From 28fffee547ca80fca2f921482c58880dac03745c Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 6 Jun 2001 00:55:53 +0000 Subject: [PATCH] pvector, pmap, etc. --- direct/src/dcparser/dcAtomicField.h | 4 +- direct/src/dcparser/dcClass.h | 9 +-- direct/src/dcparser/dcFile.h | 7 +-- direct/src/dcparser/dcMolecularField.h | 4 +- direct/src/dcparser/dcbase.h | 6 ++ direct/src/dcparser/primeNumberGenerator.h | 2 +- dtool/src/dtoolbase/pmap.h | 6 +- dtool/src/dtoolbase/pset.h | 6 +- dtool/src/dtoolbase/pvector.h | 1 + dtool/src/parser-inc/Sources.pp | 2 +- dtool/src/parser-inc/map | 7 +-- dtool/src/parser-inc/set | 7 +-- dtool/src/parser-inc/stdcompare.h | 33 +++++++++++ panda/src/audio/audio_linux_traits.cxx | 4 +- panda/src/audio/audio_manager.h | 4 +- panda/src/audio/audio_midi.h | 4 +- panda/src/audio/audio_mikmod_traits.cxx | 4 +- panda/src/audio/audio_pool.cxx | 2 +- panda/src/audio/audio_pool.h | 4 +- panda/src/audiotraits/audio_load_mp3.cxx | 4 +- panda/src/builder/builder.cxx | 4 +- panda/src/builder/builder.h | 4 +- panda/src/builder/builderAttribTempl.h | 2 +- panda/src/builder/builderBucketNode.h | 6 +- panda/src/builder/builderFuncs.I | 4 +- panda/src/builder/builderFuncs.h | 2 +- panda/src/builder/builderNormalVisualizer.h | 4 +- panda/src/builder/builderPrimTempl.h | 6 +- panda/src/builder/builderVertexTempl.h | 2 +- panda/src/builder/builder_headers.h | 8 +-- panda/src/builder/mesherEdge.h | 4 +- panda/src/builder/mesherFanMaker.I | 4 +- panda/src/builder/mesherFanMaker.h | 6 +- panda/src/builder/mesherStrip.I | 2 +- panda/src/builder/mesherStrip.h | 8 +-- panda/src/builder/mesherTempl.I | 6 +- panda/src/builder/mesherTempl.h | 22 ++++---- panda/src/chan/animChannelScalarTable.cxx | 6 +- panda/src/chan/animControl.h | 4 +- panda/src/chan/animControlCollection.h | 4 +- panda/src/chan/animGroup.h | 2 +- panda/src/chan/auto_bind.cxx | 8 +-- panda/src/chan/movingPartBase.cxx | 4 +- panda/src/chan/movingPartBase.h | 4 +- panda/src/chan/partBundle.cxx | 2 +- panda/src/chan/partBundle.h | 2 +- panda/src/chan/partGroup.cxx | 2 +- panda/src/chan/partGroup.h | 6 +- panda/src/chan/vector_PartGroupStar.h | 2 +- panda/src/chancfg/chancfg.cxx | 2 +- panda/src/chancfg/chancfg.h | 4 +- panda/src/chancfg/chanlayout.cxx | 2 +- panda/src/chancfg/chanlayout.h | 8 +-- panda/src/chancfg/chansetup.h | 4 +- panda/src/chancfg/chanwindow.h | 6 +- panda/src/char/character.h | 2 +- panda/src/char/characterJoint.h | 2 +- panda/src/char/computedVertices.cxx | 4 +- panda/src/char/computedVertices.h | 10 ++-- panda/src/char/computedVerticesMorph.h | 2 +- panda/src/collide/collisionHandlerEvent.h | 2 +- panda/src/collide/collisionHandlerPhysical.h | 6 +- panda/src/collide/collisionHandlerPusher.cxx | 2 +- panda/src/collide/collisionHandlerQueue.cxx | 2 +- panda/src/collide/collisionHandlerQueue.h | 2 +- panda/src/collide/collisionLevelState.h | 2 +- panda/src/collide/collisionNode.cxx | 2 +- panda/src/collide/collisionNode.h | 2 +- panda/src/collide/collisionPolygon.cxx | 4 +- panda/src/collide/collisionSolid.cxx | 2 +- panda/src/collide/collisionTraverser.h | 8 +-- panda/src/cull/cullState.h | 10 ++-- panda/src/cull/cullStateLookup.h | 6 +- panda/src/cull/cullTraverser.h | 10 ++-- panda/src/cull/geomBin.h | 2 +- panda/src/cull/geomBinBackToFront.h | 4 +- panda/src/cull/geomBinFixed.h | 4 +- panda/src/cull/geomBinGroup.h | 4 +- panda/src/cull/geomBinNormal.h | 2 +- panda/src/cull/geomBinUnsorted.h | 4 +- panda/src/device/clientAnalogDevice.h | 2 +- panda/src/device/clientBase.h | 6 +- panda/src/device/clientButtonDevice.h | 2 +- panda/src/device/clientDialDevice.h | 2 +- panda/src/dgraph/buttonEventDataAttribute.h | 4 +- panda/src/dgraph/dataGraphTraverser.h | 2 +- panda/src/display/config_display.h | 2 +- panda/src/display/displayRegion.h | 2 +- panda/src/display/display_headers.h | 2 +- panda/src/display/graphicsChannel.cxx | 2 +- panda/src/display/graphicsChannel.h | 4 +- panda/src/display/graphicsLayer.h | 4 +- panda/src/display/graphicsPipe.h | 6 +- panda/src/display/graphicsStateGuardian.h | 6 +- panda/src/display/graphicsWindow.cxx | 2 +- panda/src/display/graphicsWindow.h | 6 +- panda/src/display/graphicsWindowInputDevice.h | 8 +-- panda/src/downloader/asyncDownloader.cxx | 2 +- panda/src/downloader/downloadDb.cxx | 18 +++--- panda/src/downloader/downloadDb.h | 12 ++-- panda/src/downloader/multiplexStreamBuf.h | 4 +- panda/src/dxgsg/dxGraphicsStateGuardian.cxx | 4 +- panda/src/effects/lensFlareNode.h | 18 +++--- panda/src/egg/eggBinMaker.h | 12 ++-- panda/src/egg/eggGroup.cxx | 6 +- panda/src/egg/eggGroup.h | 2 +- panda/src/egg/eggGroupNode.h | 8 +-- panda/src/egg/eggMaterialCollection.cxx | 2 +- panda/src/egg/eggMaterialCollection.h | 6 +- panda/src/egg/eggMorph.h | 2 +- panda/src/egg/eggMorphList.h | 4 +- panda/src/egg/eggNameUniquifier.h | 6 +- panda/src/egg/eggNurbsSurface.h | 8 +-- panda/src/egg/eggPrimitive.cxx | 2 +- panda/src/egg/eggPrimitive.h | 2 +- panda/src/egg/eggTextureCollection.cxx | 2 +- panda/src/egg/eggTextureCollection.h | 6 +- panda/src/egg/eggUtilities.I | 4 +- panda/src/egg/eggUtilities.h | 8 +-- panda/src/egg/eggVertex.cxx | 2 +- panda/src/egg/eggVertex.h | 6 +- panda/src/egg/eggVertexPool.cxx | 2 +- panda/src/egg/eggVertexPool.h | 8 +-- panda/src/egg/eggXfmAnimData.cxx | 2 +- panda/src/egg/parser.yxx | 10 ++-- panda/src/egg/vector_PT_EggMaterial.h | 2 +- panda/src/egg/vector_PT_EggTexture.h | 2 +- panda/src/egg/vector_PT_EggVertex.h | 2 +- panda/src/egg2sg/characterMaker.h | 4 +- panda/src/egg2sg/computedVerticesMaker.cxx | 2 +- panda/src/egg2sg/computedVerticesMaker.h | 20 +++---- .../src/egg2sg/computedVerticesMakerEntity.h | 4 +- panda/src/egg2sg/deferredArcProperty.h | 2 +- panda/src/egg2sg/deferredArcTraverser.h | 2 +- panda/src/egg2sg/eggLoader.cxx | 14 ++--- panda/src/egg2sg/eggLoader.h | 10 ++-- panda/src/event/event.h | 2 +- panda/src/event/eventHandler.h | 12 ++-- panda/src/express/memoryUsage.cxx | 4 +- panda/src/express/memoryUsage.h | 4 +- panda/src/express/memoryUsagePointers.h | 4 +- panda/src/express/multifile.h | 4 +- panda/src/express/patchfile.h | 2 +- panda/src/express/profileTimer.cxx | 6 +- panda/src/express/tokenBoard.I | 4 +- panda/src/express/tokenBoard.h | 4 +- panda/src/express/typeHandle.h | 14 ++--- panda/src/framework/framework.cxx | 4 +- panda/src/glgsg/glGraphicsStateGuardian.cxx | 6 +- panda/src/glxdisplay/glxGraphicsWindow.cxx | 2 +- panda/src/gobj/LOD.h | 2 +- panda/src/gobj/geom.cxx | 2 +- panda/src/gobj/materialPool.h | 4 +- panda/src/gobj/texture.h | 4 +- panda/src/gobj/texturePool.h | 4 +- panda/src/graph/graphReducer.cxx | 16 +++--- panda/src/graph/multiAttribute.h | 4 +- panda/src/graph/multiTransition.h | 2 +- panda/src/graph/node.h | 2 +- panda/src/graph/nodeAttributes.h | 4 +- panda/src/graph/nodeRelation.cxx | 4 +- panda/src/graph/nodeRelation.h | 4 +- panda/src/graph/nodeTransition.h | 2 +- panda/src/graph/nodeTransitionCache.h | 4 +- panda/src/graph/nodeTransitions.h | 4 +- panda/src/graph/vector_NodeRelation_star.h | 2 +- panda/src/graph/vector_PT_Node.h | 2 +- panda/src/graph/vector_PT_NodeRelation.h | 2 +- panda/src/grutil/lineSegs.h | 6 +- panda/src/gui/guiButton.cxx | 4 +- panda/src/gui/guiChooser.h | 4 +- panda/src/gui/guiCollection.h | 4 +- panda/src/gui/guiFrame.cxx | 4 +- panda/src/gui/guiFrame.h | 6 +- panda/src/gui/guiLabel.h | 2 +- panda/src/gui/guiListBox.h | 8 +-- panda/src/gui/guiManager.h | 10 ++-- panda/src/gui/guiRollover.cxx | 4 +- panda/src/ipc/ipc_ps2_traits.h | 20 +++---- panda/src/ipc/ipc_traits.cxx | 4 +- panda/src/ipc/loom_internal.h | 4 +- panda/src/lerp/lerpfunctor.h | 4 +- panda/src/light/ambientLight.h | 2 +- panda/src/light/directionalLight.h | 2 +- panda/src/light/pointLight.h | 2 +- panda/src/light/spotlight.h | 2 +- panda/src/light/vector_PT_Light.h | 2 +- panda/src/linmath/vector_Colorf.h | 2 +- panda/src/linmath/vector_LPoint2f.h | 2 +- panda/src/linmath/vector_LVecBase3f.h | 2 +- panda/src/linmath/vector_Normalf.h | 2 +- panda/src/linmath/vector_Vertexf.h | 2 +- panda/src/loader/loader.cxx | 8 +-- panda/src/loader/loaderFileTypeRegistry.h | 8 +-- panda/src/loader/modelPool.h | 4 +- panda/src/mathutil/fftCompressor.cxx | 2 +- panda/src/net/connectionManager.h | 8 +-- panda/src/net/connectionReader.h | 10 ++-- panda/src/net/connectionWriter.h | 4 +- panda/src/net/datagramQueue.h | 6 +- panda/src/net/queuedConnectionListener.h | 2 +- panda/src/net/queuedConnectionManager.h | 2 +- panda/src/net/queuedConnectionReader.h | 2 +- panda/src/net/queuedReturn.h | 4 +- panda/src/net/test_spam_server.cxx | 4 +- panda/src/net/test_tcp_server.cxx | 4 +- panda/src/parametrics/classicNurbsCurve.cxx | 2 +- panda/src/parametrics/classicNurbsCurve.h | 2 +- panda/src/parametrics/curveFitter.h | 4 +- panda/src/parametrics/hermiteCurve.h | 2 +- panda/src/parametrics/nurbsCurveDrawer.h | 2 +- panda/src/parametrics/nurbsPPCurve.h | 4 +- panda/src/parametrics/parametricCurve.h | 8 +-- .../parametrics/parametricCurveCollection.h | 8 +-- panda/src/parametrics/piecewiseCurve.h | 2 +- .../src/particlesystem/baseParticleRenderer.h | 4 +- .../src/particlesystem/geomParticleRenderer.I | 2 +- .../particlesystem/geomParticleRenderer.cxx | 4 +- .../src/particlesystem/geomParticleRenderer.h | 6 +- .../particlesystem/lineParticleRenderer.cxx | 2 +- .../src/particlesystem/lineParticleRenderer.h | 2 +- panda/src/particlesystem/particleSystem.cxx | 14 ++--- panda/src/particlesystem/particleSystem.h | 6 +- .../particlesystem/particleSystemManager.I | 2 +- .../particlesystem/particleSystemManager.cxx | 6 +- .../particlesystem/particleSystemManager.h | 4 +- .../particlesystem/pointParticleRenderer.cxx | 2 +- .../particlesystem/pointParticleRenderer.h | 2 +- .../sparkleParticleRenderer.cxx | 2 +- .../particlesystem/sparkleParticleRenderer.h | 2 +- .../particlesystem/spriteParticleRenderer.cxx | 2 +- .../particlesystem/spriteParticleRenderer.h | 2 +- panda/src/physics/angularEulerIntegrator.cxx | 8 +-- panda/src/physics/angularEulerIntegrator.h | 2 +- panda/src/physics/angularIntegrator.cxx | 2 +- panda/src/physics/angularIntegrator.h | 4 +- panda/src/physics/baseIntegrator.I | 4 +- panda/src/physics/baseIntegrator.cxx | 8 +-- panda/src/physics/baseIntegrator.h | 14 ++--- panda/src/physics/forceNode.cxx | 6 +- panda/src/physics/forceNode.h | 4 +- panda/src/physics/linearEulerIntegrator.cxx | 8 +-- panda/src/physics/linearEulerIntegrator.h | 2 +- panda/src/physics/linearIntegrator.cxx | 4 +- panda/src/physics/linearIntegrator.h | 4 +- panda/src/physics/physical.I | 10 ++-- panda/src/physics/physical.cxx | 12 ++-- panda/src/physics/physical.h | 16 +++--- panda/src/physics/physicalNode.cxx | 6 +- panda/src/physics/physicalNode.h | 4 +- panda/src/physics/physicsManager.I | 6 +- panda/src/physics/physicsManager.cxx | 10 ++-- panda/src/physics/physicsManager.h | 10 ++-- panda/src/pnmimage/pnmFileTypeRegistry.cxx | 4 +- panda/src/pnmimage/pnmFileTypeRegistry.h | 6 +- panda/src/pstatclient/pStatClient.h | 10 ++-- .../pstatclient/pStatClientControlMessage.h | 6 +- panda/src/pstatclient/pStatFrameData.h | 4 +- .../pstatclient/pStatServerControlMessage.h | 2 +- panda/src/pstatclient/test_client.cxx | 4 +- panda/src/putil/bamReader.h | 10 ++-- panda/src/putil/bamWriter.h | 10 ++-- panda/src/putil/buttonRegistry.h | 8 +-- panda/src/putil/factoryBase.h | 8 +-- panda/src/putil/factoryParam.h | 2 +- panda/src/putil/factoryParams.h | 4 +- panda/src/putil/globalPointerRegistry.h | 4 +- panda/src/putil/nameUniquifier.h | 4 +- panda/src/putil/vector_double.h | 2 +- panda/src/putil/vector_float.h | 2 +- panda/src/putil/vector_typedWritable.h | 2 +- panda/src/putil/vector_uchar.h | 2 +- panda/src/putil/vector_ulong.h | 2 +- panda/src/putil/vector_ushort.h | 2 +- panda/src/putil/vector_writable.h | 2 +- panda/src/putil/writableParam.h | 2 +- panda/src/ribgsg/ribGraphicsStateGuardian.cxx | 8 +-- panda/src/ribgsg/ribGraphicsStateGuardian.h | 6 +- panda/src/sgidisplay/sgiGraphicsPipe.h | 2 +- panda/src/sgmanip/findApproxLevel.h | 2 +- panda/src/sgmanip/findApproxPath.h | 4 +- panda/src/sgmanip/nodePath.cxx | 56 ++++++++++--------- panda/src/sgmanip/nodePath.h | 2 +- panda/src/sgraph/camera.h | 4 +- panda/src/sgraph/geomNode.cxx | 2 +- panda/src/sgraph/geomTransformer.h | 8 +-- panda/src/sgraphutil/sceneGraphAnalyzer.h | 6 +- panda/src/shader/casterShader.h | 2 +- panda/src/shader/shader.h | 2 +- panda/src/shader/shaderTransition.h | 16 +++--- panda/src/testbed/deadrec_rec.cxx | 2 +- panda/src/testbed/min_shader.cxx | 6 +- panda/src/testbed/motion.cxx | 6 +- panda/src/testbed/shader_test.cxx | 6 +- panda/src/text/textFont.h | 4 +- panda/src/tform/dataValve.h | 4 +- panda/src/tform/mouseWatcher.h | 4 +- panda/src/vrpn/vrpnAnalog.h | 4 +- panda/src/vrpn/vrpnButton.h | 4 +- panda/src/vrpn/vrpnClient.h | 8 +-- panda/src/vrpn/vrpnDial.h | 4 +- panda/src/vrpn/vrpnTracker.h | 4 +- panda/src/wgldisplay/wglGraphicsWindow.cxx | 2 +- 303 files changed, 775 insertions(+), 739 deletions(-) create mode 100644 dtool/src/parser-inc/stdcompare.h diff --git a/direct/src/dcparser/dcAtomicField.h b/direct/src/dcparser/dcAtomicField.h index 9922f17669..b7dcd64c7f 100644 --- a/direct/src/dcparser/dcAtomicField.h +++ b/direct/src/dcparser/dcAtomicField.h @@ -23,8 +23,6 @@ #include "dcField.h" #include "dcSubatomicType.h" -#include - //////////////////////////////////////////////////////////////////// // Class : DCAtomicField // Description : A single atomic field of a Distributed Class, as read @@ -81,7 +79,7 @@ public: bool format_default_value(const string &str, string &formatted) const; }; - typedef vector Elements; + typedef pvector Elements; Elements _elements; enum Flags { diff --git a/direct/src/dcparser/dcClass.h b/direct/src/dcparser/dcClass.h index 059ab98764..ece2c94aa3 100644 --- a/direct/src/dcparser/dcClass.h +++ b/direct/src/dcparser/dcClass.h @@ -22,9 +22,6 @@ #include "dcbase.h" #include "dcField.h" -#include -#include - class HashGenerator; //////////////////////////////////////////////////////////////////// @@ -62,16 +59,16 @@ public: int _number; string _name; - typedef vector Parents; + typedef pvector Parents; Parents _parents; - typedef vector Fields; + typedef pvector Fields; Fields _fields; public: // These members are built up during parsing for the convenience of // the parser. - typedef map FieldsByName; + typedef pmap FieldsByName; FieldsByName _fields_by_name; }; diff --git a/direct/src/dcparser/dcFile.h b/direct/src/dcparser/dcFile.h index 6e8f8c42cb..28a996679b 100644 --- a/direct/src/dcparser/dcFile.h +++ b/direct/src/dcparser/dcFile.h @@ -22,9 +22,6 @@ #include "dcbase.h" #include "dcClass.h" -#include -#include - class HashGenerator; //////////////////////////////////////////////////////////////////// @@ -57,12 +54,12 @@ public: public: // This vector is the primary interface to the distributed classes // read from the file. - typedef vector Classes; + typedef pvector Classes; Classes _classes; public: // This map is built up during parsing for the convenience of the parser. - typedef map ClassesByName; + typedef pmap ClassesByName; ClassesByName _classes_by_name; }; diff --git a/direct/src/dcparser/dcMolecularField.h b/direct/src/dcparser/dcMolecularField.h index e7951e68d2..87ca26e827 100644 --- a/direct/src/dcparser/dcMolecularField.h +++ b/direct/src/dcparser/dcMolecularField.h @@ -22,8 +22,6 @@ #include "dcbase.h" #include "dcField.h" -#include - class DCAtomicField; //////////////////////////////////////////////////////////////////// @@ -48,7 +46,7 @@ public: public: // These members define the primary interface to the molecular field // definition as read from the file. - typedef vector Fields; + typedef pvector Fields; Fields _fields; }; diff --git a/direct/src/dcparser/dcbase.h b/direct/src/dcparser/dcbase.h index 2d1aba98f1..3a2cee82ea 100644 --- a/direct/src/dcparser/dcbase.h +++ b/direct/src/dcparser/dcbase.h @@ -34,6 +34,8 @@ #include #include #include +#include "pvector.h" +#include "pmap.h" #else @@ -98,6 +100,10 @@ typedef string Filename; #define IS_LITTLE_ENDIAN #endif +#include +#include +#define pvector vector +#define pmap map #endif // WITHIN_PANDA diff --git a/direct/src/dcparser/primeNumberGenerator.h b/direct/src/dcparser/primeNumberGenerator.h index 6087fbab58..4ab7f9a4d0 100644 --- a/direct/src/dcparser/primeNumberGenerator.h +++ b/direct/src/dcparser/primeNumberGenerator.h @@ -36,7 +36,7 @@ public: int operator [] (int n); private: - typedef vector Primes; + typedef pvector Primes; Primes _primes; }; diff --git a/dtool/src/dtoolbase/pmap.h b/dtool/src/dtoolbase/pmap.h index 149caa43ba..1e7979e260 100644 --- a/dtool/src/dtoolbase/pmap.h +++ b/dtool/src/dtoolbase/pmap.h @@ -35,7 +35,8 @@ template > class pmap : public map > > { public: pmap() : map > >() { } - pmap(const pmap ©) : map > >(copy) { } + pmap(const pmap ©) : map > >(copy) { } + pmap(const Compare &comp) : map >(comp) { } }; //////////////////////////////////////////////////////////////////// @@ -49,7 +50,8 @@ template > class pmultimap : public multimap > > { public: pmultimap() : multimap > >() { } - pmultimap(const pmultimap ©) : multimap > >(copy) { } + pmultimap(const pmultimap ©) : multimap > >(copy) { } + pmultimap(const Compare &comp) : multimap >(comp) { } }; #endif diff --git a/dtool/src/dtoolbase/pset.h b/dtool/src/dtoolbase/pset.h index 10fe483894..9c8914d2ba 100644 --- a/dtool/src/dtoolbase/pset.h +++ b/dtool/src/dtoolbase/pset.h @@ -35,7 +35,8 @@ template > class pset : public set > { public: pset() : set >() { } - pset(const pset ©) : set >(copy) { } + pset(const pset ©) : set >(copy) { } + pset(const Compare &comp) : set >(comp) { } }; //////////////////////////////////////////////////////////////////// @@ -49,7 +50,8 @@ template > class pmultiset : public multiset > { public: pmultiset() : multiset >() { } - pmultiset(const pmultiset ©) : multiset >(copy) { } + pmultiset(const pmultiset ©) : multiset >(copy) { } + pmultiset(const Compare &comp) : multiset >(comp) { } }; #endif diff --git a/dtool/src/dtoolbase/pvector.h b/dtool/src/dtoolbase/pvector.h index 7ed317f488..0ea2f898f6 100644 --- a/dtool/src/dtoolbase/pvector.h +++ b/dtool/src/dtoolbase/pvector.h @@ -38,6 +38,7 @@ public: pvector(const pvector ©) : vector >(copy) { } pvector(size_type n) : vector >(n) { } pvector(size_type n, const Type &value) : vector >(n, value) { } + pvector(const Type *begin, const Type *end) : vector >(begin, end) { } }; #endif diff --git a/dtool/src/parser-inc/Sources.pp b/dtool/src/parser-inc/Sources.pp index 4df753a7df..d063a6a98e 100644 --- a/dtool/src/parser-inc/Sources.pp +++ b/dtool/src/parser-inc/Sources.pp @@ -1,5 +1,5 @@ #define INSTALL_PARSER_INC \ algorithm deque iostream list map memory \ - pair queue set stack stdtypedefs.h \ + pair queue set stack stdcompare.h stdtypedefs.h \ string vector windows.h zlib.h md5.h files.h hex.h \ nurbs.hh diff --git a/dtool/src/parser-inc/map b/dtool/src/parser-inc/map index 829cd70b93..b1b0f4e5f5 100644 --- a/dtool/src/parser-inc/map +++ b/dtool/src/parser-inc/map @@ -25,11 +25,10 @@ #define MAP_H #include +#include #include -class default_map_compare; - -template +template > class map { public: typedef key key_type; @@ -51,7 +50,7 @@ public: class difference_type; }; -template +template > class multimap : public map { }; diff --git a/dtool/src/parser-inc/set b/dtool/src/parser-inc/set index 773593abba..178105d387 100644 --- a/dtool/src/parser-inc/set +++ b/dtool/src/parser-inc/set @@ -25,10 +25,9 @@ #define SET_H #include +#include -class default_set_compare; - -template +template > class set { public: typedef key key_type; @@ -49,7 +48,7 @@ public: class difference_type; }; -template +template > class multiset : public set { }; diff --git a/dtool/src/parser-inc/stdcompare.h b/dtool/src/parser-inc/stdcompare.h new file mode 100644 index 0000000000..25ec5b5dfb --- /dev/null +++ b/dtool/src/parser-inc/stdcompare.h @@ -0,0 +1,33 @@ +// Filename: stdcompare.h +// Created by: drose (05Jun01) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved +// +// All use of this software is subject to the terms of the Panda 3d +// Software license. You should have received a copy of this license +// along with this source code; you will also find a current copy of +// the license at http://www.panda3d.org/license.txt . +// +// To contact the maintainers of this program write to +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +#ifndef STDCOMPARE_H +#define STDCOMPARE_H + +template +class less { +public: +}; + +#endif + diff --git a/panda/src/audio/audio_linux_traits.cxx b/panda/src/audio/audio_linux_traits.cxx index 97f1d4464b..849f06fa75 100644 --- a/panda/src/audio/audio_linux_traits.cxx +++ b/panda/src/audio/audio_linux_traits.cxx @@ -24,12 +24,12 @@ #include "config_audio.h" #include #include -#include +#include "pset.h" #include #include #include -typedef set BufferSet; +typedef pset BufferSet; static bool have_initialized = false; static mutex buffer_mutex; diff --git a/panda/src/audio/audio_manager.h b/panda/src/audio/audio_manager.h index 8e62b6036a..0d41e3269f 100644 --- a/panda/src/audio/audio_manager.h +++ b/panda/src/audio/audio_manager.h @@ -25,7 +25,7 @@ #include #include -#include +#include "pset.h" class EXPCL_PANDA AudioManager { private: @@ -46,7 +46,7 @@ private: typedef void UpdateFunc(void); typedef void ShutdownFunc(void); - typedef set LoopSet; + typedef pset LoopSet; static AudioManager* _global_ptr; static UpdateFunc* _update_func; static ShutdownFunc* _shutdown_func; diff --git a/panda/src/audio/audio_midi.h b/panda/src/audio/audio_midi.h index 85c3fcd31b..76b225f5f0 100644 --- a/panda/src/audio/audio_midi.h +++ b/panda/src/audio/audio_midi.h @@ -20,12 +20,12 @@ #define __AUDIO_MIDI_H__ #include -#include +#include "plist.h" // define an internal representation for a midi file class AudioMidi { private: - typedef list StrList; + typedef plist StrList; StrList _seq; public: AudioMidi(Filename, int = 1); diff --git a/panda/src/audio/audio_mikmod_traits.cxx b/panda/src/audio/audio_mikmod_traits.cxx index f93c534d7e..eae539385d 100644 --- a/panda/src/audio/audio_mikmod_traits.cxx +++ b/panda/src/audio/audio_mikmod_traits.cxx @@ -22,7 +22,7 @@ #include "audio_manager.h" #include "config_audio.h" -#include +#include "plist.h" #include static bool have_initialized = false; @@ -43,7 +43,7 @@ static void initialize(void) { md_mixfreq = audio_mix_freq; { // I think this is defined elsewhere - typedef list StrList; + typedef plist StrList; typedef Serialize::Deserializer OptBuster; StrList opts; OptBuster buster(*audio_mode_flags, " "); diff --git a/panda/src/audio/audio_pool.cxx b/panda/src/audio/audio_pool.cxx index decabb17a7..1f4e33ac9a 100644 --- a/panda/src/audio/audio_pool.cxx +++ b/panda/src/audio/audio_pool.cxx @@ -21,7 +21,7 @@ #include AudioPool* AudioPool::_global_ptr = (AudioPool*)0L; -typedef map SoundLoaders; +typedef pmap SoundLoaders; SoundLoaders* _sound_loaders = (SoundLoaders*)0L; //////////////////////////////////////////////////////////////////// diff --git a/panda/src/audio/audio_pool.h b/panda/src/audio/audio_pool.h index 98b76b3b75..f4f2232fe1 100644 --- a/panda/src/audio/audio_pool.h +++ b/panda/src/audio/audio_pool.h @@ -22,7 +22,7 @@ #include "audio_sound.h" #include "audio_trait.h" #include "config_audio.h" -#include +#include "pmap.h" #include #include #include @@ -40,7 +40,7 @@ private: static AudioPool* get_ptr(void); static AudioPool *_global_ptr; - typedef map SoundMap; + typedef pmap SoundMap; SoundMap _sounds; public: typedef AudioTraits::SoundClass* SoundLoadFunc(Filename); diff --git a/panda/src/audiotraits/audio_load_mp3.cxx b/panda/src/audiotraits/audio_load_mp3.cxx index a83fd0d7d8..426ce8fe7d 100644 --- a/panda/src/audiotraits/audio_load_mp3.cxx +++ b/panda/src/audiotraits/audio_load_mp3.cxx @@ -146,8 +146,8 @@ static void initialize(void) { class BufferStuff { private: - typedef vector Buffer; - typedef vector Buffers; + typedef pvector Buffer; + typedef pvector Buffers; Buffers _bufs; public: BufferStuff(void) {} diff --git a/panda/src/builder/builder.cxx b/panda/src/builder/builder.cxx index f14d4d57d8..8a36f7ac0e 100644 --- a/panda/src/builder/builder.cxx +++ b/panda/src/builder/builder.cxx @@ -29,7 +29,7 @@ #include #include #include -#include +#include "pmap.h" #endif #include "builder.h" @@ -126,7 +126,7 @@ public: //////////////////////////////////////////////////////////////////// GeomNode *Builder:: build(const string &default_name) { - typedef map > GeomNodeMap; + typedef pmap > GeomNodeMap; GeomNodeMap geom_nodes; // First, build all the Geoms and create GeomNodes for them. Each diff --git a/panda/src/builder/builder.h b/panda/src/builder/builder.h index 80d27a0bc9..4cc0b6c286 100644 --- a/panda/src/builder/builder.h +++ b/panda/src/builder/builder.h @@ -172,7 +172,7 @@ #include -#include +#include "pset.h" class GeomNode; @@ -200,7 +200,7 @@ public: protected: void add_bucket(const BuilderBucket &bucket); - typedef set > Buckets; + typedef pset > Buckets; Buckets _buckets; Buckets::iterator _bi; diff --git a/panda/src/builder/builderAttribTempl.h b/panda/src/builder/builderAttribTempl.h index 130de5c2e8..fac527cad7 100644 --- a/panda/src/builder/builderAttribTempl.h +++ b/panda/src/builder/builderAttribTempl.h @@ -22,7 +22,7 @@ #include "builderTypes.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// diff --git a/panda/src/builder/builderBucketNode.h b/panda/src/builder/builderBucketNode.h index ea0b4cf76f..7720cb0cf3 100644 --- a/panda/src/builder/builderBucketNode.h +++ b/panda/src/builder/builderBucketNode.h @@ -24,7 +24,7 @@ #include "builderPrim.h" #include "builderBucket.h" -#include +#include "pset.h" class GeomNode; @@ -59,8 +59,8 @@ public: int build(GeomNode *geom_node) const; protected: - typedef multiset > Prims; - typedef multiset > IPrims; + typedef pmultiset > Prims; + typedef pmultiset > IPrims; BuilderBucket *_bucket; Prims _prims; diff --git a/panda/src/builder/builderFuncs.I b/panda/src/builder/builderFuncs.I index 7c7e1a5b3a..b627ff7f5f 100644 --- a/panda/src/builder/builderFuncs.I +++ b/panda/src/builder/builderFuncs.I @@ -46,7 +46,7 @@ decomp_concave(const PrimType &prim, BuilderBucket &bucket, int asum, int x, int y) { #define VX(p, c) p->coord[c] - vector output_prims; + pvector output_prims; DecompVtx *p0, *p1, *p2, *t0, *vert; DecompVtx *m[3]; @@ -804,7 +804,7 @@ __mesh_and_build(InputIterator first, InputIterator last, return 0; } - typedef vector Prims; + typedef pvector Prims; Prims prims; BuilderBucket *local_bucket = NULL; BuilderBucket *bucket_ptr = &bucket; diff --git a/panda/src/builder/builderFuncs.h b/panda/src/builder/builderFuncs.h index 44396c3046..3f382b673b 100644 --- a/panda/src/builder/builderFuncs.h +++ b/panda/src/builder/builderFuncs.h @@ -20,7 +20,7 @@ #include -#include +#include "pvector.h" #include diff --git a/panda/src/builder/builderNormalVisualizer.h b/panda/src/builder/builderNormalVisualizer.h index 65b8c63de1..f269fe56d0 100644 --- a/panda/src/builder/builderNormalVisualizer.h +++ b/panda/src/builder/builderNormalVisualizer.h @@ -30,7 +30,7 @@ #include "builderVertex.h" #include "builderPrim.h" -#include +#include "pvector.h" /////////////////////////////////////////////////////////////////// // Class : BuilderNormalVisualizer @@ -56,7 +56,7 @@ private: BuilderV _net_vertex; int _num_vertices; - vector _lines; + pvector _lines; }; #include "builderNormalVisualizer.I" diff --git a/panda/src/builder/builderPrimTempl.h b/panda/src/builder/builderPrimTempl.h index d4dea4bde7..0921460cbd 100644 --- a/panda/src/builder/builderPrimTempl.h +++ b/panda/src/builder/builderPrimTempl.h @@ -25,7 +25,7 @@ #include "builderAttrib.h" #include "builderTypes.h" -#include +#include "pvector.h" ///////////////////////////////////////////////////////////////////// @@ -135,8 +135,8 @@ protected: INLINE int sort_value() const; void update_overall_attrib(); - typedef vector Verts; - typedef vector Components; + typedef pvector Verts; + typedef pvector Components; Verts _verts; Components _components; diff --git a/panda/src/builder/builderVertexTempl.h b/panda/src/builder/builderVertexTempl.h index da3534dd99..ab98310842 100644 --- a/panda/src/builder/builderVertexTempl.h +++ b/panda/src/builder/builderVertexTempl.h @@ -24,7 +24,7 @@ #include "builderTypes.h" #include "builderAttribTempl.h" -#include +#include "pvector.h" ///////////////////////////////////////////////////////////////////// diff --git a/panda/src/builder/builder_headers.h b/panda/src/builder/builder_headers.h index 726a395288..27c51496b1 100644 --- a/panda/src/builder/builder_headers.h +++ b/panda/src/builder/builder_headers.h @@ -18,9 +18,9 @@ #include #include -#include +#include "plist.h" #include -#include +#include "pmap.h" #include #include #include @@ -29,9 +29,9 @@ #include #include #include -#include +#include "pset.h" #include -#include +#include "pvector.h" #include "builderAttrib.h" #include "builderAttribTempl.h" diff --git a/panda/src/builder/mesherEdge.h b/panda/src/builder/mesherEdge.h index ee3afc3b3d..7cae2645c0 100644 --- a/panda/src/builder/mesherEdge.h +++ b/panda/src/builder/mesherEdge.h @@ -24,7 +24,7 @@ #include "mesherConfig.h" #include "builderBucket.h" -#include +#include "plist.h" #include @@ -61,7 +61,7 @@ public: const Vertex *_a, *_b; - typedef list Strips; + typedef plist Strips; Strips _strips; MesherEdge *_opposite; }; diff --git a/panda/src/builder/mesherFanMaker.I b/panda/src/builder/mesherFanMaker.I index 87918ff2ed..dbfc751146 100644 --- a/panda/src/builder/mesherFanMaker.I +++ b/panda/src/builder/mesherFanMaker.I @@ -304,12 +304,12 @@ unroll(Strips::iterator strip_begin, Strips::iterator strip_end, } else { // Now decompose the new polygon into triangles. - vector tris; + pvector tris; result = expand(poly, *_bucket, back_inserter(tris)); if (result) { // Now add each triangle back into the mesher. - vector::iterator ti; + pvector::iterator ti; for (ti = tris.begin(); ti != tris.end(); ++ti) { _mesher->add_prim(*ti); diff --git a/panda/src/builder/mesherFanMaker.h b/panda/src/builder/mesherFanMaker.h index ec6bd35149..676fa29ec3 100644 --- a/panda/src/builder/mesherFanMaker.h +++ b/panda/src/builder/mesherFanMaker.h @@ -30,7 +30,7 @@ #include "mesherEdge.h" #include "mesherStrip.h" -#include +#include "plist.h" template @@ -46,8 +46,8 @@ public: typedef MesherStrip Strip; typedef MesherTempl Mesher; - typedef list Edges; - typedef list Strips; + typedef plist Edges; + typedef plist Strips; MesherFanMaker() {} MesherFanMaker(const Vertex *vertex, Strip *tri, Mesher *mesher); diff --git a/panda/src/builder/mesherStrip.I b/panda/src/builder/mesherStrip.I index 09701e59ca..2d019d7ccc 100644 --- a/panda/src/builder/mesherStrip.I +++ b/panda/src/builder/mesherStrip.I @@ -466,7 +466,7 @@ cut_sheet(int first_row_id, int do_mate, const BuilderBucket &bucket) { // calling cut_sheet() recursively will start things mating, and // could damage our edge list. - typedef list StripPtrs; + typedef plist StripPtrs; StripPtrs strip_ptrs; for (ei = _edges.begin(); ei != _edges.end(); ++ei) { diff --git a/panda/src/builder/mesherStrip.h b/panda/src/builder/mesherStrip.h index 82d2eec44b..84c341b814 100644 --- a/panda/src/builder/mesherStrip.h +++ b/panda/src/builder/mesherStrip.h @@ -25,7 +25,7 @@ #include "builderTypes.h" #include "builderBucket.h" -#include +#include "plist.h" #include @@ -118,9 +118,9 @@ public: ostream &output(ostream &out) const; - typedef list Prims; - typedef list Edges; - typedef list Verts; + typedef plist Prims; + typedef plist Edges; + typedef plist Verts; Prims _prims; Edges _edges; diff --git a/panda/src/builder/mesherTempl.I b/panda/src/builder/mesherTempl.I index 8057de923a..0d37a23e3f 100644 --- a/panda/src/builder/mesherTempl.I +++ b/panda/src/builder/mesherTempl.I @@ -384,7 +384,7 @@ count_vert_edges(const EdgePtrs &edges) const { } template -list::Strip> &MesherTempl:: +plist::Strip> &MesherTempl:: choose_strip_list(const Strip &strip) { switch (strip._status) { case MS_done: @@ -513,7 +513,7 @@ find_fans() { const Vertex &v = (*vi).first; // Build up a list of far fan edges. - typedef vector FanMakers; + typedef pvector FanMakers; FanMakers fans; @@ -588,7 +588,7 @@ make_quads() { typedef pair Pair; typedef pair Matched; - typedef vector SoulMates; + typedef pvector SoulMates; SoulMates soulmates; diff --git a/panda/src/builder/mesherTempl.h b/panda/src/builder/mesherTempl.h index 7fc75863f0..ebc5292014 100644 --- a/panda/src/builder/mesherTempl.h +++ b/panda/src/builder/mesherTempl.h @@ -25,10 +25,10 @@ #include "mesherEdge.h" #include "mesherStrip.h" -#include -#include -#include -#include +#include "pvector.h" +#include "plist.h" +#include "pset.h" +#include "pmap.h" template class MesherFanMaker; @@ -54,18 +54,18 @@ public: void show(ostream &out); protected: - typedef list Strips; - typedef set > Edges; - typedef set > EdgePtrs; - typedef map > Verts; + typedef plist Strips; + typedef pset > Edges; + typedef pset > EdgePtrs; + typedef pmap > Verts; // This is used for show-tstrips. - typedef vector Colors; + typedef pvector Colors; // And this is used for show-qsheets. - typedef map > ColorSheetMap; + typedef pmap > ColorSheetMap; int count_vert_edges(const EdgePtrs &edges) const; - list &choose_strip_list(const Strip &strip); + plist &choose_strip_list(const Strip &strip); void build_sheets(); void find_fans(); diff --git a/panda/src/chan/animChannelScalarTable.cxx b/panda/src/chan/animChannelScalarTable.cxx index b2b793c68f..a86674a826 100644 --- a/panda/src/chan/animChannelScalarTable.cxx +++ b/panda/src/chan/animChannelScalarTable.cxx @@ -165,13 +165,13 @@ write_datagram(BamWriter *manager, Datagram &me) static const int max_values = 16; static const float scale = 1000.0; - map index; + pmap index; int i; for (i = 0; i < (int)_table.size() && (int)index.size() <= max_values; i++) { int value = (int)floor(_table[i] * scale + 0.5); - index.insert(map::value_type(value, index.size())); + index.insert(pmap::value_type(value, index.size())); } int index_length = index.size(); if (index_length <= max_values) { @@ -184,7 +184,7 @@ write_datagram(BamWriter *manager, Datagram &me) // We need to write the index in order by its index number; for // this, we need to invert the index. vector_float reverse_index(index_length); - map::iterator mi; + pmap::iterator mi; for (mi = index.begin(); mi != index.end(); ++mi) { float f = (float)(*mi).first / scale; int i = (*mi).second; diff --git a/panda/src/chan/animControl.h b/panda/src/chan/animControl.h index 07ed36777d..3e674909ca 100644 --- a/panda/src/chan/animControl.h +++ b/panda/src/chan/animControl.h @@ -31,7 +31,7 @@ #include #include -#include +#include "pmap.h" class PartBundle; class AnimChannelBase; @@ -108,7 +108,7 @@ public: }; private: - typedef multimap Actions; + typedef pmultimap Actions; static void insert_event_action(Actions &actions, int frame, const CPT_Event &event); static void insert_stop_action(Actions &actions, int frame); diff --git a/panda/src/chan/animControlCollection.h b/panda/src/chan/animControlCollection.h index 53cbc53665..73243c003a 100644 --- a/panda/src/chan/animControlCollection.h +++ b/panda/src/chan/animControlCollection.h @@ -27,7 +27,7 @@ #include #include -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : AnimControlCollection @@ -85,7 +85,7 @@ PUBLISHED: string which_anim_playing() const; private: - typedef map Controls; + typedef pmap Controls; Controls _controls; CPT_Event _stop_event; AnimControl *_last_started_control; diff --git a/panda/src/chan/animGroup.h b/panda/src/chan/animGroup.h index 8f9b9000ed..7db91031e4 100644 --- a/panda/src/chan/animGroup.h +++ b/panda/src/chan/animGroup.h @@ -62,7 +62,7 @@ protected: void write_descendants(ostream &out, int indent_level) const; protected: - typedef vector< PT(AnimGroup) > Children; + typedef pvector< PT(AnimGroup) > Children; Children _children; AnimBundle *_root; diff --git a/panda/src/chan/auto_bind.cxx b/panda/src/chan/auto_bind.cxx index 607a086824..1ac4a3a086 100644 --- a/panda/src/chan/auto_bind.cxx +++ b/panda/src/chan/auto_bind.cxx @@ -37,11 +37,11 @@ #include #include "auto_bind.h" -typedef set AnimNodes; -typedef map Anims; +typedef pset AnimNodes; +typedef pmap Anims; -typedef set PartNodes; -typedef map Parts; +typedef pset PartNodes; +typedef pmap Parts; diff --git a/panda/src/chan/movingPartBase.cxx b/panda/src/chan/movingPartBase.cxx index 3bf43dfae4..3e3ebe2b8e 100644 --- a/panda/src/chan/movingPartBase.cxx +++ b/panda/src/chan/movingPartBase.cxx @@ -155,10 +155,10 @@ update_internals(PartGroup *, bool, bool) { // infinity. //////////////////////////////////////////////////////////////////// void MovingPartBase:: -pick_channel_index(list &holes, int &next) const { +pick_channel_index(plist &holes, int &next) const { // Verify each of the holes. - list::iterator ii, ii_next; + plist::iterator ii, ii_next; ii = holes.begin(); while (ii != holes.end()) { ii_next = ii; diff --git a/panda/src/chan/movingPartBase.h b/panda/src/chan/movingPartBase.h index 7846d162fa..6dd04dbca3 100644 --- a/panda/src/chan/movingPartBase.h +++ b/panda/src/chan/movingPartBase.h @@ -58,10 +58,10 @@ public: protected: MovingPartBase(void); - virtual void pick_channel_index(list &holes, int &next) const; + virtual void pick_channel_index(plist &holes, int &next) const; virtual void bind_hierarchy(AnimGroup *anim, int channel_index); - typedef vector< PT(AnimChannelBase) > Channels; + typedef pvector< PT(AnimChannelBase) > Channels; Channels _channels; public: diff --git a/panda/src/chan/partBundle.cxx b/panda/src/chan/partBundle.cxx index d49893dda3..a8403cf20b 100644 --- a/panda/src/chan/partBundle.cxx +++ b/panda/src/chan/partBundle.cxx @@ -284,7 +284,7 @@ bind_anim(AnimBundle *anim, int hierarchy_match_flags) { return NULL; } - list holes; + plist holes; int channel_index = 0; pick_channel_index(holes, channel_index); diff --git a/panda/src/chan/partBundle.h b/panda/src/chan/partBundle.h index 228def0d37..122103e455 100644 --- a/panda/src/chan/partBundle.h +++ b/panda/src/chan/partBundle.h @@ -42,7 +42,7 @@ public: // This is passed down through the MovingParts during the // do_update() call to specify the channels that are in effect. - typedef map ChannelBlend; + typedef pmap ChannelBlend; // This is the parameter to set_blend_type() and specifies the kind // of blending operation to be performed when multiple controls are diff --git a/panda/src/chan/partGroup.cxx b/panda/src/chan/partGroup.cxx index 4e397baefa..2319d15901 100644 --- a/panda/src/chan/partGroup.cxx +++ b/panda/src/chan/partGroup.cxx @@ -411,7 +411,7 @@ write_descendants_with_value(ostream &out, int indent_level) const { // infinity. //////////////////////////////////////////////////////////////////// void PartGroup:: -pick_channel_index(list &holes, int &next) const { +pick_channel_index(plist &holes, int &next) const { Children::const_iterator ci; for (ci = _children.begin(); ci != _children.end(); ++ci) { (*ci)->pick_channel_index(holes, next); diff --git a/panda/src/chan/partGroup.h b/panda/src/chan/partGroup.h index 270c21a259..caa68e7c2a 100644 --- a/panda/src/chan/partGroup.h +++ b/panda/src/chan/partGroup.h @@ -26,7 +26,7 @@ #include #include -#include +#include "plist.h" class AnimControl; class AnimGroup; @@ -89,10 +89,10 @@ protected: void write_descendants(ostream &out, int indent_level) const; void write_descendants_with_value(ostream &out, int indent_level) const; - virtual void pick_channel_index(list &holes, int &next) const; + virtual void pick_channel_index(plist &holes, int &next) const; virtual void bind_hierarchy(AnimGroup *anim, int channel_index); - typedef vector< PT(PartGroup) > Children; + typedef pvector< PT(PartGroup) > Children; Children _children; public: diff --git a/panda/src/chan/vector_PartGroupStar.h b/panda/src/chan/vector_PartGroupStar.h index be82b711b2..484eac9221 100644 --- a/panda/src/chan/vector_PartGroupStar.h +++ b/panda/src/chan/vector_PartGroupStar.h @@ -23,7 +23,7 @@ #include "partGroup.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_PartGroupStar diff --git a/panda/src/chancfg/chancfg.cxx b/panda/src/chancfg/chancfg.cxx index 1b6cd7d152..6777dad75f 100644 --- a/panda/src/chancfg/chancfg.cxx +++ b/panda/src/chancfg/chancfg.cxx @@ -130,7 +130,7 @@ INLINE bool ConfigDefined(std::string sym) { (WindowDB->find(sym) != WindowDB->end()); } -typedef std::vector SVec; +typedef std::pvector SVec; bool ChanCheckLayouts(SetupSyms& S) { if (S.empty()) diff --git a/panda/src/chancfg/chancfg.h b/panda/src/chancfg/chancfg.h index c05a5a53c3..1afa15b710 100644 --- a/panda/src/chancfg/chancfg.h +++ b/panda/src/chancfg/chancfg.h @@ -29,7 +29,7 @@ #include #include -#include +#include "pmap.h" class Node; @@ -72,7 +72,7 @@ private: INLINE void setString(const std::string& v) { _str = v; } INLINE std::string getString(void) const { return _str; } }; - typedef std::map Fields; + typedef std::pmap Fields; Fields _fields; public: ChanCfgOverrides(void); diff --git a/panda/src/chancfg/chanlayout.cxx b/panda/src/chancfg/chanlayout.cxx index d53c0f643e..4313ba0097 100644 --- a/panda/src/chancfg/chanlayout.cxx +++ b/panda/src/chancfg/chanlayout.cxx @@ -44,7 +44,7 @@ LayoutParseFunctor::~LayoutParseFunctor(void) { return; } -typedef std::vector LayoutBoolVec; +typedef std::pvector LayoutBoolVec; void LayoutParseFunctor::operator()(std::string S) { std::string sym; diff --git a/panda/src/chancfg/chanlayout.h b/panda/src/chancfg/chanlayout.h index 94a71c7762..f4146fbe92 100644 --- a/panda/src/chancfg/chanlayout.h +++ b/panda/src/chancfg/chanlayout.h @@ -21,14 +21,14 @@ #include -#include -#include +#include "pmap.h" +#include "pvector.h" #include #include #include "chanviewport.h" -typedef std::vector LayoutRegionVec; +typedef std::pvector LayoutRegionVec; class LayoutItem { private: @@ -46,7 +46,7 @@ public: INLINE const ChanViewport& operator[](int); }; -typedef std::map LayoutType; +typedef std::pmap LayoutType; extern LayoutType* LayoutDB; diff --git a/panda/src/chancfg/chansetup.h b/panda/src/chancfg/chansetup.h index c780d78bd1..d64e4995b4 100644 --- a/panda/src/chancfg/chansetup.h +++ b/panda/src/chancfg/chansetup.h @@ -23,7 +23,7 @@ #include -#include +#include "pmap.h" #include "chanviewport.h" typedef vector_string SetupSyms; @@ -88,7 +88,7 @@ public: INLINE Orientation getOrientation(void) const; }; -typedef std::map SetupType; +typedef std::pmap SetupType; extern SetupType* SetupDB; diff --git a/panda/src/chancfg/chanwindow.h b/panda/src/chancfg/chanwindow.h index eb89cf8d79..bca8e1f799 100644 --- a/panda/src/chancfg/chanwindow.h +++ b/panda/src/chancfg/chanwindow.h @@ -21,8 +21,8 @@ #include -#include -#include +#include "pmap.h" +#include "pvector.h" #include #include "chansetup.h" @@ -53,7 +53,7 @@ public: INLINE SetupSyms getSetups(void) const; }; -typedef std::map WindowType; +typedef std::pmap WindowType; extern WindowType* WindowDB; diff --git a/panda/src/char/character.h b/panda/src/char/character.h index f57907b142..5a8a10df62 100644 --- a/panda/src/char/character.h +++ b/panda/src/char/character.h @@ -68,7 +68,7 @@ PUBLISHED: private: void copy_joints(PartGroup *copy, PartGroup *orig); - typedef map ArcMap; + typedef pmap ArcMap; virtual Node *r_copy_subgraph(TypeHandle graph_type, InstanceMap &inst_map) const; void r_copy_char(Node *dest, const Node *source, TypeHandle graph_type, diff --git a/panda/src/char/characterJoint.h b/panda/src/char/characterJoint.h index 923f5fe442..deed443286 100644 --- a/panda/src/char/characterJoint.h +++ b/panda/src/char/characterJoint.h @@ -58,7 +58,7 @@ PUBLISHED: void clear_local_transforms(); private: - typedef set< PT_NodeRelation > ArcList; + typedef pset< PT_NodeRelation > ArcList; ArcList _net_transform_arcs; ArcList _local_transform_arcs; diff --git a/panda/src/char/computedVertices.cxx b/panda/src/char/computedVertices.cxx index fe59eb2a6a..34ed1dc219 100644 --- a/panda/src/char/computedVertices.cxx +++ b/panda/src/char/computedVertices.cxx @@ -63,9 +63,9 @@ VertexTransform(const VertexTransform ©) : //////////////////////////////////////////////////////////////////// template static void -compute_morphs(ValueType *table, const vector &morph_list, +compute_morphs(ValueType *table, const pvector &morph_list, Character *character) { - vector::const_iterator mli; + pvector::const_iterator mli; for (mli = morph_list.begin(); mli != morph_list.end(); ++mli) { const MorphType &morph = (*mli); const CharacterSlider *slider; diff --git a/panda/src/char/computedVertices.h b/panda/src/char/computedVertices.h index 10207ab001..1f425dc982 100644 --- a/panda/src/char/computedVertices.h +++ b/panda/src/char/computedVertices.h @@ -64,14 +64,14 @@ private: void read_datagram(DatagramIterator &source); }; - typedef vector VertexTransforms; + typedef pvector VertexTransforms; VertexTransforms _transforms; - typedef vector VertexMorphs; - typedef vector NormalMorphs; - typedef vector TexCoordMorphs; - typedef vector ColorMorphs; + typedef pvector VertexMorphs; + typedef pvector NormalMorphs; + typedef pvector TexCoordMorphs; + typedef pvector ColorMorphs; VertexMorphs _vertex_morphs; NormalMorphs _normal_morphs; TexCoordMorphs _texcoord_morphs; diff --git a/panda/src/char/computedVerticesMorph.h b/panda/src/char/computedVerticesMorph.h index 24525d834f..16e7add5c5 100644 --- a/panda/src/char/computedVerticesMorph.h +++ b/panda/src/char/computedVerticesMorph.h @@ -107,7 +107,7 @@ public: INLINE ComputedVerticesMorph(const ComputedVerticesMorph ©); typedef MorphValueType MorphValue; - typedef vector Morphs; + typedef pvector Morphs; void output(ostream &out) const; diff --git a/panda/src/collide/collisionHandlerEvent.h b/panda/src/collide/collisionHandlerEvent.h index 5edfbdabdf..b6906b3f97 100644 --- a/panda/src/collide/collisionHandlerEvent.h +++ b/panda/src/collide/collisionHandlerEvent.h @@ -72,7 +72,7 @@ private: INLINE void operator = (const SortEntries &other); }; - typedef set Colliding; + typedef pset Colliding; Colliding _current_colliding; Colliding _last_colliding; diff --git a/panda/src/collide/collisionHandlerPhysical.h b/panda/src/collide/collisionHandlerPhysical.h index cf2dba38b5..4241985343 100644 --- a/panda/src/collide/collisionHandlerPhysical.h +++ b/panda/src/collide/collisionHandlerPhysical.h @@ -55,8 +55,8 @@ protected: virtual void handle_entries()=0; protected: - typedef vector< PT(CollisionEntry) > Entries; - typedef map FromEntries; + typedef pvector< PT(CollisionEntry) > Entries; + typedef pmap FromEntries; FromEntries _from_entries; class ColliderDef { @@ -71,7 +71,7 @@ protected: PT_NodeRelation _arc; }; - typedef map Colliders; + typedef pmap Colliders; Colliders _colliders; diff --git a/panda/src/collide/collisionHandlerPusher.cxx b/panda/src/collide/collisionHandlerPusher.cxx index 4b8b469150..d11fb3c122 100644 --- a/panda/src/collide/collisionHandlerPusher.cxx +++ b/panda/src/collide/collisionHandlerPusher.cxx @@ -99,7 +99,7 @@ handle_entries() { // share nearly the same direction, and if so, we keep only the // longer of the two. - typedef vector Shoves; + typedef pvector Shoves; Shoves shoves; Entries::const_iterator ei; diff --git a/panda/src/collide/collisionHandlerQueue.cxx b/panda/src/collide/collisionHandlerQueue.cxx index 34dc7df2fc..c885ef2c38 100644 --- a/panda/src/collide/collisionHandlerQueue.cxx +++ b/panda/src/collide/collisionHandlerQueue.cxx @@ -94,7 +94,7 @@ void CollisionHandlerQueue:: sort_entries() { // Build up a temporary vector of entries so we can sort the // pointers. This uses the class defined above. - typedef vector Sorter; + typedef pvector Sorter; Sorter sorter; sorter.reserve(_entries.size()); diff --git a/panda/src/collide/collisionHandlerQueue.h b/panda/src/collide/collisionHandlerQueue.h index b32d236dde..86de1f5066 100644 --- a/panda/src/collide/collisionHandlerQueue.h +++ b/panda/src/collide/collisionHandlerQueue.h @@ -49,7 +49,7 @@ PUBLISHED: CollisionEntry *get_entry(int n) const; private: - typedef vector< PT(CollisionEntry) > Entries; + typedef pvector< PT(CollisionEntry) > Entries; Entries _entries; public: diff --git a/panda/src/collide/collisionLevelState.h b/panda/src/collide/collisionLevelState.h index 960f17aeb4..cee7dfcb3f 100644 --- a/panda/src/collide/collisionLevelState.h +++ b/panda/src/collide/collisionLevelState.h @@ -26,7 +26,7 @@ #include #include -#include +#include "plist.h" class CollisionSolid; class CollisionNode; diff --git a/panda/src/collide/collisionNode.cxx b/panda/src/collide/collisionNode.cxx index 644340db80..1a2caa1d76 100644 --- a/panda/src/collide/collisionNode.cxx +++ b/panda/src/collide/collisionNode.cxx @@ -175,7 +175,7 @@ recompute_bound() { // Now actually compute the bounding volume by putting it around all // of our solids' bounding volumes. - vector child_volumes; + pvector child_volumes; Solids::const_iterator gi; for (gi = _solids.begin(); gi != _solids.end(); ++gi) { diff --git a/panda/src/collide/collisionNode.h b/panda/src/collide/collisionNode.h index 5534263f32..f572d20504 100644 --- a/panda/src/collide/collisionNode.h +++ b/panda/src/collide/collisionNode.h @@ -72,7 +72,7 @@ private: CollideMask _into_collide_mask; bool _collide_geom; - typedef vector< PT(CollisionSolid) > Solids; + typedef pvector< PT(CollisionSolid) > Solids; Solids _solids; public: diff --git a/panda/src/collide/collisionPolygon.cxx b/panda/src/collide/collisionPolygon.cxx index 76693a6bab..54a9bd0099 100644 --- a/panda/src/collide/collisionPolygon.cxx +++ b/panda/src/collide/collisionPolygon.cxx @@ -163,7 +163,7 @@ xform(const LMatrix4f &mat) { } if (!_points.empty()) { - vector verts; + pvector verts; Points::const_iterator pi; for (pi = _points.begin(); pi != _points.end(); ++pi) { verts.push_back(to_3d(*pi) * mat); @@ -219,7 +219,7 @@ recompute_bound() { // Now actually compute the bounding volume by putting it around all // of our vertices. - vector vertices; + pvector vertices; Points::const_iterator pi; for (pi = _points.begin(); pi != _points.end(); ++pi) { vertices.push_back(to_3d(*pi)); diff --git a/panda/src/collide/collisionSolid.cxx b/panda/src/collide/collisionSolid.cxx index fc9c1182ae..3b397dffc1 100644 --- a/panda/src/collide/collisionSolid.cxx +++ b/panda/src/collide/collisionSolid.cxx @@ -166,7 +166,7 @@ test_intersection_from_segment(CollisionHandler *, void CollisionSolid:: report_undefined_intersection_test(TypeHandle from_type, TypeHandle into_type) { #ifndef NDEBUG - typedef map Reported; + typedef pmap Reported; static Reported reported; if (reported.insert(Reported::value_type(from_type, into_type)).second) { diff --git a/panda/src/collide/collisionTraverser.h b/panda/src/collide/collisionTraverser.h index 41d3d82410..f706399a7c 100644 --- a/panda/src/collide/collisionTraverser.h +++ b/panda/src/collide/collisionTraverser.h @@ -32,7 +32,7 @@ #include #include -#include +#include "pset.h" class CollisionNode; class Geom; @@ -94,12 +94,12 @@ private: PT(CollisionHandler) _default_handler; TypeHandle _graph_type; - typedef map Colliders; + typedef pmap Colliders; Colliders _colliders; - typedef vector OrderedColliders; + typedef pvector OrderedColliders; OrderedColliders _ordered_colliders; - typedef map Handlers; + typedef pmap Handlers; Handlers _handlers; // Statistics diff --git a/panda/src/cull/cullState.h b/panda/src/cull/cullState.h index 9670f92c23..c413a251ae 100644 --- a/panda/src/cull/cullState.h +++ b/panda/src/cull/cullState.h @@ -32,8 +32,8 @@ #include #include -#include -#include +#include "pmap.h" +#include "pvector.h" class GraphicsStateGuardian; class GeomBin; @@ -49,8 +49,8 @@ class GeomBin; //////////////////////////////////////////////////////////////////// class EXPCL_PANDA CullState : public ReferenceCount { public: - typedef vector CurrentGeomNodes; - typedef vector CurrentDirectNodes; + typedef pvector CurrentGeomNodes; + typedef pvector CurrentDirectNodes; public: INLINE CullState(const AllTransitionsWrapper &trans); @@ -107,7 +107,7 @@ private: AllTransitionsWrapper _trans; NodeAttributes *_attrib; - typedef map Verified; + typedef pmap Verified; Verified _verified; CurrentGeomNodes _current_geom_nodes; diff --git a/panda/src/cull/cullStateLookup.h b/panda/src/cull/cullStateLookup.h index f6623e241a..73f6b85b0f 100644 --- a/panda/src/cull/cullStateLookup.h +++ b/panda/src/cull/cullStateLookup.h @@ -26,7 +26,7 @@ #include #include -#include +#include "pmap.h" class CullState; class CullStateSubtree; @@ -74,10 +74,10 @@ public: virtual void write(ostream &out, int indent_level = 0) const; private: - typedef map CullStates; + typedef pmap CullStates; CullStates _cull_states; - typedef map Subtrees; + typedef pmap Subtrees; Subtrees _subtrees; }; diff --git a/panda/src/cull/cullTraverser.h b/panda/src/cull/cullTraverser.h index 0cabdaa502..256598eada 100644 --- a/panda/src/cull/cullTraverser.h +++ b/panda/src/cull/cullTraverser.h @@ -31,8 +31,8 @@ #include #include -#include -#include +#include "plist.h" +#include "pset.h" class GraphicsStateGuardian; class CullStateLookup; @@ -119,13 +119,13 @@ private: AllAttributesWrapper _initial_state; - typedef map ToplevelBins; - typedef multimap SubBins; + typedef pmap ToplevelBins; + typedef pmultimap SubBins; ToplevelBins _toplevel_bins; SubBins _sub_bins; PT(GeomBin) _default_bin; - typedef set > States; + typedef pset > States; States _states; CullStateLookup _lookup; diff --git a/panda/src/cull/geomBin.h b/panda/src/cull/geomBin.h index 01a74c6f3a..795cdd2dbf 100644 --- a/panda/src/cull/geomBin.h +++ b/panda/src/cull/geomBin.h @@ -31,7 +31,7 @@ #include #include -#include +#include "pset.h" class GeomNode; class CullTraverser; diff --git a/panda/src/cull/geomBinBackToFront.h b/panda/src/cull/geomBinBackToFront.h index 9d945dd959..4aec343626 100644 --- a/panda/src/cull/geomBinBackToFront.h +++ b/panda/src/cull/geomBinBackToFront.h @@ -25,7 +25,7 @@ #include -#include +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : GeomBinBackToFront @@ -67,7 +67,7 @@ private: bool _is_direct; }; - typedef multiset NodeEntries; + typedef pmultiset NodeEntries; NodeEntries _node_entries; public: diff --git a/panda/src/cull/geomBinFixed.h b/panda/src/cull/geomBinFixed.h index c4bb79eb6b..861a6c9188 100644 --- a/panda/src/cull/geomBinFixed.h +++ b/panda/src/cull/geomBinFixed.h @@ -25,7 +25,7 @@ #include -#include +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : GeomBinFixed @@ -64,7 +64,7 @@ private: bool _is_direct; }; - typedef multiset NodeEntries; + typedef pmultiset NodeEntries; NodeEntries _node_entries; public: diff --git a/panda/src/cull/geomBinGroup.h b/panda/src/cull/geomBinGroup.h index 0c8d847059..aae9505865 100644 --- a/panda/src/cull/geomBinGroup.h +++ b/panda/src/cull/geomBinGroup.h @@ -25,7 +25,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : GeomBinGroup @@ -65,7 +65,7 @@ protected: virtual PT(GeomBin) detach(); private: - typedef vector< PT(GeomBin) > SubBins; + typedef pvector< PT(GeomBin) > SubBins; SubBins _sub_bins; public: diff --git a/panda/src/cull/geomBinNormal.h b/panda/src/cull/geomBinNormal.h index c22005f01b..d6b91dae4a 100644 --- a/panda/src/cull/geomBinNormal.h +++ b/panda/src/cull/geomBinNormal.h @@ -25,7 +25,7 @@ #include -#include +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : GeomBinNormal diff --git a/panda/src/cull/geomBinUnsorted.h b/panda/src/cull/geomBinUnsorted.h index 40909c7394..dd1e68db85 100644 --- a/panda/src/cull/geomBinUnsorted.h +++ b/panda/src/cull/geomBinUnsorted.h @@ -25,7 +25,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : GeomBinUnsorted @@ -52,7 +52,7 @@ public: virtual void write(ostream &out, int indent_level = 0) const; private: - typedef vector< PT(CullState) > CullStates; + typedef pvector< PT(CullState) > CullStates; CullStates _cull_states; public: diff --git a/panda/src/device/clientAnalogDevice.h b/panda/src/device/clientAnalogDevice.h index dbc8049659..580a04fb76 100644 --- a/panda/src/device/clientAnalogDevice.h +++ b/panda/src/device/clientAnalogDevice.h @@ -61,7 +61,7 @@ protected: bool _known; }; - typedef vector Controls; + typedef pvector Controls; Controls _controls; diff --git a/panda/src/device/clientBase.h b/panda/src/device/clientBase.h index 9b0360bfee..5c642197a5 100644 --- a/panda/src/device/clientBase.h +++ b/panda/src/device/clientBase.h @@ -34,7 +34,7 @@ #include #endif -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : ClientBase @@ -74,8 +74,8 @@ protected: virtual void do_poll(); private: - typedef map DevicesByName; - typedef map Devices; + typedef pmap DevicesByName; + typedef pmap Devices; Devices _devices; bool _forked; diff --git a/panda/src/device/clientButtonDevice.h b/panda/src/device/clientButtonDevice.h index 182e7be5e8..b8d81b2e46 100644 --- a/panda/src/device/clientButtonDevice.h +++ b/panda/src/device/clientButtonDevice.h @@ -78,7 +78,7 @@ protected: State _state; }; - typedef vector Buttons; + typedef pvector Buttons; Buttons _buttons; PT(ButtonEventDataAttribute) _button_events; diff --git a/panda/src/device/clientDialDevice.h b/panda/src/device/clientDialDevice.h index b0c8b0851e..552975c4f3 100644 --- a/panda/src/device/clientDialDevice.h +++ b/panda/src/device/clientDialDevice.h @@ -59,7 +59,7 @@ protected: bool _known; }; - typedef vector Dials; + typedef pvector Dials; Dials _dials; diff --git a/panda/src/dgraph/buttonEventDataAttribute.h b/panda/src/dgraph/buttonEventDataAttribute.h index 5a542f4bbe..c4588005a6 100644 --- a/panda/src/dgraph/buttonEventDataAttribute.h +++ b/panda/src/dgraph/buttonEventDataAttribute.h @@ -24,7 +24,7 @@ #include #include -#include +#include "pvector.h" class ButtonEventDataTransition; class ModifierButtons; @@ -38,7 +38,7 @@ class ModifierButtons; //////////////////////////////////////////////////////////////////// class EXPCL_PANDA ButtonEventDataAttribute : public NodeAttribute { private: - typedef vector Buttons; + typedef pvector Buttons; public: INLINE ButtonEventDataAttribute(); diff --git a/panda/src/dgraph/dataGraphTraverser.h b/panda/src/dgraph/dataGraphTraverser.h index 565110a98f..5b9cdc8f6f 100644 --- a/panda/src/dgraph/dataGraphTraverser.h +++ b/panda/src/dgraph/dataGraphTraverser.h @@ -59,7 +59,7 @@ private: void resume(Node *node, SavedState &state); void resume_all(); - typedef map States; + typedef pmap States; States _saved_states; }; diff --git a/panda/src/display/config_display.h b/panda/src/display/config_display.h index e61930e472..cf6a9991d0 100644 --- a/panda/src/display/config_display.h +++ b/panda/src/display/config_display.h @@ -24,7 +24,7 @@ #include #include -#include +#include "pvector.h" NotifyCategoryDecl(display, EXPCL_PANDA, EXPTP_PANDA); NotifyCategoryDecl(gsg, EXPCL_PANDA, EXPTP_PANDA); diff --git a/panda/src/display/displayRegion.h b/panda/src/display/displayRegion.h index 6275fd02c4..49051858b0 100644 --- a/panda/src/display/displayRegion.h +++ b/panda/src/display/displayRegion.h @@ -26,7 +26,7 @@ #include #include -#include +#include "plist.h" //////////////////////////////////////////////////////////////////// // Defines diff --git a/panda/src/display/display_headers.h b/panda/src/display/display_headers.h index 1a85749454..b1f6deadeb 100644 --- a/panda/src/display/display_headers.h +++ b/panda/src/display/display_headers.h @@ -32,7 +32,7 @@ #include "textureContext.h" #include -#include +#include "pmap.h" #pragma hdrstop diff --git a/panda/src/display/graphicsChannel.cxx b/panda/src/display/graphicsChannel.cxx index 8837aacec4..707c424c0d 100644 --- a/panda/src/display/graphicsChannel.cxx +++ b/panda/src/display/graphicsChannel.cxx @@ -26,7 +26,7 @@ #include "graphicsWindow.h" #include "config_display.h" -#include +#include "pmap.h" #endif //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsChannel.h b/panda/src/display/graphicsChannel.h index 988a3b5cf4..5c3f006933 100644 --- a/panda/src/display/graphicsChannel.h +++ b/panda/src/display/graphicsChannel.h @@ -28,7 +28,7 @@ #include #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Defines @@ -75,7 +75,7 @@ private: GraphicsWindow *_window; bool _is_active; - typedef vector< PT(GraphicsLayer) > GraphicsLayers; + typedef pvector< PT(GraphicsLayer) > GraphicsLayers; GraphicsLayers _layers; private: diff --git a/panda/src/display/graphicsLayer.h b/panda/src/display/graphicsLayer.h index bf34368fb2..ad38bc2ff7 100644 --- a/panda/src/display/graphicsLayer.h +++ b/panda/src/display/graphicsLayer.h @@ -29,7 +29,7 @@ #include #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Defines @@ -82,7 +82,7 @@ private: GraphicsChannel *_channel; bool _is_active; - typedef vector< PT(DisplayRegion) > DisplayRegions; + typedef pvector< PT(DisplayRegion) > DisplayRegions; DisplayRegions _display_regions; private: diff --git a/panda/src/display/graphicsPipe.h b/panda/src/display/graphicsPipe.h index e6f51eaf96..b713215082 100644 --- a/panda/src/display/graphicsPipe.h +++ b/panda/src/display/graphicsPipe.h @@ -33,7 +33,7 @@ #include #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Defines @@ -115,8 +115,8 @@ protected: private: // Some private type declarations. These must be declared here so // we can declare the public iterator types, below. - typedef vector< PT(GraphicsWindow) > Windows; - typedef vector Pipes; + typedef pvector< PT(GraphicsWindow) > Windows; + typedef pvector Pipes; Windows _windows; diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 83ba209c16..90b649f82b 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -33,7 +33,7 @@ #include #include -#include +#include "plist.h" class AllAttributesWrapper; class AllTransitionsWrapper; @@ -155,7 +155,7 @@ protected: void init_frame_pstats(); void add_to_texture_record(TextureContext *tc); void record_state_change(TypeHandle type); - set _current_textures; + pset _current_textures; #else INLINE void init_frame_pstats() { } INLINE void add_to_texture_record(TextureContext *) { } @@ -208,7 +208,7 @@ public: static PStatCollector _geom_nodes_pcollector; private: - typedef set Textures; + typedef pset Textures; Textures _prepared_textures; // NOTE: on win32 another DLL (e.g. libpandadx.dll) cannot access set directly due to exported template issue public: diff --git a/panda/src/display/graphicsWindow.cxx b/panda/src/display/graphicsWindow.cxx index e7d5eaa44a..61973bf952 100644 --- a/panda/src/display/graphicsWindow.cxx +++ b/panda/src/display/graphicsWindow.cxx @@ -29,7 +29,7 @@ #include #include -#include +#include "pmap.h" #endif //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsWindow.h b/panda/src/display/graphicsWindow.h index e75ab5bc37..0a93c733f3 100644 --- a/panda/src/display/graphicsWindow.h +++ b/panda/src/display/graphicsWindow.h @@ -39,8 +39,8 @@ #include #include -#include -#include +#include "pvector.h" +#include "pdeque.h" //////////////////////////////////////////////////////////////////// // Defines @@ -207,7 +207,7 @@ protected: void declare_channel(int index, GraphicsChannel *chan); private: - typedef vector< PT(GraphicsChannel) > Channels; + typedef pvector< PT(GraphicsChannel) > Channels; Channels _channels; public: diff --git a/panda/src/display/graphicsWindowInputDevice.h b/panda/src/display/graphicsWindowInputDevice.h index 0d3355b79c..a5cc91af8a 100644 --- a/panda/src/display/graphicsWindowInputDevice.h +++ b/panda/src/display/graphicsWindowInputDevice.h @@ -24,8 +24,8 @@ #include #include -#include -#include +#include "pdeque.h" +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : GraphicsWindowInputDevice @@ -68,7 +68,7 @@ public: public: // We need these methods to make VC++ happy when we try to - // instantiate a vector. They don't do + // instantiate a pvector. They don't do // anything useful. INLINE bool operator == (const GraphicsWindowInputDevice &other) const; INLINE bool operator != (const GraphicsWindowInputDevice &other) const; @@ -79,7 +79,7 @@ private: IDF_has_pointer = 0x01, IDF_has_keyboard = 0x02 }; - typedef deque ButtonEvents; + typedef pdeque ButtonEvents; string _name; int _flags; diff --git a/panda/src/downloader/asyncDownloader.cxx b/panda/src/downloader/asyncDownloader.cxx index 179196e575..b513ae32b7 100644 --- a/panda/src/downloader/asyncDownloader.cxx +++ b/panda/src/downloader/asyncDownloader.cxx @@ -35,7 +35,7 @@ #include "asyncDownloader.h" #include -#include +#include "plist.h" #if !defined(WIN32_VC) // #define errno wsaGetLastError() diff --git a/panda/src/downloader/downloadDb.cxx b/panda/src/downloader/downloadDb.cxx index c266031b07..a857935008 100644 --- a/panda/src/downloader/downloadDb.cxx +++ b/panda/src/downloader/downloadDb.cxx @@ -329,7 +329,7 @@ server_add_file(string mfname, string fname) { PT(FileRecord) fr = new FileRecord(fname); // Find the multifile with mfname - vector< PT(MultifileRecord) >::iterator i = _server_db._mfile_records.begin(); + pvector< PT(MultifileRecord) >::iterator i = _server_db._mfile_records.begin(); for(; i != _server_db._mfile_records.end(); ++i) { if (mfname == (*i)->_name) { (*i)->add_file_record(fr); @@ -390,7 +390,7 @@ output(ostream &out) const { << " size: " << _size << endl << " status: " << _status << endl; out << "--------------------------------------------------" << endl; - vector< PT(FileRecord) >::const_iterator i = _file_records.begin(); + pvector< PT(FileRecord) >::const_iterator i = _file_records.begin(); for(; i != _file_records.end(); ++i) { (*i)->output(out); } @@ -426,7 +426,7 @@ get_file_name(int index) const { //////////////////////////////////////////////////////////////////// bool DownloadDb::MultifileRecord:: file_exists(string fname) const { - vector< PT(FileRecord) >::const_iterator i = _file_records.begin(); + pvector< PT(FileRecord) >::const_iterator i = _file_records.begin(); for(; i != _file_records.end(); ++i) { if (fname == (*i)->_name) { return true; @@ -443,7 +443,7 @@ file_exists(string fname) const { //////////////////////////////////////////////////////////////////// PT(DownloadDb::FileRecord) DownloadDb::MultifileRecord:: get_file_record_named(string fname) const { - vector< PT(FileRecord) >::const_iterator i = _file_records.begin(); + pvector< PT(FileRecord) >::const_iterator i = _file_records.begin(); for(; i != _file_records.end(); ++i) { if (fname == (*i)->_name) { return (*i); @@ -495,7 +495,7 @@ Db(void) { //////////////////////////////////////////////////////////////////// void DownloadDb::Db:: output(ostream &out) const { - vector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); + pvector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); for(; i != _mfile_records.end(); ++i) { (*i)->output(out); } @@ -529,7 +529,7 @@ get_multifile_name(int index) const { //////////////////////////////////////////////////////////////////// bool DownloadDb::Db:: multifile_exists(string mfname) const { - vector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); + pvector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); for(; i != _mfile_records.end(); ++i) { if (mfname == (*i)->_name) { return true; @@ -545,7 +545,7 @@ multifile_exists(string mfname) const { //////////////////////////////////////////////////////////////////// PT(DownloadDb::MultifileRecord) DownloadDb::Db:: get_multifile_record_named(string mfname) const { - vector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); + pvector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); for(; i != _mfile_records.end(); ++i) { if (mfname == (*i)->_name) { return (*i); @@ -806,7 +806,7 @@ write(ofstream &write_stream, bool want_server_info) { PN_int32 header_length; // Iterate over the multifiles writing them to the stream - vector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); + pvector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); for(; i != _mfile_records.end(); ++i) { _datagram.clear(); @@ -847,7 +847,7 @@ write(ofstream &write_stream, bool want_server_info) { if (want_server_info) { // Now iterate over this multifile's files writing them to the stream // Iterate over the multifiles writing them to the stream - vector< PT(FileRecord) >::const_iterator j = (*i)->_file_records.begin(); + pvector< PT(FileRecord) >::const_iterator j = (*i)->_file_records.begin(); for(; j != (*i)->_file_records.end(); ++j) { // Clear the datagram before we jam a bunch of stuff on it _datagram.clear(); diff --git a/panda/src/downloader/downloadDb.h b/panda/src/downloader/downloadDb.h index 77b46e6ab1..81a38b2636 100644 --- a/panda/src/downloader/downloadDb.h +++ b/panda/src/downloader/downloadDb.h @@ -26,10 +26,10 @@ #include #include -#include +#include "pvector.h" #include #include -#include +#include "pmap.h" #include "hashVal.h" #include @@ -134,7 +134,7 @@ public: string _name; }; - typedef vector< PT(FileRecord) > FileRecords; + typedef pvector< PT(FileRecord) > FileRecords; class EXPCL_PANDAEXPRESS MultifileRecord : public ReferenceCount { public: @@ -154,7 +154,7 @@ public: FileRecords _file_records; }; - typedef vector< PT(MultifileRecord) > MultifileRecords; + typedef pvector< PT(MultifileRecord) > MultifileRecords; class EXPCL_PANDAEXPRESS Db { public: @@ -197,8 +197,8 @@ public: // Magic number for knowing this is a download Db static PN_uint32 _magic_number; static PN_uint32 _bogus_magic_number; - typedef vector vectorHash; - typedef map VersionMap; + typedef pvector vectorHash; + typedef pmap VersionMap; PUBLISHED: void add_version(const Filename &name, HashVal hash, Version version); diff --git a/panda/src/downloader/multiplexStreamBuf.h b/panda/src/downloader/multiplexStreamBuf.h index 545ee4a07e..c0e32f72dd 100644 --- a/panda/src/downloader/multiplexStreamBuf.h +++ b/panda/src/downloader/multiplexStreamBuf.h @@ -25,7 +25,7 @@ #include #endif -#include +#include "pvector.h" #include //////////////////////////////////////////////////////////////////// @@ -77,7 +77,7 @@ private: bool _owns_obj; }; - typedef vector Outputs; + typedef pvector Outputs; Outputs _outputs; string _line_buffer; diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index ae8ec41c4e..1589c8df88 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -1712,8 +1712,8 @@ draw_sprite(const GeomSprite *geom) { Colorf v_color; // sort container and iterator - vector< WrappedSpriteSortPtr > sorted_sprite_vector; - vector< WrappedSpriteSortPtr >::iterator sorted_vec_iter; + pvector< WrappedSpriteSortPtr > sorted_sprite_vector; + pvector< WrappedSpriteSortPtr >::iterator sorted_vec_iter; WrappedSprite *SpriteArray = new WrappedSprite[nprims]; diff --git a/panda/src/effects/lensFlareNode.h b/panda/src/effects/lensFlareNode.h index d1d3a53fcd..8ae34db180 100644 --- a/panda/src/effects/lensFlareNode.h +++ b/panda/src/effects/lensFlareNode.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include "pmap.h" class GraphicsStateGuardian; class ClockObject; @@ -57,10 +57,10 @@ public: virtual bool has_sub_render() const; private: - typedef vector vector_Vfloat; - typedef vector vector_Vcolorf; - typedef vector< PT(RenderRelation) > vector_relation; - typedef vector< PT(Texture) > vector_texture; + typedef pvector vector_Vfloat; + typedef pvector vector_Vcolorf; + typedef pvector< PT(RenderRelation) > vector_relation; + typedef pvector< PT(Texture) > vector_texture; vector_texture _flares; PT(Texture) _blind; @@ -152,9 +152,9 @@ private: float _sparkle_fps; float _inv_sparkle_fps; - typedef map Sparkle_Scales; - typedef map Sparkle_Offsets; - typedef map Sparkle_Colors; + typedef pmap Sparkle_Scales; + typedef pmap Sparkle_Offsets; + typedef pmap Sparkle_Colors; Textures _sparkles; Relations _sparkle_arcs; @@ -164,7 +164,7 @@ private: Sparkle_Colors _sparkle_colors; int _num_sparkles_on; - map _current_sparkles; + pmap _current_sparkles; void prepare_sparkles(vector_relation &arcs, const vector_texture &sparkles, const vector_float &scales, const vector_float &offsets, diff --git a/panda/src/egg/eggBinMaker.h b/panda/src/egg/eggBinMaker.h index 29ec25cb95..629904fe48 100644 --- a/panda/src/egg/eggBinMaker.h +++ b/panda/src/egg/eggBinMaker.h @@ -211,8 +211,8 @@ #include #include -#include -#include +#include "pset.h" +#include "pmap.h" class EggNode; class EggGroup; @@ -270,14 +270,14 @@ private: // and store all the pointers into the GroupNodes/SortedNodes // structure, which groups nodes by their parent group, and then // sorted into bin order. - typedef multiset SortedNodes; - typedef map GroupNodes; + typedef pmultiset SortedNodes; + typedef pmap GroupNodes; // Then we walk through that list and create a Bins/Nodes structure // for each group, which separates out the nodes into the individual // bins. - typedef vector< PT(EggNode) > Nodes; - typedef vector Bins; + typedef pvector< PT(EggNode) > Nodes; + typedef pvector Bins; void collect_nodes(EggGroupNode *group); int get_bins_for_group(GroupNodes::const_iterator gi); diff --git a/panda/src/egg/eggGroup.cxx b/panda/src/egg/eggGroup.cxx index 4cb92f33b1..425e625167 100644 --- a/panda/src/egg/eggGroup.cxx +++ b/panda/src/egg/eggGroup.cxx @@ -625,9 +625,9 @@ write_vertex_ref(ostream &out, int indent_level) const { // separate VertexRef entry. Within each group, we'll sort the // vertices by index number. - typedef set Indices; - typedef map Memberships; - typedef map Pools; + typedef pset Indices; + typedef pmap Memberships; + typedef pmap Pools; Pools _entries; bool all_membership_one = true; diff --git a/panda/src/egg/eggGroup.h b/panda/src/egg/eggGroup.h index 88a50d973c..1af2794540 100644 --- a/panda/src/egg/eggGroup.h +++ b/panda/src/egg/eggGroup.h @@ -37,7 +37,7 @@ //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEGG EggGroup : public EggGroupNode, public EggRenderMode { public: - typedef map VertexRef; + typedef pmap VertexRef; // These bits are all stored somewhere in _flags. enum GroupType { diff --git a/panda/src/egg/eggGroupNode.h b/panda/src/egg/eggGroupNode.h index 4b337bd9bb..f372df5b52 100644 --- a/panda/src/egg/eggGroupNode.h +++ b/panda/src/egg/eggGroupNode.h @@ -28,7 +28,7 @@ #include #include -#include +#include "plist.h" class EggTextureCollection; class EggMaterialCollection; @@ -59,7 +59,7 @@ private: // We define the list of children as a list and not a vector, so we // can avoid the bad iterator-invalidating properties of vectors as // we insert/delete elements. - typedef list< PT(EggNode) > Children; + typedef plist< PT(EggNode) > Children; // Here begins the actual public interface to EggGroupNode. @@ -154,8 +154,8 @@ private: Normald _normal; size_t _vertex; }; - typedef vector NVertexGroup; - typedef map NVertexCollection; + typedef pvector NVertexGroup; + typedef pmap NVertexCollection; void r_collect_vertex_normals(NVertexCollection &collection, double threshold, CoordinateSystem cs); diff --git a/panda/src/egg/eggMaterialCollection.cxx b/panda/src/egg/eggMaterialCollection.cxx index dbfed2b102..565e9edb74 100644 --- a/panda/src/egg/eggMaterialCollection.cxx +++ b/panda/src/egg/eggMaterialCollection.cxx @@ -252,7 +252,7 @@ int EggMaterialCollection:: collapse_equivalent_materials(int eq, EggMaterialCollection::MaterialReplacement &removed) { int num_collapsed = 0; - typedef set Collapser; + typedef pset Collapser; UniqueEggMaterials uet(eq); Collapser collapser(uet); diff --git a/panda/src/egg/eggMaterialCollection.h b/panda/src/egg/eggMaterialCollection.h index 5b5d4f0ba0..a2c4d214a8 100644 --- a/panda/src/egg/eggMaterialCollection.h +++ b/panda/src/egg/eggMaterialCollection.h @@ -26,7 +26,7 @@ #include "vector_PT_EggMaterial.h" #include -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : EggMaterialCollection @@ -43,7 +43,7 @@ class EXPCL_PANDAEGG EggMaterialCollection { // EggMaterialCollection as an STL container. private: - typedef map Materials; + typedef pmap Materials; typedef vector_PT_EggMaterial OrderedMaterials; public: @@ -51,7 +51,7 @@ public: typedef iterator const_iterator; typedef OrderedMaterials::size_type size_type; - typedef map MaterialReplacement; + typedef pmap MaterialReplacement; // Here begins the actual public interface to EggMaterialCollection. diff --git a/panda/src/egg/eggMorph.h b/panda/src/egg/eggMorph.h index 353de5ba9a..4d9ea3fd8f 100644 --- a/panda/src/egg/eggMorph.h +++ b/panda/src/egg/eggMorph.h @@ -23,7 +23,7 @@ #include #include -#include +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : EggMorph diff --git a/panda/src/egg/eggMorphList.h b/panda/src/egg/eggMorphList.h index 1ebbcc5a87..e424d62f0f 100644 --- a/panda/src/egg/eggMorphList.h +++ b/panda/src/egg/eggMorphList.h @@ -25,7 +25,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : EggMorphList @@ -34,7 +34,7 @@ template class EggMorphList { private: - typedef vector Morphs; + typedef pvector Morphs; public: typedef Morphs::iterator iterator; diff --git a/panda/src/egg/eggNameUniquifier.h b/panda/src/egg/eggNameUniquifier.h index efe2710670..2a5a506f1f 100644 --- a/panda/src/egg/eggNameUniquifier.h +++ b/panda/src/egg/eggNameUniquifier.h @@ -78,7 +78,7 @@ #include "eggObject.h" -#include +#include "pmap.h" class EggNode; @@ -109,8 +109,8 @@ public: const string &category, int index); private: - typedef map UsedNames; - typedef map Categories; + typedef pmap UsedNames; + typedef pmap Categories; Categories _categories; int _index; diff --git a/panda/src/egg/eggNurbsSurface.h b/panda/src/egg/eggNurbsSurface.h index 67ffdaf132..5d1b6c4285 100644 --- a/panda/src/egg/eggNurbsSurface.h +++ b/panda/src/egg/eggNurbsSurface.h @@ -26,7 +26,7 @@ #include -#include +#include "plist.h" //////////////////////////////////////////////////////////////////// // Class : EggNurbsSurface @@ -34,11 +34,11 @@ //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEGG EggNurbsSurface : public EggSurface { public: - typedef list< PT(EggNurbsCurve) > Curves; + typedef plist< PT(EggNurbsCurve) > Curves; typedef Curves Loop; - typedef list Loops; + typedef plist Loops; typedef Loops Trim; - typedef list Trims; + typedef plist Trims; INLINE EggNurbsSurface(const string &name = ""); INLINE EggNurbsSurface(const EggNurbsSurface ©); diff --git a/panda/src/egg/eggPrimitive.cxx b/panda/src/egg/eggPrimitive.cxx index 89278650a3..a9d936adc3 100644 --- a/panda/src/egg/eggPrimitive.cxx +++ b/panda/src/egg/eggPrimitive.cxx @@ -339,7 +339,7 @@ test_vref_integrity() const { // First, we need to know how many times each vertex appears. // Usually, this will be only one, but it's possible for a vertex to // appear more than once. - typedef map VertexCount; + typedef pmap VertexCount; VertexCount _count; // Now count up the vertices. diff --git a/panda/src/egg/eggPrimitive.h b/panda/src/egg/eggPrimitive.h index dda10ecf05..c2a432b294 100644 --- a/panda/src/egg/eggPrimitive.h +++ b/panda/src/egg/eggPrimitive.h @@ -32,7 +32,7 @@ #include "vector_PT_EggVertex.h" #include -#include +#include "pvector.h" class EggVertexPool; diff --git a/panda/src/egg/eggTextureCollection.cxx b/panda/src/egg/eggTextureCollection.cxx index 9282944823..61d51070e1 100644 --- a/panda/src/egg/eggTextureCollection.cxx +++ b/panda/src/egg/eggTextureCollection.cxx @@ -252,7 +252,7 @@ int EggTextureCollection:: collapse_equivalent_textures(int eq, EggTextureCollection::TextureReplacement &removed) { int num_collapsed = 0; - typedef set Collapser; + typedef pset Collapser; UniqueEggTextures uet(eq); Collapser collapser(uet); diff --git a/panda/src/egg/eggTextureCollection.h b/panda/src/egg/eggTextureCollection.h index dd84e464cb..d081fbe114 100644 --- a/panda/src/egg/eggTextureCollection.h +++ b/panda/src/egg/eggTextureCollection.h @@ -26,7 +26,7 @@ #include "vector_PT_EggTexture.h" #include -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : EggTextureCollection @@ -43,7 +43,7 @@ class EXPCL_PANDAEGG EggTextureCollection { // EggTextureCollection as an STL container. private: - typedef map Textures; + typedef pmap Textures; typedef vector_PT_EggTexture OrderedTextures; public: @@ -51,7 +51,7 @@ public: typedef iterator const_iterator; typedef OrderedTextures::size_type size_type; - typedef map TextureReplacement; + typedef pmap TextureReplacement; // Here begins the actual public interface to EggTextureCollection. diff --git a/panda/src/egg/eggUtilities.I b/panda/src/egg/eggUtilities.I index 920912e03b..4d7f79b213 100644 --- a/panda/src/egg/eggUtilities.I +++ b/panda/src/egg/eggUtilities.I @@ -59,13 +59,13 @@ split_vertex(EggVertex *vert, const FunctionObject &sequence) { // Define a map of ints to vert pointers, to indicate which sequence // numbers we have already created vertices for. - typedef map Sequences; + typedef pmap Sequences; Sequences _sequences; // Get a copy of the list of primitives that reference this vertex. // We must have a copy because we will be modifying the list as we // traverse it. - typedef vector Prims; + typedef pvector Prims; Prims prims; prims.reserve(vert->pref_size()); copy(vert->pref_begin(), vert->pref_end(), back_inserter(prims)); diff --git a/panda/src/egg/eggUtilities.h b/panda/src/egg/eggUtilities.h index 693c716b68..e94dbb2f34 100644 --- a/panda/src/egg/eggUtilities.h +++ b/panda/src/egg/eggUtilities.h @@ -36,14 +36,14 @@ #include #include -#include -#include +#include "pset.h" +#include "pmap.h" class EggNode; class EggVertex; -typedef set< PT_EggTexture > EggTextures; -typedef map EggTextureFilenames; +typedef pset< PT_EggTexture > EggTextures; +typedef pmap EggTextureFilenames; //////////////////////////////////////////////////////////////////// diff --git a/panda/src/egg/eggVertex.cxx b/panda/src/egg/eggVertex.cxx index a2aa97ee9e..8e574f8452 100644 --- a/panda/src/egg/eggVertex.cxx +++ b/panda/src/egg/eggVertex.cxx @@ -165,7 +165,7 @@ write(ostream &out, int indent_level) const { // a helpful comment. if (!_gref.empty()) { // We need to build a list of group entries. - set gre; + pset gre; GroupRef::const_iterator gi; for (gi = _gref.begin(); gi != _gref.end(); ++gi) { diff --git a/panda/src/egg/eggVertex.h b/panda/src/egg/eggVertex.h index 332c3cf925..4cd28e2d85 100644 --- a/panda/src/egg/eggVertex.h +++ b/panda/src/egg/eggVertex.h @@ -27,7 +27,7 @@ #include #include -#include +#include "pset.h" class EggVertexPool; class EggGroup; @@ -41,8 +41,8 @@ class EggPrimitive; //////////////////////////////////////////////////////////////////// class EXPCL_PANDAEGG EggVertex : public EggObject, public EggAttributes { public: - typedef set GroupRef; - typedef multiset PrimitiveRef; + typedef pset GroupRef; + typedef pmultiset PrimitiveRef; EggVertex(); EggVertex(const EggVertex ©); diff --git a/panda/src/egg/eggVertexPool.cxx b/panda/src/egg/eggVertexPool.cxx index b3266e0a60..9172ba638b 100644 --- a/panda/src/egg/eggVertexPool.cxx +++ b/panda/src/egg/eggVertexPool.cxx @@ -338,7 +338,7 @@ transform(const LMatrix4d &mat) { // of vertices in this pool. We must have a copy because we might // be modifying the list as we traverse it. - typedef vector Verts; + typedef pvector Verts; Verts verts; verts.reserve(size()); copy(begin(), end(), back_inserter(verts)); diff --git a/panda/src/egg/eggVertexPool.h b/panda/src/egg/eggVertexPool.h index 21eec7bc80..13d08bf945 100644 --- a/panda/src/egg/eggVertexPool.h +++ b/panda/src/egg/eggVertexPool.h @@ -26,8 +26,8 @@ #include "pt_EggVertex.h" #include -#include -#include +#include "pset.h" +#include "pmap.h" #include #include @@ -56,14 +56,14 @@ private: // IndexVertices is the main storage mechanism of the vertex pool. // It stores a reference-counting pointer to each vertex, ordered by // vertex index number. - typedef map IndexVertices; + typedef pmap IndexVertices; // UniqueVertices is an auxiliary indexing mechanism. It stores the // same vertex pointers as IndexVertices (although these pointers // are not reference-counted), this time ordered by vertex // properties. This makes it easy to determine when one or more // vertices already exist in the pool with identical properties. - typedef multiset UniqueVertices; + typedef pmultiset UniqueVertices; public: typedef second_of_pair_iterator iterator; diff --git a/panda/src/egg/eggXfmAnimData.cxx b/panda/src/egg/eggXfmAnimData.cxx index a4e577034c..726438624b 100644 --- a/panda/src/egg/eggXfmAnimData.cxx +++ b/panda/src/egg/eggXfmAnimData.cxx @@ -52,7 +52,7 @@ EggXfmAnimData(const EggXfmSAnim &convert_from) // contents string. Also store up the SAnim tables themselves in a // temporary vector for convenience. - vector subtables; + pvector subtables; EggXfmSAnim::const_iterator ci; for (ci = convert_from.begin(); ci != convert_from.end(); ++ci) { diff --git a/panda/src/egg/parser.yxx b/panda/src/egg/parser.yxx index 4bbf2b22d7..5b994f3612 100644 --- a/panda/src/egg/parser.yxx +++ b/panda/src/egg/parser.yxx @@ -35,7 +35,7 @@ #include #include -#include +#include "pvector.h" // Because our token type contains objects of type string, which // require correct copy construction (and not simply memcpying), we @@ -50,7 +50,7 @@ // and push it onto the stack. At any given time, the top of the // stack is the EggObject we are currently scanning. -typedef vector< PT(EggObject) > EggStack; +typedef pvector< PT(EggObject) > EggStack; static EggStack egg_stack; // There's one "top-level" egg node, which is where we should parent @@ -60,15 +60,15 @@ static EggStack egg_stack; static EggGroupNode *egg_top_node; // We need a table mapping vertex pool names to vertex pools. -typedef map VertexPools; +typedef pmap VertexPools; static VertexPools vertex_pools; // And another one mapping texture names to textures. -typedef map Textures; +typedef pmap Textures; static Textures textures; // And again for material names to materials. -typedef map Materials; +typedef pmap Materials; static Materials materials; // We need to be able to save the index number requested for a vertex diff --git a/panda/src/egg/vector_PT_EggMaterial.h b/panda/src/egg/vector_PT_EggMaterial.h index e1fee29d2b..14b480fa59 100644 --- a/panda/src/egg/vector_PT_EggMaterial.h +++ b/panda/src/egg/vector_PT_EggMaterial.h @@ -24,7 +24,7 @@ #include "eggMaterial.h" #include "pt_EggMaterial.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_PT_EggMaterial diff --git a/panda/src/egg/vector_PT_EggTexture.h b/panda/src/egg/vector_PT_EggTexture.h index c6d9f8ebee..a00286565a 100644 --- a/panda/src/egg/vector_PT_EggTexture.h +++ b/panda/src/egg/vector_PT_EggTexture.h @@ -24,7 +24,7 @@ #include "eggTexture.h" #include "pt_EggTexture.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_PT_EggTexture diff --git a/panda/src/egg/vector_PT_EggVertex.h b/panda/src/egg/vector_PT_EggVertex.h index b22d9a7c57..cfd1b9cdfb 100644 --- a/panda/src/egg/vector_PT_EggVertex.h +++ b/panda/src/egg/vector_PT_EggVertex.h @@ -24,7 +24,7 @@ #include "eggVertex.h" #include "pt_EggVertex.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_PT_EggVertex diff --git a/panda/src/egg2sg/characterMaker.h b/panda/src/egg2sg/characterMaker.h index 034ac990f1..ee06de8540 100644 --- a/panda/src/egg2sg/characterMaker.h +++ b/panda/src/egg2sg/characterMaker.h @@ -27,7 +27,7 @@ #include #include -#include +#include "pmap.h" class EggNode; class EggGroup; @@ -72,7 +72,7 @@ private: EggGroupNode *prim_home); EggGroupNode *determine_primitive_home(EggPrimitive *egg_primitive); - typedef map NodeMap; + typedef pmap NodeMap; NodeMap _node_map; typedef vector_PartGroupStar Parts; diff --git a/panda/src/egg2sg/computedVerticesMaker.cxx b/panda/src/egg2sg/computedVerticesMaker.cxx index bb7223c5ac..ca6033082a 100644 --- a/panda/src/egg2sg/computedVerticesMaker.cxx +++ b/panda/src/egg2sg/computedVerticesMaker.cxx @@ -320,7 +320,7 @@ ComputedVertices *ComputedVerticesMaker:: make_computed_vertices(Character *character, CharacterMaker &char_maker) { // We must first build up a set of all the unique kinds of vertex // transforms. - typedef set VertexTransforms; + typedef pset VertexTransforms; VertexTransforms transforms; TransformSpaces::const_iterator tsi; diff --git a/panda/src/egg2sg/computedVerticesMaker.h b/panda/src/egg2sg/computedVerticesMaker.h index ec9aeccfae..f6699a5b26 100644 --- a/panda/src/egg2sg/computedVerticesMaker.h +++ b/panda/src/egg2sg/computedVerticesMaker.h @@ -33,8 +33,8 @@ #include #include -#include -#include +#include "pset.h" +#include "pmap.h" class ComputedVertices; class CharacterMaker; @@ -90,10 +90,10 @@ public: PTA_TexCoordf _texcoords; protected: - typedef map VertexMorphList; - typedef map NormalMorphList; - typedef map TexCoordMorphList; - typedef map ColorMorphList; + typedef pmap VertexMorphList; + typedef pmap NormalMorphList; + typedef pmap TexCoordMorphList; + typedef pmap ColorMorphList; class MorphList { public: VertexMorphList _vmorphs; @@ -102,10 +102,10 @@ protected: ColorMorphList _cmorphs; }; - typedef map Morphs; + typedef pmap Morphs; Morphs _morphs; - typedef set Vertices; + typedef pset Vertices; Vertices _cindex; Vertices _tindex; @@ -117,7 +117,7 @@ protected: public: #endif - class JointWeights: public map { + class JointWeights: public pmap { public: bool operator < (const JointWeights &other) const; void normalize_weights(); @@ -135,7 +135,7 @@ protected: ComputedVerticesMakerNormalMap _nmap; }; - typedef map TransformSpaces; + typedef pmap TransformSpaces; TransformSpaces _transforms; class VertexTransform { diff --git a/panda/src/egg2sg/computedVerticesMakerEntity.h b/panda/src/egg2sg/computedVerticesMakerEntity.h index 01262f8a3e..cecfd7b17a 100644 --- a/panda/src/egg2sg/computedVerticesMakerEntity.h +++ b/panda/src/egg2sg/computedVerticesMakerEntity.h @@ -26,7 +26,7 @@ #include #include -#include +#include "pmap.h" /////////////////////////////////////////////////////////////////// // Class : ComputedVerticesMakerEntity @@ -62,7 +62,7 @@ public: int add_value(const ValueType &value, const MorphType &morphs, PTA(ValueType) &table); - typedef map, int> MapType; + typedef pmap, int> MapType; MapType _map; }; diff --git a/panda/src/egg2sg/deferredArcProperty.h b/panda/src/egg2sg/deferredArcProperty.h index 9d660c5319..e22971b318 100644 --- a/panda/src/egg2sg/deferredArcProperty.h +++ b/panda/src/egg2sg/deferredArcProperty.h @@ -61,7 +61,7 @@ public: CollideMask _into_collide_mask; }; -typedef map DeferredArcs; +typedef pmap DeferredArcs; #endif diff --git a/panda/src/egg2sg/deferredArcTraverser.h b/panda/src/egg2sg/deferredArcTraverser.h index 2ee8968f64..da8fa90c5a 100644 --- a/panda/src/egg2sg/deferredArcTraverser.h +++ b/panda/src/egg2sg/deferredArcTraverser.h @@ -27,7 +27,7 @@ #include #include -#include +#include "pmap.h" class NodeRelation; diff --git a/panda/src/egg2sg/eggLoader.cxx b/panda/src/egg2sg/eggLoader.cxx index 73761d32cb..9a29ae4db9 100644 --- a/panda/src/egg2sg/eggLoader.cxx +++ b/panda/src/egg2sg/eggLoader.cxx @@ -1264,7 +1264,7 @@ make_node(EggBin *egg_bin, NamedNode *parent) { LODNode *lod_node = new LODNode; lod_node->set_name(egg_bin->get_name()); - vector instances; + pvector instances; EggGroup::const_iterator ci; for (ci = egg_bin->begin(); ci != egg_bin->end(); ++ci) { @@ -1316,8 +1316,8 @@ make_node(EggGroup *egg_group, NamedNode *parent) { // We'll allow recursive expansion of ObjectType strings--but we // don't want to get caught in a cycle. Keep track of the strings // we've expanded so far. - set expanded; - vector expanded_history; + pset expanded; + pvector expanded_history; while (egg_group->has_objecttype()) { string objecttype = egg_group->get_objecttype(); @@ -1737,7 +1737,7 @@ make_collision_sphere(EggGroup *egg_group, CollisionNode *cnode, EggGroup *geom_group = find_collision_geometry(egg_group); if (geom_group != (EggGroup *)NULL) { // Collect all of the vertices. - set vertices; + pset vertices; EggGroup::const_iterator ci; for (ci = geom_group->begin(); ci != geom_group->end(); ++ci) { @@ -1753,7 +1753,7 @@ make_collision_sphere(EggGroup *egg_group, CollisionNode *cnode, // Now average together all of the vertices to get a center. int num_vertices = 0; LPoint3d center(0.0, 0.0, 0.0); - set::const_iterator vi; + pset::const_iterator vi; for (vi = vertices.begin(); vi != vertices.end(); ++vi) { EggVertex *vtx = (*vi); @@ -1868,7 +1868,7 @@ create_collision_plane(EggPolygon *egg_poly, EggGroup *parent_group) { return NULL; } - vector vertices; + pvector vertices; if (!egg_poly->empty()) { EggPolygon::const_iterator vi; vi = egg_poly->begin(); @@ -1929,7 +1929,7 @@ create_collision_polygons(CollisionNode *cnode, EggPolygon *egg_poly, for (ci = group->begin(); ci != group->end(); ++ci) { EggPolygon *poly = DCAST(EggPolygon, *ci); - vector vertices; + pvector vertices; if (!poly->empty()) { EggPolygon::const_iterator vi; vi = poly->begin(); diff --git a/panda/src/egg2sg/eggLoader.h b/panda/src/egg2sg/eggLoader.h index 87ce781a70..69b8b5c540 100644 --- a/panda/src/egg2sg/eggLoader.h +++ b/panda/src/egg2sg/eggLoader.h @@ -131,20 +131,20 @@ private: Builder _builder; - typedef set > TextureApplies; + typedef pset > TextureApplies; TextureApplies _texture_applies; - typedef map Textures; + typedef pmap Textures; Textures _textures; - typedef map Materials; + typedef pmap Materials; Materials _materials; Materials _materials_bface; - typedef set Decals; + typedef pset Decals; Decals _decals; - typedef set Directs; + typedef pset Directs; Directs _directs; DeferredArcs _deferred_arcs; diff --git a/panda/src/event/event.h b/panda/src/event/event.h index c26656f82b..3933652b0d 100644 --- a/panda/src/event/event.h +++ b/panda/src/event/event.h @@ -63,7 +63,7 @@ PUBLISHED: void output(ostream &out) const; protected: - typedef vector ParameterList; + typedef pvector ParameterList; ParameterList _parameters; EventReceiver *_receiver; diff --git a/panda/src/event/eventHandler.h b/panda/src/event/eventHandler.h index de3cad4ec5..f62fd313b2 100644 --- a/panda/src/event/eventHandler.h +++ b/panda/src/event/eventHandler.h @@ -24,8 +24,8 @@ #include "event.h" #include "pt_Event.h" -#include -#include +#include "pset.h" +#include "pmap.h" class EventQueue; @@ -68,11 +68,11 @@ public: protected: - typedef set Functions; - typedef map Hooks; + typedef pset Functions; + typedef pmap Hooks; typedef pair CallbackFunction; - typedef set CallbackFunctions; - typedef map CallbackHooks; + typedef pset CallbackFunctions; + typedef pmap CallbackHooks; Hooks _hooks; CallbackHooks _cbhooks; diff --git a/panda/src/express/memoryUsage.cxx b/panda/src/express/memoryUsage.cxx index 5638342a34..6e7a1a58b5 100644 --- a/panda/src/express/memoryUsage.cxx +++ b/panda/src/express/memoryUsage.cxx @@ -87,7 +87,7 @@ void MemoryUsage::TypeHistogram:: show() const { // First, copy the relevant information to a vector so we can sort // by counts. - vector count_sorter; + pvector count_sorter; Counts::const_iterator ci; for (ci = _counts.begin(); ci != _counts.end(); ++ci) { count_sorter.push_back @@ -96,7 +96,7 @@ show() const { sort(count_sorter.begin(), count_sorter.end()); - vector::const_iterator vi; + pvector::const_iterator vi; for (vi = count_sorter.begin(); vi != count_sorter.end(); ++vi) { TypeHandle type = (*vi)._type; if (type == TypeHandle::none()) { diff --git a/panda/src/express/memoryUsage.h b/panda/src/express/memoryUsage.h index bfa3d96730..cc11bd4569 100644 --- a/panda/src/express/memoryUsage.h +++ b/panda/src/express/memoryUsage.h @@ -25,7 +25,7 @@ #include "memoryInfo.h" #include "memoryUsagePointerCounts.h" -#include +#include "pmap.h" class ReferenceCount; class MemoryUsagePointers; @@ -124,6 +124,7 @@ private: static MemoryUsage *_global_ptr; + // Cannot use a pmap, since that would be recursive! typedef map Table; Table _table; int _freeze_index; @@ -138,6 +139,7 @@ private: void clear(); private: + // Cannot use a pmap, since that would be recursive! typedef map Counts; Counts _counts; }; diff --git a/panda/src/express/memoryUsagePointers.h b/panda/src/express/memoryUsagePointers.h index 58b57cf99c..4985422b09 100644 --- a/panda/src/express/memoryUsagePointers.h +++ b/panda/src/express/memoryUsagePointers.h @@ -25,7 +25,7 @@ #include "pointerTo.h" #include "referenceCount.h" -#include +#include "pvector.h" #ifndef NDEBUG //////////////////////////////////////////////////////////////////// @@ -86,7 +86,7 @@ private: double _age; }; - typedef vector Entries; + typedef pvector Entries; Entries _entries; friend class MemoryUsage; }; diff --git a/panda/src/express/multifile.h b/panda/src/express/multifile.h index c8e8624af5..6af6dfac7c 100644 --- a/panda/src/express/multifile.h +++ b/panda/src/express/multifile.h @@ -29,7 +29,7 @@ #include #include -#include +#include "plist.h" //////////////////////////////////////////////////////////////////// // Class : Multifile @@ -99,7 +99,7 @@ private: int _bytes_written; }; - typedef list MemfileList; + typedef plist MemfileList; class MemfileMatch { public: diff --git a/panda/src/express/patchfile.h b/panda/src/express/patchfile.h index 5bce37280d..4768f98320 100644 --- a/panda/src/express/patchfile.h +++ b/panda/src/express/patchfile.h @@ -26,7 +26,7 @@ #include "typedef.h" #include #include -#include +#include "plist.h" #include "datagram.h" #include "datagramIterator.h" #include "buffer.h" diff --git a/panda/src/express/profileTimer.cxx b/panda/src/express/profileTimer.cxx index 35152427a4..c129e74ea1 100644 --- a/panda/src/express/profileTimer.cxx +++ b/panda/src/express/profileTimer.cxx @@ -25,7 +25,7 @@ #include "profileTimer.h" #endif -#include +#include "pmap.h" using namespace std; @@ -121,7 +121,7 @@ consolidateAllTo(ostream &out) { void ProfileTimer:: consolidateTo(ostream &out) const { - map entries; + pmap entries; int i; for (i=0; i<_entryCount; ++i) { TimerEntry& te=_entries[i]; @@ -132,7 +132,7 @@ consolidateTo(ostream &out) const { << "\n\n"; // ...should print data and time too. double total=0; { - map::const_iterator i=entries.begin(); + pmap::const_iterator i=entries.begin(); for (;i!=entries.end(); ++i) { out << " " << setw(50) << i->first << ": " << setiosflags(ios::fixed) << setprecision(6) << setw(10) << i->second << "\n"; diff --git a/panda/src/express/tokenBoard.I b/panda/src/express/tokenBoard.I index 32a3dc9f0e..de71736f06 100644 --- a/panda/src/express/tokenBoard.I +++ b/panda/src/express/tokenBoard.I @@ -34,7 +34,7 @@ is_done_token(int id) { } // Now we can search really_done for our desired id. - list< PT(TokenType) >::iterator found; + plist< PT(TokenType) >::iterator found; found = find_if(_really_done.begin(), _really_done.end(), TokenMatch(id)); @@ -62,7 +62,7 @@ get_done_token(int id) { } // Now we can search really_done for our desired id. - list< PT(TokenType) >::iterator found; + plist< PT(TokenType) >::iterator found; found = find_if(_really_done.begin(), _really_done.end(), TokenMatch(id)); diff --git a/panda/src/express/tokenBoard.h b/panda/src/express/tokenBoard.h index 191b7393ad..1eec766155 100644 --- a/panda/src/express/tokenBoard.h +++ b/panda/src/express/tokenBoard.h @@ -22,7 +22,7 @@ // Includes //////////////////////////////////////////////////////////////////// #include -#include +#include "plist.h" #include "circBuffer.h" #include "pointerTo.h" @@ -70,7 +70,7 @@ public: // extracted into the local list so we can safely search for and // remove a particular token from the middle of the list (we can // only remove from the head of a circular buffer). - list< PT(TokenType) > _really_done; + plist< PT(TokenType) > _really_done; }; #include "tokenBoard.I" diff --git a/panda/src/express/typeHandle.h b/panda/src/express/typeHandle.h index e0ce29d1b7..386a420371 100644 --- a/panda/src/express/typeHandle.h +++ b/panda/src/express/typeHandle.h @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include "pvector.h" +#include "pmap.h" +#include "pset.h" #include // The following illustrates the convention for declaring a type that @@ -152,7 +152,7 @@ protected: TypeHandle _handle; string _name; TypeHandle &_ref; - typedef vector Classes; + typedef pvector Classes; Classes _parent_classes; Classes _child_classes; }; @@ -209,13 +209,13 @@ private: void write_node(ostream &out, int indent_level, const RegistryNode *node) const; - typedef vector HandleRegistry; + typedef pvector HandleRegistry; HandleRegistry _handle_registry; - typedef map NameRegistry; + typedef pmap NameRegistry; NameRegistry _name_registry; - typedef vector RootClasses; + typedef pvector RootClasses; bool _root_classes_fresh; RootClasses _root_classes; diff --git a/panda/src/framework/framework.cxx b/panda/src/framework/framework.cxx index 600417f6a9..b665d3cd1a 100644 --- a/panda/src/framework/framework.cxx +++ b/panda/src/framework/framework.cxx @@ -60,7 +60,7 @@ #include #include #include -#include +#include "plist.h" #include #include #include @@ -1091,7 +1091,7 @@ int framework_main(int argc, char *argv[]) { // line. This is handy, for instance, to load up both a character // and its animation file. - typedef vector Files; + typedef pvector Files; Files files; Files gridded_files; diff --git a/panda/src/glgsg/glGraphicsStateGuardian.cxx b/panda/src/glgsg/glGraphicsStateGuardian.cxx index de4c4e612c..90445dfaf8 100644 --- a/panda/src/glgsg/glGraphicsStateGuardian.cxx +++ b/panda/src/glgsg/glGraphicsStateGuardian.cxx @@ -92,7 +92,7 @@ #include -#include +#include "pvector.h" #include #if 0 @@ -1046,8 +1046,8 @@ draw_sprite(const GeomSprite *geom) { } // sort container and iterator - vector< WrappedSprite > cameraspace_vector; - vector< WrappedSprite >::iterator vec_iter; + pvector< WrappedSprite > cameraspace_vector; + pvector< WrappedSprite >::iterator vec_iter; // inner loop vars int i; diff --git a/panda/src/glxdisplay/glxGraphicsWindow.cxx b/panda/src/glxdisplay/glxGraphicsWindow.cxx index 7db204d989..4822ad5501 100644 --- a/panda/src/glxdisplay/glxGraphicsWindow.cxx +++ b/panda/src/glxdisplay/glxGraphicsWindow.cxx @@ -317,7 +317,7 @@ void glxGraphicsWindow::choose_visual(void) 0 }; - set tried_masks; + pset tried_masks; tried_masks.insert(mask); int i; diff --git a/panda/src/gobj/LOD.h b/panda/src/gobj/LOD.h index d4752606a4..a6546624ed 100644 --- a/panda/src/gobj/LOD.h +++ b/panda/src/gobj/LOD.h @@ -57,7 +57,7 @@ public: INLINE void rescale(float factor_squared); // We must declare these operators to allow VC++ to explicitly - // export vector, below. They don't do anything useful. + // export pvector, below. They don't do anything useful. INLINE bool operator == (const LODSwitch &other) const; INLINE bool operator != (const LODSwitch &other) const; INLINE bool operator < (const LODSwitch &other) const; diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index e93438de44..f4a3bb8993 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -493,7 +493,7 @@ recompute_bound() { // Now actually compute the bounding volume by putting it around all // of our vertices. - vector vertices; + pvector vertices; VertexIterator vi = make_vertex_iterator(); for (int p = 0; p < get_num_prims(); p++) { diff --git a/panda/src/gobj/materialPool.h b/panda/src/gobj/materialPool.h index 58c7813dd4..a821506e27 100644 --- a/panda/src/gobj/materialPool.h +++ b/panda/src/gobj/materialPool.h @@ -26,7 +26,7 @@ #include #include -#include +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : MaterialPool @@ -63,7 +63,7 @@ private: static MaterialPool *get_ptr(); static MaterialPool *_global_ptr; - typedef set< CPT(Material), IndirectCompareTo > Materials; + typedef pset< CPT(Material), IndirectCompareTo > Materials; Materials _materials; }; diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index 7c398d3dbf..66c82ae52f 100644 --- a/panda/src/gobj/texture.h +++ b/panda/src/gobj/texture.h @@ -26,7 +26,7 @@ #include "imageBuffer.h" #include "pixelBuffer.h" #include -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Defines @@ -161,7 +161,7 @@ protected: // has been prepared into. Each GSG conversely keeps a list (a set) // of all the Texture's that have been prepared there. When either // destructs, it removes itself from the other's list. - typedef map Contexts; + typedef pmap Contexts; Contexts _contexts; diff --git a/panda/src/gobj/texturePool.h b/panda/src/gobj/texturePool.h index 71cf1e067c..c675cde424 100644 --- a/panda/src/gobj/texturePool.h +++ b/panda/src/gobj/texturePool.h @@ -25,7 +25,7 @@ #include -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : TexturePool @@ -68,7 +68,7 @@ private: static TexturePool *get_ptr(); static TexturePool *_global_ptr; - typedef map Textures; + typedef pmap Textures; Textures _textures; }; diff --git a/panda/src/graph/graphReducer.cxx b/panda/src/graph/graphReducer.cxx index dcf3c1450a..f2a7d9b2ee 100644 --- a/panda/src/graph/graphReducer.cxx +++ b/panda/src/graph/graphReducer.cxx @@ -21,8 +21,8 @@ #include "namedNode.h" #include "pt_Node.h" -#include -#include +#include "pmap.h" +#include "plist.h" //////////////////////////////////////////////////////////////////// // Function: GraphReducer::Constructor @@ -165,7 +165,7 @@ flatten_siblings(Node *root) { // First, collect the children into groups of arcs with common // properties. - typedef map, SortByTransitions> Children; + typedef pmap, SortByTransitions> Children; Children children; const DownRelationPointers &drp = @@ -179,17 +179,17 @@ flatten_siblings(Node *root) { // Now visit each of those groups and try to collapse them together. Children::iterator ci; for (ci = children.begin(); ci != children.end(); ++ci) { - list &arcs = (*ci).second; + plist &arcs = (*ci).second; - list::iterator ai1; + plist::iterator ai1; ai1 = arcs.begin(); while (ai1 != arcs.end()) { - list::iterator ai1_hold = ai1; + plist::iterator ai1_hold = ai1; NodeRelation *arc1 = (*ai1); ++ai1; - list::iterator ai2 = ai1; + plist::iterator ai2 = ai1; while (ai2 != arcs.end()) { - list::iterator ai2_hold = ai2; + plist::iterator ai2_hold = ai2; NodeRelation *arc2 = (*ai2); ++ai2; diff --git a/panda/src/graph/multiAttribute.h b/panda/src/graph/multiAttribute.h index 08d45aacf2..e00aeaffb1 100644 --- a/panda/src/graph/multiAttribute.h +++ b/panda/src/graph/multiAttribute.h @@ -37,7 +37,7 @@ class MultiTransition; template class MultiAttribute : public NodeAttribute { private: - typedef vector Properties; + typedef pvector Properties; protected: MultiAttribute(); @@ -79,7 +79,7 @@ private: public: // These functions and typedefs allow one to peruse all of the // Properties in the transition. Remember to export the - // vector template class if you intend to use these + // pvector template class if you intend to use these // outside of PANDA.DLL. typedef Properties::const_iterator iterator; typedef Properties::const_iterator const_iterator; diff --git a/panda/src/graph/multiTransition.h b/panda/src/graph/multiTransition.h index 9516a4f434..4fa93e7f3c 100644 --- a/panda/src/graph/multiTransition.h +++ b/panda/src/graph/multiTransition.h @@ -52,7 +52,7 @@ template class MultiTransition : public NodeTransition { private: - typedef map Properties; + typedef pmap Properties; protected: MultiTransition(); diff --git a/panda/src/graph/node.h b/panda/src/graph/node.h index aa1cfc29a9..cca62bb8f6 100644 --- a/panda/src/graph/node.h +++ b/panda/src/graph/node.h @@ -115,7 +115,7 @@ private: protected: virtual void propagate_stale_bound(); - typedef map InstanceMap; + typedef pmap InstanceMap; virtual Node *r_copy_subgraph(TypeHandle graph_type, InstanceMap &inst_map) const; virtual void r_copy_children(const Node *from, TypeHandle graph_type, diff --git a/panda/src/graph/nodeAttributes.h b/panda/src/graph/nodeAttributes.h index 18e645fa82..8228addd24 100644 --- a/panda/src/graph/nodeAttributes.h +++ b/panda/src/graph/nodeAttributes.h @@ -25,7 +25,7 @@ #include -#include +#include "pmap.h" class NodeTransitionCache; @@ -57,7 +57,7 @@ PUBLISHED: int compare_to(const NodeAttributes &other) const; private: - typedef map< TypeHandle, PT(NodeAttribute) > Attributes; + typedef pmap< TypeHandle, PT(NodeAttribute) > Attributes; public: // STL-like definitions to expose the map within NodeAttributes to // external adjustment. Beware! These are not safe to use outside diff --git a/panda/src/graph/nodeRelation.cxx b/panda/src/graph/nodeRelation.cxx index 48857f8b80..dcd399e06f 100644 --- a/panda/src/graph/nodeRelation.cxx +++ b/panda/src/graph/nodeRelation.cxx @@ -30,7 +30,7 @@ TypeHandle NodeRelation::_stashed_type_handle; Factory *NodeRelation::_factory = NULL; -typedef map LastGraphUpdate; +typedef pmap LastGraphUpdate; static LastGraphUpdate *last_graph_update_map = NULL; //////////////////////////////////////////////////////////////////// @@ -825,7 +825,7 @@ recompute_bound() { // Now actually compute the bounding volume by putting it around all // of our child bounding volumes. - vector child_volumes; + pvector child_volumes; Node *node = _child; nassertv(node != (Node*)NULL); diff --git a/panda/src/graph/nodeRelation.h b/panda/src/graph/nodeRelation.h index 6cdfffdc40..619d5aed8c 100644 --- a/panda/src/graph/nodeRelation.h +++ b/panda/src/graph/nodeRelation.h @@ -33,8 +33,8 @@ #include #include -#include -#include +#include "pset.h" +#include "pmap.h" #include class Node; diff --git a/panda/src/graph/nodeTransition.h b/panda/src/graph/nodeTransition.h index fb3774ca4e..01cd585b08 100644 --- a/panda/src/graph/nodeTransition.h +++ b/panda/src/graph/nodeTransition.h @@ -111,7 +111,7 @@ public: protected: int _priority; - typedef set Arcs; + typedef pset Arcs; Arcs _arcs; public: diff --git a/panda/src/graph/nodeTransitionCache.h b/panda/src/graph/nodeTransitionCache.h index fee5d08297..e6bb21410e 100644 --- a/panda/src/graph/nodeTransitionCache.h +++ b/panda/src/graph/nodeTransitionCache.h @@ -26,7 +26,7 @@ #include -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : NodeTransitionCache @@ -62,7 +62,7 @@ public: store_entry(TypeHandle handle, const NodeTransitionCacheEntry &entry); private: - typedef map Cache; + typedef pmap Cache; public: // STL-like definitions to allow read-only traversal of the // individual transitions. Note that each of these is a diff --git a/panda/src/graph/nodeTransitions.h b/panda/src/graph/nodeTransitions.h index f93fb9c1b0..bf50487653 100644 --- a/panda/src/graph/nodeTransitions.h +++ b/panda/src/graph/nodeTransitions.h @@ -25,7 +25,7 @@ #include -#include +#include "pmap.h" class NodeRelation; @@ -62,7 +62,7 @@ public: void remove_all_from_arc(NodeRelation *arc); private: - typedef map Transitions; + typedef pmap Transitions; public: // STL-like definitions to allow read-only traversal of the diff --git a/panda/src/graph/vector_NodeRelation_star.h b/panda/src/graph/vector_NodeRelation_star.h index 7146f1db8f..396dd67d36 100644 --- a/panda/src/graph/vector_NodeRelation_star.h +++ b/panda/src/graph/vector_NodeRelation_star.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" class NodeRelation; diff --git a/panda/src/graph/vector_PT_Node.h b/panda/src/graph/vector_PT_Node.h index df5b42a694..796bbfc857 100644 --- a/panda/src/graph/vector_PT_Node.h +++ b/panda/src/graph/vector_PT_Node.h @@ -24,7 +24,7 @@ #include "node.h" #include "pt_Node.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_PT_Node diff --git a/panda/src/graph/vector_PT_NodeRelation.h b/panda/src/graph/vector_PT_NodeRelation.h index 4c62114381..f850084d6f 100644 --- a/panda/src/graph/vector_PT_NodeRelation.h +++ b/panda/src/graph/vector_PT_NodeRelation.h @@ -24,7 +24,7 @@ #include "nodeRelation.h" #include "pt_NodeRelation.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_PT_NodeRelation diff --git a/panda/src/grutil/lineSegs.h b/panda/src/grutil/lineSegs.h index 13b6b50efb..7e69c83e56 100644 --- a/panda/src/grutil/lineSegs.h +++ b/panda/src/grutil/lineSegs.h @@ -28,7 +28,7 @@ #include #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : LineSegs @@ -83,8 +83,8 @@ private: Colorf _color; }; - typedef vector SegmentList; - typedef vector LineList; + typedef pvector SegmentList; + typedef pvector LineList; LineList _list; Colorf _color; diff --git a/panda/src/gui/guiButton.cxx b/panda/src/gui/guiButton.cxx index 6ede2575df..f1040938e8 100644 --- a/panda/src/gui/guiButton.cxx +++ b/panda/src/gui/guiButton.cxx @@ -21,9 +21,9 @@ #include -#include +#include "pmap.h" -typedef map ButtonMap; +typedef pmap ButtonMap; static ButtonMap buttons; static bool bAddedHooks = false; diff --git a/panda/src/gui/guiChooser.h b/panda/src/gui/guiChooser.h index 30481896f6..5674c89c5f 100644 --- a/panda/src/gui/guiChooser.h +++ b/panda/src/gui/guiChooser.h @@ -22,13 +22,13 @@ #include "guiBehavior.h" #include "guiButton.h" -#include +#include "pvector.h" // Only shows one item at a time. Has two buttons that move back and forth // over the list of things it has. Can do both circular and linear lists. class EXPCL_PANDA GuiChooser : public GuiBehavior { private: - typedef vector< PT(GuiItem) > ItemVector; + typedef pvector< PT(GuiItem) > ItemVector; class EXPCL_PANDA ChooseFunctor : public GuiBehavior::BehaviorFunctor { protected: diff --git a/panda/src/gui/guiCollection.h b/panda/src/gui/guiCollection.h index 14dabe2307..ff4639b72d 100644 --- a/panda/src/gui/guiCollection.h +++ b/panda/src/gui/guiCollection.h @@ -21,11 +21,11 @@ #include "guiItem.h" -#include +#include "pvector.h" class EXPCL_PANDA GuiCollection : public GuiItem { private: - typedef vector< PT(GuiItem) > Items; + typedef pvector< PT(GuiItem) > Items; Items _items; diff --git a/panda/src/gui/guiFrame.cxx b/panda/src/gui/guiFrame.cxx index d9850e211a..bdba02017b 100644 --- a/panda/src/gui/guiFrame.cxx +++ b/panda/src/gui/guiFrame.cxx @@ -48,7 +48,7 @@ public: } }; -typedef map UtilMap; +typedef pmap UtilMap; GuiFrame::Boxes::iterator GuiFrame::find_box(GuiItem* item) { bool found = false; @@ -64,7 +64,7 @@ GuiFrame::Boxes::iterator GuiFrame::find_box(GuiItem* item) { return ret; } -#include +#include "pmap.h" void GuiFrame::recompute_frame(void) { GuiItem::recompute_frame(); diff --git a/panda/src/gui/guiFrame.h b/panda/src/gui/guiFrame.h index a7c0a96bbe..022fefd683 100644 --- a/panda/src/gui/guiFrame.h +++ b/panda/src/gui/guiFrame.h @@ -21,7 +21,7 @@ #include "guiItem.h" -#include +#include "pvector.h" class EXPCL_PANDA GuiFrame : public GuiItem { PUBLISHED: @@ -50,7 +50,7 @@ private: inline GuiItem* get_who(void) const { return _who; } inline float get_gap(void) const { return _gap; } }; - typedef vector Connections; + typedef pvector Connections; class Box { private: PT(GuiItem) _thing; @@ -77,7 +77,7 @@ private: inline void erase_nth_link(int n) { _links.erase(_links.begin() + n); } inline void erase_all_links(void) { _links.clear(); } }; - typedef vector Boxes; + typedef pvector Boxes; Boxes _items; bool _align_to_left; diff --git a/panda/src/gui/guiLabel.h b/panda/src/gui/guiLabel.h index c417f80598..f3e8567775 100644 --- a/panda/src/gui/guiLabel.h +++ b/panda/src/gui/guiLabel.h @@ -38,7 +38,7 @@ class EXPCL_PANDA GuiLabel : public TypedReferenceCount { PUBLISHED: enum PriorityType { P_NONE, P_LOWEST, P_LOWER, P_HIGHER, P_HIGHEST }; private: - typedef map PriorityMap; + typedef pmap PriorityMap; enum LabelType { NONE, L_NULL, SIMPLE_TEXTURE, SIMPLE_TEXT, SIMPLE_CARD, MODEL }; LabelType _type; diff --git a/panda/src/gui/guiListBox.h b/panda/src/gui/guiListBox.h index e8a9d1391c..ddb6b1bf12 100644 --- a/panda/src/gui/guiListBox.h +++ b/panda/src/gui/guiListBox.h @@ -22,13 +22,13 @@ #include "guiBehavior.h" #include "guiButton.h" -#include -#include +#include "pvector.h" +#include "pdeque.h" class EXPCL_PANDA GuiListBox : public GuiBehavior { private: - typedef vector< PT(GuiItem) > ItemVector; - typedef deque< PT(GuiItem) > ItemDeque; + typedef pvector< PT(GuiItem) > ItemVector; + typedef pdeque< PT(GuiItem) > ItemDeque; class EXPCL_PANDA ListFunctor : public GuiBehavior::BehaviorFunctor { protected: diff --git a/panda/src/gui/guiManager.h b/panda/src/gui/guiManager.h index b5707225f6..a88071aabf 100644 --- a/panda/src/gui/guiManager.h +++ b/panda/src/gui/guiManager.h @@ -25,18 +25,18 @@ #include #include #include -#include +#include "pset.h" #include "guiLabel.h" #include "config_gui.h" class EXPCL_PANDA GuiManager { private: - typedef map GuiMap; + typedef pmap GuiMap; static GuiMap* _map; - typedef set RegionSet; + typedef pset RegionSet; RegionSet _regions; - typedef set LabelSet; + typedef pset LabelSet; LabelSet _labels; class SortComp { public: @@ -44,7 +44,7 @@ private: return (*a) < (*b); } }; - typedef set SortSet; + typedef pset SortSet; SortSet _sorts; int _start_draw_order; diff --git a/panda/src/gui/guiRollover.cxx b/panda/src/gui/guiRollover.cxx index 1b22695cdd..8748f59dce 100644 --- a/panda/src/gui/guiRollover.cxx +++ b/panda/src/gui/guiRollover.cxx @@ -19,9 +19,9 @@ #include "guiRollover.h" #include "config_gui.h" -#include +#include "pmap.h" -typedef map RolloverMap; +typedef pmap RolloverMap; static RolloverMap rollovers; static bool added_hooks = false; diff --git a/panda/src/ipc/ipc_ps2_traits.h b/panda/src/ipc/ipc_ps2_traits.h index cbfc10ee5e..c1c355ef85 100644 --- a/panda/src/ipc/ipc_ps2_traits.h +++ b/panda/src/ipc/ipc_ps2_traits.h @@ -23,9 +23,9 @@ #include #include #include -#include -#include -#include +#include "plist.h" +#include "pvector.h" +#include "pmap.h" // OK. The deal with the PS2 is that there is native library thread support // for threads and semaphors. Nothing else. This is why mutex and condition @@ -155,7 +155,7 @@ class EXPCL_PANDAEXPRESS ipc_traits int thread_id; }; - list waiting_thread_list; + plist waiting_thread_list; mutex_class list_access_lock; mutex_class* _mutex; @@ -214,9 +214,9 @@ class EXPCL_PANDAEXPRESS ipc_traits INLINE void broadcast(void) { - list::iterator begin = waiting_thread_list.begin(); - list::iterator end = waiting_thread_list.end(); - list::iterator cur = begin; + plist::iterator begin = waiting_thread_list.begin(); + plist::iterator end = waiting_thread_list.end(); + plist::iterator cur = begin; int s_id; @@ -274,7 +274,7 @@ class EXPCL_PANDAEXPRESS ipc_traits thread_class *thread_ptr; }; - static vector thread_addr_vector; + static pvector thread_addr_vector; static void thread_wrapper(void *); public: @@ -366,7 +366,7 @@ class EXPCL_PANDAEXPRESS ipc_traits { int id = GetThreadId(); - vector::iterator cur; + pvector::iterator cur; for (cur = thread_addr_vector.begin(); cur != thread_addr_vector.end(); cur++) @@ -396,7 +396,7 @@ class EXPCL_PANDAEXPRESS ipc_traits int id, result; struct ThreadParam thread_param; - vector::iterator cur; + pvector::iterator cur; id = GetThreadId(); diff --git a/panda/src/ipc/ipc_traits.cxx b/panda/src/ipc/ipc_traits.cxx index b4e3c2b865..759ff679d4 100644 --- a/panda/src/ipc/ipc_traits.cxx +++ b/panda/src/ipc/ipc_traits.cxx @@ -236,13 +236,13 @@ void ipc_traits::thread_class::thread_wrapper(void* data) { // PS2 #include -#include +#include "pmap.h" ConfigureFn(ipc_trait) { ipc_traits::thread_class::BuildRootThread(); } -vector ipc_traits::thread_class::thread_addr_vector; +pvector ipc_traits::thread_class::thread_addr_vector; ipc_traits::thread_class *ipc_traits::thread_class::m_root_thread; ipc_traits::mutex_class* const ipc_traits::mutex_class::Null = diff --git a/panda/src/ipc/loom_internal.h b/panda/src/ipc/loom_internal.h index 767dd5efa6..a7f1347761 100644 --- a/panda/src/ipc/loom_internal.h +++ b/panda/src/ipc/loom_internal.h @@ -25,11 +25,11 @@ #include "ipc_mutex.h" #include "ipc_condition.h" #include "ipc_thread.h" -#include +#include "plist.h" class app_service; -typedef std::list service_list; +typedef std::plist service_list; extern service_list *task_list; extern mutex *main_thread_mutex; diff --git a/panda/src/lerp/lerpfunctor.h b/panda/src/lerp/lerpfunctor.h index 4fd3aaddc2..15cdd360c6 100644 --- a/panda/src/lerp/lerpfunctor.h +++ b/panda/src/lerp/lerpfunctor.h @@ -189,12 +189,12 @@ typedef SimpleQueryLerpFunctor LVector2fQueryLerpFunctor; typedef SimpleQueryLerpFunctor LVector3fQueryLerpFunctor; typedef SimpleQueryLerpFunctor LVector4fQueryLerpFunctor; -#include +#include "pset.h" #include class EXPCL_PANDA MultiLerpFunctor : public LerpFunctor { private: - typedef set< PT(LerpFunctor) > Functors; + typedef pset< PT(LerpFunctor) > Functors; Functors _funcs; public: MultiLerpFunctor(void) {} diff --git a/panda/src/light/ambientLight.h b/panda/src/light/ambientLight.h index c01ecf3598..74bc41fad3 100644 --- a/panda/src/light/ambientLight.h +++ b/panda/src/light/ambientLight.h @@ -25,7 +25,7 @@ #include #include -#include +#include "pmap.h" #include #include "light.h" diff --git a/panda/src/light/directionalLight.h b/panda/src/light/directionalLight.h index 2452bcbccd..fdec119872 100644 --- a/panda/src/light/directionalLight.h +++ b/panda/src/light/directionalLight.h @@ -25,7 +25,7 @@ #include #include -#include +#include "pmap.h" #include #include "light.h" diff --git a/panda/src/light/pointLight.h b/panda/src/light/pointLight.h index 10100359c3..10a83008c6 100644 --- a/panda/src/light/pointLight.h +++ b/panda/src/light/pointLight.h @@ -25,7 +25,7 @@ #include #include -#include +#include "pmap.h" #include #include "light.h" diff --git a/panda/src/light/spotlight.h b/panda/src/light/spotlight.h index bb5481b84a..d54a3f05d5 100644 --- a/panda/src/light/spotlight.h +++ b/panda/src/light/spotlight.h @@ -25,7 +25,7 @@ #include #include -#include +#include "pmap.h" #include #include #include "light.h" diff --git a/panda/src/light/vector_PT_Light.h b/panda/src/light/vector_PT_Light.h index ab6feac640..bd9fa9f727 100644 --- a/panda/src/light/vector_PT_Light.h +++ b/panda/src/light/vector_PT_Light.h @@ -23,7 +23,7 @@ #include "pt_Light.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_PT_Light diff --git a/panda/src/linmath/vector_Colorf.h b/panda/src/linmath/vector_Colorf.h index 67d3e1f732..41b7b14a64 100644 --- a/panda/src/linmath/vector_Colorf.h +++ b/panda/src/linmath/vector_Colorf.h @@ -23,7 +23,7 @@ #include "luse.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_Colorf diff --git a/panda/src/linmath/vector_LPoint2f.h b/panda/src/linmath/vector_LPoint2f.h index 5ad12fcca9..c582bc2e76 100644 --- a/panda/src/linmath/vector_LPoint2f.h +++ b/panda/src/linmath/vector_LPoint2f.h @@ -23,7 +23,7 @@ #include "luse.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_LPoint2f diff --git a/panda/src/linmath/vector_LVecBase3f.h b/panda/src/linmath/vector_LVecBase3f.h index 06bc430f7e..287c14e476 100644 --- a/panda/src/linmath/vector_LVecBase3f.h +++ b/panda/src/linmath/vector_LVecBase3f.h @@ -23,7 +23,7 @@ #include "luse.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_LVecBase3f diff --git a/panda/src/linmath/vector_Normalf.h b/panda/src/linmath/vector_Normalf.h index 6250fd1678..acfa3fd209 100644 --- a/panda/src/linmath/vector_Normalf.h +++ b/panda/src/linmath/vector_Normalf.h @@ -23,7 +23,7 @@ #include "luse.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_Normalf diff --git a/panda/src/linmath/vector_Vertexf.h b/panda/src/linmath/vector_Vertexf.h index bcbac3656e..c9c74a9e49 100644 --- a/panda/src/linmath/vector_Vertexf.h +++ b/panda/src/linmath/vector_Vertexf.h @@ -23,7 +23,7 @@ #include "luse.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_Vertexf diff --git a/panda/src/loader/loader.cxx b/panda/src/loader/loader.cxx index 5cb1b92b22..d421e9d40a 100644 --- a/panda/src/loader/loader.cxx +++ b/panda/src/loader/loader.cxx @@ -28,8 +28,8 @@ #include #include -#include -#include +#include "plist.h" +#include "pvector.h" #include @@ -358,7 +358,7 @@ public: //////////////////////////////////////////////////////////////////// PT_Node Loader:: load_unknown_file_type(const Filename &filename) const { - typedef vector Files; + typedef pvector Files; Files files; // First, build up a list of all of the possible files it could be. @@ -446,7 +446,7 @@ load_unknown_file_type(const Filename &filename) const { //////////////////////////////////////////////////////////////////// void Loader:: resolve_unknown_file_type(Filename &filename) const { - typedef vector Files; + typedef pvector Files; Files files; // First, build up a list of all of the possible files it could be. diff --git a/panda/src/loader/loaderFileTypeRegistry.h b/panda/src/loader/loaderFileTypeRegistry.h index 09b2ee07bc..4a17175d82 100644 --- a/panda/src/loader/loaderFileTypeRegistry.h +++ b/panda/src/loader/loaderFileTypeRegistry.h @@ -21,8 +21,8 @@ #include -#include -#include +#include "pvector.h" +#include "pmap.h" class LoaderFileType; class Filename; @@ -51,10 +51,10 @@ public: void register_type(LoaderFileType *type); private: - typedef vector Types; + typedef pvector Types; Types _types; - typedef map Extensions; + typedef pmap Extensions; Extensions _extensions; static LoaderFileTypeRegistry *_global_ptr; diff --git a/panda/src/loader/modelPool.h b/panda/src/loader/modelPool.h index 5f0a8d50f4..6e00e732c0 100644 --- a/panda/src/loader/modelPool.h +++ b/panda/src/loader/modelPool.h @@ -24,7 +24,7 @@ #include #include -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : ModelPool @@ -73,7 +73,7 @@ private: static ModelPool *get_ptr(); static ModelPool *_global_ptr; - typedef map Models; + typedef pmap Models; Models _models; }; diff --git a/panda/src/mathutil/fftCompressor.cxx b/panda/src/mathutil/fftCompressor.cxx index b312ce4bc7..c7af938e0f 100644 --- a/panda/src/mathutil/fftCompressor.cxx +++ b/panda/src/mathutil/fftCompressor.cxx @@ -33,7 +33,7 @@ static rfftw_plan get_real_compress_plan(int length); static rfftw_plan get_real_decompress_plan(int length); -typedef map RealPlans; +typedef pmap RealPlans; static RealPlans _real_compress_plans; static RealPlans _real_decompress_plans; diff --git a/panda/src/net/connectionManager.h b/panda/src/net/connectionManager.h index aa94150107..db18628c80 100644 --- a/panda/src/net/connectionManager.h +++ b/panda/src/net/connectionManager.h @@ -27,7 +27,7 @@ #include #include -#include +#include "pset.h" class NetAddress; class ConnectionReader; @@ -74,9 +74,9 @@ protected: void add_writer(ConnectionWriter *writer); void remove_writer(ConnectionWriter *writer); - typedef set< PT(Connection) > Connections; - typedef set Readers; - typedef set Writers; + typedef pset< PT(Connection) > Connections; + typedef pset Readers; + typedef pset Writers; Connections _connections; Readers _readers; Writers _writers; diff --git a/panda/src/net/connectionReader.h b/panda/src/net/connectionReader.h index 315fc6baea..955703acea 100644 --- a/panda/src/net/connectionReader.h +++ b/panda/src/net/connectionReader.h @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include "pvector.h" +#include "pset.h" class NetDatagram; class ConnectionManager; @@ -119,15 +119,15 @@ protected: private: bool _shutdown; - typedef vector Threads; + typedef pvector Threads; Threads _threads; PRLock *_startup_mutex; bool _polling; // These structures are used to manage polling for noise on // available sockets. - typedef vector Poll; - typedef vector Sockets; + typedef pvector Poll; + typedef pvector Sockets; Poll _poll; Sockets _polled_sockets; int _next_index; diff --git a/panda/src/net/connectionWriter.h b/panda/src/net/connectionWriter.h index 0db69e1821..95b85644e6 100644 --- a/panda/src/net/connectionWriter.h +++ b/panda/src/net/connectionWriter.h @@ -27,7 +27,7 @@ #include #include -#include +#include "pvector.h" class ConnectionManager; class NetAddress; @@ -74,7 +74,7 @@ protected: private: DatagramQueue _queue; - typedef vector Threads; + typedef pvector Threads; Threads _threads; bool _immediate; diff --git a/panda/src/net/datagramQueue.h b/panda/src/net/datagramQueue.h index 0f31564ec0..7df1c09146 100644 --- a/panda/src/net/datagramQueue.h +++ b/panda/src/net/datagramQueue.h @@ -25,7 +25,7 @@ #include #include -#include +#include "pdeque.h" //////////////////////////////////////////////////////////////////// // Class : DatagramQueue @@ -53,9 +53,9 @@ private: #ifdef __ICL // The Intel compiler for some reason dumps core on a queue of // NetDatagrams. - typedef deque QueueType; + typedef pdeque QueueType; #else - typedef deque QueueType; + typedef pdeque QueueType; #endif QueueType _queue; diff --git a/panda/src/net/queuedConnectionListener.h b/panda/src/net/queuedConnectionListener.h index 1387c6c9a0..d30775bf19 100644 --- a/panda/src/net/queuedConnectionListener.h +++ b/panda/src/net/queuedConnectionListener.h @@ -27,7 +27,7 @@ #include "queuedReturn.h" #include -#include +#include "pdeque.h" class EXPCL_PANDA ConnectionListenerData { diff --git a/panda/src/net/queuedConnectionManager.h b/panda/src/net/queuedConnectionManager.h index 5a2371846e..6a824d47de 100644 --- a/panda/src/net/queuedConnectionManager.h +++ b/panda/src/net/queuedConnectionManager.h @@ -25,7 +25,7 @@ #include "queuedReturn.h" #include -#include +#include "pdeque.h" EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, QueuedReturn< PT(Connection) >); diff --git a/panda/src/net/queuedConnectionReader.h b/panda/src/net/queuedConnectionReader.h index 218e8aa694..8bda959c27 100644 --- a/panda/src/net/queuedConnectionReader.h +++ b/panda/src/net/queuedConnectionReader.h @@ -26,7 +26,7 @@ #include "queuedReturn.h" #include -#include +#include "pdeque.h" EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, QueuedReturn); diff --git a/panda/src/net/queuedReturn.h b/panda/src/net/queuedReturn.h index 26e644ebad..1010f349c9 100644 --- a/panda/src/net/queuedReturn.h +++ b/panda/src/net/queuedReturn.h @@ -26,7 +26,7 @@ #include "netAddress.h" #include -#include +#include "pdeque.h" //////////////////////////////////////////////////////////////////// // Class : QueuedReturn @@ -54,7 +54,7 @@ protected: private: PRLock *_mutex; - deque _things; + pdeque _things; bool _available; int _max_queue_size; }; diff --git a/panda/src/net/test_spam_server.cxx b/panda/src/net/test_spam_server.cxx index ff5f816189..b9e3d51412 100644 --- a/panda/src/net/test_spam_server.cxx +++ b/panda/src/net/test_spam_server.cxx @@ -30,7 +30,7 @@ #include -#include +#include "pset.h" #include #include #include @@ -57,7 +57,7 @@ main(int argc, char *argv[]) { QueuedConnectionListener listener(&cm, 1); listener.add_connection(rendezvous); - typedef set< PT(Connection) > Clients; + typedef pset< PT(Connection) > Clients; Clients clients; QueuedConnectionReader reader(&cm, 10); diff --git a/panda/src/net/test_tcp_server.cxx b/panda/src/net/test_tcp_server.cxx index e20c2d499a..d4a69e9f25 100644 --- a/panda/src/net/test_tcp_server.cxx +++ b/panda/src/net/test_tcp_server.cxx @@ -28,7 +28,7 @@ #include "datagram_ui.h" -#include +#include "pset.h" int main(int argc, char *argv[]) { @@ -52,7 +52,7 @@ main(int argc, char *argv[]) { QueuedConnectionListener listener(&cm, 0); listener.add_connection(rendezvous); - typedef set< PT(Connection) > Clients; + typedef pset< PT(Connection) > Clients; Clients clients; QueuedConnectionReader reader(&cm, 1); diff --git a/panda/src/parametrics/classicNurbsCurve.cxx b/panda/src/parametrics/classicNurbsCurve.cxx index f9bfaddeb4..d75511c3d4 100644 --- a/panda/src/parametrics/classicNurbsCurve.cxx +++ b/panda/src/parametrics/classicNurbsCurve.cxx @@ -458,7 +458,7 @@ stitch(const ParametricCurve *a, const ParametricCurve *b) { float t = na->get_max_t(); // Now add all the new CV's. - vector::iterator ci; + pvector::iterator ci; for (ci = nb->_cvs.begin(); ci != nb->_cvs.end(); ++ci) { CV new_cv = (*ci); new_cv._t += t; diff --git a/panda/src/parametrics/classicNurbsCurve.h b/panda/src/parametrics/classicNurbsCurve.h index 536228b07b..f55eff43f5 100644 --- a/panda/src/parametrics/classicNurbsCurve.h +++ b/panda/src/parametrics/classicNurbsCurve.h @@ -110,7 +110,7 @@ protected: float _t; }; - vector _cvs; + pvector _cvs; // TypedWritable stuff diff --git a/panda/src/parametrics/curveFitter.h b/panda/src/parametrics/curveFitter.h index 35330d135a..5efa44f1d1 100644 --- a/panda/src/parametrics/curveFitter.h +++ b/panda/src/parametrics/curveFitter.h @@ -26,7 +26,7 @@ #include "parametricCurveCollection.h" #include -#include +#include "pvector.h" class HermiteCurve; class ParametricCurve; @@ -79,7 +79,7 @@ public: LVecBase3f _hpr_tangent; }; - typedef vector Data; + typedef pvector Data; Data _data; bool _got_xyz; diff --git a/panda/src/parametrics/hermiteCurve.h b/panda/src/parametrics/hermiteCurve.h index bdc17db146..8e94f6e6a4 100644 --- a/panda/src/parametrics/hermiteCurve.h +++ b/panda/src/parametrics/hermiteCurve.h @@ -156,7 +156,7 @@ protected: int find_cv(float t); void recompute_basis(); - vector _points; + pvector _points; // TypedWritable stuff public: diff --git a/panda/src/parametrics/nurbsCurveDrawer.h b/panda/src/parametrics/nurbsCurveDrawer.h index 9f0573f93e..6789f9c82e 100644 --- a/panda/src/parametrics/nurbsCurveDrawer.h +++ b/panda/src/parametrics/nurbsCurveDrawer.h @@ -57,7 +57,7 @@ protected: LVecBase3f _cv_color, _hull_color, _knot_color; int _num_cvs, _num_hull, _num_knots; LineSegs _hull, _knots, _cvs; - vector _knotnums; + pvector _knotnums; bool _show_cvs, _show_hull, _show_knots; diff --git a/panda/src/parametrics/nurbsPPCurve.h b/panda/src/parametrics/nurbsPPCurve.h index 5a4467c1cc..7c6b843854 100644 --- a/panda/src/parametrics/nurbsPPCurve.h +++ b/panda/src/parametrics/nurbsPPCurve.h @@ -88,8 +88,8 @@ protected: const string &curve_type, int indent_level) const; private: - typedef vector Points; - typedef vector Knots; + typedef pvector Points; + typedef pvector Knots; bool make_nurbs_valid(); void make_arrays_valid(); diff --git a/panda/src/parametrics/parametricCurve.h b/panda/src/parametrics/parametricCurve.h index 9a88aed723..8d9a01ec37 100644 --- a/panda/src/parametrics/parametricCurve.h +++ b/panda/src/parametrics/parametricCurve.h @@ -26,8 +26,8 @@ #include #include -#include -#include +#include "plist.h" +#include "pvector.h" // Parametric curve semantic types. A parametric curve may have one @@ -105,7 +105,7 @@ public: LVecBase3f _v[4]; float _t; }; - typedef vector BezierSegs; + typedef pvector BezierSegs; virtual bool get_bezier_segs(BezierSegs &) const; virtual bool get_bezier_seg(BezierSeg &) const; @@ -140,7 +140,7 @@ protected: int _num_dimensions; private: - typedef list DrawerList; + typedef plist DrawerList; DrawerList _drawers; ParametricCurveDrawer *_implicit_drawer; PT_NodeRelation _viz_arc; diff --git a/panda/src/parametrics/parametricCurveCollection.h b/panda/src/parametrics/parametricCurveCollection.h index e8c88c6f23..7efea58477 100644 --- a/panda/src/parametrics/parametricCurveCollection.h +++ b/panda/src/parametrics/parametricCurveCollection.h @@ -27,8 +27,8 @@ #include #include -#include -#include +#include "pvector.h" +#include "plist.h" class ParametricCurveDrawer; @@ -106,9 +106,9 @@ private: void redraw(); private: - typedef vector< PT(ParametricCurve) > ParametricCurves; + typedef pvector< PT(ParametricCurve) > ParametricCurves; ParametricCurves _curves; - typedef list DrawerList; + typedef plist DrawerList; DrawerList _drawers; }; diff --git a/panda/src/parametrics/piecewiseCurve.h b/panda/src/parametrics/piecewiseCurve.h index b2296a86d2..3a55c9a967 100644 --- a/panda/src/parametrics/piecewiseCurve.h +++ b/panda/src/parametrics/piecewiseCurve.h @@ -90,7 +90,7 @@ protected: float _tend; }; - vector _segs; + pvector _segs; int _last_ti; diff --git a/panda/src/particlesystem/baseParticleRenderer.h b/panda/src/particlesystem/baseParticleRenderer.h index 40ebf6127c..50318a3d96 100644 --- a/panda/src/particlesystem/baseParticleRenderer.h +++ b/panda/src/particlesystem/baseParticleRenderer.h @@ -30,7 +30,7 @@ #include "particleCommonFuncs.h" #include "baseParticle.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : BaseParticleRenderer @@ -61,7 +61,7 @@ private: virtual void init_geoms(void) = 0; - virtual void render(vector< PT(PhysicsObject) >& po_vector, + virtual void render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) = 0; PUBLISHED: diff --git a/panda/src/particlesystem/geomParticleRenderer.I b/panda/src/particlesystem/geomParticleRenderer.I index 8b16aba33d..0ae2f2addf 100644 --- a/panda/src/particlesystem/geomParticleRenderer.I +++ b/panda/src/particlesystem/geomParticleRenderer.I @@ -49,7 +49,7 @@ get_geom_node(void) { INLINE void GeomParticleRenderer:: kill_arcs(void) { - vector< PT(RenderRelation) >::iterator vec_iter = _arc_vector.begin(); + pvector< PT(RenderRelation) >::iterator vec_iter = _arc_vector.begin(); for (; vec_iter != _arc_vector.end(); vec_iter++) remove_arc(*vec_iter); diff --git a/panda/src/particlesystem/geomParticleRenderer.cxx b/panda/src/particlesystem/geomParticleRenderer.cxx index 5c0d4d362b..6cb0a67e62 100644 --- a/panda/src/particlesystem/geomParticleRenderer.cxx +++ b/panda/src/particlesystem/geomParticleRenderer.cxx @@ -137,12 +137,12 @@ kill_particle(int index) { //////////////////////////////////////////////////////////////////// void GeomParticleRenderer:: -render(vector< PT(PhysicsObject) >& po_vector, int ttl_particles) { +render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) { BaseParticle *cur_particle; LPoint3f pos; int i, remaining_particles = ttl_particles; - vector< PT(RenderRelation) >::iterator cur_arc_iter = _arc_vector.begin(); + pvector< PT(RenderRelation) >::iterator cur_arc_iter = _arc_vector.begin(); // run through the particle vector diff --git a/panda/src/particlesystem/geomParticleRenderer.h b/panda/src/particlesystem/geomParticleRenderer.h index 549a51bbb0..aa26d29791 100644 --- a/panda/src/particlesystem/geomParticleRenderer.h +++ b/panda/src/particlesystem/geomParticleRenderer.h @@ -27,7 +27,7 @@ #include #include -#include +#include "pvector.h" class EXPCL_PANDAPHYSICS GeomParticleRenderer : public BaseParticleRenderer { private: @@ -35,7 +35,7 @@ private: PT(Node) _geom_node; PT(Node) _dead_particle_parent_node; - vector< PT(RenderRelation) > _arc_vector; + pvector< PT(RenderRelation) > _arc_vector; int _pool_size; @@ -47,7 +47,7 @@ private: virtual void kill_particle(int index); virtual void init_geoms(void); - virtual void render(vector< PT(PhysicsObject) >& po_vector, + virtual void render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles); virtual void resize_pool(int new_size); diff --git a/panda/src/particlesystem/lineParticleRenderer.cxx b/panda/src/particlesystem/lineParticleRenderer.cxx index e96bc7db37..17fb10cdf4 100644 --- a/panda/src/particlesystem/lineParticleRenderer.cxx +++ b/panda/src/particlesystem/lineParticleRenderer.cxx @@ -149,7 +149,7 @@ init_geoms(void) { //////////////////////////////////////////////////////////////////// void LineParticleRenderer:: -render(vector< PT(PhysicsObject) >& po_vector, int ttl_particles) { +render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) { if (!ttl_particles) return; diff --git a/panda/src/particlesystem/lineParticleRenderer.h b/panda/src/particlesystem/lineParticleRenderer.h index a26bc13eed..01f27b523d 100644 --- a/panda/src/particlesystem/lineParticleRenderer.h +++ b/panda/src/particlesystem/lineParticleRenderer.h @@ -51,7 +51,7 @@ private: virtual void birth_particle(int index); virtual void kill_particle(int index); virtual void init_geoms(void); - virtual void render(vector< PT(PhysicsObject) >& po_vector, + virtual void render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles); virtual void resize_pool(int new_size); diff --git a/panda/src/particlesystem/particleSystem.cxx b/panda/src/particlesystem/particleSystem.cxx index 4db4d82dc7..5023c13d29 100644 --- a/panda/src/particlesystem/particleSystem.cxx +++ b/panda/src/particlesystem/particleSystem.cxx @@ -380,7 +380,7 @@ resize_pool(int size) { kill_particle(delete_index); _free_particle_fifo.pop_back(); } else { - deque::iterator i; + pdeque::iterator i; i = find(_free_particle_fifo.begin(), _free_particle_fifo.end(), delete_index); if (i != _free_particle_fifo.end()) { _free_particle_fifo.erase(i); @@ -432,7 +432,7 @@ resize_pool(int size) { #ifdef PSDEBUG cout << "WAS NOT ALIVE" << endl; #endif - deque::iterator i; + pdeque::iterator i; i = find(_free_particle_fifo.begin(), _free_particle_fifo.end(), delete_index); if (i != _free_particle_fifo.end()) { _free_particle_fifo.erase(i); @@ -554,8 +554,8 @@ public: }; // returns 0 if OK, # of errors if not OK -static int check_free_live_total_particles(vector< PT(SC_valuenamepair) > live_counts, - vector< PT(SC_valuenamepair) > dead_counts, vector< PT(SC_valuenamepair) > total_counts, +static int check_free_live_total_particles(pvector< PT(SC_valuenamepair) > live_counts, + pvector< PT(SC_valuenamepair) > dead_counts, pvector< PT(SC_valuenamepair) > total_counts, int print_all = 0) { int val = 0; @@ -663,9 +663,9 @@ sanity_check() { /////////////////////////////////////////////////////////////////// // check the numbers of free particles, live particles, and total particles - vector< PT(SC_valuenamepair) > live_counts; - vector< PT(SC_valuenamepair) > dead_counts; - vector< PT(SC_valuenamepair) > total_counts; + pvector< PT(SC_valuenamepair) > live_counts; + pvector< PT(SC_valuenamepair) > dead_counts; + pvector< PT(SC_valuenamepair) > total_counts; live_counts.push_back(new SC_valuenamepair(real_live_particle_count, "real_live_particle_count")); diff --git a/panda/src/particlesystem/particleSystem.h b/panda/src/particlesystem/particleSystem.h index f4c3894cb1..b300d26248 100644 --- a/panda/src/particlesystem/particleSystem.h +++ b/panda/src/particlesystem/particleSystem.h @@ -32,7 +32,7 @@ #include #include -#include +#include "pdeque.h" #include "baseParticle.h" #include "baseParticleRenderer.h" @@ -57,7 +57,7 @@ private: void birth_litter(void); void resize_pool(int size); - deque< int > _free_particle_fifo; + pdeque< int > _free_particle_fifo; int _particle_pool_size; int _living_particles; @@ -89,7 +89,7 @@ private: bool _spawn_on_death_flag; PT(Node) _spawn_render_node; - vector< PT(ParticleSystem) > _spawn_templates; + pvector< PT(ParticleSystem) > _spawn_templates; void spawn_child_system(BaseParticle *bp); diff --git a/panda/src/particlesystem/particleSystemManager.I b/panda/src/particlesystem/particleSystemManager.I index 3429cb59b6..e4accafb5f 100644 --- a/panda/src/particlesystem/particleSystemManager.I +++ b/panda/src/particlesystem/particleSystemManager.I @@ -44,7 +44,7 @@ get_frame_stepping(void) const { INLINE void ParticleSystemManager:: attach_particlesystem(ParticleSystem *ps) { ps->_manager = this; - list< PT(ParticleSystem) >::iterator found; + plist< PT(ParticleSystem) >::iterator found; PT(ParticleSystem) ptps = ps; found = find(_ps_list.begin(), _ps_list.end(), ptps); if (found == _ps_list.end()) diff --git a/panda/src/particlesystem/particleSystemManager.cxx b/panda/src/particlesystem/particleSystemManager.cxx index a18b66f83e..0261eccdd1 100644 --- a/panda/src/particlesystem/particleSystemManager.cxx +++ b/panda/src/particlesystem/particleSystemManager.cxx @@ -42,7 +42,7 @@ ParticleSystemManager(int every_nth_frame) : //////////////////////////////////////////////////////////////////// void ParticleSystemManager:: remove_particlesystem(ParticleSystem *ps) { - list< PT(ParticleSystem) >::iterator found; + plist< PT(ParticleSystem) >::iterator found; PT(ParticleSystem) ptps = ps; found = find(_ps_list.begin(), _ps_list.end(), ptps); @@ -66,7 +66,7 @@ void ParticleSystemManager:: do_particles(float dt) { // cout << "ParticlesystemManager::doparticles entering." << endl; - list< PT(ParticleSystem) >::iterator cur; + plist< PT(ParticleSystem) >::iterator cur; bool render_due = false; @@ -98,7 +98,7 @@ do_particles(float dt) { // handle death if (age >= cur_ps->get_system_lifespan()) { - list< PT(ParticleSystem) >::iterator kill = cur; + plist< PT(ParticleSystem) >::iterator kill = cur; cur++; _ps_list.erase(kill); diff --git a/panda/src/particlesystem/particleSystemManager.h b/panda/src/particlesystem/particleSystemManager.h index 59129ede00..551c9032e6 100644 --- a/panda/src/particlesystem/particleSystemManager.h +++ b/panda/src/particlesystem/particleSystemManager.h @@ -20,7 +20,7 @@ #define PARTICLESYSTEMMANAGER_H #include -#include +#include "plist.h" #include "particleSystem.h" @@ -34,7 +34,7 @@ class EXPCL_PANDAPHYSICS ParticleSystemManager { private: - list< PT(ParticleSystem) > _ps_list; + plist< PT(ParticleSystem) > _ps_list; int _nth_frame; int _cur_frame; diff --git a/panda/src/particlesystem/pointParticleRenderer.cxx b/panda/src/particlesystem/pointParticleRenderer.cxx index b9cdb2cd9e..53a7e045c8 100644 --- a/panda/src/particlesystem/pointParticleRenderer.cxx +++ b/panda/src/particlesystem/pointParticleRenderer.cxx @@ -212,7 +212,7 @@ create_color(const BaseParticle *p) { //////////////////////////////////////////////////////////////////// void PointParticleRenderer:: -render(vector< PT(PhysicsObject) >& po_vector, int ttl_particles) { +render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) { BaseParticle *cur_particle; diff --git a/panda/src/particlesystem/pointParticleRenderer.h b/panda/src/particlesystem/pointParticleRenderer.h index 53d8fb835a..1a720671ed 100644 --- a/panda/src/particlesystem/pointParticleRenderer.h +++ b/panda/src/particlesystem/pointParticleRenderer.h @@ -88,7 +88,7 @@ private: virtual void birth_particle(int index); virtual void kill_particle(int index); virtual void init_geoms(void); - virtual void render(vector< PT(PhysicsObject) >& po_vector, + virtual void render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles); virtual void resize_pool(int new_size); }; diff --git a/panda/src/particlesystem/sparkleParticleRenderer.cxx b/panda/src/particlesystem/sparkleParticleRenderer.cxx index 6f61da10f4..e90e01b88b 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.cxx +++ b/panda/src/particlesystem/sparkleParticleRenderer.cxx @@ -157,7 +157,7 @@ init_geoms(void) { //////////////////////////////////////////////////////////////////// void SparkleParticleRenderer:: -render(vector< PT(PhysicsObject) >& po_vector, int ttl_particles) { +render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) { if (!ttl_particles) return; diff --git a/panda/src/particlesystem/sparkleParticleRenderer.h b/panda/src/particlesystem/sparkleParticleRenderer.h index cb6af069d8..97bef14abb 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.h +++ b/panda/src/particlesystem/sparkleParticleRenderer.h @@ -92,7 +92,7 @@ private: virtual void birth_particle(int index); virtual void kill_particle(int index); virtual void init_geoms(void); - virtual void render(vector< PT(PhysicsObject) >& po_vector, + virtual void render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles); virtual void resize_pool(int new_size); }; diff --git a/panda/src/particlesystem/spriteParticleRenderer.cxx b/panda/src/particlesystem/spriteParticleRenderer.cxx index c60cbb9561..5a31d6222c 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.cxx +++ b/panda/src/particlesystem/spriteParticleRenderer.cxx @@ -183,7 +183,7 @@ kill_particle(int) { // Description : big child render. populates the geom node. //////////////////////////////////////////////////////////////////// void SpriteParticleRenderer:: -render(vector< PT(PhysicsObject) >& po_vector, int ttl_particles) { +render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) { BaseParticle *cur_particle; int remaining_particles = ttl_particles; diff --git a/panda/src/particlesystem/spriteParticleRenderer.h b/panda/src/particlesystem/spriteParticleRenderer.h index 79d1bd6d17..25411a90e1 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.h +++ b/panda/src/particlesystem/spriteParticleRenderer.h @@ -62,7 +62,7 @@ private: virtual void birth_particle(int index); virtual void kill_particle(int index); virtual void init_geoms(void); - virtual void render(vector< PT(PhysicsObject) > &po_vector, + virtual void render(pvector< PT(PhysicsObject) > &po_vector, int ttl_particles); virtual void resize_pool(int new_size); diff --git a/panda/src/physics/angularEulerIntegrator.cxx b/panda/src/physics/angularEulerIntegrator.cxx index 7804069740..2362cacc90 100644 --- a/panda/src/physics/angularEulerIntegrator.cxx +++ b/panda/src/physics/angularEulerIntegrator.cxx @@ -50,7 +50,7 @@ AngularEulerIntegrator:: //////////////////////////////////////////////////////////////////// void AngularEulerIntegrator:: child_integrate(Physical *physical, - vector< PT(AngularForce) >& forces, + pvector< PT(AngularForce) >& forces, float dt) { // perform the precomputation. Note that the vector returned by // get_precomputed_matrices() has the matrices loaded in order of force @@ -58,7 +58,7 @@ child_integrate(Physical *physical, // another integrator, be sure to process your forces global, then local. // otherwise your transforms will be VERY bad. No good. precompute_angular_matrices(physical, forces); - const vector< LMatrix4f > &matrices = get_precomputed_angular_matrices(); + const pvector< LMatrix4f > &matrices = get_precomputed_angular_matrices(); // Loop through each object in the set. This processing occurs in O(pf) time, // where p is the number of physical objects and f is the number of @@ -67,7 +67,7 @@ child_integrate(Physical *physical, // velocity of each physicsobject in the set. Accordingly, we have // to grunt our way through each one. wrt caching of the xform matrix // should help. - vector< PT(PhysicsObject) >::const_iterator current_object_iter; + pvector< PT(PhysicsObject) >::const_iterator current_object_iter; current_object_iter = physical->get_object_vector().begin(); for (; current_object_iter != physical->get_object_vector().end(); @@ -87,7 +87,7 @@ child_integrate(Physical *physical, // set up the traversal stuff. ForceNode *force_node; - vector< PT(AngularForce) >::const_iterator f_cur; + pvector< PT(AngularForce) >::const_iterator f_cur; LVector3f f; diff --git a/panda/src/physics/angularEulerIntegrator.h b/panda/src/physics/angularEulerIntegrator.h index 315586a24e..e19252605e 100644 --- a/panda/src/physics/angularEulerIntegrator.h +++ b/panda/src/physics/angularEulerIntegrator.h @@ -29,7 +29,7 @@ class EXPCL_PANDAPHYSICS AngularEulerIntegrator : public AngularIntegrator { private: virtual void child_integrate(Physical *physical, - vector< PT(AngularForce) >& forces, + pvector< PT(AngularForce) >& forces, float dt); PUBLISHED: diff --git a/panda/src/physics/angularIntegrator.cxx b/panda/src/physics/angularIntegrator.cxx index 7a7540e55d..4e6666e28f 100644 --- a/panda/src/physics/angularIntegrator.cxx +++ b/panda/src/physics/angularIntegrator.cxx @@ -42,7 +42,7 @@ AngularIntegrator:: // Description : high-level integration. API. //////////////////////////////////////////////////////////////////// void AngularIntegrator:: -integrate(Physical *physical, vector< PT(AngularForce) >& forces, +integrate(Physical *physical, pvector< PT(AngularForce) >& forces, float dt) { // intercept in case we want to censor/adjust values if (dt > _max_angular_dt) diff --git a/panda/src/physics/angularIntegrator.h b/panda/src/physics/angularIntegrator.h index 8065bb0d2f..2b5e47ac67 100644 --- a/panda/src/physics/angularIntegrator.h +++ b/panda/src/physics/angularIntegrator.h @@ -34,7 +34,7 @@ private: // this allows baseAngularIntegrator to censor/modify data that the // actual integration function receives. - virtual void child_integrate(Physical *physical, vector< PT(AngularForce) > &forces, + virtual void child_integrate(Physical *physical, pvector< PT(AngularForce) > &forces, float dt) = 0; protected: @@ -43,7 +43,7 @@ protected: public: virtual ~AngularIntegrator(void); - void integrate(Physical *physical, vector< PT(AngularForce) > &forces, + void integrate(Physical *physical, pvector< PT(AngularForce) > &forces, float dt); }; diff --git a/panda/src/physics/baseIntegrator.I b/panda/src/physics/baseIntegrator.I index a32c1f3bbe..210e660a42 100644 --- a/panda/src/physics/baseIntegrator.I +++ b/panda/src/physics/baseIntegrator.I @@ -20,7 +20,7 @@ // Function : get_precomputed_linear_matrices // Access : protected //////////////////////////////////////////////////////////////////// -INLINE const vector< LMatrix4f > &BaseIntegrator:: +INLINE const pvector< LMatrix4f > &BaseIntegrator:: get_precomputed_linear_matrices(void) const { return _precomputed_linear_matrices; } @@ -29,7 +29,7 @@ get_precomputed_linear_matrices(void) const { // Function : get_precomputed_angular_matrices // Access : protected //////////////////////////////////////////////////////////////////// -INLINE const vector< LMatrix4f > &BaseIntegrator:: +INLINE const pvector< LMatrix4f > &BaseIntegrator:: get_precomputed_angular_matrices(void) const { return _precomputed_angular_matrices; } diff --git a/panda/src/physics/baseIntegrator.cxx b/panda/src/physics/baseIntegrator.cxx index 9c1c21ba95..3cee9069f1 100644 --- a/panda/src/physics/baseIntegrator.cxx +++ b/panda/src/physics/baseIntegrator.cxx @@ -50,7 +50,7 @@ BaseIntegrator:: //////////////////////////////////////////////////////////////////// void BaseIntegrator:: precompute_linear_matrices(Physical *physical, - const vector< PT(LinearForce) > &forces) { + const pvector< PT(LinearForce) > &forces) { // make sure the physical's in the scene graph, somewhere. PhysicalNode *physical_node = physical->get_physical_node(); nassertv(physical_node != NULL); @@ -78,7 +78,7 @@ precompute_linear_matrices(Physical *physical, _precomputed_linear_matrices[index++] = current_xform; } - const vector< PT(LinearForce) > &force_vector = + const pvector< PT(LinearForce) > &force_vector = physical->get_linear_forces(); // tally the local xforms @@ -101,7 +101,7 @@ precompute_linear_matrices(Physical *physical, //////////////////////////////////////////////////////////////////// void BaseIntegrator:: precompute_angular_matrices(Physical *physical, - const vector< PT(AngularForce) > &forces) { + const pvector< PT(AngularForce) > &forces) { // make sure the physical's in the scene graph, somewhere. PhysicalNode *physical_node = physical->get_physical_node(); nassertv(physical_node != NULL); @@ -129,7 +129,7 @@ precompute_angular_matrices(Physical *physical, _precomputed_angular_matrices[index++] = current_xform; } - const vector< PT(AngularForce) > &force_vector = + const pvector< PT(AngularForce) > &force_vector = physical->get_angular_forces(); // tally the local xforms diff --git a/panda/src/physics/baseIntegrator.h b/panda/src/physics/baseIntegrator.h index 21d78d863c..127d5a5b26 100644 --- a/panda/src/physics/baseIntegrator.h +++ b/panda/src/physics/baseIntegrator.h @@ -27,7 +27,7 @@ #include "linearForce.h" #include "angularForce.h" -#include +#include "pvector.h" class Physical; @@ -43,19 +43,19 @@ private: // and however many forces will be the same among one physical, // the transformation matrices can be pulled out of the inner loop // and precomputed. - vector< LMatrix4f > _precomputed_linear_matrices; - vector< LMatrix4f > _precomputed_angular_matrices; + pvector< LMatrix4f > _precomputed_linear_matrices; + pvector< LMatrix4f > _precomputed_angular_matrices; protected: BaseIntegrator(void); - INLINE const vector< LMatrix4f > &get_precomputed_linear_matrices(void) const; - INLINE const vector< LMatrix4f > &get_precomputed_angular_matrices(void) const; + INLINE const pvector< LMatrix4f > &get_precomputed_linear_matrices(void) const; + INLINE const pvector< LMatrix4f > &get_precomputed_angular_matrices(void) const; void precompute_linear_matrices(Physical *physical, - const vector< PT(LinearForce) > &forces); + const pvector< PT(LinearForce) > &forces); void precompute_angular_matrices(Physical *physical, - const vector< PT(AngularForce) > &forces); + const pvector< PT(AngularForce) > &forces); public: virtual ~BaseIntegrator(void); diff --git a/panda/src/physics/forceNode.cxx b/panda/src/physics/forceNode.cxx index e6d69d8aed..bbabee2744 100644 --- a/panda/src/physics/forceNode.cxx +++ b/panda/src/physics/forceNode.cxx @@ -79,7 +79,7 @@ make_copy(void) const { //////////////////////////////////////////////////////////////////// void ForceNode:: add_forces_from(const ForceNode &other) { - vector< PT(BaseForce) >::iterator last = _forces.end() - 1; + pvector< PT(BaseForce) >::iterator last = _forces.end() - 1; _forces.insert(_forces.end(), other._forces.begin(), other._forces.end()); @@ -95,7 +95,7 @@ add_forces_from(const ForceNode &other) { //////////////////////////////////////////////////////////////////// void ForceNode:: remove_force(BaseForce *f) { - vector< PT(BaseForce) >::iterator found; + pvector< PT(BaseForce) >::iterator found; PT(BaseForce) ptbf = f; found = find(_forces.begin(), _forces.end(), ptbf); if (found == _forces.end()) @@ -112,7 +112,7 @@ void ForceNode:: remove_force(int index) { nassertv(index >= 0 && index <= (int)_forces.size()); - vector< PT(BaseForce) >::iterator remove; + pvector< PT(BaseForce) >::iterator remove; remove = _forces.begin() + index; (*remove)->_force_node = (ForceNode *) NULL; diff --git a/panda/src/physics/forceNode.h b/panda/src/physics/forceNode.h index e43b86f896..0e5ebd4f56 100644 --- a/panda/src/physics/forceNode.h +++ b/panda/src/physics/forceNode.h @@ -20,7 +20,7 @@ #define FORCENODE_H #include -#include +#include "pvector.h" #include "baseForce.h" @@ -33,7 +33,7 @@ //////////////////////////////////////////////////////////////////// class EXPCL_PANDAPHYSICS ForceNode : public NamedNode { private: - vector< PT(BaseForce) > _forces; + pvector< PT(BaseForce) > _forces; PUBLISHED: ForceNode(const string &name = ""); diff --git a/panda/src/physics/linearEulerIntegrator.cxx b/panda/src/physics/linearEulerIntegrator.cxx index 513024baa2..333a337f0d 100644 --- a/panda/src/physics/linearEulerIntegrator.cxx +++ b/panda/src/physics/linearEulerIntegrator.cxx @@ -50,9 +50,9 @@ LinearEulerIntegrator:: //////////////////////////////////////////////////////////////////// void LinearEulerIntegrator:: child_integrate(Physical *physical, - vector< PT(LinearForce) >& forces, + pvector< PT(LinearForce) >& forces, float dt) { - vector< PT(PhysicsObject) >::const_iterator current_object_iter; + pvector< PT(PhysicsObject) >::const_iterator current_object_iter; // perform the precomputation. Note that the vector returned by // get_precomputed_matrices() has the matrices loaded in order of force @@ -60,7 +60,7 @@ child_integrate(Physical *physical, // another integrator, be sure to process your forces global, then local. // otherwise your transforms will be VERY bad. precompute_linear_matrices(physical, forces); - const vector< LMatrix4f > &matrices = get_precomputed_linear_matrices(); + const pvector< LMatrix4f > &matrices = get_precomputed_linear_matrices(); // Loop through each object in the set. This processing occurs in O(pf) time, // where p is the number of physical objects and f is the number of @@ -96,7 +96,7 @@ child_integrate(Physical *physical, // LMatrix4f force_to_object_xform; ForceNode *force_node; - vector< PT(LinearForce) >::const_iterator f_cur; + pvector< PT(LinearForce) >::const_iterator f_cur; // global forces f_cur = forces.begin(); diff --git a/panda/src/physics/linearEulerIntegrator.h b/panda/src/physics/linearEulerIntegrator.h index b863d650a4..7356900db2 100644 --- a/panda/src/physics/linearEulerIntegrator.h +++ b/panda/src/physics/linearEulerIntegrator.h @@ -29,7 +29,7 @@ class EXPCL_PANDAPHYSICS LinearEulerIntegrator : public LinearIntegrator { private: virtual void child_integrate(Physical *physical, - vector< PT(LinearForce) >& forces, + pvector< PT(LinearForce) >& forces, float dt); PUBLISHED: diff --git a/panda/src/physics/linearIntegrator.cxx b/panda/src/physics/linearIntegrator.cxx index 9539f5559e..e7f06117ef 100644 --- a/panda/src/physics/linearIntegrator.cxx +++ b/panda/src/physics/linearIntegrator.cxx @@ -48,7 +48,7 @@ LinearIntegrator:: // virtual. //////////////////////////////////////////////////////////////////// void LinearIntegrator:: -integrate(Physical *physical, vector< PT(LinearForce) > &forces, +integrate(Physical *physical, pvector< PT(LinearForce) > &forces, float dt) { /* <-- darren, 2000.10.06 // cap dt so physics don't go flying off on lags @@ -56,7 +56,7 @@ integrate(Physical *physical, vector< PT(LinearForce) > &forces, dt = _max_linear_dt; */ - vector< PT(PhysicsObject) >::const_iterator current_object_iter; + pvector< PT(PhysicsObject) >::const_iterator current_object_iter; current_object_iter = physical->get_object_vector().begin(); for (; current_object_iter != physical->get_object_vector().end(); current_object_iter++) { diff --git a/panda/src/physics/linearIntegrator.h b/panda/src/physics/linearIntegrator.h index 3f0d3153c8..13b33295b5 100644 --- a/panda/src/physics/linearIntegrator.h +++ b/panda/src/physics/linearIntegrator.h @@ -35,7 +35,7 @@ private: // this allows baseLinearIntegrator to censor/modify data that the // actual integration function receives. - virtual void child_integrate(Physical *physical, vector< PT(LinearForce) > &forces, + virtual void child_integrate(Physical *physical, pvector< PT(LinearForce) > &forces, float dt) = 0; protected: @@ -44,7 +44,7 @@ protected: public: virtual ~LinearIntegrator(void); - void integrate(Physical *physical, vector< PT(LinearForce) > &forces, + void integrate(Physical *physical, pvector< PT(LinearForce) > &forces, float dt); }; diff --git a/panda/src/physics/physical.I b/panda/src/physics/physical.I index 26fed9e9ae..38f489c296 100644 --- a/panda/src/physics/physical.I +++ b/panda/src/physics/physical.I @@ -78,7 +78,7 @@ add_angular_force(AngularForce *f) { //////////////////////////////////////////////////////////////////// INLINE void Physical:: remove_linear_force(LinearForce *f) { - vector< PT(LinearForce) >::iterator found; + pvector< PT(LinearForce) >::iterator found; // this is a PT because the templates don't like what should be // perfectly allowable, which is to search for bf directly. @@ -98,7 +98,7 @@ remove_linear_force(LinearForce *f) { //////////////////////////////////////////////////////////////////// INLINE void Physical:: remove_angular_force(AngularForce *f) { - vector< PT(AngularForce) >::iterator found; + pvector< PT(AngularForce) >::iterator found; PT(AngularForce) pt_af = f; found = find(_angular_forces.begin(), _angular_forces.end(), pt_af); @@ -150,7 +150,7 @@ get_physical_node(void) const { // Function : get_object_vector // Access : Public //////////////////////////////////////////////////////////////////// -INLINE const vector< PT(PhysicsObject) > &Physical:: +INLINE const pvector< PT(PhysicsObject) > &Physical:: get_object_vector(void) const { return _physics_objects; } @@ -159,7 +159,7 @@ get_object_vector(void) const { // Function : get_linear_forces // Access : Public //////////////////////////////////////////////////////////////////// -INLINE const vector< PT(LinearForce) > &Physical:: +INLINE const pvector< PT(LinearForce) > &Physical:: get_linear_forces(void) const { return _linear_forces; } @@ -168,7 +168,7 @@ get_linear_forces(void) const { // Function : get_angular_forces // Access : Public //////////////////////////////////////////////////////////////////// -INLINE const vector< PT(AngularForce) > &Physical:: +INLINE const pvector< PT(AngularForce) > &Physical:: get_angular_forces(void) const { return _angular_forces; } diff --git a/panda/src/physics/physical.cxx b/panda/src/physics/physical.cxx index 0d416c3532..47d4fa2676 100644 --- a/panda/src/physics/physical.cxx +++ b/panda/src/physics/physical.cxx @@ -75,23 +75,23 @@ Physical(const Physical& copy) { _physics_manager = (PhysicsManager *) NULL; // copy the forces. - vector< PT(LinearForce) >::const_iterator lf_cur; - vector< PT(LinearForce) >::const_iterator lf_end = copy._linear_forces.end(); + pvector< PT(LinearForce) >::const_iterator lf_cur; + pvector< PT(LinearForce) >::const_iterator lf_end = copy._linear_forces.end(); for (lf_cur = copy._linear_forces.begin(); lf_cur != lf_end; lf_cur++) { _linear_forces.push_back((*lf_cur)->make_copy()); } - vector< PT(AngularForce) >::const_iterator af_cur; - vector< PT(AngularForce) >::const_iterator af_end = copy._angular_forces.end(); + pvector< PT(AngularForce) >::const_iterator af_cur; + pvector< PT(AngularForce) >::const_iterator af_end = copy._angular_forces.end(); for (af_cur = copy._angular_forces.begin(); af_cur != af_end; af_cur++) { _angular_forces.push_back((*af_cur)->make_copy()); } // copy the physics objects - vector< PT(PhysicsObject) >::const_iterator p_cur; - vector< PT(PhysicsObject) >::const_iterator p_end = copy._physics_objects.end(); + pvector< PT(PhysicsObject) >::const_iterator p_cur; + pvector< PT(PhysicsObject) >::const_iterator p_end = copy._physics_objects.end(); for (p_cur = copy._physics_objects.begin(); p_cur != p_end; p_cur++) { // oooh so polymorphic. diff --git a/panda/src/physics/physical.h b/panda/src/physics/physical.h index f8b377c7cc..cb5c8dc12a 100644 --- a/panda/src/physics/physical.h +++ b/panda/src/physics/physical.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include "pvector.h" +#include "plist.h" #include "physicsObject.h" #include "linearForce.h" @@ -46,9 +46,9 @@ private: protected: // containers - vector< PT(PhysicsObject) > _physics_objects; - vector< PT(LinearForce) > _linear_forces; - vector< PT(AngularForce) > _angular_forces; + pvector< PT(PhysicsObject) > _physics_objects; + pvector< PT(LinearForce) > _linear_forces; + pvector< PT(AngularForce) > _angular_forces; // this pointer exists to make life easy. If a physical exists // with only one element (i.e. NOT a particle system or set-physical), @@ -83,9 +83,9 @@ PUBLISHED: INLINE PT(AngularForce) get_angular_force(int index) const; public: - INLINE const vector< PT(PhysicsObject) > &get_object_vector(void) const; - INLINE const vector< PT(LinearForce) > &get_linear_forces(void) const; - INLINE const vector< PT(AngularForce) > &get_angular_forces(void) const; + INLINE const pvector< PT(PhysicsObject) > &get_object_vector(void) const; + INLINE const pvector< PT(LinearForce) > &get_linear_forces(void) const; + INLINE const pvector< PT(AngularForce) > &get_angular_forces(void) const; friend class PhysicsManager; friend class PhysicalNode; diff --git a/panda/src/physics/physicalNode.cxx b/panda/src/physics/physicalNode.cxx index eb22d7ff77..e61e6494f9 100644 --- a/panda/src/physics/physicalNode.cxx +++ b/panda/src/physics/physicalNode.cxx @@ -79,7 +79,7 @@ make_copy(void) const { //////////////////////////////////////////////////////////////////// void PhysicalNode:: add_physicals_from(const PhysicalNode &other) { - vector< PT(Physical) >::iterator last = _physicals.end() - 1; + pvector< PT(Physical) >::iterator last = _physicals.end() - 1; _physicals.insert(_physicals.end(), other._physicals.begin(), other._physicals.end()); @@ -95,7 +95,7 @@ add_physicals_from(const PhysicalNode &other) { //////////////////////////////////////////////////////////////////// void PhysicalNode:: remove_physical(Physical *physical) { - vector< PT(Physical) >::iterator found; + pvector< PT(Physical) >::iterator found; PT(Physical) ptp = physical; found = find(_physicals.begin(), _physicals.end(), ptp); if (found == _physicals.end()) @@ -112,7 +112,7 @@ void PhysicalNode:: remove_physical(int index) { nassertv(index >= 0 && index <= (int)_physicals.size()); - vector< PT(Physical) >::iterator remove; + pvector< PT(Physical) >::iterator remove; remove = _physicals.begin() + index; (*remove)->_physical_node = (PhysicalNode *) NULL; diff --git a/panda/src/physics/physicalNode.h b/panda/src/physics/physicalNode.h index 5c91570b6d..b9e169ccaa 100644 --- a/panda/src/physics/physicalNode.h +++ b/panda/src/physics/physicalNode.h @@ -22,7 +22,7 @@ #include #include -#include +#include "pvector.h" #include "physical.h" #include "config_physics.h" @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////////////// class EXPCL_PANDAPHYSICS PhysicalNode : public NamedNode { private: - vector< PT(Physical) > _physicals; + pvector< PT(Physical) > _physicals; PUBLISHED: PhysicalNode(const string &name = ""); diff --git a/panda/src/physics/physicsManager.I b/panda/src/physics/physicsManager.I index a0b35541fd..1b3881ff57 100644 --- a/panda/src/physics/physicsManager.I +++ b/panda/src/physics/physicsManager.I @@ -24,7 +24,7 @@ INLINE void PhysicsManager:: attach_physical(Physical *p) { p->_physics_manager = this; - vector< Physical * >::iterator found; + pvector< Physical * >::iterator found; found = find(_physicals.begin(), _physicals.end(), p); if (found == _physicals.end()) _physicals.push_back(p); @@ -37,7 +37,7 @@ attach_physical(Physical *p) { //////////////////////////////////////////////////////////////////// INLINE void PhysicsManager:: add_linear_force(LinearForce *f) { - vector< PT(LinearForce) >::iterator found; + pvector< PT(LinearForce) >::iterator found; PT(LinearForce) ptlf = f; found = find(_linear_forces.begin(), _linear_forces.end(), ptlf); if (found == _linear_forces.end()) @@ -72,7 +72,7 @@ clear_linear_forces(void) { //////////////////////////////////////////////////////////////////// INLINE void PhysicsManager:: add_angular_force(AngularForce *f) { - vector< PT(AngularForce) >::iterator found; + pvector< PT(AngularForce) >::iterator found; PT(AngularForce) ptaf = f; found = find(_angular_forces.begin(), _angular_forces.end(), ptaf); if (found == _angular_forces.end()) diff --git a/panda/src/physics/physicsManager.cxx b/panda/src/physics/physicsManager.cxx index 3dd8768e66..167001e685 100644 --- a/panda/src/physics/physicsManager.cxx +++ b/panda/src/physics/physicsManager.cxx @@ -20,7 +20,7 @@ #include "actorNode.h" #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Function : PhysicsManager @@ -50,7 +50,7 @@ PhysicsManager:: //////////////////////////////////////////////////////////////////// void PhysicsManager:: remove_linear_force(LinearForce *f) { - vector< PT(LinearForce) >::iterator found; + pvector< PT(LinearForce) >::iterator found; PT(LinearForce) ptbf = f; found = find(_linear_forces.begin(), _linear_forces.end(), ptbf); @@ -68,7 +68,7 @@ remove_linear_force(LinearForce *f) { //////////////////////////////////////////////////////////////////// void PhysicsManager:: remove_angular_force(AngularForce *f) { - vector< PT(AngularForce) >::iterator found; + pvector< PT(AngularForce) >::iterator found; PT(BaseForce) ptbf = f; found = find(_angular_forces.begin(), _angular_forces.end(), ptbf); @@ -86,7 +86,7 @@ remove_angular_force(AngularForce *f) { //////////////////////////////////////////////////////////////////// void PhysicsManager:: remove_physical(Physical *p) { - vector< Physical * >::iterator found; + pvector< Physical * >::iterator found; found = find(_physicals.begin(), _physicals.end(), p); if (found == _physicals.end()) @@ -104,7 +104,7 @@ remove_physical(Physical *p) { //////////////////////////////////////////////////////////////////// void PhysicsManager:: do_physics(float dt) { - vector< Physical * >::iterator p_cur; + pvector< Physical * >::iterator p_cur; // now, run through each physics object in the set. p_cur = _physicals.begin(); diff --git a/panda/src/physics/physicsManager.h b/panda/src/physics/physicsManager.h index a422863466..6c54293700 100644 --- a/panda/src/physics/physicsManager.h +++ b/panda/src/physics/physicsManager.h @@ -29,8 +29,8 @@ #include "angularIntegrator.h" #include "physicalNode.h" -#include -#include +#include "plist.h" +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : PhysicsManager @@ -47,9 +47,9 @@ private: // current physicsmanager, if one exists, relieving the client from // the task and also allowing for dynamically created and destroyed // physicals. - vector< Physical * > _physicals; - vector< PT(LinearForce) > _linear_forces; - vector< PT(AngularForce) > _angular_forces; + pvector< Physical * > _physicals; + pvector< PT(LinearForce) > _linear_forces; + pvector< PT(AngularForce) > _angular_forces; PT(LinearIntegrator) _linear_integrator; PT(AngularIntegrator) _angular_integrator; diff --git a/panda/src/pnmimage/pnmFileTypeRegistry.cxx b/panda/src/pnmimage/pnmFileTypeRegistry.cxx index 3285acdbd8..dfef0f13df 100644 --- a/panda/src/pnmimage/pnmFileTypeRegistry.cxx +++ b/panda/src/pnmimage/pnmFileTypeRegistry.cxx @@ -227,7 +227,7 @@ register_type(PNMFileType *type) { _handles.insert(Handles::value_type(type->get_type(), type)); // Collect the unique extensions associated with the type. - set unique_extensions; + pset unique_extensions; int num_extensions = type->get_num_extensions(); for (int i = 0; i < num_extensions; i++) { string extension = downcase(type->get_extension(i)); @@ -240,7 +240,7 @@ register_type(PNMFileType *type) { } } - set::iterator ui; + pset::iterator ui; for (ui = unique_extensions.begin(); ui != unique_extensions.end(); ++ui) { _extensions[*ui].push_back(type); } diff --git a/panda/src/pnmimage/pnmFileTypeRegistry.h b/panda/src/pnmimage/pnmFileTypeRegistry.h index d8398b47aa..6001d63b7b 100644 --- a/panda/src/pnmimage/pnmFileTypeRegistry.h +++ b/panda/src/pnmimage/pnmFileTypeRegistry.h @@ -53,13 +53,13 @@ public: private: void sort_preferences(); - typedef vector Types; + typedef pvector Types; Types _types; - typedef map Extensions; + typedef pmap Extensions; Extensions _extensions; - typedef map Handles; + typedef pmap Handles; Handles _handles; bool _requires_sort; diff --git a/panda/src/pstatclient/pStatClient.h b/panda/src/pstatclient/pStatClient.h index 2ac329e48a..314c7d38e8 100644 --- a/panda/src/pstatclient/pStatClient.h +++ b/panda/src/pstatclient/pStatClient.h @@ -25,7 +25,7 @@ #include #include -#include +#include "pmap.h" #ifdef HAVE_NET #include @@ -115,7 +115,7 @@ private: // Stats collecting stuff ClockObject _clock; - typedef map ThingsByName; + typedef pmap ThingsByName; ThingsByName _threads_by_name; // This is for the data that is per-collector, per-thread. A vector @@ -128,7 +128,7 @@ private: float _level; int _nested_count; }; - typedef vector PerThread; + typedef pvector PerThread; // This is where the meat of the Collector data is stored. (All the // stuff in PStatCollector and PStatCollectorDef is just fluff.) @@ -139,7 +139,7 @@ private: PerThread _per_thread; }; - typedef vector Collectors; + typedef pvector Collectors; Collectors _collectors; // This defines a single thread, i.e. a separate chain of execution, @@ -153,7 +153,7 @@ private: int _frame_number; float _next_packet; }; - typedef vector Threads; + typedef pvector Threads; Threads _threads; diff --git a/panda/src/pstatclient/pStatClientControlMessage.h b/panda/src/pstatclient/pStatClientControlMessage.h index 09dd7d0ce0..177c859ba7 100644 --- a/panda/src/pstatclient/pStatClientControlMessage.h +++ b/panda/src/pstatclient/pStatClientControlMessage.h @@ -23,7 +23,7 @@ #include "pStatCollectorDef.h" -#include +#include "pvector.h" class Datagram; class PStatClientVersion; @@ -58,11 +58,11 @@ public: int _minor_version; // Used for T_define_collectors - vector _collectors; + pvector _collectors; // Used for T_define_threads int _first_thread_index; - vector _names; + pvector _names; }; diff --git a/panda/src/pstatclient/pStatFrameData.h b/panda/src/pstatclient/pStatFrameData.h index aef09f8554..51fc1d5965 100644 --- a/panda/src/pstatclient/pStatFrameData.h +++ b/panda/src/pstatclient/pStatFrameData.h @@ -23,7 +23,7 @@ #include -#include +#include "pvector.h" class Datagram; class DatagramIterator; @@ -69,7 +69,7 @@ private: int _index; float _value; }; - typedef vector Data; + typedef pvector Data; Data _time_data, _level_data; }; diff --git a/panda/src/pstatclient/pStatServerControlMessage.h b/panda/src/pstatclient/pStatServerControlMessage.h index 1e011e3e2e..cec3898048 100644 --- a/panda/src/pstatclient/pStatServerControlMessage.h +++ b/panda/src/pstatclient/pStatServerControlMessage.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" class Datagram; diff --git a/panda/src/pstatclient/test_client.cxx b/panda/src/pstatclient/test_client.cxx index 0295dc88e4..f090170980 100644 --- a/panda/src/pstatclient/test_client.cxx +++ b/panda/src/pstatclient/test_client.cxx @@ -135,7 +135,7 @@ main(int argc, char *argv[]) { SampleData *ds = datasets[ds_index]; - vector _collectors; + pvector _collectors; int i = 0; while (ds[i].category != (const char *)NULL) { _collectors.push_back(PStatCollector(ds[i].category)); @@ -151,7 +151,7 @@ main(int argc, char *argv[]) { float total_ms = 0.0; float now = client->get_clock().get_real_time(); - typedef vector Wait; + typedef pvector Wait; Wait wait; // Make up some random intervals to "wait". diff --git a/panda/src/putil/bamReader.h b/panda/src/putil/bamReader.h index efdd276acf..55fc9c9dac 100644 --- a/panda/src/putil/bamReader.h +++ b/panda/src/putil/bamReader.h @@ -136,18 +136,18 @@ private: // This maps the type index numbers encountered within the Bam file // to actual TypeHandles. - typedef map IndexMap; + typedef pmap IndexMap; IndexMap _index_map; // This maps the object ID numbers encountered within the Bam file // to the actual pointers of the corresponding generated objects. - typedef map CreatedObjs; + typedef pmap CreatedObjs; CreatedObjs _created_objs; // This records all the objects that still need their pointers // completed, along with the object ID's of the pointers they need, // in the order in which read_pointer() was called. - typedef map Requests; + typedef pmap Requests; Requests _deferred_pointers; // This is the number of extra objects that must still be read (and @@ -157,12 +157,12 @@ private: // This is the set of all objects that registered themselves for // finalization. - typedef set Finalize; + typedef pset Finalize; Finalize _finalize_list; // These are used by get_pta() and register_pta() to unify multiple // references to the same PointerToArray. - typedef map PTAMap; + typedef pmap PTAMap; PTAMap _pta_map; int _pta_id; diff --git a/panda/src/putil/bamWriter.h b/panda/src/putil/bamWriter.h index b7fcdb4574..a00ac8e988 100644 --- a/panda/src/putil/bamWriter.h +++ b/panda/src/putil/bamWriter.h @@ -24,7 +24,7 @@ #include "typedWritable.h" #include "datagramSink.h" -#include +#include "pdeque.h" // A handy macro for writing PointerToArrays. #define WRITE_PTA(Manager, dest, Write_func, array) \ @@ -91,7 +91,7 @@ private: // This is the set of all TypeHandles already written. - set _types_written; + pset _types_written; // This keeps track of all of the objects we have written out // already (or are about to write out), and associates a unique @@ -103,7 +103,7 @@ private: StoreState(int object_id) : _object_id(object_id), _written(false) {} }; - typedef map StateMap; + typedef pmap StateMap; StateMap _state_map; // This is the next object ID that will be assigned to a new object. @@ -111,12 +111,12 @@ private: // This is the queue of objects that need to be written when the // current object is finished. - typedef deque ObjectQueue; + typedef pdeque ObjectQueue; ObjectQueue _object_queue; // These are used by register_pta() to unify multiple references to // the same PointerToArray. - typedef map PTAMap; + typedef pmap PTAMap; PTAMap _pta_map; int _next_pta_id; diff --git a/panda/src/putil/buttonRegistry.h b/panda/src/putil/buttonRegistry.h index 310ff7a6c4..50d4d7afbc 100644 --- a/panda/src/putil/buttonRegistry.h +++ b/panda/src/putil/buttonRegistry.h @@ -23,8 +23,8 @@ #include "buttonHandle.h" -#include -#include +#include "pvector.h" +#include "pmap.h" #include //////////////////////////////////////////////////////////////////// @@ -69,10 +69,10 @@ private: RegistryNode *look_up(ButtonHandle button) const; - typedef vector HandleRegistry; + typedef pvector HandleRegistry; HandleRegistry _handle_registry; - typedef map NameRegistry; + typedef pmap NameRegistry; NameRegistry _name_registry; static ButtonRegistry *_global_pointer; diff --git a/panda/src/putil/factoryBase.h b/panda/src/putil/factoryBase.h index 730c57f461..c3c4411e70 100644 --- a/panda/src/putil/factoryBase.h +++ b/panda/src/putil/factoryBase.h @@ -25,7 +25,7 @@ #include "typedReferenceCount.h" #include "factoryParams.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : FactoryBase @@ -92,14 +92,14 @@ private: #if defined(WIN32_VC) && !defined(__ICL) //__ICL is Intel C++ // Visual C++ seems to have a problem with building a map based on // BaseCreateFunc. We'll have to typecast it on the way out. - typedef map Creators; + typedef pmap Creators; #else - typedef map Creators; + typedef pmap Creators; #endif Creators _creators; - typedef vector Preferred; + typedef pvector Preferred; Preferred _preferred; }; diff --git a/panda/src/putil/factoryParam.h b/panda/src/putil/factoryParam.h index 2d2ccb25d3..76cdfccf9d 100644 --- a/panda/src/putil/factoryParam.h +++ b/panda/src/putil/factoryParam.h @@ -23,7 +23,7 @@ #include "typedReferenceCount.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : FactoryParam diff --git a/panda/src/putil/factoryParams.h b/panda/src/putil/factoryParams.h index 1568eaab28..360fc35069 100644 --- a/panda/src/putil/factoryParams.h +++ b/panda/src/putil/factoryParams.h @@ -26,7 +26,7 @@ #include "pointerTo.h" #include "factoryParam.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : FactoryParams @@ -54,7 +54,7 @@ public: FactoryParam *get_param_of_type(TypeHandle type) const; private: - typedef vector< PT(TypedReferenceCount) > Params; + typedef pvector< PT(TypedReferenceCount) > Params; Params _params; }; diff --git a/panda/src/putil/globalPointerRegistry.h b/panda/src/putil/globalPointerRegistry.h index 97dcfa12d7..a0d11d6f47 100644 --- a/panda/src/putil/globalPointerRegistry.h +++ b/panda/src/putil/globalPointerRegistry.h @@ -23,7 +23,7 @@ #include "typedObject.h" -#include +#include "pmap.h" //////////////////////////////////////////////////////////////////// // Class : GlobalPointerRegistry @@ -79,7 +79,7 @@ private: static GlobalPointerRegistry *_global_ptr; private: - typedef map Pointers; + typedef pmap Pointers; Pointers _pointers; }; diff --git a/panda/src/putil/nameUniquifier.h b/panda/src/putil/nameUniquifier.h index 7c0532eb71..31372603e4 100644 --- a/panda/src/putil/nameUniquifier.h +++ b/panda/src/putil/nameUniquifier.h @@ -22,7 +22,7 @@ #include #include -#include +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : NameUniquifier @@ -44,7 +44,7 @@ public: private: string add_name_body(const string &name, const string &prefix); - typedef set Names; + typedef pset Names; Names _names; string _separator; string _empty; diff --git a/panda/src/putil/vector_double.h b/panda/src/putil/vector_double.h index 8329478d28..0f93d15ee9 100644 --- a/panda/src/putil/vector_double.h +++ b/panda/src/putil/vector_double.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_double diff --git a/panda/src/putil/vector_float.h b/panda/src/putil/vector_float.h index 597f34d94e..91ec7937cc 100644 --- a/panda/src/putil/vector_float.h +++ b/panda/src/putil/vector_float.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_float diff --git a/panda/src/putil/vector_typedWritable.h b/panda/src/putil/vector_typedWritable.h index ce33c33a07..e5f65f7d75 100644 --- a/panda/src/putil/vector_typedWritable.h +++ b/panda/src/putil/vector_typedWritable.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" class TypedWritable; diff --git a/panda/src/putil/vector_uchar.h b/panda/src/putil/vector_uchar.h index e05255607a..a206e45e1f 100644 --- a/panda/src/putil/vector_uchar.h +++ b/panda/src/putil/vector_uchar.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_uchar diff --git a/panda/src/putil/vector_ulong.h b/panda/src/putil/vector_ulong.h index a81d9e99b9..02be856c3e 100644 --- a/panda/src/putil/vector_ulong.h +++ b/panda/src/putil/vector_ulong.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_ushort diff --git a/panda/src/putil/vector_ushort.h b/panda/src/putil/vector_ushort.h index babcb0335e..9dc15374e3 100644 --- a/panda/src/putil/vector_ushort.h +++ b/panda/src/putil/vector_ushort.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : vector_ushort diff --git a/panda/src/putil/vector_writable.h b/panda/src/putil/vector_writable.h index c73fe5b852..027e614c5f 100644 --- a/panda/src/putil/vector_writable.h +++ b/panda/src/putil/vector_writable.h @@ -21,7 +21,7 @@ #include -#include +#include "pvector.h" class Writable; diff --git a/panda/src/putil/writableParam.h b/panda/src/putil/writableParam.h index a8b8b5349f..9c1b53c7aa 100644 --- a/panda/src/putil/writableParam.h +++ b/panda/src/putil/writableParam.h @@ -24,7 +24,7 @@ #include "factoryParam.h" #include "datagram.h" -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Class : WritableParam diff --git a/panda/src/ribgsg/ribGraphicsStateGuardian.cxx b/panda/src/ribgsg/ribGraphicsStateGuardian.cxx index 8d9ae69115..51583452ca 100644 --- a/panda/src/ribgsg/ribGraphicsStateGuardian.cxx +++ b/panda/src/ribgsg/ribGraphicsStateGuardian.cxx @@ -63,10 +63,10 @@ TypeHandle RIBGraphicsStateGuardian::_type_handle; // Here are some global arrays we use in the various draw() routines // to hold temporary coordinate values for each Geom for formatting. -static vector rib_vertices; -static vector rib_normals; -static vector rib_texcoords; -static vector rib_colors; +static pvector rib_vertices; +static pvector rib_normals; +static pvector rib_texcoords; +static pvector rib_colors; static void issue_vertex_rib(const Geom *geom, Geom::VertexIterator &vi) { diff --git a/panda/src/ribgsg/ribGraphicsStateGuardian.h b/panda/src/ribgsg/ribGraphicsStateGuardian.h index a4bddd293c..8263ae8961 100644 --- a/panda/src/ribgsg/ribGraphicsStateGuardian.h +++ b/panda/src/ribgsg/ribGraphicsStateGuardian.h @@ -155,11 +155,11 @@ protected: string _texture_extension; ostream *_output; int _indent_level; - typedef map TextureNames; + typedef pmap TextureNames; TextureNames _texture_names; - typedef map LightIDs; + typedef pmap LightIDs; LightIDs _light_ids; - typedef vector EnabledLights; + typedef pvector EnabledLights; EnabledLights _enabled_lights; diff --git a/panda/src/sgidisplay/sgiGraphicsPipe.h b/panda/src/sgidisplay/sgiGraphicsPipe.h index 5973d13120..2e751eee1c 100644 --- a/panda/src/sgidisplay/sgiGraphicsPipe.h +++ b/panda/src/sgidisplay/sgiGraphicsPipe.h @@ -47,7 +47,7 @@ public: protected: - typedef map Channels; + typedef pmap Channels; Channels _hw_chans; virtual int get_num_hw_channels(); diff --git a/panda/src/sgmanip/findApproxLevel.h b/panda/src/sgmanip/findApproxLevel.h index ca0714d207..99b856c08c 100644 --- a/panda/src/sgmanip/findApproxLevel.h +++ b/panda/src/sgmanip/findApproxLevel.h @@ -87,7 +87,7 @@ public: void write(ostream &out) const; - typedef vector Vec; + typedef pvector Vec; Vec _v; }; diff --git a/panda/src/sgmanip/findApproxPath.h b/panda/src/sgmanip/findApproxPath.h index 3cdae15282..333335518b 100644 --- a/panda/src/sgmanip/findApproxPath.h +++ b/panda/src/sgmanip/findApproxPath.h @@ -24,7 +24,7 @@ #include #include -#include +#include "pvector.h" class Node; class NodeRelation; @@ -93,7 +93,7 @@ private: int _flags; }; - typedef vector Path; + typedef pvector Path; Path _path; bool _return_hidden; diff --git a/panda/src/sgmanip/nodePath.cxx b/panda/src/sgmanip/nodePath.cxx index 770eb5e344..b940aa0c99 100644 --- a/panda/src/sgmanip/nodePath.cxx +++ b/panda/src/sgmanip/nodePath.cxx @@ -41,7 +41,7 @@ #include #include -#include +#include "plist.h" TypeHandle NodePath::_type_handle; @@ -593,7 +593,7 @@ get_top_node() const { //////////////////////////////////////////////////////////////////// int NodePath:: share_with(const NodePath &other) { - typedef list Comps; + typedef plist Comps; Comps other_comps; Comps this_comps; @@ -1098,30 +1098,33 @@ analyze() const { // Function: NodePath::flatten_light // Access: Public // Description: Lightly flattens out the hierarchy below this node by -// removing unneeded grouping nodes--nodes that have -// exactly one child, for instance, but have no special -// properties in themselves. This will not affect any -// transforms or other transitions. +// applying transforms, colors, and texture matrices +// from the arcs onto the vertices, but does not remove +// any nodes. // -// This is the same level of flattening that is normally -// automatically applied by the egg loader. It's -// generally completely safe (except that it may remove -// a node you expected to be there). +// This can result in improved rendering performance +// because there will be fewer transforms in the +// resulting scene graph, but the number of nodes will +// remain the same. // -// The return value is the number of arcs removed. +// Particularly, any NodePaths that reference nodes +// within this hierarchy will not be damaged. However, +// since this operation will remove transforms from the +// scene graph, it may be dangerous to apply to arcs +// where you expect to dynamically modify the transform, +// or where you expect the geometry to remain in a +// particular local coordinate system. +// +// The return value is always 0, since flatten_light +// does not remove any arcs. //////////////////////////////////////////////////////////////////// int NodePath:: flatten_light() { nassertr(!is_empty(), 0); SceneGraphReducer gr(_graph_type); - int num_removed = gr.flatten(node(), false); + gr.apply_transitions(arc()); - if (sgmanip_cat.is_debug()) { - sgmanip_cat.debug() - << "flatten_light() removed " << num_removed << " arcs.\n"; - } - - return num_removed; + return 0; } //////////////////////////////////////////////////////////////////// @@ -1130,16 +1133,15 @@ flatten_light() { // Description: A more thorough flattening than flatten_light(), this // first applies all the transforms, colors, and texture // matrices from the arcs onto the vertices, and then -// performs a flatten. This results in substantially -// improved perforamance over flatten_light() because -// (a) there are now fewer transforms, and (b) once the -// transforms are gone, it can safely remove more nodes. +// removes unneeded grouping nodes--nodes that have +// exactly one child, for instance, but have no special +// properties in themselves. // -// Since this operation will remove transforms from the -// scene graph, it may be dangerous to apply to arcs -// where you expect to dynamically modify the transform, -// or where you expect the geometry to remain in a -// particular local coordinate system. +// This results in improved perforamance over +// flatten_light() because the number of nodes in the +// scene graph is reduced. +// +// The return value is the number of arcs removed. //////////////////////////////////////////////////////////////////// int NodePath:: flatten_medium() { diff --git a/panda/src/sgmanip/nodePath.h b/panda/src/sgmanip/nodePath.h index 806eac2d97..384f61ae44 100644 --- a/panda/src/sgmanip/nodePath.h +++ b/panda/src/sgmanip/nodePath.h @@ -44,7 +44,7 @@ #include #include -#include +#include "pmap.h" class FindApproxLevel; class FindApproxPath; diff --git a/panda/src/sgraph/camera.h b/panda/src/sgraph/camera.h index 1583406687..e7c6847e76 100644 --- a/panda/src/sgraph/camera.h +++ b/panda/src/sgraph/camera.h @@ -27,7 +27,7 @@ #include -#include +#include "pvector.h" //////////////////////////////////////////////////////////////////// // Defines @@ -71,7 +71,7 @@ private: bool _active; PT_Node _scene; - typedef vector DisplayRegions; + typedef pvector DisplayRegions; DisplayRegions _display_regions; public: diff --git a/panda/src/sgraph/geomNode.cxx b/panda/src/sgraph/geomNode.cxx index b231650d72..5828407bd1 100644 --- a/panda/src/sgraph/geomNode.cxx +++ b/panda/src/sgraph/geomNode.cxx @@ -238,7 +238,7 @@ recompute_bound() { // Now actually compute the bounding volume by putting it around all // of our drawable's bounding volumes. - vector child_volumes; + pvector child_volumes; Geoms::const_iterator gi; for (gi = _geoms.begin(); gi != _geoms.end(); ++gi) { diff --git a/panda/src/sgraph/geomTransformer.h b/panda/src/sgraph/geomTransformer.h index 8b2f2c2371..9624667913 100644 --- a/panda/src/sgraph/geomTransformer.h +++ b/panda/src/sgraph/geomTransformer.h @@ -64,7 +64,7 @@ private: LMatrix4f _mat; PTA_Vertexf _coords; }; - typedef map Vertices; + typedef pmap Vertices; Vertices _vertices; class SourceNormals { @@ -74,7 +74,7 @@ private: LMatrix4f _mat; PTA_Normalf _norms; }; - typedef map Normals; + typedef pmap Normals; Normals _normals; class SourceTexCoords { @@ -84,10 +84,10 @@ private: LMatrix4f _mat; PTA_TexCoordf _texcoords; }; - typedef map TexCoords; + typedef pmap TexCoords; TexCoords _texcoords; - typedef map Colors; + typedef pmap Colors; Colors _colors; }; diff --git a/panda/src/sgraphutil/sceneGraphAnalyzer.h b/panda/src/sgraphutil/sceneGraphAnalyzer.h index 2ac010ead8..a6b22f063c 100644 --- a/panda/src/sgraphutil/sceneGraphAnalyzer.h +++ b/panda/src/sgraphutil/sceneGraphAnalyzer.h @@ -24,7 +24,7 @@ #include #include -#include +#include "pmap.h" class Node; class GeomNode; @@ -55,8 +55,8 @@ private: void consider_normals(const Normalf *norms, const ushort *nindex, int num); - typedef map Nodes; - typedef map Textures; + typedef pmap Nodes; + typedef pmap Textures; Nodes _nodes; Textures _textures; diff --git a/panda/src/shader/casterShader.h b/panda/src/shader/casterShader.h index 4da25ff415..b4da89b822 100644 --- a/panda/src/shader/casterShader.h +++ b/panda/src/shader/casterShader.h @@ -48,7 +48,7 @@ class EXPCL_SHADER CasterShader : public FrustumShader INLINE int add_caster(NamedNode* node); INLINE int remove_caster(NamedNode* node); - typedef vector NamedNodeVector; + typedef pvector NamedNodeVector; protected: diff --git a/panda/src/shader/shader.h b/panda/src/shader/shader.h index f015b83579..dc88d96bbb 100644 --- a/panda/src/shader/shader.h +++ b/panda/src/shader/shader.h @@ -123,7 +123,7 @@ public: INLINE int add_frustum(ProjectionNode* frust); INLINE int remove_frustum(ProjectionNode* frust); - typedef vector ProjectionVector; + typedef pvector ProjectionVector; protected: diff --git a/panda/src/shader/shaderTransition.h b/panda/src/shader/shaderTransition.h index 26724fd8e5..f138e264f1 100644 --- a/panda/src/shader/shaderTransition.h +++ b/panda/src/shader/shaderTransition.h @@ -27,9 +27,9 @@ #include #include -#include -#include -#include +#include "plist.h" +#include "pmap.h" +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : ShaderTransition @@ -41,11 +41,11 @@ //////////////////////////////////////////////////////////////////// class EXPCL_SHADER ShaderTransition : public ImmediateTransition { private: - // typedef vector< PT(Shader) > Shaders; - typedef list< PT(Shader) > Shaders; - typedef map ShaderOrder; - typedef map ShaderOverride; - typedef set ShaderBlend; + // typedef pvector< PT(Shader) > Shaders; + typedef plist< PT(Shader) > Shaders; + typedef pmap ShaderOrder; + typedef pmap ShaderOverride; + typedef pset ShaderBlend; public: INLINE ShaderTransition(); diff --git a/panda/src/testbed/deadrec_rec.cxx b/panda/src/testbed/deadrec_rec.cxx index 990595e8a8..114dd35229 100644 --- a/panda/src/testbed/deadrec_rec.cxx +++ b/panda/src/testbed/deadrec_rec.cxx @@ -39,7 +39,7 @@ Configure(deadrec); ConfigureFn(deadrec) { } -typedef set< PT(Connection) > Clients; +typedef pset< PT(Connection) > Clients; static PT_Node smiley; static RenderRelation* my_arc; diff --git a/panda/src/testbed/min_shader.cxx b/panda/src/testbed/min_shader.cxx index 2b70f5eebc..591384eb92 100644 --- a/panda/src/testbed/min_shader.cxx +++ b/panda/src/testbed/min_shader.cxx @@ -131,9 +131,9 @@ public: virtual void DisplayTexture(PT(Texture)&, Shader*); virtual void DisplayPixelBuffer(PT(PixelBuffer)&, Shader*); protected: - typedef std::list texlist; + typedef std::plist texlist; typedef texlist::iterator texiter; - typedef std::list pblist; + typedef std::plist pblist; typedef pblist::iterator pbiter; texlist _texs; @@ -191,7 +191,7 @@ public: virtual ~Viztex(void); virtual void Flush(void); protected: - typedef std::list< PT(GraphicsWindow) > winlist; + typedef std::plist< PT(GraphicsWindow) > winlist; typedef winlist::iterator winiter; winlist _wins; diff --git a/panda/src/testbed/motion.cxx b/panda/src/testbed/motion.cxx index 2114bb80f5..bcbc003e34 100644 --- a/panda/src/testbed/motion.cxx +++ b/panda/src/testbed/motion.cxx @@ -24,7 +24,7 @@ #include #include -#include +#include "plist.h" extern GraphicsWindow* win; @@ -33,9 +33,9 @@ extern void (*extra_display_func)(); extern void (*define_keys)(EventHandler&); #include -typedef list TexList; +typedef plist TexList; TexList screenshots; -typedef list PBList; +typedef plist PBList; PBList sshots; int num_frames = 4; int frame_num = 0; diff --git a/panda/src/testbed/shader_test.cxx b/panda/src/testbed/shader_test.cxx index bbc1779e7a..35895658ef 100644 --- a/panda/src/testbed/shader_test.cxx +++ b/panda/src/testbed/shader_test.cxx @@ -109,9 +109,9 @@ public: virtual void DisplayTexture(PT(Texture)&, Shader*); virtual void DisplayPixelBuffer(PT(PixelBuffer)&, Shader*); protected: - typedef std::list texlist; + typedef std::plist texlist; typedef texlist::iterator texiter; - typedef std::list pblist; + typedef std::plist pblist; typedef pblist::iterator pbiter; texlist _texs; @@ -169,7 +169,7 @@ public: virtual ~Viztex(void); virtual void Flush(void); protected: - typedef std::list< PT(GraphicsWindow) > winlist; + typedef std::plist< PT(GraphicsWindow) > winlist; typedef winlist::iterator winiter; winlist _wins; diff --git a/panda/src/text/textFont.h b/panda/src/text/textFont.h index c3f4ad6f45..a2a63e4521 100644 --- a/panda/src/text/textFont.h +++ b/panda/src/text/textFont.h @@ -28,7 +28,7 @@ #include #include -#include +#include "pmap.h" class Node; class Geom; @@ -69,7 +69,7 @@ private: AllTransitionsWrapper &trans); void find_characters(Node *root); - typedef map CharDefs; + typedef pmap CharDefs; CharDefs _defs; float _font_height; PT_Node _font; diff --git a/panda/src/tform/dataValve.h b/panda/src/tform/dataValve.h index 6b927d7c4f..eee3659d80 100644 --- a/panda/src/tform/dataValve.h +++ b/panda/src/tform/dataValve.h @@ -94,7 +94,7 @@ private: ModifierButtons _mods; PT(Control) _default_control; - typedef map FineControls; + typedef pmap FineControls; class Child { public: @@ -102,7 +102,7 @@ private: FineControls _fine_controls; }; - typedef vector Controls; + typedef pvector Controls; Controls _controls; diff --git a/panda/src/tform/mouseWatcher.h b/panda/src/tform/mouseWatcher.h index 456dd8f382..a4f135ab69 100644 --- a/panda/src/tform/mouseWatcher.h +++ b/panda/src/tform/mouseWatcher.h @@ -32,7 +32,7 @@ #include #include -#include +#include "pset.h" //////////////////////////////////////////////////////////////////// // Class : MouseWatcher @@ -105,7 +105,7 @@ private: const MouseWatcherRegion *region, const string &button_name = string()); - typedef set< PT(MouseWatcherRegion) > Regions; + typedef pset< PT(MouseWatcherRegion) > Regions; Regions _regions; bool _has_mouse; diff --git a/panda/src/vrpn/vrpnAnalog.h b/panda/src/vrpn/vrpnAnalog.h index 7f79e05595..a654c87e36 100644 --- a/panda/src/vrpn/vrpnAnalog.h +++ b/panda/src/vrpn/vrpnAnalog.h @@ -23,7 +23,7 @@ #include "vrpn_interface.h" -#include +#include "pvector.h" class VrpnAnalogDevice; @@ -67,7 +67,7 @@ private: string _analog_name; vrpn_Analog_Remote *_analog; - typedef vector Devices; + typedef pvector Devices; Devices _devices; }; diff --git a/panda/src/vrpn/vrpnButton.h b/panda/src/vrpn/vrpnButton.h index 8f1c55dea8..9641a15acc 100644 --- a/panda/src/vrpn/vrpnButton.h +++ b/panda/src/vrpn/vrpnButton.h @@ -23,7 +23,7 @@ #include "vrpn_interface.h" -#include +#include "pvector.h" class VrpnButtonDevice; @@ -67,7 +67,7 @@ private: string _button_name; vrpn_Button_Remote *_button; - typedef vector Devices; + typedef pvector Devices; Devices _devices; }; diff --git a/panda/src/vrpn/vrpnClient.h b/panda/src/vrpn/vrpnClient.h index c21b742ee3..1069bf5f96 100644 --- a/panda/src/vrpn/vrpnClient.h +++ b/panda/src/vrpn/vrpnClient.h @@ -89,10 +89,10 @@ private: string _server_name; vrpn_Connection *_connection; - typedef map Trackers; - typedef map Buttons; - typedef map Analogs; - typedef map Dials; + typedef pmap Trackers; + typedef pmap Buttons; + typedef pmap Analogs; + typedef pmap Dials; Trackers _trackers; Buttons _buttons; diff --git a/panda/src/vrpn/vrpnDial.h b/panda/src/vrpn/vrpnDial.h index e9452bb873..bf1f6156e4 100644 --- a/panda/src/vrpn/vrpnDial.h +++ b/panda/src/vrpn/vrpnDial.h @@ -23,7 +23,7 @@ #include "vrpn_interface.h" -#include +#include "pvector.h" class VrpnDialDevice; @@ -67,7 +67,7 @@ private: string _dial_name; vrpn_Dial_Remote *_dial; - typedef vector Devices; + typedef pvector Devices; Devices _devices; }; diff --git a/panda/src/vrpn/vrpnTracker.h b/panda/src/vrpn/vrpnTracker.h index e7c9366b6b..65e69a587a 100644 --- a/panda/src/vrpn/vrpnTracker.h +++ b/panda/src/vrpn/vrpnTracker.h @@ -23,7 +23,7 @@ #include "vrpn_interface.h" -#include +#include "pvector.h" class VrpnTrackerDevice; @@ -70,7 +70,7 @@ private: string _tracker_name; vrpn_Tracker_Remote *_tracker; - typedef vector Devices; + typedef pvector Devices; Devices _devices; }; diff --git a/panda/src/wgldisplay/wglGraphicsWindow.cxx b/panda/src/wgldisplay/wglGraphicsWindow.cxx index 8f44bc9f89..de5d059dc8 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.cxx +++ b/panda/src/wgldisplay/wglGraphicsWindow.cxx @@ -410,7 +410,7 @@ int wglGraphicsWindow::choose_visual(void) { 0 }; - set tried_masks; + pset tried_masks; tried_masks.insert(mask); int i;