parameterRemapPTToPointer.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Filename: parameterRemapPTToPointer.h
  2. // Created by: drose (10Aug00)
  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 PARAMETERREMAPPTTOPOINTER_H
  15. #define PARAMETERREMAPPTTOPOINTER_H
  16. #include "dtoolbase.h"
  17. #include "parameterRemap.h"
  18. class CPPType;
  19. class CPPStructType;
  20. ////////////////////////////////////////////////////////////////////
  21. // Class : ParameterRemapPTToPointer
  22. // Description : A ParameterRemap class that handles remapping a
  23. // PT(Type) or PointerTo<Type> to a Type *.
  24. ////////////////////////////////////////////////////////////////////
  25. class ParameterRemapPTToPointer : public ParameterRemap {
  26. public:
  27. ParameterRemapPTToPointer(CPPType *orig_type);
  28. virtual void pass_parameter(ostream &out, const string &variable_name);
  29. virtual string get_return_expr(const string &expression);
  30. virtual string temporary_to_return(const string &temporary);
  31. private:
  32. CPPType *_pointer_type;
  33. };
  34. #endif