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

Static Public Member Functions

static std::unique_ptr< LuaParameterDictionaryNonReferenceCounted (const std::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 std::string &key) const
 
void CheckHasKeyAndReference (const std::string &key)
 
std::string DoToString (const std::string &indent) const
 
 LuaParameterDictionary (const std::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
 
std::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< std::string > included_files_
 
int index_into_reference_table_
 
lua_State * L_
 
const ReferenceCount reference_count_
 
std::map< std::string, int > reference_counts_
 

Detailed Description

Definition at line 42 of file lua_parameter_dictionary.h.

Member Enumeration Documentation

◆ Quoted

Enumerator
YES 
NO 

Definition at line 103 of file lua_parameter_dictionary.h.

◆ ReferenceCount

Enumerator
YES 
NO 

Definition at line 83 of file lua_parameter_dictionary.h.

Constructor & Destructor Documentation

◆ LuaParameterDictionary() [1/4]

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

Definition at line 155 of file lua_parameter_dictionary.cc.

◆ LuaParameterDictionary() [2/4]

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

◆ ~LuaParameterDictionary()

cartographer::common::LuaParameterDictionary::~LuaParameterDictionary ( )

Definition at line 198 of file lua_parameter_dictionary.cc.

◆ LuaParameterDictionary() [3/4]

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

Definition at line 160 of file lua_parameter_dictionary.cc.

◆ LuaParameterDictionary() [4/4]

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

◆ CheckAllKeysWereUsedExactlyOnceAndReset()

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

Definition at line 408 of file lua_parameter_dictionary.cc.

◆ CheckHasKey()

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

Definition at line 398 of file lua_parameter_dictionary.cc.

◆ CheckHasKeyAndReference()

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

Definition at line 403 of file lua_parameter_dictionary.cc.

◆ DoToString()

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

Definition at line 300 of file lua_parameter_dictionary.cc.

◆ GetArrayValuesAsDictionaries()

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

Definition at line 383 of file lua_parameter_dictionary.cc.

◆ GetArrayValuesAsDoubles()

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

Definition at line 376 of file lua_parameter_dictionary.cc.

◆ GetArrayValuesAsStrings()

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

Definition at line 391 of file lua_parameter_dictionary.cc.

◆ GetBool()

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

Definition at line 270 of file lua_parameter_dictionary.cc.

◆ GetDictionary()

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

Definition at line 283 of file lua_parameter_dictionary.cc.

◆ GetDouble()

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

Definition at line 244 of file lua_parameter_dictionary.cc.

◆ GetInt()

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

Definition at line 257 of file lua_parameter_dictionary.cc.

◆ GetKeys()

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

Definition at line 209 of file lua_parameter_dictionary.cc.

◆ GetNonNegativeInt()

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

Definition at line 418 of file lua_parameter_dictionary.cc.

◆ GetString()

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

Definition at line 227 of file lua_parameter_dictionary.cc.

◆ HasKey()

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

Definition at line 223 of file lua_parameter_dictionary.cc.

◆ LuaInclude()

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

Definition at line 426 of file lua_parameter_dictionary.cc.

◆ LuaRead()

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

Definition at line 460 of file lua_parameter_dictionary.cc.

◆ NonReferenceCounted()

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

Definition at line 149 of file lua_parameter_dictionary.cc.

◆ operator=()

LuaParameterDictionary& cartographer::common::LuaParameterDictionary::operator= ( const LuaParameterDictionary )
delete

◆ PopBool()

bool cartographer::common::LuaParameterDictionary::PopBool ( ) const
private

Definition at line 276 of file lua_parameter_dictionary.cc.

◆ PopDictionary()

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

Definition at line 290 of file lua_parameter_dictionary.cc.

◆ PopDouble()

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

Definition at line 250 of file lua_parameter_dictionary.cc.

◆ PopInt()

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

Definition at line 263 of file lua_parameter_dictionary.cc.

◆ PopString()

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

Definition at line 233 of file lua_parameter_dictionary.cc.

◆ ToString()

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

Definition at line 374 of file lua_parameter_dictionary.cc.

Member Data Documentation

◆ file_resolver_

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

Definition at line 132 of file lua_parameter_dictionary.h.

◆ included_files_

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

Definition at line 143 of file lua_parameter_dictionary.h.

◆ index_into_reference_table_

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

Definition at line 129 of file lua_parameter_dictionary.h.

◆ L_

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

Definition at line 128 of file lua_parameter_dictionary.h.

◆ reference_count_

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

Definition at line 135 of file lua_parameter_dictionary.h.

◆ reference_counts_

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

Definition at line 139 of file lua_parameter_dictionary.h.


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


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:59