Loading...
Searching...
No Matches
debug.hpp
Go to the documentation of this file.
// Copyright 2011 Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of Google Inc. nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if !defined(LUTOK_DEBUG_HPP)
#define LUTOK_DEBUG_HPP
#include <string>
#include <memory>
namespace lutok {
class state;
class debug {
struct impl;
std::shared_ptr< impl > _pimpl;
public:
debug(void);
~debug(void);
void get_info(state&, const std::string&);
void get_stack(state&, const int);
int event(void) const;
std::string name(void) const;
std::string name_what(void) const;
std::string what(void) const;
std::string source(void) const;
int current_line(void) const;
int n_ups(void) const;
int line_defined(void) const;
int last_line_defined(void) const;
std::string short_src(void) const;
};
} // namespace lutok
#endif // !defined(LUTOK_DEBUG_HPP)
lutok::debug::impl
Internal implementation for lutok::debug.
Definition debug.cpp:40
lutok::debug::get_info
void get_info(state &, const std::string &)
Wrapper around lua_getinfo.
Definition debug.cpp:67
lutok::debug::last_line_defined
int last_line_defined(void) const
Accessor for the 'lastlinedefined' field of lua_Debug.
Definition debug.cpp:178
lutok::debug::~debug
~debug(void)
Destructor.
Definition debug.cpp:54
lutok::debug::source
std::string source(void) const
Accessor for the 'source' field of lua_Debug.
Definition debug.cpp:136
lutok::debug::current_line
int current_line(void) const
Accessor for the 'currentline' field of lua_Debug.
Definition debug.cpp:147
lutok::debug::line_defined
int line_defined(void) const
Accessor for the 'linedefined' field of lua_Debug.
Definition debug.cpp:167
lutok::debug::get_stack
void get_stack(state &, const int)
Wrapper around lua_getstack.
Definition debug.cpp:81
lutok::debug::event
int event(void) const
Accessor for the 'event' field of lua_Debug.
Definition debug.cpp:93
lutok::debug::name
std::string name(void) const
Accessor for the 'name' field of lua_Debug.
Definition debug.cpp:103
lutok::debug::_pimpl
std::shared_ptr< impl > _pimpl
Pointer to the shared internal implementation.
Definition debug.hpp:58
lutok::debug::n_ups
int n_ups(void) const
Accessor for the 'nups' field of lua_Debug.
Definition debug.cpp:157
lutok::debug::debug
debug(void)
Constructor for an empty debug structure.
Definition debug.cpp:47
lutok::debug::short_src
std::string short_src(void) const
Accessor for the 'short_src' field of lua_Debug.
Definition debug.cpp:188
lutok::debug::name_what
std::string name_what(void) const
Accessor for the 'namewhat' field of lua_Debug.
Definition debug.cpp:114
lutok::debug::what
std::string what(void) const
Accessor for the 'what' field of lua_Debug.
Definition debug.cpp:125
lutok::state
A RAII model for the Lua state.
Definition state.hpp:71