33 virtual bool write(FILE* f,
bool bin,
unsigned int fg)
const {
45 virtual bool read(FILE* f,
bool bin,
unsigned int fg) {
70 virtual char const*
ctype()
const {
71 return typeid(*this).name();
77 virtual std::string
type()
const {
78 return std::string(
ctype());
99 #endif // oo_ObjBase_H__
static char const * ctypeBase()
用C-style string回傳base的type name
virtual ObjBase * create() const
回傳一個new出來的物件, 預設implement為直接回傳 NULL
一切物件的Base, 並要求每個物件都要有read, write, create, ... 等功能
virtual ObjBase * copyFrom(ObjBase const *b)
複製, 預設使用operator=
virtual char const * ctype() const
用C-style string回傳這個class的type name
virtual bool read(FILE *f, bool bin, unsigned int fg)
將物件從檔案讀出, 預設implement為直接回傳 false
ObjBase()
Constructor with doing nothing.
static std::string typeBase()
用std::string回傳base的type name
virtual bool write(FILE *f, bool bin, unsigned int fg) const
將物件寫入檔案, 預設implement為直接回傳 false
virtual std::string type() const
用std::string回傳這個class的type name