vector_src.cxx 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Filename: vector_src.cxx
  2. // Created by: drose (15May01)
  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. ////////////////////////////////////////////////////////////////////
  15. //
  16. // This file defines the interface to declare and export from the DLL
  17. // an STL vector of some type.
  18. //
  19. // To use this file you must #define a number of symbols and then
  20. // #include it from a .cxx file. You also must do the same thing with
  21. // vector_something_src.h from a .h file.
  22. //
  23. // This is necessary because of the complexity involved in exporting a
  24. // vector class from a DLL. If we are using the Dinkumware STL
  25. // implementation, it is even more complex. However, all this
  26. // complexity is only needed to support Windows builds; Unix shared
  27. // libraries are able to export symbols (including templates) without
  28. // any special syntax.
  29. //
  30. ////////////////////////////////////////////////////////////////////
  31. // The following variables should be defined prior to including this
  32. // file:
  33. //
  34. // EXPCL - the appropriate EXPCL_* symbol for this DLL.
  35. // EXPTP - the appropriate EXPTP_* symbol for this DLL.
  36. // TYPE - the type of thing we are building a vector on.
  37. // NAME - The name of the resulting vector typedef, e.g. vector_int.
  38. //
  39. // They will automatically be undefined at the end of the file.
  40. /*
  41. void
  42. insert_into_vector(NAME &vec, NAME::iterator where,
  43. NAME::const_pointer begin, NAME::const_pointer end) {
  44. vec.insert(where, begin, end);
  45. }
  46. */
  47. #undef EXPCL
  48. #undef EXPTP
  49. #undef TYPE
  50. #undef NAME