diff --git a/dtool/src/dconfig/symbolEnt.cxx b/dtool/src/dconfig/symbolEnt.cxx index a94de10417..3e40e463ec 100644 --- a/dtool/src/dconfig/symbolEnt.cxx +++ b/dtool/src/dconfig/symbolEnt.cxx @@ -5,6 +5,12 @@ #include "symbolEnt.h" +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG +#define TYPE Config::SymbolEnt +#define NAME vector_SymbolEnt +#include "vector_src.cxx" + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/dtool/src/dconfig/symbolEnt.h b/dtool/src/dconfig/symbolEnt.h index 6f47cdcea2..7234987b7a 100644 --- a/dtool/src/dconfig/symbolEnt.h +++ b/dtool/src/dconfig/symbolEnt.h @@ -46,11 +46,11 @@ class EXPCL_DTOOLCONFIG SymbolEnt { } // close Config namespace -#ifdef HAVE_DINKUM -#define VV_SYMBOLENT std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_DTOOL, EXPTP_DTOOL, VV_SYMBOLENT) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_DTOOLCONFIG, EXPTP_DTOOLCONFIG, std::vector); +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG +#define TYPE Config::SymbolEnt +#define NAME vector_SymbolEnt +#include "vector_src.h" namespace Config { diff --git a/dtool/src/dtoolutil/Sources.pp b/dtool/src/dtoolutil/Sources.pp index c108cbe37f..28d4e15d69 100644 --- a/dtool/src/dtoolutil/Sources.pp +++ b/dtool/src/dtoolutil/Sources.pp @@ -9,12 +9,13 @@ load_dso.cxx load_dso.h dSearchPath.I dSearchPath.cxx \ dSearchPath.h pfstream.h vector_string.cxx vector_string.h \ gnu_getopt.c gnu_getopt.h gnu_getopt1.c pfstreamBuf.h pfstreamBuf.cxx \ - pfstream.cxx + pfstream.cxx vector_src.h #define INSTALL_HEADERS \ executionEnvironment.I executionEnvironment.h filename.I \ filename.h load_dso.h dSearchPath.I dSearchPath.h \ pfstream.h pfstream.I vector_string.h gnu_getopt.h \ - pfstreamBuf.h + pfstreamBuf.h \ + vector_src.cxx vector_src.h #end lib_target diff --git a/dtool/src/dtoolutil/vector_src.cxx b/dtool/src/dtoolutil/vector_src.cxx new file mode 100644 index 0000000000..db3bb9f7c0 --- /dev/null +++ b/dtool/src/dtoolutil/vector_src.cxx @@ -0,0 +1,44 @@ +// Filename: vector_something_src.cxx +// Created by: drose (15May01) +// +//////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////// +// +// This file defines the interface to declare and export from the DLL +// an STL vector of some type. +// +// To use this file you must #define a number of symbols and then +// #include it from a .cxx file. You also must do the same thing with +// vector_something_src.h from a .h file. +// +// This is necessary because of the complexity involved in exporting a +// vector class from a DLL. If we are using the Dinkumware STL +// implementation, it is even more complex. However, all this +// complexity is only needed to support Windows builds; Unix shared +// libraries are able to export symbols (including templates) without +// any special syntax. +// +//////////////////////////////////////////////////////////////////// + + +// The following variables should be defined prior to including this +// file: +// +// EXPCL - the appropriate EXPCL_* symbol for this DLL. +// EXPTP - the appropriate EXPTP_* symbol for this DLL. +// TYPE - the type of thing we are building a vector on. +// NAME - The name of the resulting vector typedef, e.g. vector_int. +// +// They will automatically be undefined at the end of the file. + +void +insert_into_vector(NAME &vec, NAME::iterator where, + NAME::const_pointer begin, NAME::const_pointer end) { + vec.insert(where, begin, end); +} + +#undef EXPCL +#undef EXPTP +#undef TYPE +#undef NAME diff --git a/dtool/src/dtoolutil/vector_src.h b/dtool/src/dtoolutil/vector_src.h new file mode 100644 index 0000000000..d66dd7b9a6 --- /dev/null +++ b/dtool/src/dtoolutil/vector_src.h @@ -0,0 +1,69 @@ +// Filename: vector_something_src.h +// Created by: drose (15May01) +// +//////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////// +// +// This file defines the interface to declare and export from the DLL +// an STL vector of some type. +// +// To use this file you must #define a number of symbols and then +// #include it from a .h file. You also must do the same thing with +// vector_something_src.cxx from a .cxx file. +// +// This is necessary because of the complexity involved in exporting a +// vector class from a DLL. If we are using the Dinkumware STL +// implementation, it is even more complex. However, all this +// complexity is only needed to support Windows builds; Unix shared +// libraries are able to export symbols (including templates) without +// any special syntax. +// +//////////////////////////////////////////////////////////////////// + +// The following variables should be defined prior to including this +// file: +// +// EXPCL - the appropriate EXPCL_* symbol for this DLL. +// EXPTP - the appropriate EXPTP_* symbol for this DLL. +// TYPE - the type of thing we are building a vector on. +// NAME - The name of the resulting vector typedef, e.g. vector_int. +// +// They will automatically be undefined at the end of the file. + +#include + +#if defined(WIN32_VC) && !defined(CPPPARSER) + + #ifdef HAVE_DINKUM +// With the Dinkum library, we must first export the base class, +// _Vector_val. + #define VV_BASE std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL, EXPTP, VV_BASE) + #undef VV_BASE + #endif + +// Now we can export the vector class. +EXPORT_TEMPLATE_CLASS(EXPCL, EXPTP, std::vector) + +#endif + +// Now make a typedef for the vector. +typedef std::vector NAME; + + // Finally, we must define a non-inline function that performs the + // insert operation given a range of pointers. We do this because + // the Dinkum STL implementation uses member templates to handle + // this, but we cannot export the member templates from the DLL. + +extern EXPCL void +insert_into_vector(NAME &vec, NAME::iterator where, + const TYPE *begin, const TYPE *end); + + +#undef EXPCL +#undef EXPTP +#undef TYPE +#undef NAME + diff --git a/dtool/src/dtoolutil/vector_string.cxx b/dtool/src/dtoolutil/vector_string.cxx index f090140b79..30138938af 100644 --- a/dtool/src/dtoolutil/vector_string.cxx +++ b/dtool/src/dtoolutil/vector_string.cxx @@ -5,6 +5,13 @@ #include "vector_string.h" +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG +#define TYPE std::string +#define NAME vector_string + +#include "vector_src.cxx" + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/dtool/src/dtoolutil/vector_string.h b/dtool/src/dtoolutil/vector_string.h index 48fab760c2..1a71ede713 100644 --- a/dtool/src/dtoolutil/vector_string.h +++ b/dtool/src/dtoolutil/vector_string.h @@ -19,12 +19,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_STRING std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_DTOOL, EXPTP_DTOOL, VV_STRING) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_DTOOL, EXPTP_DTOOL, std::vector) -typedef vector vector_string; +#define EXPCL EXPCL_DTOOL +#define EXPTP EXPTP_DTOOL +#define TYPE std::string +#define NAME vector_string + +#include "vector_src.h" // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/dtool/src/interrogatedb/Sources.pp b/dtool/src/interrogatedb/Sources.pp index 716461e6c6..ba82382f80 100644 --- a/dtool/src/interrogatedb/Sources.pp +++ b/dtool/src/interrogatedb/Sources.pp @@ -20,8 +20,8 @@ vector_int.h #define INSTALL_HEADERS \ - interrogate_interface.h interrogate_request.h \ - vector_int.h config_interrogatedb.h + interrogate_interface.h interrogate_request.h vector_int.h \ + config_interrogatedb.h // These are temporary; they need not be installed in the future. These are // necessary only when using template stopgap. diff --git a/dtool/src/interrogatedb/interrogateDatabase.cxx b/dtool/src/interrogatedb/interrogateDatabase.cxx index 86b96f57c0..9668ab31ee 100644 --- a/dtool/src/interrogatedb/interrogateDatabase.cxx +++ b/dtool/src/interrogatedb/interrogateDatabase.cxx @@ -34,6 +34,12 @@ InterrogateDatabase() { InterrogateDatabase *InterrogateDatabase:: get_ptr() { if (_global_ptr == (InterrogateDatabase *)NULL) { +#ifndef NDEBUG + if (interrogatedb_cat->is_debug()) { + interrogatedb_cat->debug() + << "Creating interrogate database\n"; + } +#endif _global_ptr = new InterrogateDatabase; } return _global_ptr; @@ -50,6 +56,7 @@ get_ptr() { //////////////////////////////////////////////////////////////////// void InterrogateDatabase:: request_module(InterrogateModuleDef *def) { +#ifndef NDEBUG if (interrogatedb_cat->is_debug()) { if (def->library_name == (const char *)NULL) { interrogatedb_cat->debug() @@ -59,6 +66,7 @@ request_module(InterrogateModuleDef *def) { << "Got interrogate data for module " << def->library_name << "\n"; } } +#endif int num_indices = def->next_index - def->first_index; if (num_indices > 0) { @@ -854,6 +862,7 @@ load_latest() { Requests::const_iterator ri; for (ri = copy_requests.begin(); ri != copy_requests.end(); ++ri) { InterrogateModuleDef *def = (*ri); + if (def->database_filename != (char *)NULL) { Filename filename = def->database_filename; Filename pathname = filename; diff --git a/dtool/src/interrogatedb/vector_int.cxx b/dtool/src/interrogatedb/vector_int.cxx index 4ec4c84095..94e4b23e19 100644 --- a/dtool/src/interrogatedb/vector_int.cxx +++ b/dtool/src/interrogatedb/vector_int.cxx @@ -5,6 +5,13 @@ #include "vector_int.h" +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG +#define TYPE int +#define NAME vector_int + +#include "vector_src.cxx" + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/dtool/src/interrogatedb/vector_int.h b/dtool/src/interrogatedb/vector_int.h index d7004b0d7c..ec6a17a76b 100644 --- a/dtool/src/interrogatedb/vector_int.h +++ b/dtool/src/interrogatedb/vector_int.h @@ -19,12 +19,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_INT std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_DTOOLCONFIG, EXPTP_DTOOLCONFIG, VV_INT) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_DTOOLCONFIG, EXPTP_DTOOLCONFIG, std::vector) -typedef vector vector_int; +#define EXPCL EXPCL_DTOOLCONFIG +#define EXPTP EXPTP_DTOOLCONFIG +#define TYPE int +#define NAME vector_int + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/chan/vector_PartGroupStar.cxx b/panda/src/chan/vector_PartGroupStar.cxx index 197ab432a9..5be372cba7 100644 --- a/panda/src/chan/vector_PartGroupStar.cxx +++ b/panda/src/chan/vector_PartGroupStar.cxx @@ -5,6 +5,13 @@ #include "vector_PartGroupStar.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PartGroup * +#define NAME vector_PartGroupStar + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/chan/vector_PartGroupStar.h b/panda/src/chan/vector_PartGroupStar.h index 863f19794a..7a0ee84db0 100644 --- a/panda/src/chan/vector_PartGroupStar.h +++ b/panda/src/chan/vector_PartGroupStar.h @@ -22,12 +22,12 @@ // vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_PARTGROUPSTAR std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PARTGROUPSTAR) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_PartGroupStar; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PartGroup * +#define NAME vector_PartGroupStar + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/display/graphicsWindowInputDevice.cxx b/panda/src/display/graphicsWindowInputDevice.cxx index a6be5e6ea1..6b93cadd61 100644 --- a/panda/src/display/graphicsWindowInputDevice.cxx +++ b/panda/src/display/graphicsWindowInputDevice.cxx @@ -7,6 +7,12 @@ #include #include +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE GraphicsWindowInputDevice +#define NAME vector_GraphicsWindowInputDevice + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/display/graphicsWindowInputDevice.h b/panda/src/display/graphicsWindowInputDevice.h index efc37d4dd6..cc44e31a00 100644 --- a/panda/src/display/graphicsWindowInputDevice.h +++ b/panda/src/display/graphicsWindowInputDevice.h @@ -76,12 +76,12 @@ private: #include "graphicsWindowInputDevice.I" -#ifdef HAVE_DINKUM -#define VV_GRAPHICSWINDOWINPUTDEVICE std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_GRAPHICSWINDOWINPUTDEVICE) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_GraphicsWindowInputDevice; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE GraphicsWindowInputDevice +#define NAME vector_GraphicsWindowInputDevice + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/egg/Sources.pp b/panda/src/egg/Sources.pp index 79665ca1f3..1564c75385 100644 --- a/panda/src/egg/Sources.pp +++ b/panda/src/egg/Sources.pp @@ -24,7 +24,7 @@ eggMaterialCollection.h \ eggMiscFuncs.I \ eggMiscFuncs.cxx eggMiscFuncs.h \ - eggMorph.I eggMorph.h eggMorphList.I eggMorphList.h \ + eggMorph.I eggMorph.h eggMorphList.cxx eggMorphList.I eggMorphList.h \ eggNamedObject.I eggNamedObject.cxx \ eggNamedObject.h eggNameUniquifier.cxx eggNameUniquifier.h \ eggNode.I eggNode.cxx eggNode.h eggNurbsCurve.I \ diff --git a/panda/src/egg/eggMorphList.cxx b/panda/src/egg/eggMorphList.cxx new file mode 100644 index 0000000000..046e37e14f --- /dev/null +++ b/panda/src/egg/eggMorphList.cxx @@ -0,0 +1,26 @@ +// Filename: eggMorphList.cxx +// Created by: drose (15May01) +// +//////////////////////////////////////////////////////////////////// + +#include "eggMorphList.h" + +// Continue all of the vector import definitions. + +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE LVector3d +#define NAME vector_LVector3d +#include + +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE LVector2d +#define NAME vector_LVector2d +#include + +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE LVector4f +#define NAME vector_LVector4f +#include diff --git a/panda/src/egg/eggMorphList.h b/panda/src/egg/eggMorphList.h index 8c03ace76c..0becb02ba3 100644 --- a/panda/src/egg/eggMorphList.h +++ b/panda/src/egg/eggMorphList.h @@ -53,10 +53,27 @@ private: Morphs _morphs; }; +// Export all of the vectors. -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE LVector3d +#define NAME vector_LVector3d +#include + +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE LVector2d +#define NAME vector_LVector2d +#include + +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE LVector4f +#define NAME vector_LVector4f +#include + +// Now export each EggMorphList. EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList) EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorphList) diff --git a/panda/src/egg/vector_PT_EggMaterial.cxx b/panda/src/egg/vector_PT_EggMaterial.cxx index 623d68afdf..fccb377550 100644 --- a/panda/src/egg/vector_PT_EggMaterial.cxx +++ b/panda/src/egg/vector_PT_EggMaterial.cxx @@ -5,6 +5,13 @@ #include "vector_PT_EggMaterial.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_EggMaterial +#define NAME vector_PT_EggMaterial + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/egg/vector_PT_EggMaterial.h b/panda/src/egg/vector_PT_EggMaterial.h index 49c711eaf8..00b55e5cf8 100644 --- a/panda/src/egg/vector_PT_EggMaterial.h +++ b/panda/src/egg/vector_PT_EggMaterial.h @@ -22,12 +22,12 @@ // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_PT_EGGMATERIAL std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGMATERIAL) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) -typedef vector vector_PT_EggMaterial; +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE PT_EggMaterial +#define NAME vector_PT_EggMaterial + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/egg/vector_PT_EggTexture.cxx b/panda/src/egg/vector_PT_EggTexture.cxx index 8ecd658ce2..f64a155cd8 100644 --- a/panda/src/egg/vector_PT_EggTexture.cxx +++ b/panda/src/egg/vector_PT_EggTexture.cxx @@ -5,6 +5,13 @@ #include "vector_PT_EggTexture.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_EggTexture +#define NAME vector_PT_EggTexture + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/egg/vector_PT_EggTexture.h b/panda/src/egg/vector_PT_EggTexture.h index 1df7f97ae7..4ab9fdb43b 100644 --- a/panda/src/egg/vector_PT_EggTexture.h +++ b/panda/src/egg/vector_PT_EggTexture.h @@ -22,12 +22,12 @@ // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_PT_EGGTEXTURE std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGTEXTURE) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) -typedef vector vector_PT_EggTexture; +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE PT_EggTexture +#define NAME vector_PT_EggTexture + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/egg/vector_PT_EggVertex.cxx b/panda/src/egg/vector_PT_EggVertex.cxx index f5d94cb5ff..4dee5fe53b 100644 --- a/panda/src/egg/vector_PT_EggVertex.cxx +++ b/panda/src/egg/vector_PT_EggVertex.cxx @@ -5,6 +5,13 @@ #include "vector_PT_EggVertex.h" +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE PT_EggVertex +#define NAME vector_PT_EggVertex + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/egg/vector_PT_EggVertex.h b/panda/src/egg/vector_PT_EggVertex.h index f63ab53217..1d3f34842d 100644 --- a/panda/src/egg/vector_PT_EggVertex.h +++ b/panda/src/egg/vector_PT_EggVertex.h @@ -22,12 +22,12 @@ // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_PT_EGGVERTEX std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGVERTEX) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) -typedef vector vector_PT_EggVertex; +#define EXPCL EXPCL_PANDAEGG +#define EXPTP EXPTP_PANDAEGG +#define TYPE PT_EggVertex +#define NAME vector_PT_EggVertex + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/egg2sg/eggLoader.cxx b/panda/src/egg2sg/eggLoader.cxx index 6472c74463..eec9755534 100644 --- a/panda/src/egg2sg/eggLoader.cxx +++ b/panda/src/egg2sg/eggLoader.cxx @@ -1938,8 +1938,10 @@ create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, } if (vertices.size() >= 3) { + const Vertexf *vertices_begin = &vertices[0]; + const Vertexf *vertices_end = vertices_begin + vertices.size(); CollisionPolygon *cspoly = - new CollisionPolygon(vertices.begin(), vertices.end()); + new CollisionPolygon(vertices_begin, vertices_end); apply_collision_flags(cspoly, flags); cnode->add_solid(cspoly); } diff --git a/panda/src/egg2sg/eggLoader.h b/panda/src/egg2sg/eggLoader.h index 29229ab606..49f08ea653 100644 --- a/panda/src/egg2sg/eggLoader.h +++ b/panda/src/egg2sg/eggLoader.h @@ -12,8 +12,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -119,10 +121,10 @@ private: typedef set > TextureApplies; TextureApplies _texture_applies; - typedef map Textures; + typedef map Textures; Textures _textures; - typedef map Materials; + typedef map Materials; Materials _materials; Materials _materials_bface; diff --git a/panda/src/gobj/LOD.cxx b/panda/src/gobj/LOD.cxx index 2f3158c57f..033c25a36a 100644 --- a/panda/src/gobj/LOD.cxx +++ b/panda/src/gobj/LOD.cxx @@ -12,6 +12,13 @@ #include #include +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE LODSwitch +#define NAME LODSwitchVector + +#include + //////////////////////////////////////////////////////////////////// // Static variables //////////////////////////////////////////////////////////////////// diff --git a/panda/src/gobj/LOD.h b/panda/src/gobj/LOD.h index bd74d447d3..b329899cba 100644 --- a/panda/src/gobj/LOD.h +++ b/panda/src/gobj/LOD.h @@ -58,12 +58,12 @@ protected: float _out; }; -#ifdef HAVE_DINKUM -#define VV_LODSWITCH std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LODSWITCH) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector LODSwitchVector; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE LODSwitch +#define NAME LODSwitchVector + +#include //////////////////////////////////////////////////////////////////// // Class : LOD diff --git a/panda/src/graph/vector_NodeRelation_star.cxx b/panda/src/graph/vector_NodeRelation_star.cxx index 759853b376..456826c855 100644 --- a/panda/src/graph/vector_NodeRelation_star.cxx +++ b/panda/src/graph/vector_NodeRelation_star.cxx @@ -5,6 +5,13 @@ #include "vector_NodeRelation_star.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE NodeRelation * +#define NAME vector_NodeRelation_star + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/graph/vector_NodeRelation_star.h b/panda/src/graph/vector_NodeRelation_star.h index 696dc90000..39d3431b85 100644 --- a/panda/src/graph/vector_NodeRelation_star.h +++ b/panda/src/graph/vector_NodeRelation_star.h @@ -21,12 +21,12 @@ class NodeRelation; // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_NODERELATION_STAR std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NODERELATION_STAR) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_NodeRelation_star; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE NodeRelation * +#define NAME vector_NodeRelation_star + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/graph/vector_PT_Node.cxx b/panda/src/graph/vector_PT_Node.cxx index 23dcb4722c..5c34157ae9 100644 --- a/panda/src/graph/vector_PT_Node.cxx +++ b/panda/src/graph/vector_PT_Node.cxx @@ -5,6 +5,13 @@ #include "vector_PT_Node.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_Node +#define NAME vector_PT_Node + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/graph/vector_PT_Node.h b/panda/src/graph/vector_PT_Node.h index d2af0c2309..eea4bf8af6 100644 --- a/panda/src/graph/vector_PT_Node.h +++ b/panda/src/graph/vector_PT_Node.h @@ -22,12 +22,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_PT_NODE std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODE) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_PT_Node; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_Node +#define NAME vector_PT_Node + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/graph/vector_PT_NodeRelation.cxx b/panda/src/graph/vector_PT_NodeRelation.cxx index 468507b283..d3c8110c84 100644 --- a/panda/src/graph/vector_PT_NodeRelation.cxx +++ b/panda/src/graph/vector_PT_NodeRelation.cxx @@ -6,6 +6,13 @@ #include "node.h" #include "vector_PT_NodeRelation.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_NodeRelation +#define NAME vector_PT_NodeRelation + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/graph/vector_PT_NodeRelation.h b/panda/src/graph/vector_PT_NodeRelation.h index 1fd3b03c97..7d0f012191 100644 --- a/panda/src/graph/vector_PT_NodeRelation.h +++ b/panda/src/graph/vector_PT_NodeRelation.h @@ -22,12 +22,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_PT_NODERELATION std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODERELATION) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_PT_NodeRelation; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_NodeRelation +#define NAME vector_PT_NodeRelation + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/light/vector_PT_Light.cxx b/panda/src/light/vector_PT_Light.cxx index 563104752c..8bd9c0157b 100644 --- a/panda/src/light/vector_PT_Light.cxx +++ b/panda/src/light/vector_PT_Light.cxx @@ -5,6 +5,13 @@ #include "vector_PT_Light.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_Light +#define NAME vector_PT_Light + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/light/vector_PT_Light.h b/panda/src/light/vector_PT_Light.h index c62c73cfdb..2ae55e447e 100644 --- a/panda/src/light/vector_PT_Light.h +++ b/panda/src/light/vector_PT_Light.h @@ -21,12 +21,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_PT_LIGHT std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_LIGHT) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_PT_Light; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE PT_Light +#define NAME vector_PT_Light + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/linmath/vector_Colorf.cxx b/panda/src/linmath/vector_Colorf.cxx index b5eb7311c5..64c8a3ac08 100644 --- a/panda/src/linmath/vector_Colorf.cxx +++ b/panda/src/linmath/vector_Colorf.cxx @@ -5,6 +5,13 @@ #include "vector_Colorf.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Colorf +#define NAME vector_Colorf + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/linmath/vector_Colorf.h b/panda/src/linmath/vector_Colorf.h index 3d73be0c99..dcec94593b 100644 --- a/panda/src/linmath/vector_Colorf.h +++ b/panda/src/linmath/vector_Colorf.h @@ -21,12 +21,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_COLORF std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_COLORF) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_Colorf; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Colorf +#define NAME vector_Colorf + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/linmath/vector_LPoint2f.cxx b/panda/src/linmath/vector_LPoint2f.cxx index cbf77ba3c6..9e7ab9c38c 100644 --- a/panda/src/linmath/vector_LPoint2f.cxx +++ b/panda/src/linmath/vector_LPoint2f.cxx @@ -5,6 +5,13 @@ #include "vector_LPoint2f.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE LPoint2f +#define NAME vector_LPoint2f + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/linmath/vector_LPoint2f.h b/panda/src/linmath/vector_LPoint2f.h index 031a45a145..9f74e14833 100644 --- a/panda/src/linmath/vector_LPoint2f.h +++ b/panda/src/linmath/vector_LPoint2f.h @@ -21,12 +21,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_LPOINT2F std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LPOINT2F) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_LPoint2f; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE LPoint2f +#define NAME vector_LPoint2f + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/linmath/vector_LVecBase3f.cxx b/panda/src/linmath/vector_LVecBase3f.cxx index 7827bb89f9..64b3f1d148 100644 --- a/panda/src/linmath/vector_LVecBase3f.cxx +++ b/panda/src/linmath/vector_LVecBase3f.cxx @@ -5,6 +5,13 @@ #include "vector_LVecBase3f.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE LVecBase3f +#define NAME vector_LVecBase3f + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/linmath/vector_LVecBase3f.h b/panda/src/linmath/vector_LVecBase3f.h index 8169df0abd..0cb1082b8d 100644 --- a/panda/src/linmath/vector_LVecBase3f.h +++ b/panda/src/linmath/vector_LVecBase3f.h @@ -21,12 +21,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_LVECBASE3F std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LVECBASE3F) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_LVecBase3f; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE LVecBase3f +#define NAME vector_LVecBase3f + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/linmath/vector_Normalf.cxx b/panda/src/linmath/vector_Normalf.cxx index 1e9805076e..0a48cb2613 100644 --- a/panda/src/linmath/vector_Normalf.cxx +++ b/panda/src/linmath/vector_Normalf.cxx @@ -5,6 +5,13 @@ #include "vector_Normalf.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Normalf +#define NAME vector_Normalf + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/linmath/vector_Normalf.h b/panda/src/linmath/vector_Normalf.h index fd3739ec04..38e1c29b8b 100644 --- a/panda/src/linmath/vector_Normalf.h +++ b/panda/src/linmath/vector_Normalf.h @@ -21,12 +21,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_NORMALF std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NORMALF) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_Normalf; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Normalf +#define NAME vector_Normalf + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/linmath/vector_Vertexf.cxx b/panda/src/linmath/vector_Vertexf.cxx index 40d732c49f..90bcb904bc 100644 --- a/panda/src/linmath/vector_Vertexf.cxx +++ b/panda/src/linmath/vector_Vertexf.cxx @@ -5,6 +5,13 @@ #include "vector_Vertexf.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Vertexf +#define NAME vector_Vertexf + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/linmath/vector_Vertexf.h b/panda/src/linmath/vector_Vertexf.h index 9b79dbd12c..f2d909e613 100644 --- a/panda/src/linmath/vector_Vertexf.h +++ b/panda/src/linmath/vector_Vertexf.h @@ -21,12 +21,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_VERTEXF std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_VERTEXF) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_Vertexf; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Vertexf +#define NAME vector_Vertexf + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/physics/physicsManager.cxx b/panda/src/physics/physicsManager.cxx index 518e1b7cb0..bba1c5df96 100644 --- a/panda/src/physics/physicsManager.cxx +++ b/panda/src/physics/physicsManager.cxx @@ -3,12 +3,12 @@ // //////////////////////////////////////////////////////////////////// -#include -#include - #include "physicsManager.h" #include "actorNode.h" +#include +#include + //////////////////////////////////////////////////////////////////// // Function : PhysicsManager // Access : Public diff --git a/panda/src/putil/pointerToArray.I b/panda/src/putil/pointerToArray.I index 533b995aae..4a5956b477 100644 --- a/panda/src/putil/pointerToArray.I +++ b/panda/src/putil/pointerToArray.I @@ -239,37 +239,6 @@ insert(iterator position, size_type n, const Element &x) const { _ptr->insert(position, n, x); } -#ifdef HAVE_MEMBER_TEMPLATES -//////////////////////////////////////////////////////////////////// -// Function: PointerToArray::insert -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -template -template -INLINE void PointerToArray:: -insert(iterator position, InputIterator first, InputIterator last) const { - nassertv(_ptr != NULL); - nassertv(position >= _ptr->begin() && - position <= _ptr->end()); - _ptr->insert(position, first, last); -} -#else -//////////////////////////////////////////////////////////////////// -// Function: PointerToArray::insert -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -template -INLINE void PointerToArray:: -insert(iterator position, const Element *first, const Element *last) const { - nassertv(_ptr != NULL); - nassertv(position >= _ptr->begin() && - position <= _ptr->end()); - _ptr->insert(position, first, last); -} -#endif - //////////////////////////////////////////////////////////////////// // Function: PointerToArray::erase // Access: Public diff --git a/panda/src/putil/pointerToArray.h b/panda/src/putil/pointerToArray.h index b5a72cbc18..98febcef5b 100644 --- a/panda/src/putil/pointerToArray.h +++ b/panda/src/putil/pointerToArray.h @@ -118,12 +118,12 @@ public: INLINE iterator insert(iterator position, const Element &x) const; INLINE void insert(iterator position, size_type n, const Element &x) const; -#ifdef HAVE_MEMBER_TEMPLATES - template - INLINE void insert(iterator position, InputIterator first, InputIterator last) const; -#else - INLINE void insert(iterator position, const Element *first, const Element *last) const; -#endif + // We don't define the insert() method that accepts a pair of + // iterators to copy from. That's problematic because of the whole + // member template thing. If you really need this, use + // pta.v().insert(...); if you're doing this on a vector that has to + // be exported from the DLL, you should use + // insert_into_vector(pta.v(), ...). INLINE void erase(iterator position) const; INLINE void erase(iterator first, iterator last) const; @@ -169,7 +169,6 @@ private: static vector _empty_array; }; - //////////////////////////////////////////////////////////////////// // Class : ConstPointerToArray // Description : Similar to PointerToArray, except that its contents diff --git a/panda/src/putil/vector_double.cxx b/panda/src/putil/vector_double.cxx index e7baee2559..3a8b25e5c7 100644 --- a/panda/src/putil/vector_double.cxx +++ b/panda/src/putil/vector_double.cxx @@ -5,6 +5,13 @@ #include "vector_double.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE double +#define NAME vector_double + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/putil/vector_double.h b/panda/src/putil/vector_double.h index 9f4c9ecb9d..8b0a5b87a8 100644 --- a/panda/src/putil/vector_double.h +++ b/panda/src/putil/vector_double.h @@ -19,12 +19,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_DOUBLE std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_DOUBLE) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_double; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE double +#define NAME vector_double + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/putil/vector_float.cxx b/panda/src/putil/vector_float.cxx index 44f0f1dd25..e5abc2b6c4 100644 --- a/panda/src/putil/vector_float.cxx +++ b/panda/src/putil/vector_float.cxx @@ -5,6 +5,13 @@ #include "vector_float.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE float +#define NAME vector_float + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/putil/vector_float.h b/panda/src/putil/vector_float.h index f5a2173429..3b69c48dd7 100644 --- a/panda/src/putil/vector_float.h +++ b/panda/src/putil/vector_float.h @@ -19,12 +19,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_FLOAT std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_FLOAT) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_float; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE float +#define NAME vector_float + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/putil/vector_typedWritable.cxx b/panda/src/putil/vector_typedWritable.cxx index 4d570c6d37..d6812d41c1 100644 --- a/panda/src/putil/vector_typedWritable.cxx +++ b/panda/src/putil/vector_typedWritable.cxx @@ -5,6 +5,13 @@ #include "vector_typedWritable.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE TypedWritable * +#define NAME vector_typedWritable + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/putil/vector_typedWritable.h b/panda/src/putil/vector_typedWritable.h index 95891c7fba..0f5e01a5b1 100644 --- a/panda/src/putil/vector_typedWritable.h +++ b/panda/src/putil/vector_typedWritable.h @@ -21,12 +21,12 @@ class TypedWritable; // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_TYPEDWRITABLE std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_TYPEDWRITABLE) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_typedWritable; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE TypedWritable * +#define NAME vector_typedWritable + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/putil/vector_uchar.cxx b/panda/src/putil/vector_uchar.cxx index 2dcb9db006..a4ac5b4643 100644 --- a/panda/src/putil/vector_uchar.cxx +++ b/panda/src/putil/vector_uchar.cxx @@ -5,6 +5,13 @@ #include "vector_uchar.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE unsigned char +#define NAME vector_uchar + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/putil/vector_uchar.h b/panda/src/putil/vector_uchar.h index 416049aedc..9eb2a9b734 100644 --- a/panda/src/putil/vector_uchar.h +++ b/panda/src/putil/vector_uchar.h @@ -19,12 +19,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_UCHAR std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_UCHAR) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_uchar; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE unsigned char +#define NAME vector_uchar + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/putil/vector_ulong.cxx b/panda/src/putil/vector_ulong.cxx index cdca10cc49..0ac67f50a3 100644 --- a/panda/src/putil/vector_ulong.cxx +++ b/panda/src/putil/vector_ulong.cxx @@ -5,6 +5,13 @@ #include "vector_ulong.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE unsigned long +#define NAME vector_ulong + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/putil/vector_ulong.h b/panda/src/putil/vector_ulong.h index da9315cd11..ef58f3bf96 100644 --- a/panda/src/putil/vector_ulong.h +++ b/panda/src/putil/vector_ulong.h @@ -19,12 +19,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_ULONG std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_ULONG) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_ulong; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE unsigned long +#define NAME vector_ulong + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/putil/vector_ushort.cxx b/panda/src/putil/vector_ushort.cxx index c3b0af4cb2..21ccf0ea2c 100644 --- a/panda/src/putil/vector_ushort.cxx +++ b/panda/src/putil/vector_ushort.cxx @@ -5,6 +5,13 @@ #include "vector_ushort.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE unsigned short +#define NAME vector_ushort + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/putil/vector_ushort.h b/panda/src/putil/vector_ushort.h index 0b8baf22b0..f1359e4046 100644 --- a/panda/src/putil/vector_ushort.h +++ b/panda/src/putil/vector_ushort.h @@ -19,12 +19,12 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_USHORT std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_USHORT) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_ushort; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE unsigned short +#define NAME vector_ushort + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/putil/vector_writable.cxx b/panda/src/putil/vector_writable.cxx index cecc93a5f2..6d4e2267cc 100644 --- a/panda/src/putil/vector_writable.cxx +++ b/panda/src/putil/vector_writable.cxx @@ -5,6 +5,13 @@ #include "vector_writable.h" +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Writable * +#define NAME vector_writable + +#include + // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ #pragma implementation diff --git a/panda/src/putil/vector_writable.h b/panda/src/putil/vector_writable.h index e870324768..0d09b88d14 100644 --- a/panda/src/putil/vector_writable.h +++ b/panda/src/putil/vector_writable.h @@ -21,12 +21,12 @@ class Writable; // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#ifdef HAVE_DINKUM -#define VV_WRITABLE std::_Vector_val > -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_WRITABLE) -#endif -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) -typedef vector vector_writable; +#define EXPCL EXPCL_PANDA +#define EXPTP EXPTP_PANDA +#define TYPE Writable * +#define NAME vector_writable + +#include // Tell GCC that we'll take care of the instantiation explicitly here. #ifdef __GNUC__ diff --git a/panda/src/sgraph/geomNode.cxx b/panda/src/sgraph/geomNode.cxx index fba2bf9f8d..80d6ea88d4 100644 --- a/panda/src/sgraph/geomNode.cxx +++ b/panda/src/sgraph/geomNode.cxx @@ -212,7 +212,7 @@ void GeomNode:: add_geoms_from(const GeomNode *other) { const PT(dDrawable) *geoms_begin = &other->_geoms[0]; const PT(dDrawable) *geoms_end = geoms_begin + other->_geoms.size(); - _geoms.insert(_geoms.end(), geoms_begin, geoms_end); + _geoms.v().insert(_geoms.end(), geoms_begin, geoms_end); mark_bound_stale(); }