functionWriter.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Filename: functionWriter.h
  2. // Created by: drose (14Sep01)
  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 FUNCTIONWRITER_H
  19. #define FUNCTIONWRITER_H
  20. #include "dtoolbase.h"
  21. ////////////////////////////////////////////////////////////////////
  22. // Class : FunctionWriter
  23. // Description : This is an abstract class that can be used by the
  24. // various InterfaceMakers to indicate a generic helper
  25. // function or variable that needs to be written to the
  26. // generated source file.
  27. ////////////////////////////////////////////////////////////////////
  28. class FunctionWriter {
  29. public:
  30. FunctionWriter();
  31. virtual ~FunctionWriter();
  32. const string &get_name() const;
  33. virtual int compare_to(const FunctionWriter &other) const;
  34. virtual void write_prototype(ostream &out);
  35. virtual void write_code(ostream &out);
  36. protected:
  37. string _name;
  38. };
  39. #endif