functionWriterPtrToPython.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Filename: functionWriterPtrToPython.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 FUNCTIONWRITERPTRTOPYTHON_H
  19. #define FUNCTIONWRITERPTRTOPYTHON_H
  20. #include "functionWriter.h"
  21. class CPPType;
  22. ////////////////////////////////////////////////////////////////////
  23. // Class : FunctionWriterPtrToPython
  24. // Description : This specialization of FunctionWriter generates a
  25. // function that generates a PyObject class wrapper
  26. // object around the corresponding C++ pointer.
  27. ////////////////////////////////////////////////////////////////////
  28. class FunctionWriterPtrToPython : public FunctionWriter {
  29. public:
  30. FunctionWriterPtrToPython(CPPType *type);
  31. virtual ~FunctionWriterPtrToPython();
  32. virtual void write_prototype(ostream &out);
  33. virtual void write_code(ostream &out);
  34. CPPType *get_pointer_type() const;
  35. private:
  36. CPPType *_type;
  37. CPPType *_pointer_type;
  38. };
  39. #endif