Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Object.H File Reference

Declarations of SFW::Object and a few related things. More...

#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <string>

Go to the source code of this file.

Namespaces

namespace  SFW

Defines

#define STL_TO_SFW(sfwcls,stlcls,arg)
 Provide a convenient way to pull STL containers into the hierarchy. More...

#define STL2_TO_SFW(sfwcls,stlcls,arg0,arg1)
 Provide a convenient way to pull STL containers into the hierarchy. More...

#define V_TYPE_INFO(class,super)
#define TYPE_INFO(class,super)
#define TYPE_INIT(class)   string class ## ::SFWob_type = #class
#define METHOD_PTR(cls)


Detailed Description

Declarations of SFW::Object and a few related things.

Definition in file Object.H.


Define Documentation

#define METHOD_PTR( cls )
 

Initializer:

\
class Method : public SFW::Method {\
    typedef Object* (cls::*fn)(Object*);\
    fn mptr;\
    \
public:\
    TYPE_INFO(cls::Method, SFW::Method);\
\
    Method()                   { mptr = 0; }\
    Method(fn           _mptr) { mptr = _mptr; }\
    Method(cls::Method &_m)    { mptr = _m.mptr; }\
\
    fn      operator=  (fn     _mptr) { return mptr = _mptr; }\
    Method& operator=  (Method _m)    { mptr = _m.mptr; return *this; }\
\
    virtual Object* operator() (Object *c, Object *o) {\
        if(!c->isType(#cls)) {\
            cerr << "Called " << #cls << " method on a " << c->getType() << endl;\
            abort();\
        }\
\
        return (((cls*)c)->*mptr)(o);\
    }\
};

Definition at line 135 of file Object.H.

#define STL2_TO_SFW( sfwcls, stlcls, arg0, arg1 )
 

Initializer:

\
class sfwcls : public Object, public stlcls<arg0, arg1> { \
public:                                                   \
    TYPE_INFO(SFW::sfwcls, SFW::Object);                  \
};
Provide a convenient way to pull STL containers into the hierarchy.

This version is for containers that take two parameters

Definition at line 45 of file Object.H.

#define STL_TO_SFW( sfwcls, stlcls, arg )
 

Initializer:

\
class sfwcls : public Object, public stlcls<arg> {        \
public:                                                   \
    TYPE_INFO(SFW::sfwcls, SFW::Object);                  \
};
Provide a convenient way to pull STL containers into the hierarchy.

Definition at line 37 of file Object.H.

#define TYPE_INFO( class, super )
 

Initializer:

\
private:\
static string SFWob_type;\
\
public:\
virtual string getType() const { return class ## ::SFWob_type; }\
\
virtual bool isType(const string &_SFWob_type) const {\
    return (_SFWob_type == class ## ::SFWob_type || super ## ::isType(_SFWob_type));\
}\
\
virtual class* clone() const {\
    return new class(*((class *) this));\
}

Definition at line 118 of file Object.H.

#define TYPE_INIT( class )   string class ## ::SFWob_type = #class
 

Definition at line 133 of file Object.H.

#define V_TYPE_INFO( class, super )
 

Initializer:

\
private:\
static string SFWob_type;\
\
public:\
virtual string getType() const { return class ## ::SFWob_type; }\
\
virtual bool isType(const string &_SFWob_type) const {\
    return (_SFWob_type == class ## ::SFWob_type || super ## ::isType(_SFWob_type));\
}

Definition at line 107 of file Object.H.


Generated at Tue Jan 2 15:38:34 2001 for SFW by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000