cppNamespace.h 1.2 KB

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