Leviathan  0.8.0.0
Leviathan game engine
Leviathan::ObjectFileTemplateObject Class Reference

Class that represents an object created from a template. More...

#include <ObjectFile.h>

+ Inheritance diagram for Leviathan::ObjectFileTemplateObject:

Public Member Functions

DLLEXPORT ObjectFileTemplateObject (const std::string &name, const std::string &typesname, std::vector< std::unique_ptr< std::string >> &&prefix)
 Creates an ObjectFileTemplateObject as a wrapper around an ObjectFileObject. More...
 
virtual DLLEXPORT bool IsThisTemplated () const
 Returns true when this is a templated object. More...
 
- Public Member Functions inherited from Leviathan::ObjectFileObjectProper
DLLEXPORT ObjectFileObjectProper (const std::string &name, const std::string &typesname, std::vector< std::unique_ptr< std::string >> &&prefix)
 
DLLEXPORT ~ObjectFileObjectProper ()
 
DLLEXPORT const std::string & GetName () const override
 Gets the name of this object. More...
 
DLLEXPORT bool AddVariableList (std::unique_ptr< ObjectFileList > &&list) override
 Add a variable list to this object. More...
 
DLLEXPORT bool AddTextBlock (std::unique_ptr< ObjectFileTextBlock > &&tblock) override
 Add a text block to this object. More...
 
DLLEXPORT void AddScriptScript (std::shared_ptr< ScriptScript > script) override
 Add a script block to this object. More...
 
DLLEXPORT const std::string & GetTypeName () const override
 Gets the name of the type. More...
 
DLLEXPORT ObjectFileListGetListWithName (const std::string &name) const override
 Gets an ObjectFileList that matches the name. More...
 
DLLEXPORT ObjectFileTextBlockGetTextBlockWithName (const std::string &name) const override
 Gets an ObjectFileTextBlock that matches the name. More...
 
DLLEXPORT std::shared_ptr< ScriptScriptGetScript () const override
 Returns a std::shared_ptr to our script. More...
 
DLLEXPORT size_t GetPrefixesCount () const override
 Gets the number of prefixes. More...
 
DLLEXPORT const std::string & GetPrefix (size_t index) const override
 Gets a prefix prom an index ExceptionInvalidArgument when the index is out of bounds. More...
 
DLLEXPORT const std::string * GetPrefixPtr (size_t index) const
 
DLLEXPORT size_t GetListCount () const override
 Gets the number of lists in this object. More...
 
DLLEXPORT ObjectFileListGetList (size_t index) const override
 Gets a list from an index ExceptionInvalidArgument when the index is out of bounds. More...
 
DLLEXPORT size_t GetTextBlockCount () const override
 Gets the number of text blocks in this object. More...
 
DLLEXPORT ObjectFileTextBlockGetTextBlock (size_t index) const override
 Gets a text block from an index ExceptionInvalidArgument when the index is out of bounds. More...
 
DLLEXPORT std::string Serialize (size_t indentspaces=0) const override
 
- Public Member Functions inherited from Leviathan::ObjectFileObject
virtual DLLEXPORT ~ObjectFileObject ()
 

Additional Inherited Members

- Protected Member Functions inherited from Leviathan::ObjectFileObject
 ObjectFileObject ()
 
- Protected Attributes inherited from Leviathan::ObjectFileObjectProper
std::string Name
 
std::string TName
 
std::vector< std::unique_ptr< std::string > > Prefixes
 
std::vector< ObjectFileList * > Contents
 
std::vector< ObjectFileTextBlock * > TextBlocks
 
std::shared_ptr< ScriptScriptScript
 

Detailed Description

Class that represents an object created from a template.

Definition at line 261 of file ObjectFile.h.

Constructor & Destructor Documentation

◆ ObjectFileTemplateObject()

DLLEXPORT Leviathan::ObjectFileTemplateObject::ObjectFileTemplateObject ( const std::string &  name,
const std::string &  typesname,
std::vector< std::unique_ptr< std::string >> &&  prefix 
)

Creates an ObjectFileTemplateObject as a wrapper around an ObjectFileObject.

See also
ObjectFileObjectProper

Definition at line 814 of file ObjectFile.cpp.

815  :
816  ObjectFileObjectProper(name, typesname, std::move(prefix)) {
817 
818 }
DLLEXPORT ObjectFileObjectProper(const std::string &name, const std::string &typesname, std::vector< std::unique_ptr< std::string >> &&prefix)
Definition: ObjectFile.cpp:233

Member Function Documentation

◆ IsThisTemplated()

virtual DLLEXPORT bool Leviathan::ObjectFileTemplateObject::IsThisTemplated ( ) const
inlinevirtual

Returns true when this is a templated object.

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

Reimplemented from Leviathan::ObjectFileObjectProper.

Definition at line 271 of file ObjectFile.h.

271  {
272 
273  return true;
274  }

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