54 lines
932 B
C
54 lines
932 B
C
|
#ifndef __GOLEM_H
|
||
|
#define __GOLEM_H
|
||
|
|
||
|
#ifndef __STRINGS_H
|
||
|
#include <strings.h>
|
||
|
#endif
|
||
|
|
||
|
#ifndef __CONFIG_H
|
||
|
class TConfig;
|
||
|
#endif
|
||
|
|
||
|
#ifndef __RELATION_H
|
||
|
class TRelation;
|
||
|
#endif
|
||
|
|
||
|
// Generic Object Linking & Embedding Mechanism
|
||
|
|
||
|
class TGolem : public TSortable
|
||
|
{
|
||
|
static long _count;
|
||
|
static TConfig* _config;
|
||
|
static TFilename* _path;
|
||
|
static TRelation* _golem;
|
||
|
|
||
|
TString16 _class;
|
||
|
long _id;
|
||
|
|
||
|
protected:
|
||
|
const TFilename& path(bool test = FALSE) const;
|
||
|
const char* ext() const;
|
||
|
TConfig& config() const;
|
||
|
long new_id() const;
|
||
|
|
||
|
protected:// TSortable
|
||
|
virtual int compare(const TSortable& o) const;
|
||
|
|
||
|
public: // TObject
|
||
|
virtual const char* class_name() const;
|
||
|
virtual word class_id() const;
|
||
|
virtual bool ok() const;
|
||
|
|
||
|
public:
|
||
|
virtual short icon() const;
|
||
|
virtual bool edit();
|
||
|
virtual bool import();
|
||
|
|
||
|
long id() const { return _id; }
|
||
|
|
||
|
TGolem(const char* cls, long id);
|
||
|
virtual ~TGolem();
|
||
|
};
|
||
|
|
||
|
#endif
|