17 #ifndef AGXSDK_LOGLISTENER_H
18 #define AGXSDK_LOGLISTENER_H
47 bool newFilePerTimeStep =
false,
48 const std::string& valueSeparator =
"\t");
55 inline void setFileName(
const std::string& fileName );
56 inline void setNewFilePerTimeStep(
bool newFilePerTimeStep );
57 inline void setValueSeparator(
const std::string& valueSeparator );
58 inline void setPrecision(
int precision );
61 inline std::string getFileName()
const;
62 inline bool getNewFilePerTimeStep()
const;
63 inline std::string getValueSeparator()
const;
64 inline int getPrecision()
const;
74 void writeToFile(
const std::string& text,
const agx::TimeStamp& time,
bool append );
#define AGXPHYSICS_EXPORT
Abstract class for logging properties per time step to a file/standard out.
virtual void post(const agx::TimeStamp &)
inherited from StepEventListener
void setValueSeparator(const std::string &valueSeparator)
bool getNewFilePerTimeStep() const
std::string getValueSeparator() const
virtual void pre(const agx::TimeStamp &)
inherited from StepEventListener
void setPrecision(int precision)
void setNumberFormat(NumberFormat format)
LogListener(const std::string &fileName="", bool newFilePerTimeStep=false, const std::string &valueSeparator="\t")
LogListener constructor.
NumberFormat getNumberFormat() const
void setNewFilePerTimeStep(bool newFilePerTimeStep)
std::string getFileName() const
void setFileName(const std::string &fileName)
virtual void collectData(std::stringstream &, const agx::TimeStamp &)
Implement this function when inheriting.
virtual void obtainHeader(std::stringstream &)
Implement this function when inheriting.
bool m_newFilePerTimeStep
Derive from this class to implement a listener for simulation step events.
Smart pointer for handling referenced counted objects.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
agx::ref_ptr< LogListener > LogListenerRef