Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
cartographer::common::LuaParameterDictionary Class Reference

#include <lua_parameter_dictionary.h>

Public Member Functions

std::vector< std::unique_ptr< LuaParameterDictionary > > GetArrayValuesAsDictionaries ()
 
std::vector< double > GetArrayValuesAsDoubles ()
 
std::vector< string > GetArrayValuesAsStrings ()
 
bool GetBool (const string &key)
 
std::unique_ptr< LuaParameterDictionaryGetDictionary (const string &key)
 
double GetDouble (const string &key)
 
int GetInt (const string &key)
 
std::vector< string > GetKeys () const
 
int GetNonNegativeInt (const string &key)
 
string GetString (const string &key)
 
bool HasKey (const string &key) const
 
 LuaParameterDictionary (const string &code, std::unique_ptr< FileResolver > file_resolver)
 
 LuaParameterDictionary (const LuaParameterDictionary &)=delete
 
LuaParameterDictionaryoperator= (const LuaParameterDictionary &)=delete
 
string ToString () const
 
 ~LuaParameterDictionary ()
 

Static Public Member Functions

static std::unique_ptr< LuaParameterDictionaryNonReferenceCounted (const string &code, std::unique_ptr< FileResolver > file_resolver)
 

Private Types

enum  Quoted { Quoted::YES, Quoted::NO }
 
enum  ReferenceCount { ReferenceCount::YES, ReferenceCount::NO }
 

Private Member Functions

void CheckAllKeysWereUsedExactlyOnceAndReset ()
 
void CheckHasKey (const string &key) const
 
void CheckHasKeyAndReference (const string &key)
 
string DoToString (const string &indent) const
 
 LuaParameterDictionary (const string &code, ReferenceCount reference_count, std::unique_ptr< FileResolver > file_resolver)
 
 LuaParameterDictionary (lua_State *L, ReferenceCount reference_count, std::shared_ptr< FileResolver > file_resolver)
 
bool PopBool () const
 
std::unique_ptr< LuaParameterDictionaryPopDictionary (ReferenceCount reference_count) const
 
double PopDouble () const
 
int PopInt () const
 
string PopString (Quoted quoted) const
 

Static Private Member Functions

static int LuaInclude (lua_State *L)
 
static int LuaRead (lua_State *L)
 

Private Attributes

const std::shared_ptr< FileResolverfile_resolver_
 
std::vector< string > included_files_
 
int index_into_reference_table_
 
lua_State * L_
 
const ReferenceCount reference_count_
 
std::map< string, int > reference_counts_
 

Detailed Description

Definition at line 42 of file lua_parameter_dictionary.h.

Member Enumeration Documentation

Enumerator
YES 
NO 

Definition at line 102 of file lua_parameter_dictionary.h.

Enumerator
YES 
NO 

Definition at line 83 of file lua_parameter_dictionary.h.

Constructor & Destructor Documentation

cartographer::common::LuaParameterDictionary::LuaParameterDictionary ( const string &  code,
std::unique_ptr< FileResolver file_resolver 
)

Definition at line 155 of file lua_parameter_dictionary.cc.

cartographer::common::LuaParameterDictionary::LuaParameterDictionary ( const LuaParameterDictionary )
delete
cartographer::common::LuaParameterDictionary::~LuaParameterDictionary ( )

Definition at line 198 of file lua_parameter_dictionary.cc.

cartographer::common::LuaParameterDictionary::LuaParameterDictionary ( const string &  code,
ReferenceCount  reference_count,
std::unique_ptr< FileResolver file_resolver 
)
private

Definition at line 160 of file lua_parameter_dictionary.cc.

cartographer::common::LuaParameterDictionary::LuaParameterDictionary ( lua_State *  L,
ReferenceCount  reference_count,
std::shared_ptr< FileResolver file_resolver 
)
private

Definition at line 181 of file lua_parameter_dictionary.cc.

Member Function Documentation

void cartographer::common::LuaParameterDictionary::CheckAllKeysWereUsedExactlyOnceAndReset ( )
private

Definition at line 407 of file lua_parameter_dictionary.cc.

void cartographer::common::LuaParameterDictionary::CheckHasKey ( const string &  key) const
private

Definition at line 397 of file lua_parameter_dictionary.cc.

void cartographer::common::LuaParameterDictionary::CheckHasKeyAndReference ( const string &  key)
private

Definition at line 402 of file lua_parameter_dictionary.cc.

string cartographer::common::LuaParameterDictionary::DoToString ( const string &  indent) const
private

