Pyrogenesis
trunk
|
Public Member Functions | |
virtual int | GetComponentTypeId () const |
virtual void | Init (const CParamNode ¶mNode) |
virtual void | Deinit () |
virtual void | Serialize (ISerializer &serialize) |
virtual void | Deserialize (const CParamNode ¶mNode, IDeserializer &deserialize) |
virtual void | HandleMessage (const CMessage &msg, bool global) |
virtual void | DisableValidation () |
Permanently disable XML validation (intended solely for test cases). More... | |
virtual const CParamNode * | LoadTemplate (entity_id_t ent, const std::string &templateName) |
Loads the template XML file identified by 'templateName' (including inheritance from parent XML files) for use with a new entity 'ent'. More... | |
virtual const CParamNode * | GetTemplate (const std::string &templateName) |
Loads the template XML file identified by 'templateName' (including inheritance from parent XML files). More... | |
virtual const CParamNode * | GetTemplateWithoutValidation (const std::string &templateName) |
Like GetTemplate, except without doing the XML validation (so it's faster but may return invalid templates). More... | |
virtual bool | TemplateExists (const std::string &templateName) const |
Check if the template XML file exists, without trying to load it. More... | |
virtual const CParamNode * | LoadLatestTemplate (entity_id_t ent) |
Returns the template most recently specified for the entity 'ent'. More... | |
virtual std::string | GetCurrentTemplateName (entity_id_t ent) const |
Returns the name of the template most recently specified for the entity 'ent'. More... | |
virtual std::vector< std::string > | FindAllTemplates (bool includeActors) const |
Returns a list of strings that could be validly passed as templateName to LoadTemplate. More... | |
virtual std::vector< std::string > | FindAllPlaceableTemplates (bool includeActors) const |
virtual std::vector< entity_id_t > | GetEntitiesUsingTemplate (const std::string &templateName) const |
Get the list of entities using the specified template. More... | |
Public Member Functions inherited from IComponent | |
virtual | ~IComponent () |
CEntityHandle | GetEntityHandle () const |
void | SetEntityHandle (CEntityHandle ent) |
entity_id_t | GetEntityId () const |
CEntityHandle | GetSystemEntity () const |
const CSimContext & | GetSimContext () const |
void | SetSimContext (const CSimContext &context) |
virtual bool | NewJSObject (ScriptInterface &scriptInterface, JS::MutableHandleObject out) const |
Returns false by default, indicating that a scripted wrapper of this IComponent is not supported. More... | |
virtual JS::Value | GetJSInstance () const |
Static Public Member Functions | |
static void | ClassInit (CComponentManager &componentManager) |
static IComponent * | Allocate (ScriptInterface &, JS::HandleValue) |
static void | Deallocate (IComponent *cmp) |
static std::string | GetSchema () |
Static Public Member Functions inherited from IComponent | |
static std::string | GetSchema () |
static u8 | GetSerializationVersion () |
Private Attributes | |
CTemplateLoader | m_templateLoader |
RelaxNGValidator | m_Validator |
bool | m_DisableValidation |
std::map< std::string, bool > | m_TemplateSchemaValidity |
std::map< entity_id_t, std::string > | m_LatestTemplates |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinevirtual |
Implements IComponent.
|
inlinevirtual |
Implements IComponent.
|
inlinevirtual |
Permanently disable XML validation (intended solely for test cases).
Implements ICmpTemplateManager.
|
virtual |
Implements ICmpTemplateManager.
|
virtual |
Returns a list of strings that could be validly passed as templateName
to LoadTemplate.
(This includes "actor|foo" etc names). Intended for use by the map editor. This is likely to be quite slow.
Implements ICmpTemplateManager.
|
inlinevirtual |
Implements IComponent.
|
virtual |
Returns the name of the template most recently specified for the entity 'ent'.
Implements ICmpTemplateManager.
|
virtual |
Get the list of entities using the specified template.
Implements ICmpTemplateManager.
|
inlinestatic |
|
virtual |
Loads the template XML file identified by 'templateName' (including inheritance from parent XML files).
The templateName syntax is the same as LoadTemplate.
Implements ICmpTemplateManager.
|
virtual |
Like GetTemplate, except without doing the XML validation (so it's faster but may return invalid templates).
Implements ICmpTemplateManager.
|
inlinevirtual |
Reimplemented from IComponent.
|
inlinevirtual |
Implements IComponent.
|
virtual |
Returns the template most recently specified for the entity 'ent'.
Used during deserialization.
Implements ICmpTemplateManager.
|
virtual |
Loads the template XML file identified by 'templateName' (including inheritance from parent XML files) for use with a new entity 'ent'.
The returned CParamNode must not be used for any entities other than 'ent'.
If templateName is of the form "actor|foo" then it will load a default stationary entity template that uses actor "foo". (This is a convenience to avoid the need for hundreds of tiny decorative-object entity templates.)
If templateName is of the form "preview|foo" then it will load a template based on entity template "foo" with the non-graphical components removed. (This is for previewing construction/placement of units.)
If templateName is of the form "corpse|foo" then it will load a template like "preview|foo" but with corpse-related components included.
If templateName is of the form "foundation|foo" then it will load a template based on entity template "foo" with various components removed and a few changed and added. (This is for constructing foundations of buildings.)
Implements ICmpTemplateManager.
|
inlinevirtual |
Implements IComponent.
|
virtual |
Check if the template XML file exists, without trying to load it.
Implements ICmpTemplateManager.
|
private |
|
private |
|
private |
|
private |
|
private |