#ifndef __TYPE_HPP #define __TYPE_HPP #include <_null.h> class istream; class ostream; class String; class aType { String *name; String *fromLibrary; public: //2 constructors - one with char* and one with String& aType(const char *name, const char *libname=NULL); aType(const String& name, const String& libname); //copy constructor aType(const aType& t); //stream constructor aType(istream& i); virtual ~aType(); //get ptr to name of type const String* getName() const; //get full name of type (eg: "library:namespace:typename" ) virtual String* getFullName() const; //change name of type void changeName(const String& s); virtual const String* getLibraryName() const; //RTTI virtual int isClass() const = 0 ; virtual int isSimple() const { return !isClass(); } virtual int isFromLibrary() const =0; //stream stuff virtual const char *getstreamablename() const =0; friend ostream& operator<<(ostream& o, const aType& t); virtual ostream& write(ostream& o) const; }; inline ostream& operator<<(ostream& o, const aType& t) { return t.write(o); } #endif