Definition at line 300 of file lua_parameter_dictionary.cc.

std::vector< std::unique_ptr< LuaParameterDictionary > > cartographer::common::LuaParameterDictionary::GetArrayValuesAsDictionaries ( )

Definition at line 382 of file lua_parameter_dictionary.cc.

std::vector< double > cartographer::common::LuaParameterDictionary::GetArrayValuesAsDoubles ( )

Definition at line 375 of file lua_parameter_dictionary.cc.

std::vector< string > cartographer::common::LuaParameterDictionary::GetArrayValuesAsStrings ( )

Definition at line 390 of file lua_parameter_dictionary.cc.

bool cartographer::common::LuaParameterDictionary::GetBool ( const string &  key)

Definition at line 270 of file lua_parameter_dictionary.cc.

std::unique_ptr< LuaParameterDictionary > cartographer::common::LuaParameterDictionary::GetDictionary ( const string &  key)

Definition at line 283 of file lua_parameter_dictionary.cc.

double cartographer::common::LuaParameterDictionary::GetDouble ( const string &  key)

Definition at line 244 of file lua_parameter_dictionary.cc.

int cartographer::common::LuaParameterDictionary::GetInt ( const string &  key)

Definition at line 257 of file lua_parameter_dictionary.cc.

std::vector< string > cartographer::common::LuaParameterDictionary::GetKeys ( ) const

Definition at line 209 of file lua_parameter_dictionary.cc.

int cartographer::common::LuaParameterDictionary::GetNonNegativeInt ( const string &  key)

Definition at line 417 of file lua_parameter_dictionary.cc.

string cartographer::common::LuaParameterDictionary::GetString ( const string &  key)

Definition at line 227 of file lua_parameter_dictionary.cc.

bool cartographer::common::LuaParameterDictionary::HasKey ( const string &  key) const

Definition at line 223 of file lua_parameter_dictionary.cc.

int cartographer::common::LuaParameterDictionary::LuaInclude ( lua_State *  L)
staticprivate

Definition at line 425 of file lua_parameter_dictionary.cc.

int cartographer::common::LuaParameterDictionary::LuaRead ( lua_State *  L)
staticprivate

Definition at line 458 of file lua_parameter_dictionary.cc.

std::unique_ptr< LuaParameterDictionary > cartographer::common::LuaParameterDictionary::NonReferenceCounted ( const string &  code,
std::unique_ptr< FileResolver file_resolver 
)
static

Definition at line 149 of file lua_parameter_dictionary.cc.

LuaParameterDictionary& cartographer::common::LuaParameterDictionary::operator= ( const LuaParameterDictionary )
delete
bool cartographer::common::LuaParameterDictionary::PopBool ( ) const
private

Definition at line 276 of file lua_parameter_dictionary.cc.

std::unique_ptr< LuaParameterDictionary > cartographer::common::LuaParameterDictionary::PopDictionary ( ReferenceCount  reference_count) const
private

Definition at line 290 of file lua_parameter_dictionary.cc.

double cartographer::common::LuaParameterDictionary::PopDouble ( ) const
private

Definition at line 250 of file lua_parameter_dictionary.cc.

int cartographer::common::LuaParameterDictionary::PopInt ( ) const
private

Definition at line 263 of file lua_parameter_dictionary.cc.

string cartographer::common::LuaParameterDictionary::PopString ( Quoted  quoted) const
private

Definition at line 233 of file lua_parameter_dictionary.cc.

string cartographer::common::LuaParameterDictionary::ToString ( ) const

Definition at line 373 of file lua_parameter_dictionary.cc.

Member Data Documentation

const std::shared_ptr<FileResolver> cartographer::common::LuaParameterDictionary::file_resolver_
private

Definition at line 131 of file lua_parameter_dictionary.h.

std::vector<string> cartographer::common::LuaParameterDictionary::included_files_
private

Definition at line 142 of file lua_parameter_dictionary.h.

int cartographer::common::LuaParameterDictionary::index_into_reference_table_
private

Definition at line 128 of file lua_parameter_dictionary.h.

lua_State* cartographer::common::LuaParameterDictionary::L_
private

Definition at line 127 of file lua_parameter_dictionary.h.

const ReferenceCount cartographer::common::LuaParameterDictionary::reference_count_
private

Definition at line 134 of file lua_parameter_dictionary.h.

std::map<string, int> cartographer::common::LuaParameterDictionary::reference_counts_
private

Definition at line 138 of file lua_parameter_dictionary.h.


The documentation for this class was generated from the following files:


cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:39