8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
14 #include "IPhysicsMovableItem.h"
15 #include "IPhysicsBody.h"
17 #include "MovableItem.h"
72 {
Std_TraceMsg(0,
"Caught Error in desctructor of ContactAdapter\r\n",
"", -1,
false,
true);}
96 THROW_ERROR(Al_Err_lBodyIDBlank, Al_Err_strBodyIDBlank);
101 {
return "AnimatLab";}
117 THROW_TEXT_ERROR(Al_Err_lModuleNameBlank, Al_Err_strModuleNameBlank,
" Target Module");
122 void ContactAdapter::AddFieldPair(std::string strXml,
bool bDoNotInit)
134 void ContactAdapter::RemoveFieldPair(std::string strID,
bool bThrowError)
136 int iPos = FindFieldPairListPos(strID, bThrowError);
140 int ContactAdapter::FindFieldPairListPos(std::string strID,
bool bThrowError)
145 for(
int iIndex=0; iIndex<iCount; iIndex++)
150 THROW_TEXT_ERROR(Al_Err_lReceptiveFieldIDNotFound, Al_Err_strReceptiveFieldIDNotFound,
"ID");
161 THROW_PARAM_ERROR(Al_Err_lNodeNotFound, Al_Err_strNodeNotFound,
"ID: ",
m_strSourceBodyID);
168 for(
int iIndex=0; iIndex<iCount; iIndex++)
179 if(strType ==
"FIELDPAIR")
181 AddFieldPair(strXml, bDoNotInit);
187 THROW_PARAM_ERROR(Al_Err_lInvalidItemType, Al_Err_strInvalidItemType,
"Item Type", strItemType);
196 if(strType ==
"FIELDPAIR")
198 RemoveFieldPair(strID);
204 THROW_PARAM_ERROR(Al_Err_lInvalidItemType, Al_Err_strInvalidItemType,
"Item Type", strItemType);
212 for(
int iIndex=0; iIndex<iCount; iIndex++)
216 void ContactAdapter::Load(
CStdXml &oXml)
232 for(
int iIndex=0; iIndex<iCount; iIndex++)
269 if(lpPair)
delete lpPair;
275 if(lpPair)
delete lpPair;
276 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
virtual void Deserialize(std::string &strXml)
Deserializes a string into an xml document.
Base class file for all Animat simulation objects.
Declares the nervous system class.
Declares the simulation recorder class.
virtual void SetSystemPointers(Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify)
Sets the system pointers.
virtual bool FindChildElement(std::string strElementName, bool fThrowError=true)
Finds a child element by name.
Root namespace for the base simulation library for AnimatLab.
Declares the body part class.
virtual bool FindElement(std::string strElementName, bool fThrowError=true)
Finds an element with the specified name.
Simulator * m_lpSim
The pointer to a Simulation.
Information about the standard error.
virtual std::string ID()
Gets the unique GUID ID of this object.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
virtual void Initialize()
Initializes this object.
Declares the link base class.
Declares the key frame class.
Node * m_lpSourceNode
Pointer to the source node.
Declares the joint class.
Declares the organism class.
AnimatSim::Environment::Structure * m_lpStructure
The pointer to this items parent Structure. If this is not relevant for this object then this is NULL...
virtual void Initialize()
Initializes this object.
std::string Std_Trim(std::string strVal)
Trims a string.
Declares the activated item class.
Declares a light manager object.
Declares the receptive field pair class.
Declares the bounding box class.
Declares the gain base class.
A standard xml manipulation class.
Node * m_lpNode
The pointer to this items parent Node. If this is not relevant for this object then this is NULL...
virtual std::string GetChildString(std::string strElementName)
Gets a string value from the element with the specified name.
virtual AnimatBase * FindByID(std::string strID, bool bThrowError=true)
Searches for the object with the specified ID.
virtual void Load(StdUtils::CStdXml &oXml)
Loads the item using an XML data packet.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
virtual int NumberOfChildren()
Gets the number of children of the current element.
Base class for body parts and neural network nodes.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
bool Std_IsBlank(std::string strVal)
Trims a string and tests if a string is blank.
Declares the data chart manager class.
Declares the rigid body class.
std::string Std_CheckString(std::string strVal)
Converts a string to upper case and trims it.
Declares the structure class.
Declares the odor type class.
Declares the simulator class.
Declares the neural module class.
virtual bool FindChildByIndex(int iIndex, bool bThrowError=true)
Finds a child element by index.
std::string Std_ToUpper(std::string strVal)
Converts a string to upper case.
Declares the activated item manager class.
Declares the external stimuli manager class.
Declares the receptive field class.