WARPXM v1.10.0
Loading...
Searching...
No Matches
wxobject.h
Go to the documentation of this file.
1#ifndef wxobject_h
2#define wxobject_h
3
4// STL includes
5#include <iostream>
6#include <string>
7
8// forward declarations
9class WxIoBase;
10struct WxIoNodeTypev;
11typedef WxIoNodeTypev* WxIoNodeType; // this is actually a duplicate, must stay consistent
12class WxMsgBase;
13class WxCryptSet;
14
54{
55public:
57 virtual ~WxObject();
58
64 void setIo(WxIoBase& io);
65
71 void setMsg(WxMsgBase& msg);
72
79
85 const WxIoBase& getIo() const;
86
93
99 const WxMsgBase& getMsg() const;
100
108 virtual void setup(const WxCryptSet& wxc);
109
116 virtual void init();
117
123 virtual void finishBuild();
124
132 virtual void load(WxIoBase& io, const WxIoNodeType& grpNode);
133
142 virtual void dump(WxIoBase& io, WxIoNodeType& grpNode) const;
143
149 virtual std::string name() const;
150
156 void setName(const std::string& nm);
157
158protected:
165
173 WxObject(const std::string& name);
174
175private:
179 std::string _name;
183 WxIoBase* _io;
187 WxMsgBase* _msg;
191 bool _hasBeenSetup;
192};
193
195#endif // wxobject_h
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
Provides an abstract interface for access to hierachical datasets.
Definition: wxiobase.h:25
Provides an abstract interface for message based communication between different processes.
Definition: wxmsgbase.h:22
WxObject is a base class for WarpX classes which need to go through a creation/destruction cycle with...
Definition: wxobject.h:54
virtual std::string name() const
Get name of object.
virtual ~WxObject()
Dtor: destroy object.
void setMsg(WxMsgBase &msg)
Set the msg pointer for use in object.
void setIo(WxIoBase &io)
Set the I/O pointer for use in object.
virtual void setup(const WxCryptSet &wxc)
Setup object using supplied crypset.
virtual void dump(WxIoBase &io, WxIoNodeType &grpNode) const
Dump object to file.
void setName(const std::string &nm)
Set object's name.
WxIoBase & getIo()
Return reference to I/O object.
WxMsgBase & getMsg()
Return reference to msg object.
virtual void init()
Initialize the object.
virtual void load(WxIoBase &io, const WxIoNodeType &grpNode)
Load object from file.
const WxIoBase & getIo() const
Return constant reference to I/O object.
virtual void finishBuild()
Finish building the object.
WxObject(const std::string &name)
Create object with given name bypassing object setup phase Protected because there is no reason to ha...
const WxMsgBase & getMsg() const
Return const reference to msg object.
WxObject()
Create object, that will be initialized subsequently.
Provides a means for derived messengers to return implimentation specific message status flags and da...
Definition: wxiotmpl.h:23
WxIoNodeTypev * WxIoNodeType
Definition: wxobject.h:11