Leviathan  0.8.0.0
Leviathan game engine
Leviathan::ObjectFileObject Class Referenceabstract

Interface for object file objects to implement. More...

#include <ObjectFile.h>

+ Inheritance diagram for Leviathan::ObjectFileObject:

Public Member Functions

virtual DLLEXPORT ~ObjectFileObject ()
 
virtual DLLEXPORT const std::string & GetName () const =0
 Gets the name of this object. More...
 
virtual DLLEXPORT bool AddVariableList (std::unique_ptr< ObjectFileList > &&list)=0
 Add a variable list to this object. More...
 
virtual DLLEXPORT bool AddTextBlock (std::unique_ptr< ObjectFileTextBlock > &&tblock)=0
 Add a text block to this object. More...
 
virtual DLLEXPORT void AddScriptScript (std::shared_ptr< ScriptScript > script)=0
 Add a script block to this object. More...
 
virtual DLLEXPORT const std::string & GetTypeName () const =0
 Gets the name of the type. More...
 
virtual DLLEXPORT ObjectFileListGetListWithName (const std::string &name) const =0
 Gets an ObjectFileList that matches the name. More...
 
virtual DLLEXPORT size_t GetListCount () const =0
 Gets the number of lists in this object. More...
 
virtual DLLEXPORT ObjectFileListGetList (size_t index) const =0
 Gets a list from an index \except ExceptionInvalidArgument when the index is out of bounds. More...
 
virtual DLLEXPORT ObjectFileTextBlockGetTextBlockWithName (const std::string &name) const =0
 Gets an ObjectFileTextBlock that matches the name. More...
 
virtual DLLEXPORT size_t GetTextBlockCount () const =0
 Gets the number of text blocks in this object. More...
 
virtual DLLEXPORT ObjectFileTextBlockGetTextBlock (size_t index) const =0
 Gets a text block from an index \except ExceptionInvalidArgument when the index is out of bounds. More...
 
virtual DLLEXPORT std::shared_ptr< ScriptScriptGetScript () const =0
 Returns a std::shared_ptr to our script. More...
 
virtual DLLEXPORT size_t GetPrefixesCount () const =0
 Gets the number of prefixes. More...
 
virtual DLLEXPORT const std::string & GetPrefix (size_t index) const =0
 Gets a prefix prom an index \except ExceptionInvalidArgument when the index is out of bounds. More...
 
virtual DLLEXPORT bool IsThisTemplated () const =0
 Returns true when this is a templated object. More...
 
virtual DLLEXPORT std::string Serialize (size_t indentspaces=0) const =0
 

Protected Member Functions

 ObjectFileObject ()
 

Detailed Description

Interface for object file objects to implement.

See also
ObjectFileObjectProper

Definition at line 122 of file ObjectFile.h.

Constructor & Destructor Documentation

◆ ~ObjectFileObject()

DLLEXPORT Leviathan::ObjectFileObject::~ObjectFileObject ( )
virtual

Definition at line 469 of file ObjectFile.cpp.

469  {
470 
471 }

◆ ObjectFileObject()

Leviathan::ObjectFileObject::ObjectFileObject ( )
inlineprotected

Definition at line 198 of file ObjectFile.h.

198  {
199  };

Member Function Documentation

◆ AddScriptScript()

virtual DLLEXPORT void Leviathan::ObjectFileObject::AddScriptScript ( std::shared_ptr< ScriptScript script)
pure virtual

Add a script block to this object.

Note
Only the last set ScriptScript will remain

Implemented in Leviathan::ObjectFileObjectProper.

◆ AddTextBlock()

virtual DLLEXPORT bool Leviathan::ObjectFileObject::AddTextBlock ( std::unique_ptr< ObjectFileTextBlock > &&  tblock)
pure virtual

Add a text block to this object.

Returns
False when the name collides
Postcondition
The tblock variable will be empty

Implemented in Leviathan::ObjectFileObjectProper.

◆ AddVariableList()

virtual DLLEXPORT bool Leviathan::ObjectFileObject::AddVariableList ( std::unique_ptr< ObjectFileList > &&  list)
pure virtual

Add a variable list to this object.

Returns
False when the name collides
Postcondition
The list variable will be empty

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetList()

virtual DLLEXPORT ObjectFileList* Leviathan::ObjectFileObject::GetList ( size_t  index) const
pure virtual

Gets a list from an index \except ExceptionInvalidArgument when the index is out of bounds.

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetListCount()

virtual DLLEXPORT size_t Leviathan::ObjectFileObject::GetListCount ( ) const
pure virtual

Gets the number of lists in this object.

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetListWithName()

virtual DLLEXPORT ObjectFileList* Leviathan::ObjectFileObject::GetListWithName ( const std::string &  name) const
pure virtual

Gets an ObjectFileList that matches the name.

Returns
The object if it exists or NULL

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetName()

virtual DLLEXPORT const std::string& Leviathan::ObjectFileObject::GetName ( ) const
pure virtual

Gets the name of this object.

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetPrefix()

virtual DLLEXPORT const std::string& Leviathan::ObjectFileObject::GetPrefix ( size_t  index) const
pure virtual

Gets a prefix prom an index \except ExceptionInvalidArgument when the index is out of bounds.

See also
GetPrefixesCount

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetPrefixesCount()

virtual DLLEXPORT size_t Leviathan::ObjectFileObject::GetPrefixesCount ( ) const
pure virtual

Gets the number of prefixes.

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetScript()

virtual DLLEXPORT std::shared_ptr<ScriptScript> Leviathan::ObjectFileObject::GetScript ( ) const
pure virtual

Returns a std::shared_ptr to our script.

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetTextBlock()

virtual DLLEXPORT ObjectFileTextBlock* Leviathan::ObjectFileObject::GetTextBlock ( size_t  index) const
pure virtual

Gets a text block from an index \except ExceptionInvalidArgument when the index is out of bounds.

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetTextBlockCount()

virtual DLLEXPORT size_t Leviathan::ObjectFileObject::GetTextBlockCount ( ) const
pure virtual

Gets the number of text blocks in this object.

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetTextBlockWithName()

virtual DLLEXPORT ObjectFileTextBlock* Leviathan::ObjectFileObject::GetTextBlockWithName ( const std::string &  name) const
pure virtual

Gets an ObjectFileTextBlock that matches the name.

Returns
The object if it exists or NULL

Implemented in Leviathan::ObjectFileObjectProper.

◆ GetTypeName()

virtual DLLEXPORT const std::string& Leviathan::ObjectFileObject::GetTypeName ( ) const
pure virtual

Gets the name of the type.

Implemented in Leviathan::ObjectFileObjectProper.

◆ IsThisTemplated()

virtual DLLEXPORT bool Leviathan::ObjectFileObject::IsThisTemplated ( ) const
pure virtual

Returns true when this is a templated object.

This is used while saving to a file to avoid writing template objects

Implemented in Leviathan::ObjectFileTemplateObject, and Leviathan::ObjectFileObjectProper.

◆ Serialize()

virtual DLLEXPORT std::string Leviathan::ObjectFileObject::Serialize ( size_t  indentspaces = 0) const
pure virtual
Returns
A string representation of this object

Implemented in Leviathan::ObjectFileObjectProper.


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