Leviathan  0.8.0.0
Leviathan game engine
Leviathan::ObjectFileListProper Class Reference

Implementation of ObjectFileList. More...

#include <ObjectFile.h>

+ Inheritance diagram for Leviathan::ObjectFileListProper:

Public Member Functions

DLLEXPORT ObjectFileListProper (const std::string &name)
 
virtual DLLEXPORT bool AddVariable (std::shared_ptr< NamedVariableList > var)
 Adds a new variable. More...
 
virtual DLLEXPORT NamedVarsGetVariables ()
 Gets a reference to the underlying variables. More...
 
virtual DLLEXPORT const std::string & GetName () const
 Gets the name of this list. More...
 
- Public Member Functions inherited from Leviathan::ObjectFileList
virtual DLLEXPORT ~ObjectFileList ()
 

Protected Attributes

std::string Name
 
NamedVars Variables
 

Additional Inherited Members

- Protected Member Functions inherited from Leviathan::ObjectFileList
 ObjectFileList ()
 

Detailed Description

Implementation of ObjectFileList.

See also
ObjectFileList

Definition at line 49 of file ObjectFile.h.

Constructor & Destructor Documentation

◆ ObjectFileListProper()

DLLEXPORT Leviathan::ObjectFileListProper::ObjectFileListProper ( const std::string &  name)

Definition at line 201 of file ObjectFile.cpp.

201  :
202  Name(name) {
203 
204 }

Member Function Documentation

◆ AddVariable()

DLLEXPORT bool Leviathan::ObjectFileListProper::AddVariable ( std::shared_ptr< NamedVariableList var)
virtual

Adds a new variable.

Returns
False when the name conflicts, True otherwise

Implements Leviathan::ObjectFileList.

Definition at line 210 of file ObjectFile.cpp.

210  {
211 
212  if (!var)
213  return false;
214 
215  // Make sure that name is not in use //
216  if (Variables.Find(var->GetName()) < Variables.GetVariableCount()) {
217  return false;
218  }
219 
220  // Add it //
221  Variables.AddVar(var);
222  return true;
223 }
size_t Find(const std::string &name) const
Definition: NamedVars.h:363
DLLEXPORT size_t GetVariableCount() const
Returns the size of the internal variable vector.
Definition: NamedVars.cpp:1300
DLLEXPORT void AddVar(NamedVariableList *newvaluetoadd)
Definition: NamedVars.cpp:1193

◆ GetName()

DLLEXPORT const std::string & Leviathan::ObjectFileListProper::GetName ( ) const
virtual

Gets the name of this list.

Implements Leviathan::ObjectFileList.

Definition at line 206 of file ObjectFile.cpp.

206  {
207  return Name;
208 }

◆ GetVariables()

DLLEXPORT NamedVars & Leviathan::ObjectFileListProper::GetVariables ( )
virtual

Gets a reference to the underlying variables.

Implements Leviathan::ObjectFileList.

Definition at line 225 of file ObjectFile.cpp.

225  {
226  return Variables;
227 }

Member Data Documentation

◆ Name

std::string Leviathan::ObjectFileListProper::Name
protected

Definition at line 64 of file ObjectFile.h.

◆ Variables

NamedVars Leviathan::ObjectFileListProper::Variables
protected

Definition at line 65 of file ObjectFile.h.


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