| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- // Filename: cppTBDType.h
- // Created by: drose (05Nov99)
- //
- ////////////////////////////////////////////////////////////////////
- #ifndef CPPTBDTYPE_H
- #define CPPTBDTYPE_H
- #include <dtoolbase.h>
- #include "cppType.h"
- class CPPIdentifier;
- ///////////////////////////////////////////////////////////////////
- // Class : CPPTBDType
- // Description : This represents a type whose exact meaning is still
- // to-be-determined. It happens when a typename is
- // referenced in a template class (especially using the
- // 'typename' keyword) but the actual type cannot be
- // known until the class is instantiated.
- ////////////////////////////////////////////////////////////////////
- class CPPTBDType : public CPPType {
- public:
- CPPTBDType(CPPIdentifier *ident);
- virtual CPPType *resolve_type(CPPScope *current_scope,
- CPPScope *global_scope);
- virtual bool is_tbd() const;
- virtual string get_simple_name() const;
- virtual string get_local_name(CPPScope *scope = NULL) const;
- virtual string get_fully_scoped_name() const;
- virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
- CPPScope *current_scope,
- CPPScope *global_scope);
- virtual void output(ostream &out, int indent_level, CPPScope *scope,
- bool complete) const;
- virtual SubType get_subtype() const;
- virtual CPPTBDType *as_tbd_type();
- CPPIdentifier *_ident;
- protected:
- virtual bool is_equal(const CPPDeclaration *other) const;
- virtual bool is_less(const CPPDeclaration *other) const;
- private:
- bool _subst_decl_recursive_protect;
- };
- #endif
|