cppTypeParser.h 936 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Filename: cppTypeParser.h
  2. // Created by: drose (14Dec99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. #ifndef CPPTYPEPARSER_H
  6. #define CPPTYPEPARSER_H
  7. #include <dtoolbase.h>
  8. #include "cppPreprocessor.h"
  9. class CPPType;
  10. class CPPScope;
  11. ///////////////////////////////////////////////////////////////////
  12. // Class : CPPTypeParser
  13. // Description :
  14. ////////////////////////////////////////////////////////////////////
  15. class CPPTypeParser : public CPPPreprocessor {
  16. public:
  17. CPPTypeParser(CPPScope *current_scope, CPPScope *global_scope);
  18. ~CPPTypeParser();
  19. bool parse_type(const string &type);
  20. bool parse_type(const string &type, const CPPPreprocessor &filepos);
  21. void output(ostream &out) const;
  22. CPPScope *_current_scope;
  23. CPPScope *_global_scope;
  24. CPPType *_type;
  25. };
  26. inline ostream &
  27. operator << (ostream &out, const CPPTypeParser &ep) {
  28. ep.output(out);
  29. return out;
  30. }
  31. #endif