Commit bf408924 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added set of standard per object datas

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15220 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fca8ddfa
......@@ -100,6 +100,31 @@ class DLLEXPORT PerObjectData {
};
//=============================================================================
#define PER_OBJECT_DATA(_CLASS, _VALUE) \
class DLLEXPORT _CLASS : public PerObjectData { \
\
public: \
inline _CLASS() { } \
inline _CLASS(const _VALUE& _x) : data_(_x) { } \
inline ~_CLASS() { } \
inline virtual _CLASS* copyPerObjectData() { return new _CLASS(data_); } \
inline _VALUE& data() { return data_; } \
inline const _VALUE& data() const { return data_; } \
private: \
_VALUE data_; \
}
//=============================================================================
PER_OBJECT_DATA(BoolPerObjectData, bool );
PER_OBJECT_DATA(CharPerObjectData, char );
PER_OBJECT_DATA(UCharPerObjectData, unsigned char);
PER_OBJECT_DATA(IntPerObjectData, int );
PER_OBJECT_DATA(UIntPerObjectData, unsigned int );
PER_OBJECT_DATA(FloatPerObjectData, float );
PER_OBJECT_DATA(DoublePerObjectData, double );
//=============================================================================
#endif // PEROBJECTDATA_HH defined
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment