AnimatLab  2
Test
DataColumn.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Charting
12  {
24  class ANIMAT_PORT DataColumn : public AnimatBase
25  {
26  protected:
28  std::string m_strTargetID;
29 
31  std::string m_strDataType;
32 
35 
38 
40  float *m_lpDataValue;
41 
44 
47 
52 
56 
57  public:
58  DataColumn();
59  virtual ~DataColumn();
60 
61  static DataColumn *CastToDerived(AnimatBase *lpBase) {return static_cast<DataColumn*>(lpBase);}
62 
63  virtual int ColumnCount();
64 
65  virtual void Name(std::string strValue);
66 
67  virtual std::string DataType();
68  virtual void DataType(std::string strType);
69 
70  virtual std::string TargetID();
71  virtual void TargetID(std::string strID);
72 
73  virtual int AppendSpaces();
74  virtual void AppendSpaces(int iSpaces);
75 
76  virtual bool IsInitialized();
77  virtual void IsInitialized(bool bVal);
78 
79  virtual int ColumnIndex();
80  virtual void ColumnIndex(int iIndex);
81 
82  virtual int RowIndex();
83  virtual void RowIndex(int iIndex);
84 
85  virtual float *DataValue();
86 
100  virtual void SetSystemPointers(Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, DataChart *lpChart, bool bVerify);
101  virtual void VerifySystemPointers();
102  virtual void Initialize();
103  virtual void ReInitialize();
104  virtual void StepSimulation();
105  virtual bool operator<(DataColumn *lpColumn);
106  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
107  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
108 
109  virtual void Activate();
110  virtual void Deactivate();
111 
112  virtual void Load(CStdXml &oXml);
113  virtual void SaveColumnNames(std::ofstream &oStream);
114  };
115 
116  bool ANIMAT_PORT LessThanDataColumnCompare(DataColumn *lpColumn1, DataColumn *lpColumn2);
117 
118  } //Charting
119 } //AnimatSim
Simulates the entire environment.
Definition: Simulator.h:31
Root namespace for the base simulation library for AnimatLab.
bool m_bInitialized
true it this chart has been initialized
Definition: DataColumn.h:46
Data column class.
Definition: DataColumn.h:24
int m_iAppendSpaces
Determines whether how many other tabs are added after this data is written to the file...
Definition: DataColumn.h:43
Data chart base class.
Definition: DataChart.h:31
bool LessThanDataColumnCompare(DataColumn *lpColumn1, DataColumn *lpColumn2)
Compares two DataColumn items to find the one that is less than the other.
Definition: DataColumn.cpp:389
float * m_lpDataValue
Pointer to the data variable we are collecting.
Definition: DataColumn.h:40
DataChart * m_lpChart
Pointer to the parent DataChart.
Definition: DataColumn.h:34
std::string m_strTargetID
GUID ID of the target object that contains the variable we will be collecting.
Definition: DataColumn.h:28
Animat base class.
Definition: AnimatBase.h:36
Base class for body parts and neural network nodes.
Definition: Node.h:25
AnimatBase * m_lpTarget
Pointer to the target object that contains the data variable we will be collecting.
Definition: DataColumn.h:37
std::string m_strDataType
The Data type of the variable we will be collecting. This is passed into the GetDataPointer method of...
Definition: DataColumn.h:31