cppNamespace.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Filename: cppNamespace.h
  2. // Created by: drose (16Nov99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. #ifndef CPPNAMESPACE_H
  15. #define CPPNAMESPACE_H
  16. #include "dtoolbase.h"
  17. #include "cppDeclaration.h"
  18. class CPPIdentifier;
  19. class CPPScope;
  20. ///////////////////////////////////////////////////////////////////
  21. // Class : CPPNamespace
  22. // Description :
  23. ////////////////////////////////////////////////////////////////////
  24. class CPPNamespace : public CPPDeclaration {
  25. public:
  26. CPPNamespace(CPPIdentifier *ident, CPPScope *scope,
  27. const CPPFile &file);
  28. string get_simple_name() const;
  29. string get_local_name(CPPScope *scope = NULL) const;
  30. string get_fully_scoped_name() const;
  31. CPPScope *get_scope() const;
  32. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  33. bool complete) const;
  34. virtual SubType get_subtype() const;
  35. virtual CPPNamespace *as_namespace();
  36. // We can't call this _inline since that would clash with an MSVC
  37. // built-in keyword declaration.
  38. bool _is_inline;
  39. private:
  40. CPPIdentifier *_ident;
  41. CPPScope *_scope;
  42. };
  43. #endif