parameterRemapToString.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Filename: parameterRemapToString.h
  2. // Created by: drose (09Aug00)
  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 PARAMETERREMAPTOSTRING_H
  15. #define PARAMETERREMAPTOSTRING_H
  16. #include "dtoolbase.h"
  17. #include "parameterRemap.h"
  18. ////////////////////////////////////////////////////////////////////
  19. // Class : ParameterRemapToString
  20. // Description : A base class for several different remapping types
  21. // that convert to an atomic string class.
  22. //
  23. // The atomic string class is represented in the C
  24. // interface as a (const char *). Other interfaces may
  25. // be able to represent it differently, subverting the
  26. // code defined here.
  27. ////////////////////////////////////////////////////////////////////
  28. class ParameterRemapToString : public ParameterRemap {
  29. public:
  30. ParameterRemapToString(CPPType *orig_type);
  31. virtual void pass_parameter(ostream &out, const string &variable_name);
  32. virtual string get_return_expr(const string &expression);
  33. virtual bool new_type_is_atomic_string();
  34. };
  35. ////////////////////////////////////////////////////////////////////
  36. // Class : ParameterRemapToWString
  37. // Description : A base class for several different remapping types
  38. // that convert to an atomic string class.
  39. //
  40. // The atomic string class is represented in the C
  41. // interface as a (const wchar_t *). Other interfaces
  42. // may be able to represent it differently, subverting
  43. // the code defined here.
  44. ////////////////////////////////////////////////////////////////////
  45. class ParameterRemapToWString : public ParameterRemap {
  46. public:
  47. ParameterRemapToWString(CPPType *orig_type);
  48. virtual void pass_parameter(ostream &out, const string &variable_name);
  49. virtual string get_return_expr(const string &expression);
  50. virtual bool new_type_is_atomic_string();
  51. };
  52. #endif