Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
ComponentTestHelper Class Reference

Class to test a single component. More...

#include <ComponentTest.h>

Public Member Functions

 ComponentTestHelper ()
 
ScriptInterfaceGetScriptInterface ()
 
CSimContextGetSimContext ()
 
template<typename T >
TAdd (EComponentTypeId cid, const std::string &xml, entity_id_t ent=10)
 Call this once to initialise the test helper with a component. More...
 
void AddMock (entity_id_t ent, EInterfaceId iid, IComponent &component)
 
void HandleMessage (IComponent *cmp, const CMessage &msg, bool global)
 
void Roundtrip (bool verbose=false)
 Checks that the object roundtrips through its serialize/deserialize functions correctly. More...
 

Private Attributes

CSimContext m_Context
 
CComponentManager m_ComponentManager
 
CParamNode m_Param
 
IComponentm_Cmp
 
EComponentTypeId m_Cid
 

Detailed Description

Class to test a single component.

Definition at line 46 of file ComponentTest.h.

Constructor & Destructor Documentation

ComponentTestHelper::ComponentTestHelper ( )
inline

Definition at line 55 of file ComponentTest.h.

Member Function Documentation

template<typename T >
T* ComponentTestHelper::Add ( EComponentTypeId  cid,
const std::string &  xml,
entity_id_t  ent = 10 
)
inline

Call this once to initialise the test helper with a component.

Definition at line 75 of file ComponentTest.h.

void ComponentTestHelper::AddMock ( entity_id_t  ent,
EInterfaceId  iid,
IComponent component 
)
inline

Definition at line 97 of file ComponentTest.h.

ScriptInterface& ComponentTestHelper::GetScriptInterface ( )
inline

Definition at line 61 of file ComponentTest.h.

CSimContext& ComponentTestHelper::GetSimContext ( )
inline

Definition at line 66 of file ComponentTest.h.

void ComponentTestHelper::HandleMessage ( IComponent cmp,
const CMessage msg,
bool  global 
)
inline

Definition at line 112 of file ComponentTest.h.

void ComponentTestHelper::Roundtrip ( bool  verbose = false)
inline

Checks that the object roundtrips through its serialize/deserialize functions correctly.

Computes the debug output, hash, and binary serialization; then deserializes into a new system and checks the serialization outputs are unchanged.

Definition at line 122 of file ComponentTest.h.

Member Data Documentation

EComponentTypeId ComponentTestHelper::m_Cid
private

Definition at line 52 of file ComponentTest.h.

IComponent* ComponentTestHelper::m_Cmp
private

Definition at line 51 of file ComponentTest.h.

CComponentManager ComponentTestHelper::m_ComponentManager
private

Definition at line 49 of file ComponentTest.h.

CSimContext ComponentTestHelper::m_Context
private

Definition at line 48 of file ComponentTest.h.

CParamNode ComponentTestHelper::m_Param
private

Definition at line 50 of file ComponentTest.h.


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