DECLARE_MEMBERS macro

The new DECLARE_MEMBERS preprocessor macro generates the declarations for the class descriptor and most of the member functions that all NIH Library classes must provide, including:

private:

static Class classDesc; // class descriptor

public:

classname* castDown(Object*);

const classname* castDown(const Object*);

classname& castDown(Object&);

const classname& castDown(const Object&);

static const Class* desc(); // return class descriptor

static classname* readFrom(OIOin&);

static classname* readFrom(OIOifd&);

classname(OIOin&); // readFrom() constructors

classname(OIOout&);

virtual const Class* isA() const;

virtual Object* shallowCopy() const;

virtual void* _castdown(const Class&) const;

protected:

void deepenVBase();

void storeVBaseOn(OIOofd&) const; // store virtual base class

void storeVBaseOn(OIOout&) const;

private:

static Object* reader(OIOin& strm);

static Object* reader(OIOifd& fd);

The DECLARE_MEMBERS macro takes a single argument, the name of the class being declared.