#ifndef __TYPEREF_HPP #define __TYPEREF_HPP class String; class istream; class ostream; class aTypeReference { public: enum reftype { refValue, refReference, refPointer }; private: String *theTypeName; reftype ref; int isconst; public: aTypeReference(const char *name, reftype r, int c); aTypeReference(const String& name, reftype r, int c); aTypeReference(const aTypeReference& tr); aTypeReference(istream& is); virtual ~aTypeReference(); aTypeReference& operator=(const aTypeReference& tr); const String *getTypeName() const { return theTypeName; } reftype getReferenceType() const { return ref; } int isConst() const { return isconst; } //stream stuff friend ostream& operator<<(ostream& os, const aTypeReference& tr); virtual ostream& write(ostream& os) const; }; inline ostream& operator<<(ostream& os, const aTypeReference& tr) { return tr.write(os); } #endif