8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
12 #include <sys/types.h>
17 #include "IPhysicsMovableItem.h"
18 #include "IPhysicsBody.h"
20 #include "MovableItem.h"
76 {
Std_TraceMsg(0,
"Caught Error in desctructor of Gain\r\n",
"", -1,
false,
true);}
179 AnimatBase::Copy(lpSource);
181 Gain *lpOrig =
dynamic_cast<Gain *
>(lpSource);
190 bool Gain::SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError)
195 if(strDataType ==
"USELIMITS")
201 if(strDataType ==
"LOWERLIMIT")
207 if(strDataType ==
"LOWEROUTPUT")
213 if(strDataType ==
"UPPERLIMIT")
219 if(strDataType ==
"UPPEROUTPUT")
227 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
236 aryProperties.Add(
new TypeProperty(
"UseLimits", AnimatPropertyType::Boolean, AnimatPropertyDirection::Set));
237 aryProperties.Add(
new TypeProperty(
"LowerLimit", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
238 aryProperties.Add(
new TypeProperty(
"LowerOutput", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
239 aryProperties.Add(
new TypeProperty(
"UpperLimit", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
240 aryProperties.Add(
new TypeProperty(
"UpperOutput", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
295 std::string strModuleName = oXml.
GetChildString(
"ModuleName",
"");
301 THROW_TEXT_ERROR(Al_Err_lConvertingClassToType, Al_Err_strConvertingClassToType,
"CurrentGraph");
Gain()
Default constructor.
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.
Simulates the entire environment.
Root namespace for the base simulation library for AnimatLab.
bool UseLimits()
Tells whether limits should be used.
Declares the body part class.
float m_fltUpperLimit
The upper limit value that is checked if UseLimits is true.
std::string m_strError
The error message.
Information about the standard error.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
Class that stores information about types for QueryProperty information.
long m_lError
The error number.
float UpperLimit()
Gets the upper limit.
Declares the link base class.
Declares the key frame class.
Declares the joint class.
Declares the organism class.
bool Std_IsAboveMin(int iMinVal, int iVal, bool bThrowError, std::string strParamName, bool bInclusiveLimit)
Tests if a number is above a minimum value.
float LowerOutput()
Gets the lower output.
Declares the activated item class.
float m_fltLowerLimit
The lower limit value that is checked if UseLimits is true.
virtual CStdSerialize * CreateObject(std::string strModule, std::string strClassName, std::string strType, bool bThrowError=true)
Creates an object using a class factory.
Declares a light manager object.
Declares the bounding box class.
Declares the gain base class.
A standard xml manipulation class.
float UpperOutput()
Gets the upper output.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
virtual std::string GetChildString(std::string strElementName)
Gets a string value from the element with the specified name.
bool Std_ToBool(int iVal)
Converts a value toa bool.
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 bool GetChildBool(std::string strElementName)
Gets a bool value from the element with the specified name.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
float m_fltLowerOutput
The lower limit output that is used if UseLimits is true and the input is below the lower limit...
float LowerLimit()
Gets the lower limit.
virtual ~Gain()
Destructor.
Declares the data chart manager class.
Declares the rigid body class.
virtual bool IntoChildElement(std::string strElementName, bool bThrowError=true)
Goes into the child element with the specified name.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
float m_fltUpperOutput
The upper limit output that is used if UseLimits is true and the input is above the upper limit...
Declares the structure class.
Declares the odor type class.
Standard serialize class.
Declares the simulator class.
Declares the neural module class.
bool m_bUseLimits
Determines whether or not the gain uses upper and lower limits during its calculations.
Declares the activated item manager class.
Declares the external stimuli manager class.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
Gain * LoadGain(Simulator *lpSim, std::string strName, CStdXml &oXml)
Loads a gain object.
Declares the receptive field class.
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.