cppFunctionGroup.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Filename: cppFunctionGroup.h
  2. // Created by: drose (11Nov99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef CPPFUNCTIONGROUP_H
  19. #define CPPFUNCTIONGROUP_H
  20. #include "dtoolbase.h"
  21. #include "cppDeclaration.h"
  22. class CPPInstance;
  23. ///////////////////////////////////////////////////////////////////
  24. // Class : CPPFunctionGroup
  25. // Description : This class is simply a container for one or more
  26. // CPPInstances for functions of the same name. It's
  27. // handy for storing in the CPPScope, so that
  28. // CPPScope::find_symbol() can return a single pointer
  29. // to indicate all of the functions that may share a
  30. // given name.
  31. ////////////////////////////////////////////////////////////////////
  32. class CPPFunctionGroup : public CPPDeclaration {
  33. public:
  34. CPPFunctionGroup(const string &name);
  35. ~CPPFunctionGroup();
  36. CPPType *get_return_type() const;
  37. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  38. bool complete) const;
  39. virtual SubType get_subtype() const;
  40. virtual CPPFunctionGroup *as_function_group();
  41. typedef vector<CPPInstance *> Instances;
  42. Instances _instances;
  43. string _name;
  44. };
  45. #endif