Ver código fonte

Merge branch 'master' into vulkan

rdb 7 anos atrás
pai
commit
a17193ca1c
100 arquivos alterados com 484 adições e 394 exclusões
  1. 4 0
      contrib/src/ai/aiBehaviors.cxx
  2. 15 15
      contrib/src/ai/aiBehaviors.h
  3. 1 1
      contrib/src/ai/aiCharacter.cxx
  4. 2 2
      contrib/src/ai/aiCharacter.h
  5. 1 1
      contrib/src/ai/aiPathFinder.cxx
  6. 5 5
      contrib/src/ai/aiWorld.cxx
  7. 2 2
      contrib/src/ai/aiWorld.h
  8. 1 1
      contrib/src/ai/arrival.cxx
  9. 7 3
      contrib/src/ai/pathFind.cxx
  10. 2 2
      contrib/src/ai/pathFind.h
  11. 1 1
      contrib/src/ai/pathFollow.cxx
  12. 3 3
      contrib/src/ai/pathFollow.h
  13. 1 1
      contrib/src/rplight/gpuCommand.I
  14. 4 4
      contrib/src/rplight/gpuCommand.cxx
  15. 1 1
      contrib/src/rplight/gpuCommand.h
  16. 4 2
      contrib/src/rplight/iesDataset.cxx
  17. 5 3
      contrib/src/rplight/internalLightManager.cxx
  18. 2 2
      contrib/src/rplight/pointerSlotStorage.h
  19. 2 0
      contrib/src/rplight/pssmCameraRig.cxx
  20. 2 2
      contrib/src/rplight/rpLight.I
  21. 2 2
      contrib/src/rplight/rpLight.h
  22. 2 0
      contrib/src/rplight/rpSpotLight.cxx
  23. 1 1
      contrib/src/rplight/shadowAtlas.I
  24. 6 6
      contrib/src/rplight/shadowAtlas.cxx
  25. 2 2
      contrib/src/rplight/shadowManager.I
  26. 5 5
      contrib/src/rplight/tagStateManager.I
  27. 3 1
      contrib/src/rplight/tagStateManager.cxx
  28. 10 10
      contrib/src/rplight/tagStateManager.h
  29. 3 0
      direct/src/dcparse/dcparse.cxx
  30. 4 2
      direct/src/dcparser/dcArrayParameter.cxx
  31. 4 4
      direct/src/dcparser/dcArrayParameter.h
  32. 5 3
      direct/src/dcparser/dcAtomicField.cxx
  33. 6 6
      direct/src/dcparser/dcAtomicField.h
  34. 1 1
      direct/src/dcparser/dcClass.I
  35. 7 3
      direct/src/dcparser/dcClass.cxx
  36. 17 17
      direct/src/dcparser/dcClass.h
  37. 2 2
      direct/src/dcparser/dcClassParameter.cxx
  38. 2 2
      direct/src/dcparser/dcClassParameter.h
  39. 2 2
      direct/src/dcparser/dcDeclaration.cxx
  40. 5 5
      direct/src/dcparser/dcDeclaration.h
  41. 4 4
      direct/src/dcparser/dcField.I
  42. 6 4
      direct/src/dcparser/dcField.cxx
  43. 14 14
      direct/src/dcparser/dcField.h
  44. 6 3
      direct/src/dcparser/dcFile.cxx
  45. 15 15
      direct/src/dcparser/dcFile.h
  46. 4 4
      direct/src/dcparser/dcKeyword.cxx
  47. 5 5
      direct/src/dcparser/dcKeyword.h
  48. 3 3
      direct/src/dcparser/dcKeywordList.cxx
  49. 4 4
      direct/src/dcparser/dcKeywordList.h
  50. 17 13
      direct/src/dcparser/dcLexer.cxx.prebuilt
  51. 17 13
      direct/src/dcparser/dcLexer.lxx
  52. 3 3
      direct/src/dcparser/dcLexerDefs.h
  53. 3 3
      direct/src/dcparser/dcMolecularField.cxx
  54. 3 3
      direct/src/dcparser/dcMolecularField.h
  55. 7 7
      direct/src/dcparser/dcNumericRange.I
  56. 4 4
      direct/src/dcparser/dcNumericRange.h
  57. 2 2
      direct/src/dcparser/dcPackData.I
  58. 1 1
      direct/src/dcparser/dcPackData.h
  59. 19 19
      direct/src/dcparser/dcPacker.I
  60. 8 2
      direct/src/dcparser/dcPacker.cxx
  61. 21 21
      direct/src/dcparser/dcPacker.h
  62. 1 1
      direct/src/dcparser/dcPackerCatalog.I
  63. 2 0
      direct/src/dcparser/dcPackerCatalog.cxx
  64. 7 7
      direct/src/dcparser/dcPackerCatalog.h
  65. 1 1
      direct/src/dcparser/dcPackerInterface.I
  66. 3 1
      direct/src/dcparser/dcPackerInterface.cxx
  67. 8 8
      direct/src/dcparser/dcPackerInterface.h
  68. 3 0
      direct/src/dcparser/dcParameter.cxx
  69. 12 12
      direct/src/dcparser/dcParameter.h
  70. 4 0
      direct/src/dcparser/dcParser.cxx.prebuilt
  71. 4 0
      direct/src/dcparser/dcParser.yxx
  72. 4 4
      direct/src/dcparser/dcParserDefs.h
  73. 3 1
      direct/src/dcparser/dcSimpleParameter.cxx
  74. 4 4
      direct/src/dcparser/dcSimpleParameter.h
  75. 2 2
      direct/src/dcparser/dcSubatomicType.cxx
  76. 1 1
      direct/src/dcparser/dcSubatomicType.h
  77. 3 0
      direct/src/dcparser/dcSwitch.cxx
  78. 21 21
      direct/src/dcparser/dcSwitch.h
  79. 4 2
      direct/src/dcparser/dcSwitchParameter.cxx
  80. 5 5
      direct/src/dcparser/dcSwitchParameter.h
  81. 5 3
      direct/src/dcparser/dcTypedef.cxx
  82. 5 5
      direct/src/dcparser/dcTypedef.h
  83. 2 2
      direct/src/dcparser/dcindent.cxx
  84. 2 2
      direct/src/dcparser/dcindent.h
  85. 2 2
      direct/src/dcparser/hashGenerator.cxx
  86. 1 1
      direct/src/dcparser/hashGenerator.h
  87. 1 1
      direct/src/dcparser/primeNumberGenerator.h
  88. 5 5
      direct/src/deadrec/smoothMover.cxx
  89. 2 2
      direct/src/deadrec/smoothMover.h
  90. 6 1
      direct/src/directd/directd.cxx
  91. 10 10
      direct/src/directd/directd.h
  92. 6 0
      direct/src/directdServer/directdClient.cxx
  93. 2 2
      direct/src/directdServer/directdClient.h
  94. 6 2
      direct/src/directdServer/directdServer.cxx
  95. 2 2
      direct/src/directdServer/directdServer.h
  96. 1 1
      direct/src/distributed/cConnectionRepository.I
  97. 5 2
      direct/src/distributed/cConnectionRepository.cxx
  98. 4 4
      direct/src/distributed/cConnectionRepository.h
  99. 4 4
      direct/src/distributed/cDistributedSmoothNodeBase.cxx
  100. 1 1
      direct/src/distributed/cDistributedSmoothNodeBase.h

+ 4 - 0
contrib/src/ai/aiBehaviors.cxx

@@ -13,6 +13,10 @@
 
 
 #include "aiBehaviors.h"
 #include "aiBehaviors.h"
 
 
+using std::cout;
+using std::endl;
+using std::string;
+
 static const float _PI = 3.14;
 static const float _PI = 3.14;
 
 
 AIBehaviors::AIBehaviors() {
 AIBehaviors::AIBehaviors() {

+ 15 - 15
contrib/src/ai/aiBehaviors.h

@@ -28,8 +28,8 @@ class PathFollow;
 class PathFind;
 class PathFind;
 class ObstacleAvoidance;
 class ObstacleAvoidance;
 
 
-typedef list<Flee, allocator<Flee> > ListFlee;
-typedef list<Evade, allocator<Evade> > ListEvade;
+typedef std::list<Flee, std::allocator<Flee> > ListFlee;
+typedef std::list<Evade, std::allocator<Evade> > ListEvade;
 
 
 /**
 /**
  * This class implements all the steering behaviors of the AI framework, such
  * This class implements all the steering behaviors of the AI framework, such
@@ -113,21 +113,21 @@ public:
   ~AIBehaviors();
   ~AIBehaviors();
 
 
   bool is_on(_behavior_type bt);
   bool is_on(_behavior_type bt);
-  bool is_on(string ai_type); // special cases for pathfollow and pathfinding
+  bool is_on(std::string ai_type); // special cases for pathfollow and pathfinding
   bool is_off(_behavior_type bt);
   bool is_off(_behavior_type bt);
-  bool is_off(string ai_type); // special cases for pathfollow and pathfinding
-  void turn_on(string ai_type);
-  void turn_off(string ai_type);
+  bool is_off(std::string ai_type); // special cases for pathfollow and pathfinding
+  void turn_on(std::string ai_type);
+  void turn_off(std::string ai_type);
 
 
   bool is_conflict();
   bool is_conflict();
 
 
-  void accumulate_force(string force_type, LVecBase3 force);
+  void accumulate_force(std::string force_type, LVecBase3 force);
   LVecBase3 calculate_prioritized();
   LVecBase3 calculate_prioritized();
 
 
   void flock_activate();
   void flock_activate();
   LVecBase3 do_flock();
   LVecBase3 do_flock();
 
 
-  int char_to_int(string ai_type);
+  int char_to_int(std::string ai_type);
 
 
 PUBLISHED:
 PUBLISHED:
   void seek(NodePath target_object, float seek_wt = 1.0);
   void seek(NodePath target_object, float seek_wt = 1.0);
@@ -150,21 +150,21 @@ PUBLISHED:
 
 
   void path_follow(float follow_wt);
   void path_follow(float follow_wt);
   void add_to_path(LVecBase3 pos);
   void add_to_path(LVecBase3 pos);
-  void start_follow(string type = "normal");
+  void start_follow(std::string type = "normal");
 
 
   // should have different function names.
   // should have different function names.
   void init_path_find(const char* navmesh_filename);
   void init_path_find(const char* navmesh_filename);
-  void path_find_to(LVecBase3 pos, string type = "normal");
-  void path_find_to(NodePath target, string type = "normal");
+  void path_find_to(LVecBase3 pos, std::string type = "normal");
+  void path_find_to(NodePath target, std::string type = "normal");
   void add_static_obstacle(NodePath obstacle);
   void add_static_obstacle(NodePath obstacle);
   void add_dynamic_obstacle(NodePath obstacle);
   void add_dynamic_obstacle(NodePath obstacle);
 
 
 
 
-  void remove_ai(string ai_type);
-  void pause_ai(string ai_type);
-  void resume_ai(string ai_type);
+  void remove_ai(std::string ai_type);
+  void pause_ai(std::string ai_type);
+  void resume_ai(std::string ai_type);
 
 
-  string behavior_status(string ai_type);
+  std::string behavior_status(std::string ai_type);
 };
 };
 
 
 #endif
 #endif

+ 1 - 1
contrib/src/ai/aiCharacter.cxx

@@ -13,7 +13,7 @@
 
 
 #include "aiCharacter.h"
 #include "aiCharacter.h"
 
 
-AICharacter::AICharacter(string model_name, NodePath model_np, double mass, double movt_force, double max_force) {
+AICharacter::AICharacter(std::string model_name, NodePath model_np, double mass, double movt_force, double max_force) {
   _name = model_name;
   _name = model_name;
   _ai_char_np = model_np;
   _ai_char_np = model_np;
 
 

+ 2 - 2
contrib/src/ai/aiCharacter.h

@@ -32,7 +32,7 @@ class EXPCL_PANDAAI AICharacter : public ReferenceCount {
   double _max_force;
   double _max_force;
   LVecBase3 _velocity;
   LVecBase3 _velocity;
   LVecBase3 _steering_force;
   LVecBase3 _steering_force;
-  string _name;
+  std::string _name;
   double _movt_force;
   double _movt_force;
   unsigned int _ai_char_flock_id;
   unsigned int _ai_char_flock_id;
   AIWorld *_world;
   AIWorld *_world;
@@ -63,7 +63,7 @@ PUBLISHED:
     // This function is used to enable or disable the guides for path finding.
     // This function is used to enable or disable the guides for path finding.
     void set_pf_guide(bool pf_guide);
     void set_pf_guide(bool pf_guide);
 
 
-    explicit AICharacter(string model_name, NodePath model_np, double mass, double movt_force, double max_force);
+    explicit AICharacter(std::string model_name, NodePath model_np, double mass, double movt_force, double max_force);
     ~AICharacter();
     ~AICharacter();
 };
 };
 
 

+ 1 - 1
contrib/src/ai/aiPathFinder.cxx

@@ -74,7 +74,7 @@ void PathFinder::generate_path() {
       add_to_clist(nxt_node);
       add_to_clist(nxt_node);
     }
     }
   }
   }
-  cout<<"DESTINATION NOT REACHABLE MATE!"<<endl;
+  std::cout << "DESTINATION NOT REACHABLE MATE!" << std::endl;
   _closed_list.clear();
   _closed_list.clear();
 }
 }
 
 

+ 5 - 5
contrib/src/ai/aiWorld.cxx

@@ -14,7 +14,7 @@
 #include "aiWorld.h"
 #include "aiWorld.h"
 
 
 AIWorld::AIWorld(NodePath render) {
 AIWorld::AIWorld(NodePath render) {
-  _render = move(render);
+  _render = std::move(render);
 }
 }
 
 
 AIWorld::~AIWorld() {
 AIWorld::~AIWorld() {
@@ -26,7 +26,7 @@ void AIWorld::add_ai_char(AICharacter *ai_char) {
   ai_char->_world = this;
   ai_char->_world = this;
 }
 }
 
 
-void AIWorld::remove_ai_char(string name) {
+void AIWorld::remove_ai_char(std::string name) {
   AICharPool::iterator it;
   AICharPool::iterator it;
   for (it = _ai_char_pool.begin(); it != _ai_char_pool.end(); ++it) {
   for (it = _ai_char_pool.begin(); it != _ai_char_pool.end(); ++it) {
     AICharacter *ai_char = *it;
     AICharacter *ai_char = *it;
@@ -38,10 +38,10 @@ void AIWorld::remove_ai_char(string name) {
     }
     }
   }
   }
 
 
-  remove_ai_char_from_flock(move(name));
+  remove_ai_char_from_flock(std::move(name));
 }
 }
 
 
-void AIWorld::remove_ai_char_from_flock(string name) {
+void AIWorld::remove_ai_char_from_flock(std::string name) {
   for (AICharacter *ai_char : _ai_char_pool) {
   for (AICharacter *ai_char : _ai_char_pool) {
     for (Flock *flock : _flock_pool) {
     for (Flock *flock : _flock_pool) {
       if (ai_char->_ai_char_flock_id == flock->get_id()) {
       if (ai_char->_ai_char_flock_id == flock->get_id()) {
@@ -62,7 +62,7 @@ void AIWorld::remove_ai_char_from_flock(string name) {
  */
  */
 void AIWorld::print_list() {
 void AIWorld::print_list() {
   for (AICharacter *ai_char : _ai_char_pool) {
   for (AICharacter *ai_char : _ai_char_pool) {
-    cout << ai_char->_name << endl;
+    std::cout << ai_char->_name << std::endl;
   }
   }
 }
 }
 
 

+ 2 - 2
contrib/src/ai/aiWorld.h

@@ -37,14 +37,14 @@ class EXPCL_PANDAAI AIWorld {
     std::vector<NodePath> _obstacles;
     std::vector<NodePath> _obstacles;
     typedef std::vector<Flock*> FlockPool;
     typedef std::vector<Flock*> FlockPool;
     FlockPool _flock_pool;
     FlockPool _flock_pool;
-    void remove_ai_char_from_flock(string name);
+    void remove_ai_char_from_flock(std::string name);
 
 
 PUBLISHED:
 PUBLISHED:
     AIWorld(NodePath render);
     AIWorld(NodePath render);
     ~AIWorld();
     ~AIWorld();
 
 
     void add_ai_char(AICharacter *ai_ch);
     void add_ai_char(AICharacter *ai_ch);
-    void remove_ai_char(string name);
+    void remove_ai_char(std::string name);
 
 
     void add_flock(Flock *flock);
     void add_flock(Flock *flock);
     void flock_off(unsigned int flock_id);
     void flock_off(unsigned int flock_id);

+ 1 - 1
contrib/src/ai/arrival.cxx

@@ -77,7 +77,7 @@ LVecBase3 Arrival::do_arrival() {
     return(desired_force);
     return(desired_force);
   }
   }
 
 
-  cout<<"Arrival works only with seek and pursue"<<endl;
+  std::cout << "Arrival works only with seek and pursue" << std::endl;
   return(LVecBase3(0.0, 0.0, 0.0));
   return(LVecBase3(0.0, 0.0, 0.0));
 }
 }
 
 

+ 7 - 3
contrib/src/ai/pathFind.cxx

@@ -13,6 +13,10 @@
 
 
 #include "pathFind.h"
 #include "pathFind.h"
 
 
+using std::cout;
+using std::endl;
+using std::string;
+
 PathFind::PathFind(AICharacter *ai_ch) {
 PathFind::PathFind(AICharacter *ai_ch) {
   _ai_char = ai_ch;
   _ai_char = ai_ch;
 
 
@@ -68,7 +72,7 @@ void PathFind::create_nav_mesh(const char* navmesh_filename) {
     // Begin reading data from the file.
     // Begin reading data from the file.
     while(!nav_mesh_file.eof()) {
     while(!nav_mesh_file.eof()) {
       getline(nav_mesh_file, line);
       getline(nav_mesh_file, line);
-      stringstream linestream (line);
+      std::stringstream linestream (line);
 
 
       // Stores all the data members in the line to the array.  Data
       // Stores all the data members in the line to the array.  Data
       // structure:
       // structure:
@@ -125,7 +129,7 @@ void PathFind::assign_neighbor_nodes(const char* navmesh_filename){
 
 
     while(!nav_mesh_file.eof()) {
     while(!nav_mesh_file.eof()) {
       getline(nav_mesh_file, ln); // Gets main node data only. No neighbor nodes.
       getline(nav_mesh_file, ln); // Gets main node data only. No neighbor nodes.
-      stringstream linestream (ln);
+      std::stringstream linestream (ln);
       for(int i = 0; i < 10; ++i) {
       for(int i = 0; i < 10; ++i) {
         getline(linestream, fields[i], ',');
         getline(linestream, fields[i], ',');
       }
       }
@@ -135,7 +139,7 @@ void PathFind::assign_neighbor_nodes(const char* navmesh_filename){
         gd_y = atoi(fields[3].c_str());
         gd_y = atoi(fields[3].c_str());
         for(int i = 0; i < 8; ++i) {
         for(int i = 0; i < 8; ++i) {
           getline(nav_mesh_file, ln); // Gets neighbor node data only. No main nodes.
           getline(nav_mesh_file, ln); // Gets neighbor node data only. No main nodes.
-          stringstream linestream_n (ln);
+          std::stringstream linestream_n (ln);
           for(int j = 0; j < 10; ++j) {
           for(int j = 0; j < 10; ++j) {
             getline(linestream_n, fields_n[j], ',');
             getline(linestream_n, fields_n[j], ',');
           }
           }

+ 2 - 2
contrib/src/ai/pathFind.h

@@ -56,8 +56,8 @@ public:
   void clear_previous_obstacles();
   void clear_previous_obstacles();
 
 
   void set_path_find(const char* navmesh_filename);
   void set_path_find(const char* navmesh_filename);
-  void path_find(LVecBase3 pos, string type = "normal");
-  void path_find(NodePath target, string type = "normal");
+  void path_find(LVecBase3 pos, std::string type = "normal");
+  void path_find(NodePath target, std::string type = "normal");
   void add_obstacle_to_mesh(NodePath obstacle);
   void add_obstacle_to_mesh(NodePath obstacle);
   void dynamic_avoid(NodePath obstacle);
   void dynamic_avoid(NodePath obstacle);
 };
 };

+ 1 - 1
contrib/src/ai/pathFollow.cxx

@@ -23,7 +23,7 @@ void PathFollow::add_to_path(LVecBase3 pos) {
 /**
 /**
  * This function initiates the path follow behavior.
  * This function initiates the path follow behavior.
  */
  */
-void PathFollow::start(string type) {
+void PathFollow::start(std::string type) {
     _type = type;
     _type = type;
   _start = true;
   _start = true;
   if(_path.size() > 0) {
   if(_path.size() > 0) {

+ 3 - 3
contrib/src/ai/pathFollow.h

@@ -13,18 +13,18 @@ class EXPCL_PANDAAI PathFollow {
 public:
 public:
   AICharacter *_ai_char;
   AICharacter *_ai_char;
   float _follow_weight;
   float _follow_weight;
-  vector<LVecBase3> _path;
+  std::vector<LVecBase3> _path;
   int _curr_path_waypoint;
   int _curr_path_waypoint;
   bool _start;
   bool _start;
   NodePath _dummy;
   NodePath _dummy;
-  string _type;
+  std::string _type;
   ClockObject *_myClock;
   ClockObject *_myClock;
   float _time;
   float _time;
 
 
   PathFollow(AICharacter *ai_ch, float follow_wt);
   PathFollow(AICharacter *ai_ch, float follow_wt);
   ~PathFollow();
   ~PathFollow();
   void add_to_path(LVecBase3 pos);
   void add_to_path(LVecBase3 pos);
-  void start(string type);
+  void start(std::string type);
   void do_follow();
   void do_follow();
   bool check_if_possible();
   bool check_if_possible();
 };
 };

+ 1 - 1
contrib/src/rplight/gpuCommand.I

@@ -74,7 +74,7 @@ inline float GPUCommand::convert_int_to_float(int v) const {
  */
  */
 inline void GPUCommand::push_float(float v) {
 inline void GPUCommand::push_float(float v) {
   if (_current_index >= GPU_COMMAND_ENTRIES) {
   if (_current_index >= GPU_COMMAND_ENTRIES) {
-    gpucommand_cat.error() << "Out of bounds! Exceeded command size of " << GPU_COMMAND_ENTRIES << endl;
+    gpucommand_cat.error() << "Out of bounds! Exceeded command size of " << GPU_COMMAND_ENTRIES << std::endl;
     return;
     return;
   }
   }
   _data[_current_index++] = v;
   _data[_current_index++] = v;

+ 4 - 4
contrib/src/rplight/gpuCommand.cxx

@@ -57,13 +57,13 @@ GPUCommand::GPUCommand(CommandType command_type) {
  *   in mind that integers might be shown in their binary float representation,
  *   in mind that integers might be shown in their binary float representation,
  *   depending on the setting in the GPUCommand::convert_int_to_float method.
  *   depending on the setting in the GPUCommand::convert_int_to_float method.
  */
  */
-void GPUCommand::write(ostream &out) const {
-  out << "GPUCommand(type=" << _command_type << ", size=" << _current_index << ", data = {" << endl;
+void GPUCommand::write(std::ostream &out) const {
+  out << "GPUCommand(type=" << _command_type << ", size=" << _current_index << ", data = {" << std::endl;
   for (size_t k = 0; k < GPU_COMMAND_ENTRIES; ++k) {
   for (size_t k = 0; k < GPU_COMMAND_ENTRIES; ++k) {
     out << std::setw(12) << std::fixed << std::setprecision(5) << _data[k] << " ";
     out << std::setw(12) << std::fixed << std::setprecision(5) << _data[k] << " ";
-    if (k % 6 == 5 || k == GPU_COMMAND_ENTRIES - 1) out << endl;
+    if (k % 6 == 5 || k == GPU_COMMAND_ENTRIES - 1) out << std::endl;
   }
   }
-  out << "})" << endl;
+  out << "})" << std::endl;
 }
 }
 
 
 /**
 /**

+ 1 - 1
contrib/src/rplight/gpuCommand.h

@@ -73,7 +73,7 @@ PUBLISHED:
   inline static bool get_uses_integer_packing();
   inline static bool get_uses_integer_packing();
 
 
   void write_to(const PTA_uchar &dest, size_t command_index);
   void write_to(const PTA_uchar &dest, size_t command_index);
-  void write(ostream &out) const;
+  void write(std::ostream &out) const;
 
 
 private:
 private:
 
 

+ 4 - 2
contrib/src/rplight/iesDataset.cxx

@@ -27,7 +27,9 @@
 
 
 #include "iesDataset.h"
 #include "iesDataset.h"
 
 
+#ifndef _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
+#endif
 #include <math.h>
 #include <math.h>
 
 
 NotifyCategoryDef(iesdataset, "")
 NotifyCategoryDef(iesdataset, "")
@@ -139,7 +141,7 @@ float IESDataset::get_candela_value(float vertical_angle, float horizontal_angle
         iesdataset_cat.error() << "Invalid horizontal lerp: " << lerp
         iesdataset_cat.error() << "Invalid horizontal lerp: " << lerp
                      << ", requested angle was " << horizontal_angle
                      << ", requested angle was " << horizontal_angle
                      << ", prev = " << prev_angle << ", cur = " << curr_angle
                      << ", prev = " << prev_angle << ", cur = " << curr_angle
-                     << endl;
+                     << std::endl;
       }
       }
 
 
       return curr_value * lerp + prev_value * (1-lerp);
       return curr_value * lerp + prev_value * (1-lerp);
@@ -190,7 +192,7 @@ float IESDataset::get_vertical_candela_value(size_t horizontal_angle_idx, float
         iesdataset_cat.error() << "ERROR: Invalid vertical lerp: " << lerp
         iesdataset_cat.error() << "ERROR: Invalid vertical lerp: " << lerp
                      << ", requested angle was " << vertical_angle
                      << ", requested angle was " << vertical_angle
                      << ", prev = " << prev_angle << ", cur = " << curr_angle
                      << ", prev = " << prev_angle << ", cur = " << curr_angle
-                     << endl;
+                     << std::endl;
       }
       }
 
 
       return curr_value * lerp + prev_value * (1-lerp);
       return curr_value * lerp + prev_value * (1-lerp);

+ 5 - 3
contrib/src/rplight/internalLightManager.cxx

@@ -29,6 +29,8 @@
 
 
 #include <algorithm>
 #include <algorithm>
 
 
+using std::endl;
+
 NotifyCategoryDef(lightmgr, "");
 NotifyCategoryDef(lightmgr, "");
 
 
 
 
@@ -133,7 +135,7 @@ void InternalLightManager::setup_shadows(RPLight* light) {
   }
   }
 
 
   // Init all sources
   // Init all sources
-  for (int i = 0; i < num_sources; ++i) {
+  for (size_t i = 0; i < num_sources; ++i) {
     ShadowSource* source = light->get_shadow_source(i);
     ShadowSource* source = light->get_shadow_source(i);
 
 
     // Set the source as dirty, so it gets updated in the beginning
     // Set the source as dirty, so it gets updated in the beginning
@@ -355,7 +357,7 @@ bool InternalLightManager::compare_shadow_sources(const ShadowSource* a, const S
 void InternalLightManager::update_shadow_sources() {
 void InternalLightManager::update_shadow_sources() {
 
 
   // Find all dirty shadow sources and make a list of them
   // Find all dirty shadow sources and make a list of them
-  vector<ShadowSource*> sources_to_update;
+  std::vector<ShadowSource*> sources_to_update;
    for (auto iter = _shadow_sources.begin(); iter != _shadow_sources.end(); ++iter) {
    for (auto iter = _shadow_sources.begin(); iter != _shadow_sources.end(); ++iter) {
     ShadowSource* source = *iter;
     ShadowSource* source = *iter;
     if (source) {
     if (source) {
@@ -393,7 +395,7 @@ void InternalLightManager::update_shadow_sources() {
 
 
   // Free the regions of all sources which will get updated. We have to take into
   // Free the regions of all sources which will get updated. We have to take into
   // account that only a limited amount of sources can get updated per frame.
   // account that only a limited amount of sources can get updated per frame.
-  size_t update_slots = min(sources_to_update.size(),
+  size_t update_slots = std::min(sources_to_update.size(),
                 _shadow_manager->get_num_update_slots_left());
                 _shadow_manager->get_num_update_slots_left());
   for(size_t i = 0; i < update_slots; ++i) {
   for(size_t i = 0; i < update_slots; ++i) {
     if (sources_to_update[i]->has_region()) {
     if (sources_to_update[i]->has_region()) {

+ 2 - 2
contrib/src/rplight/pointerSlotStorage.h

@@ -170,7 +170,7 @@ public:
     _num_entries--;
     _num_entries--;
 
 
     // Update maximum index
     // Update maximum index
-    if (slot == _max_index) {
+    if ((int)slot == _max_index) {
       while (_max_index >= 0 && !_data[_max_index--]);
       while (_max_index >= 0 && !_data[_max_index--]);
     }
     }
   }
   }
@@ -203,7 +203,7 @@ public:
     nassertv(slot >= 0 && slot < SIZE);
     nassertv(slot >= 0 && slot < SIZE);
     nassertv(_data[slot] == nullptr); // Slot already taken!
     nassertv(_data[slot] == nullptr); // Slot already taken!
     nassertv(ptr != nullptr); // nullptr passed as argument!
     nassertv(ptr != nullptr); // nullptr passed as argument!
-    _max_index = max(_max_index, (int)slot);
+    _max_index = std::max(_max_index, (int)slot);
     _data[slot] = ptr;
     _data[slot] = ptr;
     _num_entries++;
     _num_entries++;
   }
   }

+ 2 - 0
contrib/src/rplight/pssmCameraRig.cxx

@@ -27,7 +27,9 @@
 
 
 #include "pssmCameraRig.h"
 #include "pssmCameraRig.h"
 
 
+#ifndef _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
+#endif
 #include <math.h>
 #include <math.h>
 #include "orthographicLens.h"
 #include "orthographicLens.h"
 
 

+ 2 - 2
contrib/src/rplight/rpLight.I

@@ -33,7 +33,7 @@
  *
  *
  * @return Amount of shadow sources
  * @return Amount of shadow sources
  */
  */
-inline int RPLight::get_num_shadow_sources() const {
+inline size_t RPLight::get_num_shadow_sources() const {
   return _shadow_sources.size();
   return _shadow_sources.size();
 }
 }
 
 
@@ -278,7 +278,7 @@ inline RPLight::LightType RPLight::get_light_type() const {
  */
  */
 inline void RPLight::set_casts_shadows(bool flag) {
 inline void RPLight::set_casts_shadows(bool flag) {
   if (has_slot()) {
   if (has_slot()) {
-    cerr << "Light is already attached, can not call set_casts_shadows!" << endl;
+    std::cerr << "Light is already attached, can not call set_casts_shadows!" << std::endl;
     return;
     return;
   }
   }
   _casts_shadows = flag;
   _casts_shadows = flag;

+ 2 - 2
contrib/src/rplight/rpLight.h

@@ -57,7 +57,7 @@ public:
   virtual void update_shadow_sources() = 0;
   virtual void update_shadow_sources() = 0;
   virtual void write_to_command(GPUCommand &cmd);
   virtual void write_to_command(GPUCommand &cmd);
 
 
-  inline int get_num_shadow_sources() const;
+  inline size_t get_num_shadow_sources() const;
   inline ShadowSource* get_shadow_source(size_t index) const;
   inline ShadowSource* get_shadow_source(size_t index) const;
   inline void clear_shadow_sources();
   inline void clear_shadow_sources();
 
 
@@ -122,7 +122,7 @@ protected:
   LightType _light_type;
   LightType _light_type;
   float _near_plane;
   float _near_plane;
 
 
-  vector<ShadowSource*> _shadow_sources;
+  std::vector<ShadowSource*> _shadow_sources;
 };
 };
 
 
 #include "rpLight.I"
 #include "rpLight.I"

+ 2 - 0
contrib/src/rplight/rpSpotLight.cxx

@@ -27,7 +27,9 @@
 
 
 #include "rpSpotLight.h"
 #include "rpSpotLight.h"
 
 
+#ifndef _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
+#endif
 #include <math.h>
 #include <math.h>
 
 
 
 

+ 1 - 1
contrib/src/rplight/shadowAtlas.I

@@ -118,7 +118,7 @@ inline int ShadowAtlas::get_required_tiles(size_t resolution) const {
 
 
   if (resolution % _tile_size != 0) {
   if (resolution % _tile_size != 0) {
     shadowatlas_cat.error() << "Resolution " << resolution << " is not a multiple "
     shadowatlas_cat.error() << "Resolution " << resolution << " is not a multiple "
-                << "of the shadow atlas tile size (" << _tile_size << ")!" << endl;
+                << "of the shadow atlas tile size (" << _tile_size << ")!" << std::endl;
     return 1;
     return 1;
   }
   }
   return resolution / _tile_size;
   return resolution / _tile_size;

+ 6 - 6
contrib/src/rplight/shadowAtlas.cxx

@@ -131,13 +131,13 @@ LVecBase4i ShadowAtlas::find_and_reserve_region(size_t tile_width, size_t tile_h
 
 
   // Check for empty region
   // Check for empty region
   if (tile_width < 1 || tile_height < 1) {
   if (tile_width < 1 || tile_height < 1) {
-    shadowatlas_cat.error() << "Called find_and_reserve_region with null-region!" << endl;
+    shadowatlas_cat.error() << "Called find_and_reserve_region with null-region!" << std::endl;
     return LVecBase4i(-1);
     return LVecBase4i(-1);
   }
   }
 
 
   // Check for region bigger than the shadow atlas
   // Check for region bigger than the shadow atlas
   if (tile_width > _num_tiles || tile_height > _num_tiles) {
   if (tile_width > _num_tiles || tile_height > _num_tiles) {
-    shadowatlas_cat.error() << "Requested region exceeds shadow atlas size!" << endl;
+    shadowatlas_cat.error() << "Requested region exceeds shadow atlas size!" << std::endl;
     return LVecBase4i(-1);
     return LVecBase4i(-1);
   }
   }
 
 
@@ -155,7 +155,7 @@ LVecBase4i ShadowAtlas::find_and_reserve_region(size_t tile_width, size_t tile_h
   // When we reached this part, we couldn't find a free region, so the atlas
   // When we reached this part, we couldn't find a free region, so the atlas
   // seems to be full.
   // seems to be full.
   shadowatlas_cat.error() << "Failed to find a free region of size " << tile_width
   shadowatlas_cat.error() << "Failed to find a free region of size " << tile_width
-              << " x " << tile_height << "!"  << endl;
+              << " x " << tile_height << "!"  << std::endl;
   return LVecBase4i(-1);
   return LVecBase4i(-1);
 }
 }
 
 
@@ -173,12 +173,12 @@ LVecBase4i ShadowAtlas::find_and_reserve_region(size_t tile_width, size_t tile_h
 void ShadowAtlas::free_region(const LVecBase4i& region) {
 void ShadowAtlas::free_region(const LVecBase4i& region) {
   // Out of bounds check, can't hurt
   // Out of bounds check, can't hurt
   nassertv(region.get_x() >= 0 && region.get_y() >= 0);
   nassertv(region.get_x() >= 0 && region.get_y() >= 0);
-  nassertv(region.get_x() + region.get_z() <= _num_tiles && region.get_y() + region.get_w() <= _num_tiles);
+  nassertv(region.get_x() + region.get_z() <= (int)_num_tiles && region.get_y() + region.get_w() <= (int)_num_tiles);
 
 
   _num_used_tiles -= region.get_z() * region.get_w();
   _num_used_tiles -= region.get_z() * region.get_w();
 
 
-  for (size_t x = 0; x < region.get_z(); ++x) {
-    for (size_t y = 0; y < region.get_w(); ++y) {
+  for (int x = 0; x < region.get_z(); ++x) {
+    for (int y = 0; y < region.get_w(); ++y) {
       // Could do an assert here, that the tile should have been used (=true) before
       // Could do an assert here, that the tile should have been used (=true) before
       set_tile(region.get_x() + x, region.get_y() + y, false);
       set_tile(region.get_x() + x, region.get_y() + y, false);
     }
     }

+ 2 - 2
contrib/src/rplight/shadowManager.I

@@ -52,7 +52,7 @@ inline void ShadowManager::set_max_updates(size_t max_updates) {
   nassertv(max_updates >= 0);
   nassertv(max_updates >= 0);
   nassertv(_atlas == nullptr);  // ShadowManager was already initialized
   nassertv(_atlas == nullptr);  // ShadowManager was already initialized
   if (max_updates == 0) {
   if (max_updates == 0) {
-    shadowmanager_cat.warning() << "max_updates set to 0, no shadows will be updated." << endl;
+    shadowmanager_cat.warning() << "max_updates set to 0, no shadows will be updated." << std::endl;
   }
   }
   _max_updates = max_updates;
   _max_updates = max_updates;
 }
 }
@@ -170,7 +170,7 @@ inline bool ShadowManager::add_update(const ShadowSource* source) {
 
 
   if (_queued_updates.size() >= _max_updates) {
   if (_queued_updates.size() >= _max_updates) {
     if (shadowmanager_cat.is_debug()) {
     if (shadowmanager_cat.is_debug()) {
-      shadowmanager_cat.debug() << "cannot update source, out of update slots" << endl;
+      shadowmanager_cat.debug() << "cannot update source, out of update slots" << std::endl;
     }
     }
     return false;
     return false;
   }
   }

+ 5 - 5
contrib/src/rplight/tagStateManager.I

@@ -35,7 +35,7 @@
  * @param source Camera which will be used to render shadows
  * @param source Camera which will be used to render shadows
  */
  */
 inline void TagStateManager::
 inline void TagStateManager::
-register_camera(const string& name, Camera* source) {
+register_camera(const std::string& name, Camera* source) {
   ContainerList::iterator entry = _containers.find(name);
   ContainerList::iterator entry = _containers.find(name);
   nassertv(entry != _containers.end());
   nassertv(entry != _containers.end());
   register_camera(entry->second, source);
   register_camera(entry->second, source);
@@ -49,7 +49,7 @@ register_camera(const string& name, Camera* source) {
  * @param source Camera to unregister
  * @param source Camera to unregister
  */
  */
 inline void TagStateManager::
 inline void TagStateManager::
-unregister_camera(const string& name, Camera* source) {
+unregister_camera(const std::string& name, Camera* source) {
   ContainerList::iterator entry = _containers.find(name);
   ContainerList::iterator entry = _containers.find(name);
   nassertv(entry != _containers.end());
   nassertv(entry != _containers.end());
   unregister_camera(entry->second, source);
   unregister_camera(entry->second, source);
@@ -67,8 +67,8 @@ unregister_camera(const string& name, Camera* source) {
  * @param sort Determines the sort with which the shader will be applied.
  * @param sort Determines the sort with which the shader will be applied.
  */
  */
 inline void TagStateManager::
 inline void TagStateManager::
-apply_state(const string& state, NodePath np, Shader* shader,
-            const string &name, int sort) {
+apply_state(const std::string& state, NodePath np, Shader* shader,
+            const std::string &name, int sort) {
   ContainerList::iterator entry = _containers.find(state);
   ContainerList::iterator entry = _containers.find(state);
   nassertv(entry != _containers.end());
   nassertv(entry != _containers.end());
   apply_state(entry->second, np, shader, name, sort);
   apply_state(entry->second, np, shader, name, sort);
@@ -83,7 +83,7 @@ apply_state(const string& state, NodePath np, Shader* shader,
  * @return Bit mask of the render pass
  * @return Bit mask of the render pass
  */
  */
 inline BitMask32 TagStateManager::
 inline BitMask32 TagStateManager::
-get_mask(const string &container_name) {
+get_mask(const std::string &container_name) {
   if (container_name == "gbuffer") {
   if (container_name == "gbuffer") {
     return BitMask32::bit(1);
     return BitMask32::bit(1);
   }
   }

+ 3 - 1
contrib/src/rplight/tagStateManager.cxx

@@ -27,6 +27,8 @@
 
 
 #include "tagStateManager.h"
 #include "tagStateManager.h"
 
 
+using std::endl;
+
 
 
 NotifyCategoryDef(tagstatemgr, "");
 NotifyCategoryDef(tagstatemgr, "");
 
 
@@ -77,7 +79,7 @@ TagStateManager::
  */
  */
 void TagStateManager::
 void TagStateManager::
 apply_state(StateContainer& container, NodePath np, Shader* shader,
 apply_state(StateContainer& container, NodePath np, Shader* shader,
-            const string &name, int sort) {
+            const std::string &name, int sort) {
   if (tagstatemgr_cat.is_spam()) {
   if (tagstatemgr_cat.is_spam()) {
     tagstatemgr_cat.spam() << "Constructing new state " << name
     tagstatemgr_cat.spam() << "Constructing new state " << name
                  << " with shader " << shader << endl;
                  << " with shader " << shader << endl;

+ 10 - 10
contrib/src/rplight/tagStateManager.h

@@ -52,36 +52,36 @@ PUBLISHED:
   TagStateManager(NodePath main_cam_node);
   TagStateManager(NodePath main_cam_node);
   ~TagStateManager();
   ~TagStateManager();
 
 
-  inline void apply_state(const string& state, NodePath np, Shader* shader, const string &name, int sort);
+  inline void apply_state(const std::string& state, NodePath np, Shader* shader, const std::string &name, int sort);
   void cleanup_states();
   void cleanup_states();
 
 
-  inline void register_camera(const string& state, Camera* source);
-  inline void unregister_camera(const string& state, Camera* source);
-  inline BitMask32 get_mask(const string &container_name);
+  inline void register_camera(const std::string& state, Camera* source);
+  inline void unregister_camera(const std::string& state, Camera* source);
+  inline BitMask32 get_mask(const std::string &container_name);
 
 
 private:
 private:
-  typedef vector<Camera*> CameraList;
-  typedef pmap<string, CPT(RenderState)> TagStateList;
+  typedef std::vector<Camera*> CameraList;
+  typedef pmap<std::string, CPT(RenderState)> TagStateList;
 
 
   struct StateContainer {
   struct StateContainer {
     CameraList cameras;
     CameraList cameras;
     TagStateList tag_states;
     TagStateList tag_states;
-    string tag_name;
+    std::string tag_name;
     BitMask32 mask;
     BitMask32 mask;
     bool write_color;
     bool write_color;
 
 
     StateContainer() {};
     StateContainer() {};
-    StateContainer(const string &tag_name, size_t mask, bool write_color)
+    StateContainer(const std::string &tag_name, size_t mask, bool write_color)
       : tag_name(tag_name), mask(BitMask32::bit(mask)), write_color(write_color) {};
       : tag_name(tag_name), mask(BitMask32::bit(mask)), write_color(write_color) {};
   };
   };
 
 
   void apply_state(StateContainer& container, NodePath np, Shader* shader,
   void apply_state(StateContainer& container, NodePath np, Shader* shader,
-                   const string& name, int sort);
+                   const std::string& name, int sort);
   void cleanup_container_states(StateContainer& container);
   void cleanup_container_states(StateContainer& container);
   void register_camera(StateContainer &container, Camera* source);
   void register_camera(StateContainer &container, Camera* source);
   void unregister_camera(StateContainer &container, Camera* source);
   void unregister_camera(StateContainer &container, Camera* source);
 
 
-  typedef pmap<string, StateContainer> ContainerList;
+  typedef pmap<std::string, StateContainer> ContainerList;
   ContainerList _containers;
   ContainerList _containers;
 
 
   NodePath _main_cam_node;
   NodePath _main_cam_node;

+ 3 - 0
direct/src/dcparse/dcparse.cxx

@@ -19,6 +19,9 @@
 #include "indent.h"
 #include "indent.h"
 #include "panda_getopt.h"
 #include "panda_getopt.h"
 
 
+using std::cerr;
+using std::cout;
+
 void
 void
 usage() {
 usage() {
   cerr <<
   cerr <<

+ 4 - 2
direct/src/dcparser/dcArrayParameter.cxx

@@ -16,6 +16,8 @@
 #include "dcClassParameter.h"
 #include "dcClassParameter.h"
 #include "hashGenerator.h"
 #include "hashGenerator.h"
 
 
+using std::string;
+
 /**
 /**
  *
  *
  */
  */
@@ -201,13 +203,13 @@ validate_num_nested_fields(int num_nested_fields) const {
  * identifier.
  * identifier.
  */
  */
 void DCArrayParameter::
 void DCArrayParameter::
-output_instance(ostream &out, bool brief, const string &prename,
+output_instance(std::ostream &out, bool brief, const string &prename,
                 const string &name, const string &postname) const {
                 const string &name, const string &postname) const {
   if (get_typedef() != nullptr) {
   if (get_typedef() != nullptr) {
     output_typedef_name(out, brief, prename, name, postname);
     output_typedef_name(out, brief, prename, name, postname);
 
 
   } else {
   } else {
-    ostringstream strm;
+    std::ostringstream strm;
 
 
     strm << "[";
     strm << "[";
     _array_size_range.output(strm);
     _array_size_range.output(strm);

+ 4 - 4
direct/src/dcparser/dcArrayParameter.h

@@ -46,14 +46,14 @@ public:
   virtual DCPackerInterface *get_nested_field(int n) const;
   virtual DCPackerInterface *get_nested_field(int n) const;
   virtual bool validate_num_nested_fields(int num_nested_fields) const;
   virtual bool validate_num_nested_fields(int num_nested_fields) const;
 
 
-  virtual void output_instance(ostream &out, bool brief, const string &prename,
-                               const string &name, const string &postname) const;
+  virtual void output_instance(std::ostream &out, bool brief, const std::string &prename,
+                               const std::string &name, const std::string &postname) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
-  virtual void pack_string(DCPackData &pack_data, const string &value,
+  virtual void pack_string(DCPackData &pack_data, const std::string &value,
                            bool &pack_error, bool &range_error) const;
                            bool &pack_error, bool &range_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
   virtual void unpack_string(const char *data, size_t length, size_t &p,
   virtual void unpack_string(const char *data, size_t length, size_t &p,
-                             string &value, bool &pack_error, bool &range_error) const;
+                             std::string &value, bool &pack_error, bool &range_error) const;
 
 
 protected:
 protected:
   virtual bool do_check_match(const DCPackerInterface *other) const;
   virtual bool do_check_match(const DCPackerInterface *other) const;

+ 5 - 3
direct/src/dcparser/dcAtomicField.cxx

@@ -19,6 +19,8 @@
 
 
 #include <math.h>
 #include <math.h>
 
 
+using std::string;
+
 /**
 /**
  *
  *
  */
  */
@@ -151,7 +153,7 @@ get_element_divisor(int n) const {
  *
  *
  */
  */
 void DCAtomicField::
 void DCAtomicField::
-output(ostream &out, bool brief) const {
+output(std::ostream &out, bool brief) const {
   out << _name << "(";
   out << _name << "(";
 
 
   if (!_elements.empty()) {
   if (!_elements.empty()) {
@@ -174,7 +176,7 @@ output(ostream &out, bool brief) const {
  * stream.
  * stream.
  */
  */
 void DCAtomicField::
 void DCAtomicField::
-write(ostream &out, bool brief, int indent_level) const {
+write(std::ostream &out, bool brief, int indent_level) const {
   indent(out, indent_level);
   indent(out, indent_level);
   output(out, brief);
   output(out, brief);
   out << ";";
   out << ";";
@@ -270,7 +272,7 @@ do_check_match_atomic_field(const DCAtomicField *other) const {
  *
  *
  */
  */
 void DCAtomicField::
 void DCAtomicField::
-output_element(ostream &out, bool brief, DCParameter *element) const {
+output_element(std::ostream &out, bool brief, DCParameter *element) const {
   element->output(out, brief);
   element->output(out, brief);
 
 
   if (!brief && element->has_default_value()) {
   if (!brief && element->has_default_value()) {

+ 6 - 6
direct/src/dcparser/dcAtomicField.h

@@ -29,7 +29,7 @@
  */
  */
 class DCAtomicField : public DCField {
 class DCAtomicField : public DCField {
 public:
 public:
-  DCAtomicField(const string &name, DCClass *dclass, bool bogus_field);
+  DCAtomicField(const std::string &name, DCClass *dclass, bool bogus_field);
   virtual ~DCAtomicField();
   virtual ~DCAtomicField();
 
 
 PUBLISHED:
 PUBLISHED:
@@ -40,17 +40,17 @@ PUBLISHED:
   DCParameter *get_element(int n) const;
   DCParameter *get_element(int n) const;
 
 
   // These five methods are deprecated and will be removed soon.
   // These five methods are deprecated and will be removed soon.
-  string get_element_default(int n) const;
+  std::string get_element_default(int n) const;
   bool has_element_default(int n) const;
   bool has_element_default(int n) const;
-  string get_element_name(int n) const;
+  std::string get_element_name(int n) const;
   DCSubatomicType get_element_type(int n) const;
   DCSubatomicType get_element_type(int n) const;
   int get_element_divisor(int n) const;
   int get_element_divisor(int n) const;
 
 
 public:
 public:
   void add_element(DCParameter *element);
   void add_element(DCParameter *element);
 
 
-  virtual void output(ostream &out, bool brief) const;
-  virtual void write(ostream &out, bool brief, int indent_level) const;
+  virtual void output(std::ostream &out, bool brief) const;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
 
 
   virtual DCPackerInterface *get_nested_field(int n) const;
   virtual DCPackerInterface *get_nested_field(int n) const;
@@ -60,7 +60,7 @@ protected:
   virtual bool do_check_match_atomic_field(const DCAtomicField *other) const;
   virtual bool do_check_match_atomic_field(const DCAtomicField *other) const;
 
 
 private:
 private:
-  void output_element(ostream &out, bool brief, DCParameter *element) const;
+  void output_element(std::ostream &out, bool brief, DCParameter *element) const;
 
 
   typedef pvector<DCParameter *> Elements;
   typedef pvector<DCParameter *> Elements;
   Elements _elements;
   Elements _elements;

+ 1 - 1
direct/src/dcparser/dcClass.I

@@ -22,7 +22,7 @@ get_dc_file() const {
 /**
 /**
  * Returns the name of this class.
  * Returns the name of this class.
  */
  */
-INLINE const string &DCClass::
+INLINE const std::string &DCClass::
 get_name() const {
 get_name() const {
   return _name;
   return _name;
 }
 }

+ 7 - 3
direct/src/dcparser/dcClass.cxx

@@ -25,6 +25,10 @@
 #include "py_panda.h"
 #include "py_panda.h"
 #endif
 #endif
 
 
+using std::ostream;
+using std::ostringstream;
+using std::string;
+
 #ifdef WITHIN_PANDA
 #ifdef WITHIN_PANDA
 #include "pStatTimer.h"
 #include "pStatTimer.h"
 
 
@@ -177,9 +181,9 @@ DCField *DCClass::
 get_field(int n) const {
 get_field(int n) const {
   #ifndef NDEBUG //[
   #ifndef NDEBUG //[
   if (n < 0 || n >= (int)_fields.size()) {
   if (n < 0 || n >= (int)_fields.size()) {
-    cerr << *this << " "
+    std::cerr << *this << " "
          << "n:" << n << " _fields.size():"
          << "n:" << n << " _fields.size():"
-         << (int)_fields.size() << endl;
+         << (int)_fields.size() << std::endl;
     // __asm { int 3 }
     // __asm { int 3 }
   }
   }
   #endif //]
   #endif //]
@@ -749,7 +753,7 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
   if (result == nullptr) {
   if (result == nullptr) {
     // We don't set this as an exception, since presumably the Python method
     // We don't set this as an exception, since presumably the Python method
     // itself has already triggered a Python exception.
     // itself has already triggered a Python exception.
-    cerr << "Error when calling " << getter_name << "\n";
+    std::cerr << "Error when calling " << getter_name << "\n";
     return false;
     return false;
   }
   }
 
 

+ 17 - 17
direct/src/dcparser/dcClass.h

@@ -43,7 +43,7 @@ class DCParameter;
  */
  */
 class DCClass : public DCDeclaration {
 class DCClass : public DCDeclaration {
 public:
 public:
-  DCClass(DCFile *dc_file, const string &name,
+  DCClass(DCFile *dc_file, const std::string &name,
           bool is_struct, bool bogus_class);
           bool is_struct, bool bogus_class);
   ~DCClass();
   ~DCClass();
 
 
@@ -53,7 +53,7 @@ PUBLISHED:
 
 
   INLINE DCFile *get_dc_file() const;
   INLINE DCFile *get_dc_file() const;
 
 
-  INLINE const string &get_name() const;
+  INLINE const std::string &get_name() const;
   INLINE int get_number() const;
   INLINE int get_number() const;
 
 
   int get_num_parents() const;
   int get_num_parents() const;
@@ -65,7 +65,7 @@ PUBLISHED:
   int get_num_fields() const;
   int get_num_fields() const;
   DCField *get_field(int n) const;
   DCField *get_field(int n) const;
 
 
-  DCField *get_field_by_name(const string &name) const;
+  DCField *get_field_by_name(const std::string &name) const;
   DCField *get_field_by_index(int index_number) const;
   DCField *get_field_by_index(int index_number) const;
 
 
   int get_num_inherited_fields() const;
   int get_num_inherited_fields() const;
@@ -78,7 +78,7 @@ PUBLISHED:
   INLINE void start_generate();
   INLINE void start_generate();
   INLINE void stop_generate();
   INLINE void stop_generate();
 
 
-  virtual void output(ostream &out) const;
+  virtual void output(std::ostream &out) const;
 
 
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
   bool has_class_def() const;
   bool has_class_def() const;
@@ -94,9 +94,9 @@ PUBLISHED:
   void receive_update_all_required(PyObject *distobj, DatagramIterator &di) const;
   void receive_update_all_required(PyObject *distobj, DatagramIterator &di) const;
   void receive_update_other(PyObject *distobj, DatagramIterator &di) const;
   void receive_update_other(PyObject *distobj, DatagramIterator &di) const;
 
 
-  void direct_update(PyObject *distobj, const string &field_name,
-                     const string &value_blob);
-  void direct_update(PyObject *distobj, const string &field_name,
+  void direct_update(PyObject *distobj, const std::string &field_name,
+                     const std::string &value_blob);
+  void direct_update(PyObject *distobj, const std::string &field_name,
                      const Datagram &datagram);
                      const Datagram &datagram);
   bool pack_required_field(Datagram &datagram, PyObject *distobj,
   bool pack_required_field(Datagram &datagram, PyObject *distobj,
                            const DCField *field) const;
                            const DCField *field) const;
@@ -105,11 +105,11 @@ PUBLISHED:
 
 
 
 
 
 
-  Datagram client_format_update(const string &field_name,
+  Datagram client_format_update(const std::string &field_name,
                                 DOID_TYPE do_id, PyObject *args) const;
                                 DOID_TYPE do_id, PyObject *args) const;
-  Datagram ai_format_update(const string &field_name, DOID_TYPE do_id,
+  Datagram ai_format_update(const std::string &field_name, DOID_TYPE do_id,
                             CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, PyObject *args) const;
                             CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, PyObject *args) const;
-  Datagram ai_format_update_msg_type(const string &field_name, DOID_TYPE do_id,
+  Datagram ai_format_update_msg_type(const std::string &field_name, DOID_TYPE do_id,
                             CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, int msg_type, PyObject *args) const;
                             CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, int msg_type, PyObject *args) const;
   Datagram ai_format_generate(PyObject *distobj, DOID_TYPE do_id, ZONEID_TYPE parent_id, ZONEID_TYPE zone_id,
   Datagram ai_format_generate(PyObject *distobj, DOID_TYPE do_id, ZONEID_TYPE parent_id, ZONEID_TYPE zone_id,
                               CHANNEL_TYPE district_channel_id, CHANNEL_TYPE from_channel_id,
                               CHANNEL_TYPE district_channel_id, CHANNEL_TYPE from_channel_id,
@@ -120,10 +120,10 @@ PUBLISHED:
 #endif
 #endif
 
 
 public:
 public:
-  virtual void output(ostream &out, bool brief) const;
-  virtual void write(ostream &out, bool brief, int indent_level) const;
-  void output_instance(ostream &out, bool brief, const string &prename,
-                       const string &name, const string &postname) const;
+  virtual void output(std::ostream &out, bool brief) const;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const;
+  void output_instance(std::ostream &out, bool brief, const std::string &prename,
+                       const std::string &name, const std::string &postname) const;
   void generate_hash(HashGenerator &hashgen) const;
   void generate_hash(HashGenerator &hashgen) const;
   void clear_inherited_fields();
   void clear_inherited_fields();
   void rebuild_inherited_fields();
   void rebuild_inherited_fields();
@@ -133,7 +133,7 @@ public:
   void set_number(int number);
   void set_number(int number);
 
 
 private:
 private:
-  void shadow_inherited_field(const string &name);
+  void shadow_inherited_field(const std::string &name);
 
 
 #ifdef WITHIN_PANDA
 #ifdef WITHIN_PANDA
   PStatCollector _class_update_pcollector;
   PStatCollector _class_update_pcollector;
@@ -144,7 +144,7 @@ private:
 
 
   DCFile *_dc_file;
   DCFile *_dc_file;
 
 
-  string _name;
+  std::string _name;
   bool _is_struct;
   bool _is_struct;
   bool _bogus_class;
   bool _bogus_class;
   int _number;
   int _number;
@@ -157,7 +157,7 @@ private:
   typedef pvector<DCField *> Fields;
   typedef pvector<DCField *> Fields;
   Fields _fields, _inherited_fields;
   Fields _fields, _inherited_fields;
 
 
-  typedef pmap<string, DCField *> FieldsByName;
+  typedef pmap<std::string, DCField *> FieldsByName;
   FieldsByName _fields_by_name;
   FieldsByName _fields_by_name;
 
 
   typedef pmap<int, DCField *> FieldsByIndex;
   typedef pmap<int, DCField *> FieldsByIndex;

+ 2 - 2
direct/src/dcparser/dcClassParameter.cxx

@@ -128,8 +128,8 @@ get_nested_field(int n) const {
  * identifier.
  * identifier.
  */
  */
 void DCClassParameter::
 void DCClassParameter::
-output_instance(ostream &out, bool brief, const string &prename,
-                const string &name, const string &postname) const {
+output_instance(std::ostream &out, bool brief, const std::string &prename,
+                const std::string &name, const std::string &postname) const {
   if (get_typedef() != nullptr) {
   if (get_typedef() != nullptr) {
     output_typedef_name(out, brief, prename, name, postname);
     output_typedef_name(out, brief, prename, name, postname);
 
 

+ 2 - 2
direct/src/dcparser/dcClassParameter.h

@@ -39,8 +39,8 @@ PUBLISHED:
 public:
 public:
   virtual DCPackerInterface *get_nested_field(int n) const;
   virtual DCPackerInterface *get_nested_field(int n) const;
 
 
-  virtual void output_instance(ostream &out, bool brief, const string &prename,
-                               const string &name, const string &postname) const;
+  virtual void output_instance(std::ostream &out, bool brief, const std::string &prename,
+                               const std::string &name, const std::string &postname) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
 
 
 protected:
 protected:

+ 2 - 2
direct/src/dcparser/dcDeclaration.cxx

@@ -57,7 +57,7 @@ as_switch() const {
  * Write a string representation of this instance to <out>.
  * Write a string representation of this instance to <out>.
  */
  */
 void DCDeclaration::
 void DCDeclaration::
-output(ostream &out) const {
+output(std::ostream &out) const {
   output(out, true);
   output(out, true);
 }
 }
 
 
@@ -65,6 +65,6 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  * Write a string representation of this instance to <out>.
  */
  */
 void DCDeclaration::
 void DCDeclaration::
-write(ostream &out, int indent_level) const {
+write(std::ostream &out, int indent_level) const {
   write(out, false, indent_level);
   write(out, false, indent_level);
 }
 }

+ 5 - 5
direct/src/dcparser/dcDeclaration.h

@@ -36,15 +36,15 @@ PUBLISHED:
   virtual DCSwitch *as_switch();
   virtual DCSwitch *as_switch();
   virtual const DCSwitch *as_switch() const;
   virtual const DCSwitch *as_switch() const;
 
 
-  virtual void output(ostream &out) const;
-  void write(ostream &out, int indent_level) const;
+  virtual void output(std::ostream &out) const;
+  void write(std::ostream &out, int indent_level) const;
 
 
 public:
 public:
-  virtual void output(ostream &out, bool brief) const=0;
-  virtual void write(ostream &out, bool brief, int indent_level) const=0;
+  virtual void output(std::ostream &out, bool brief) const=0;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const=0;
 };
 };
 
 
-INLINE ostream &operator << (ostream &out, const DCDeclaration &decl) {
+INLINE std::ostream &operator << (std::ostream &out, const DCDeclaration &decl) {
   decl.output(out);
   decl.output(out);
   return out;
   return out;
 }
 }

+ 4 - 4
direct/src/dcparser/dcField.I

@@ -42,7 +42,7 @@ has_default_value() const {
  * explicitly set (e.g.  has_default_value() returns true), returns that
  * explicitly set (e.g.  has_default_value() returns true), returns that
  * value; otherwise, returns an implicit default for the field.
  * value; otherwise, returns an implicit default for the field.
  */
  */
-INLINE const string &DCField::
+INLINE const std::string &DCField::
 get_default_value() const {
 get_default_value() const {
   if (_default_value_stale) {
   if (_default_value_stale) {
     ((DCField *)this)->refresh_default_value();
     ((DCField *)this)->refresh_default_value();
@@ -138,7 +138,7 @@ is_airecv() const {
  * Write a string representation of this instance to <out>.
  * Write a string representation of this instance to <out>.
  */
  */
 INLINE void DCField::
 INLINE void DCField::
-output(ostream &out) const {
+output(std::ostream &out) const {
   output(out, true);
   output(out, true);
 }
 }
 
 
@@ -146,7 +146,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  * Write a string representation of this instance to <out>.
  */
  */
 INLINE void DCField::
 INLINE void DCField::
-write(ostream &out, int indent_level) const {
+write(std::ostream &out, int indent_level) const {
   write(out, false, indent_level);
   write(out, false, indent_level);
 }
 }
 
 
@@ -172,7 +172,7 @@ set_class(DCClass *dclass) {
  * Establishes a default value for this field.
  * Establishes a default value for this field.
  */
  */
 INLINE void DCField::
 INLINE void DCField::
-set_default_value(const string &default_value) {
+set_default_value(const std::string &default_value) {
   _default_value = default_value;
   _default_value = default_value;
   _has_default_value = true;
   _has_default_value = true;
   _default_value_stale = false;
   _default_value_stale = false;

+ 6 - 4
direct/src/dcparser/dcField.cxx

@@ -26,6 +26,8 @@
 #include "pStatTimer.h"
 #include "pStatTimer.h"
 #endif
 #endif
 
 
+using std::string;
+
 /**
 /**
  *
  *
  */
  */
@@ -232,7 +234,7 @@ pack_args(DCPacker &packer, PyObject *sequence) const {
   }
   }
 
 
   if (!Notify::ptr()->has_assert_failed()) {
   if (!Notify::ptr()->has_assert_failed()) {
-    ostringstream strm;
+    std::ostringstream strm;
     PyObject *exc_type = PyExc_Exception;
     PyObject *exc_type = PyExc_Exception;
 
 
     if (as_parameter() != nullptr) {
     if (as_parameter() != nullptr) {
@@ -303,7 +305,7 @@ unpack_args(DCPacker &packer) const {
   }
   }
 
 
   if (!Notify::ptr()->has_assert_failed()) {
   if (!Notify::ptr()->has_assert_failed()) {
-    ostringstream strm;
+    std::ostringstream strm;
     PyObject *exc_type = PyExc_Exception;
     PyObject *exc_type = PyExc_Exception;
 
 
     if (packer.had_pack_error()) {
     if (packer.had_pack_error()) {
@@ -315,7 +317,7 @@ unpack_args(DCPacker &packer) const {
       dg.dump_hex(strm);
       dg.dump_hex(strm);
       size_t error_byte = packer.get_num_unpacked_bytes() - start_byte;
       size_t error_byte = packer.get_num_unpacked_bytes() - start_byte;
       strm << "Error detected on byte " << error_byte
       strm << "Error detected on byte " << error_byte
-           << " (" << hex << error_byte << dec << " hex)";
+           << " (" << std::hex << error_byte << std::dec << " hex)";
 
 
       exc_type = PyExc_RuntimeError;
       exc_type = PyExc_RuntimeError;
     } else {
     } else {
@@ -562,7 +564,7 @@ refresh_default_value() {
   packer.begin_pack(this);
   packer.begin_pack(this);
   packer.pack_default_value();
   packer.pack_default_value();
   if (!packer.end_pack()) {
   if (!packer.end_pack()) {
-    cerr << "Error while packing default value for " << get_name() << "\n";
+    std::cerr << "Error while packing default value for " << get_name() << "\n";
   } else {
   } else {
     _default_value.assign(packer.get_data(), packer.get_length());
     _default_value.assign(packer.get_data(), packer.get_length());
   }
   }

+ 14 - 14
direct/src/dcparser/dcField.h

@@ -37,7 +37,7 @@ class HashGenerator;
 class DCField : public DCPackerInterface, public DCKeywordList {
 class DCField : public DCPackerInterface, public DCKeywordList {
 public:
 public:
   DCField();
   DCField();
-  DCField(const string &name, DCClass *dclass);
+  DCField(const std::string &name, DCClass *dclass);
   virtual ~DCField();
   virtual ~DCField();
 
 
 PUBLISHED:
 PUBLISHED:
@@ -53,13 +53,13 @@ PUBLISHED:
   virtual DCParameter *as_parameter();
   virtual DCParameter *as_parameter();
   virtual const DCParameter *as_parameter() const;
   virtual const DCParameter *as_parameter() const;
 
 
-  string format_data(const string &packed_data, bool show_field_names = true);
-  string parse_string(const string &formatted_string);
+  std::string format_data(const std::string &packed_data, bool show_field_names = true);
+  std::string parse_string(const std::string &formatted_string);
 
 
-  bool validate_ranges(const string &packed_data) const;
+  bool validate_ranges(const std::string &packed_data) const;
 
 
   INLINE bool has_default_value() const;
   INLINE bool has_default_value() const;
-  INLINE const string &get_default_value() const;
+  INLINE const std::string &get_default_value() const;
 
 
   INLINE bool is_bogus_field() const;
   INLINE bool is_bogus_field() const;
 
 
@@ -73,8 +73,8 @@ PUBLISHED:
   INLINE bool is_ownrecv() const;
   INLINE bool is_ownrecv() const;
   INLINE bool is_airecv() const;
   INLINE bool is_airecv() const;
 
 
-  INLINE void output(ostream &out) const;
-  INLINE void write(ostream &out, int indent_level) const;
+  INLINE void output(std::ostream &out) const;
+  INLINE void write(std::ostream &out, int indent_level) const;
 
 
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
   bool pack_args(DCPacker &packer, PyObject *sequence) const;
   bool pack_args(DCPacker &packer, PyObject *sequence) const;
@@ -90,18 +90,18 @@ PUBLISHED:
 #endif
 #endif
 
 
 public:
 public:
-  virtual void output(ostream &out, bool brief) const=0;
-  virtual void write(ostream &out, bool brief, int indent_level) const=0;
+  virtual void output(std::ostream &out, bool brief) const=0;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const=0;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
-  virtual void set_name(const string &name);
+  virtual void set_name(const std::string &name);
 
 
   INLINE void set_number(int number);
   INLINE void set_number(int number);
   INLINE void set_class(DCClass *dclass);
   INLINE void set_class(DCClass *dclass);
-  INLINE void set_default_value(const string &default_value);
+  INLINE void set_default_value(const std::string &default_value);
 
 
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
-  static string get_pystr(PyObject *value);
+  static std::string get_pystr(PyObject *value);
 #endif
 #endif
 
 
 protected:
 protected:
@@ -115,14 +115,14 @@ protected:
   bool _bogus_field;
   bool _bogus_field;
 
 
 private:
 private:
-  string _default_value;
+  std::string _default_value;
 
 
 #ifdef WITHIN_PANDA
 #ifdef WITHIN_PANDA
   PStatCollector _field_update_pcollector;
   PStatCollector _field_update_pcollector;
 #endif
 #endif
 };
 };
 
 
-INLINE ostream &operator << (ostream &out, const DCField &field) {
+INLINE std::ostream &operator << (std::ostream &out, const DCField &field) {
   field.output(out);
   field.output(out);
   return out;
   return out;
 }
 }

+ 6 - 3
direct/src/dcparser/dcFile.cxx

@@ -28,6 +28,9 @@
 #include "configVariableList.h"
 #include "configVariableList.h"
 #endif
 #endif
 
 
+using std::cerr;
+using std::string;
+
 
 
 /**
 /**
  *
  *
@@ -122,7 +125,7 @@ read(Filename filename) {
 #ifdef WITHIN_PANDA
 #ifdef WITHIN_PANDA
   filename.set_text();
   filename.set_text();
   VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
   VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
-  istream *in = vfs->open_read_file(filename, true);
+  std::istream *in = vfs->open_read_file(filename, true);
   if (in == nullptr) {
   if (in == nullptr) {
     cerr << "Cannot open " << filename << " for reading.\n";
     cerr << "Cannot open " << filename << " for reading.\n";
     return false;
     return false;
@@ -163,7 +166,7 @@ read(Filename filename) {
  * (in which case the file might have been partially read).
  * (in which case the file might have been partially read).
  */
  */
 bool DCFile::
 bool DCFile::
-read(istream &in, const string &filename) {
+read(std::istream &in, const string &filename) {
   cerr << "DCFile::read of " << filename << "\n";
   cerr << "DCFile::read of " << filename << "\n";
   dc_init_parser(in, filename, *this);
   dc_init_parser(in, filename, *this);
   dcyyparse();
   dcyyparse();
@@ -203,7 +206,7 @@ write(Filename filename, bool brief) const {
  * Returns true if the description is successfully written, false otherwise.
  * Returns true if the description is successfully written, false otherwise.
  */
  */
 bool DCFile::
 bool DCFile::
-write(ostream &out, bool brief) const {
+write(std::ostream &out, bool brief) const {
   if (!_imports.empty()) {
   if (!_imports.empty()) {
     Imports::const_iterator ii;
     Imports::const_iterator ii;
     for (ii = _imports.begin(); ii != _imports.end(); ++ii) {
     for (ii = _imports.begin(); ii != _imports.end(); ++ii) {

+ 15 - 15
direct/src/dcparser/dcFile.h

@@ -41,32 +41,32 @@ PUBLISHED:
 #endif
 #endif
 
 
   bool read(Filename filename);
   bool read(Filename filename);
-  bool read(istream &in, const string &filename = string());
+  bool read(std::istream &in, const std::string &filename = std::string());
 
 
   bool write(Filename filename, bool brief) const;
   bool write(Filename filename, bool brief) const;
-  bool write(ostream &out, bool brief) const;
+  bool write(std::ostream &out, bool brief) const;
 
 
   int get_num_classes() const;
   int get_num_classes() const;
   DCClass *get_class(int n) const;
   DCClass *get_class(int n) const;
-  DCClass *get_class_by_name(const string &name) const;
-  DCSwitch *get_switch_by_name(const string &name) const;
+  DCClass *get_class_by_name(const std::string &name) const;
+  DCSwitch *get_switch_by_name(const std::string &name) const;
 
 
   DCField *get_field_by_index(int index_number) const;
   DCField *get_field_by_index(int index_number) const;
 
 
   INLINE bool all_objects_valid() const;
   INLINE bool all_objects_valid() const;
 
 
   int get_num_import_modules() const;
   int get_num_import_modules() const;
-  string get_import_module(int n) const;
+  std::string get_import_module(int n) const;
   int get_num_import_symbols(int n) const;
   int get_num_import_symbols(int n) const;
-  string get_import_symbol(int n, int i) const;
+  std::string get_import_symbol(int n, int i) const;
 
 
   int get_num_typedefs() const;
   int get_num_typedefs() const;
   DCTypedef *get_typedef(int n) const;
   DCTypedef *get_typedef(int n) const;
-  DCTypedef *get_typedef_by_name(const string &name) const;
+  DCTypedef *get_typedef_by_name(const std::string &name) const;
 
 
   int get_num_keywords() const;
   int get_num_keywords() const;
   const DCKeyword *get_keyword(int n) const;
   const DCKeyword *get_keyword(int n) const;
-  const DCKeyword *get_keyword_by_name(const string &name) const;
+  const DCKeyword *get_keyword_by_name(const std::string &name) const;
 
 
   unsigned long get_hash() const;
   unsigned long get_hash() const;
 
 
@@ -74,10 +74,10 @@ public:
   void generate_hash(HashGenerator &hashgen) const;
   void generate_hash(HashGenerator &hashgen) const;
   bool add_class(DCClass *dclass);
   bool add_class(DCClass *dclass);
   bool add_switch(DCSwitch *dswitch);
   bool add_switch(DCSwitch *dswitch);
-  void add_import_module(const string &import_module);
-  void add_import_symbol(const string &import_symbol);
+  void add_import_module(const std::string &import_module);
+  void add_import_symbol(const std::string &import_symbol);
   bool add_typedef(DCTypedef *dtypedef);
   bool add_typedef(DCTypedef *dtypedef);
-  bool add_keyword(const string &name);
+  bool add_keyword(const std::string &name);
   void add_thing_to_delete(DCDeclaration *decl);
   void add_thing_to_delete(DCDeclaration *decl);
 
 
   void set_new_index_number(DCField *field);
   void set_new_index_number(DCField *field);
@@ -91,13 +91,13 @@ private:
   typedef pvector<DCClass *> Classes;
   typedef pvector<DCClass *> Classes;
   Classes _classes;
   Classes _classes;
 
 
-  typedef pmap<string, DCDeclaration *> ThingsByName;
+  typedef pmap<std::string, DCDeclaration *> ThingsByName;
   ThingsByName _things_by_name;
   ThingsByName _things_by_name;
 
 
-  typedef pvector<string> ImportSymbols;
+  typedef pvector<std::string> ImportSymbols;
   class Import {
   class Import {
   public:
   public:
-    string _module;
+    std::string _module;
     ImportSymbols _symbols;
     ImportSymbols _symbols;
   };
   };
 
 
@@ -107,7 +107,7 @@ private:
   typedef pvector<DCTypedef *> Typedefs;
   typedef pvector<DCTypedef *> Typedefs;
   Typedefs _typedefs;
   Typedefs _typedefs;
 
 
-  typedef pmap<string, DCTypedef *> TypedefsByName;
+  typedef pmap<std::string, DCTypedef *> TypedefsByName;
   TypedefsByName _typedefs_by_name;
   TypedefsByName _typedefs_by_name;
 
 
   DCKeywordList _keywords;
   DCKeywordList _keywords;

+ 4 - 4
direct/src/dcparser/dcKeyword.cxx

@@ -19,7 +19,7 @@
  *
  *
  */
  */
 DCKeyword::
 DCKeyword::
-DCKeyword(const string &name, int historical_flag) :
+DCKeyword(const std::string &name, int historical_flag) :
   _name(name),
   _name(name),
   _historical_flag(historical_flag)
   _historical_flag(historical_flag)
 {
 {
@@ -35,7 +35,7 @@ DCKeyword::
 /**
 /**
  * Returns the name of this keyword.
  * Returns the name of this keyword.
  */
  */
-const string &DCKeyword::
+const std::string &DCKeyword::
 get_name() const {
 get_name() const {
   return _name;
   return _name;
 }
 }
@@ -64,7 +64,7 @@ clear_historical_flag() {
  * Write a string representation of this instance to <out>.
  * Write a string representation of this instance to <out>.
  */
  */
 void DCKeyword::
 void DCKeyword::
-output(ostream &out, bool brief) const {
+output(std::ostream &out, bool brief) const {
   out << "keyword " << _name;
   out << "keyword " << _name;
 }
 }
 
 
@@ -72,7 +72,7 @@ output(ostream &out, bool brief) const {
  *
  *
  */
  */
 void DCKeyword::
 void DCKeyword::
-write(ostream &out, bool, int indent_level) const {
+write(std::ostream &out, bool, int indent_level) const {
   indent(out, indent_level)
   indent(out, indent_level)
     << "keyword " << _name << ";\n";
     << "keyword " << _name << ";\n";
 }
 }

+ 5 - 5
direct/src/dcparser/dcKeyword.h

@@ -27,22 +27,22 @@ class HashGenerator;
  */
  */
 class DCKeyword : public DCDeclaration {
 class DCKeyword : public DCDeclaration {
 public:
 public:
-  DCKeyword(const string &name, int historical_flag = ~0);
+  DCKeyword(const std::string &name, int historical_flag = ~0);
   virtual ~DCKeyword();
   virtual ~DCKeyword();
 
 
 PUBLISHED:
 PUBLISHED:
-  const string &get_name() const;
+  const std::string &get_name() const;
 
 
 public:
 public:
   int get_historical_flag() const;
   int get_historical_flag() const;
   void clear_historical_flag();
   void clear_historical_flag();
 
 
-  virtual void output(ostream &out, bool brief) const;
-  virtual void write(ostream &out, bool brief, int indent_level) const;
+  virtual void output(std::ostream &out, bool brief) const;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const;
   void generate_hash(HashGenerator &hashgen) const;
   void generate_hash(HashGenerator &hashgen) const;
 
 
 private:
 private:
-  const string _name;
+  const std::string _name;
 
 
   // This flag is only kept for historical reasons, so we can preserve the
   // This flag is only kept for historical reasons, so we can preserve the
   // file's hash code if no new flags are in use.
   // file's hash code if no new flags are in use.

+ 3 - 3
direct/src/dcparser/dcKeywordList.cxx

@@ -57,7 +57,7 @@ DCKeywordList::
  * Returns true if this list includes the indicated keyword, false otherwise.
  * Returns true if this list includes the indicated keyword, false otherwise.
  */
  */
 bool DCKeywordList::
 bool DCKeywordList::
-has_keyword(const string &name) const {
+has_keyword(const std::string &name) const {
   return (_keywords_by_name.find(name) != _keywords_by_name.end());
   return (_keywords_by_name.find(name) != _keywords_by_name.end());
 }
 }
 
 
@@ -92,7 +92,7 @@ get_keyword(int n) const {
  * is no keyword in the list with that name.
  * is no keyword in the list with that name.
  */
  */
 const DCKeyword *DCKeywordList::
 const DCKeyword *DCKeywordList::
-get_keyword_by_name(const string &name) const {
+get_keyword_by_name(const std::string &name) const {
   KeywordsByName::const_iterator ni;
   KeywordsByName::const_iterator ni;
   ni = _keywords_by_name.find(name);
   ni = _keywords_by_name.find(name);
   if (ni != _keywords_by_name.end()) {
   if (ni != _keywords_by_name.end()) {
@@ -148,7 +148,7 @@ clear_keywords() {
  *
  *
  */
  */
 void DCKeywordList::
 void DCKeywordList::
-output_keywords(ostream &out) const {
+output_keywords(std::ostream &out) const {
   Keywords::const_iterator ki;
   Keywords::const_iterator ki;
   for (ki = _keywords.begin(); ki != _keywords.end(); ++ki) {
   for (ki = _keywords.begin(); ki != _keywords.end(); ++ki) {
     out << " " << (*ki)->get_name();
     out << " " << (*ki)->get_name();

+ 4 - 4
direct/src/dcparser/dcKeywordList.h

@@ -31,11 +31,11 @@ public:
   ~DCKeywordList();
   ~DCKeywordList();
 
 
 PUBLISHED:
 PUBLISHED:
-  bool has_keyword(const string &name) const;
+  bool has_keyword(const std::string &name) const;
   bool has_keyword(const DCKeyword *keyword) const;
   bool has_keyword(const DCKeyword *keyword) const;
   int get_num_keywords() const;
   int get_num_keywords() const;
   const DCKeyword *get_keyword(int n) const;
   const DCKeyword *get_keyword(int n) const;
-  const DCKeyword *get_keyword_by_name(const string &name) const;
+  const DCKeyword *get_keyword_by_name(const std::string &name) const;
 
 
   bool compare_keywords(const DCKeywordList &other) const;
   bool compare_keywords(const DCKeywordList &other) const;
 
 
@@ -45,14 +45,14 @@ public:
   bool add_keyword(const DCKeyword *keyword);
   bool add_keyword(const DCKeyword *keyword);
   void clear_keywords();
   void clear_keywords();
 
 
-  void output_keywords(ostream &out) const;
+  void output_keywords(std::ostream &out) const;
   void generate_hash(HashGenerator &hashgen) const;
   void generate_hash(HashGenerator &hashgen) const;
 
 
 private:
 private:
   typedef pvector<const DCKeyword *> Keywords;
   typedef pvector<const DCKeyword *> Keywords;
   Keywords _keywords;
   Keywords _keywords;
 
 
-  typedef pmap<string, const DCKeyword *> KeywordsByName;
+  typedef pmap<std::string, const DCKeyword *> KeywordsByName;
   KeywordsByName _keywords_by_name;
   KeywordsByName _keywords_by_name;
 
 
   int _flags;
   int _flags;

+ 17 - 13
direct/src/dcparser/dcLexer.cxx.prebuilt

@@ -610,11 +610,11 @@ static int error_count = 0;
 static int warning_count = 0;
 static int warning_count = 0;
 
 
 // This is the pointer to the current input stream.
 // This is the pointer to the current input stream.
-static istream *input_p = NULL;
+static std::istream *input_p = nullptr;
 
 
 // This is the name of the dc file we're parsing.  We keep it so we
 // This is the name of the dc file we're parsing.  We keep it so we
 // can print it out for error messages.
 // can print it out for error messages.
-static string dc_filename;
+static std::string dc_filename;
 
 
 // This is the initial token state returned by the lexer.  It allows
 // This is the initial token state returned by the lexer.  It allows
 // the yacc grammar to start from initial points.
 // the yacc grammar to start from initial points.
@@ -626,7 +626,7 @@ static int initial_token;
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 void
 void
-dc_init_lexer(istream &in, const string &filename) {
+dc_init_lexer(std::istream &in, const std::string &filename) {
   input_p = &in;
   input_p = &in;
   dc_filename = filename;
   dc_filename = filename;
   line_number = 0;
   line_number = 0;
@@ -671,7 +671,9 @@ dcyywrap(void) {
 }
 }
 
 
 void
 void
-dcyyerror(const string &msg) {
+dcyyerror(const std::string &msg) {
+  using std::cerr;
+
   cerr << "\nError";
   cerr << "\nError";
   if (!dc_filename.empty()) {
   if (!dc_filename.empty()) {
     cerr << " in " << dc_filename;
     cerr << " in " << dc_filename;
@@ -686,7 +688,9 @@ dcyyerror(const string &msg) {
 }
 }
 
 
 void
 void
-dcyywarning(const string &msg) {
+dcyywarning(const std::string &msg) {
+  using std::cerr;
+
   cerr << "\nWarning";
   cerr << "\nWarning";
   if (!dc_filename.empty()) {
   if (!dc_filename.empty()) {
     cerr << " in " << dc_filename;
     cerr << " in " << dc_filename;
@@ -740,7 +744,7 @@ input_chars(char *buffer, int &result, int max_size) {
 // Define this macro carefully, since different flex versions call it
 // Define this macro carefully, since different flex versions call it
 // with a different type for result.
 // with a different type for result.
 #define YY_INPUT(buffer, result, max_size) { \
 #define YY_INPUT(buffer, result, max_size) { \
-  int int_result; \
+  int int_result = 0; \
   input_chars((buffer), int_result, (max_size)); \
   input_chars((buffer), int_result, (max_size)); \
   (result) = int_result; \
   (result) = int_result; \
 }
 }
@@ -762,9 +766,9 @@ read_char(int &line, int &col) {
 
 
 // scan_quoted_string reads a string delimited by quotation marks and
 // scan_quoted_string reads a string delimited by quotation marks and
 // returns it.
 // returns it.
-static string
+static std::string
 scan_quoted_string(char quote_mark) {
 scan_quoted_string(char quote_mark) {
-  string result;
+  std::string result;
 
 
   // We don't touch the current line number and column number during
   // We don't touch the current line number and column number during
   // scanning, so that if we detect an error while scanning the string
   // scanning, so that if we detect an error while scanning the string
@@ -884,9 +888,9 @@ scan_quoted_string(char quote_mark) {
 
 
 // scan_hex_string reads a string of hexadecimal digits delimited by
 // scan_hex_string reads a string of hexadecimal digits delimited by
 // angle brackets and returns the representative string.
 // angle brackets and returns the representative string.
-static string
+static std::string
 scan_hex_string() {
 scan_hex_string() {
-  string result;
+  std::string result;
 
 
   // We don't touch the current line number and column number during
   // We don't touch the current line number and column number during
   // scanning, so that if we detect an error while scanning the string
   // scanning, so that if we detect an error while scanning the string
@@ -916,7 +920,7 @@ scan_hex_string() {
       line_number = line;
       line_number = line;
       col_number = col;
       col_number = col;
       dcyyerror("Invalid hex digit.");
       dcyyerror("Invalid hex digit.");
-      return string();
+      return std::string();
     }
     }
 
 
     odd = !odd;
     odd = !odd;
@@ -930,10 +934,10 @@ scan_hex_string() {
 
 
   if (c == EOF) {
   if (c == EOF) {
     dcyyerror("This hex string is unterminated.");
     dcyyerror("This hex string is unterminated.");
-    return string();
+    return std::string();
   } else if (odd) {
   } else if (odd) {
     dcyyerror("Odd number of hex digits.");
     dcyyerror("Odd number of hex digits.");
-    return string();
+    return std::string();
   }
   }
 
 
   line_number = line;
   line_number = line;

+ 17 - 13
direct/src/dcparser/dcLexer.lxx

@@ -35,11 +35,11 @@ static int error_count = 0;
 static int warning_count = 0;
 static int warning_count = 0;
 
 
 // This is the pointer to the current input stream.
 // This is the pointer to the current input stream.
-static istream *input_p = nullptr;
+static std::istream *input_p = nullptr;
 
 
 // This is the name of the dc file we're parsing.  We keep it so we
 // This is the name of the dc file we're parsing.  We keep it so we
 // can print it out for error messages.
 // can print it out for error messages.
-static string dc_filename;
+static std::string dc_filename;
 
 
 // This is the initial token state returned by the lexer.  It allows
 // This is the initial token state returned by the lexer.  It allows
 // the yacc grammar to start from initial points.
 // the yacc grammar to start from initial points.
@@ -51,7 +51,7 @@ static int initial_token;
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 void
 void
-dc_init_lexer(istream &in, const string &filename) {
+dc_init_lexer(std::istream &in, const std::string &filename) {
   input_p = &in;
   input_p = &in;
   dc_filename = filename;
   dc_filename = filename;
   line_number = 0;
   line_number = 0;
@@ -96,7 +96,9 @@ dcyywrap(void) {
 }
 }
 
 
 void
 void
-dcyyerror(const string &msg) {
+dcyyerror(const std::string &msg) {
+  using std::cerr;
+
   cerr << "\nError";
   cerr << "\nError";
   if (!dc_filename.empty()) {
   if (!dc_filename.empty()) {
     cerr << " in " << dc_filename;
     cerr << " in " << dc_filename;
@@ -111,7 +113,9 @@ dcyyerror(const string &msg) {
 }
 }
 
 
 void
 void
-dcyywarning(const string &msg) {
+dcyywarning(const std::string &msg) {
+  using std::cerr;
+
   cerr << "\nWarning";
   cerr << "\nWarning";
   if (!dc_filename.empty()) {
   if (!dc_filename.empty()) {
     cerr << " in " << dc_filename;
     cerr << " in " << dc_filename;
@@ -165,7 +169,7 @@ input_chars(char *buffer, int &result, int max_size) {
 // Define this macro carefully, since different flex versions call it
 // Define this macro carefully, since different flex versions call it
 // with a different type for result.
 // with a different type for result.
 #define YY_INPUT(buffer, result, max_size) { \
 #define YY_INPUT(buffer, result, max_size) { \
-  int int_result; \
+  int int_result = 0; \
   input_chars((buffer), int_result, (max_size)); \
   input_chars((buffer), int_result, (max_size)); \
   (result) = int_result; \
   (result) = int_result; \
 }
 }
@@ -187,9 +191,9 @@ read_char(int &line, int &col) {
 
 
 // scan_quoted_string reads a string delimited by quotation marks and
 // scan_quoted_string reads a string delimited by quotation marks and
 // returns it.
 // returns it.
-static string
+static std::string
 scan_quoted_string(char quote_mark) {
 scan_quoted_string(char quote_mark) {
-  string result;
+  std::string result;
 
 
   // We don't touch the current line number and column number during
   // We don't touch the current line number and column number during
   // scanning, so that if we detect an error while scanning the string
   // scanning, so that if we detect an error while scanning the string
@@ -309,9 +313,9 @@ scan_quoted_string(char quote_mark) {
 
 
 // scan_hex_string reads a string of hexadecimal digits delimited by
 // scan_hex_string reads a string of hexadecimal digits delimited by
 // angle brackets and returns the representative string.
 // angle brackets and returns the representative string.
-static string
+static std::string
 scan_hex_string() {
 scan_hex_string() {
-  string result;
+  std::string result;
 
 
   // We don't touch the current line number and column number during
   // We don't touch the current line number and column number during
   // scanning, so that if we detect an error while scanning the string
   // scanning, so that if we detect an error while scanning the string
@@ -341,7 +345,7 @@ scan_hex_string() {
       line_number = line;
       line_number = line;
       col_number = col;
       col_number = col;
       dcyyerror("Invalid hex digit.");
       dcyyerror("Invalid hex digit.");
-      return string();
+      return std::string();
     }
     }
 
 
     odd = !odd;
     odd = !odd;
@@ -355,10 +359,10 @@ scan_hex_string() {
 
 
   if (c == EOF) {
   if (c == EOF) {
     dcyyerror("This hex string is unterminated.");
     dcyyerror("This hex string is unterminated.");
-    return string();
+    return std::string();
   } else if (odd) {
   } else if (odd) {
     dcyyerror("Odd number of hex digits.");
     dcyyerror("Odd number of hex digits.");
-    return string();
+    return std::string();
   }
   }
 
 
   line_number = line;
   line_number = line;

+ 3 - 3
direct/src/dcparser/dcLexerDefs.h

@@ -16,14 +16,14 @@
 
 
 #include "dcbase.h"
 #include "dcbase.h"
 
 
-void dc_init_lexer(istream &in, const string &filename);
+void dc_init_lexer(std::istream &in, const std::string &filename);
 void dc_start_parameter_value();
 void dc_start_parameter_value();
 void dc_start_parameter_description();
 void dc_start_parameter_description();
 int dc_error_count();
 int dc_error_count();
 int dc_warning_count();
 int dc_warning_count();
 
 
-void dcyyerror(const string &msg);
-void dcyywarning(const string &msg);
+void dcyyerror(const std::string &msg);
+void dcyywarning(const std::string &msg);
 
 
 int dcyylex();
 int dcyylex();
 
 

+ 3 - 3
direct/src/dcparser/dcMolecularField.cxx

@@ -22,7 +22,7 @@
  *
  *
  */
  */
 DCMolecularField::
 DCMolecularField::
-DCMolecularField(const string &name, DCClass *dclass) : DCField(name, dclass) {
+DCMolecularField(const std::string &name, DCClass *dclass) : DCField(name, dclass) {
   _got_keywords = false;
   _got_keywords = false;
 }
 }
 
 
@@ -109,7 +109,7 @@ add_atomic(DCAtomicField *atomic) {
  *
  *
  */
  */
 void DCMolecularField::
 void DCMolecularField::
-output(ostream &out, bool brief) const {
+output(std::ostream &out, bool brief) const {
   out << _name;
   out << _name;
 
 
   if (!_fields.empty()) {
   if (!_fields.empty()) {
@@ -130,7 +130,7 @@ output(ostream &out, bool brief) const {
  * stream.
  * stream.
  */
  */
 void DCMolecularField::
 void DCMolecularField::
-write(ostream &out, bool brief, int indent_level) const {
+write(std::ostream &out, bool brief, int indent_level) const {
   indent(out, indent_level);
   indent(out, indent_level);
   output(out, brief);
   output(out, brief);
   if (!brief) {
   if (!brief) {

+ 3 - 3
direct/src/dcparser/dcMolecularField.h

@@ -27,7 +27,7 @@ class DCParameter;
  */
  */
 class DCMolecularField : public DCField {
 class DCMolecularField : public DCField {
 public:
 public:
-  DCMolecularField(const string &name, DCClass *dclass);
+  DCMolecularField(const std::string &name, DCClass *dclass);
 
 
 PUBLISHED:
 PUBLISHED:
   virtual DCMolecularField *as_molecular_field();
   virtual DCMolecularField *as_molecular_field();
@@ -39,8 +39,8 @@ PUBLISHED:
 public:
 public:
   void add_atomic(DCAtomicField *atomic);
   void add_atomic(DCAtomicField *atomic);
 
 
-  virtual void output(ostream &out, bool brief) const;
-  virtual void write(ostream &out, bool brief, int indent_level) const;
+  virtual void output(std::ostream &out, bool brief) const;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
 
 
   virtual DCPackerInterface *get_nested_field(int n) const;
   virtual DCPackerInterface *get_nested_field(int n) const;

+ 7 - 7
direct/src/dcparser/dcNumericRange.I

@@ -125,7 +125,7 @@ generate_hash(HashGenerator &hashgen) const {
  */
  */
 template <class NUM>
 template <class NUM>
 void DCNumericRange<NUM>::
 void DCNumericRange<NUM>::
-output(ostream &out, Number divisor) const {
+output(std::ostream &out, Number divisor) const {
   if (!_ranges.empty()) {
   if (!_ranges.empty()) {
     typename Ranges::const_iterator ri;
     typename Ranges::const_iterator ri;
     ri = _ranges.begin();
     ri = _ranges.begin();
@@ -145,7 +145,7 @@ output(ostream &out, Number divisor) const {
  */
  */
 template <class NUM>
 template <class NUM>
 void DCNumericRange<NUM>::
 void DCNumericRange<NUM>::
-output_char(ostream &out, Number divisor) const {
+output_char(std::ostream &out, Number divisor) const {
   if (divisor != 1) {
   if (divisor != 1) {
     output(out, divisor);
     output(out, divisor);
 
 
@@ -248,7 +248,7 @@ get_max(int n) const {
  */
  */
 template <class NUM>
 template <class NUM>
 INLINE void DCNumericRange<NUM>::
 INLINE void DCNumericRange<NUM>::
-output_minmax(ostream &out, Number divisor, const MinMax &range) const {
+output_minmax(std::ostream &out, Number divisor, const MinMax &range) const {
   if (divisor == 1) {
   if (divisor == 1) {
     if (range._min == range._max) {
     if (range._min == range._max) {
       out << range._min;
       out << range._min;
@@ -271,12 +271,12 @@ output_minmax(ostream &out, Number divisor, const MinMax &range) const {
  */
  */
 template <class NUM>
 template <class NUM>
 INLINE void DCNumericRange<NUM>::
 INLINE void DCNumericRange<NUM>::
-output_minmax_char(ostream &out, const MinMax &range) const {
+output_minmax_char(std::ostream &out, const MinMax &range) const {
   if (range._min == range._max) {
   if (range._min == range._max) {
-    DCPacker::enquote_string(out, '\'', string(1, range._min));
+    DCPacker::enquote_string(out, '\'', std::string(1, range._min));
   } else {
   } else {
-    DCPacker::enquote_string(out, '\'', string(1, range._min));
+    DCPacker::enquote_string(out, '\'', std::string(1, range._min));
     out << "-";
     out << "-";
-    DCPacker::enquote_string(out, '\'', string(1, range._max));
+    DCPacker::enquote_string(out, '\'', std::string(1, range._max));
   }
   }
 }
 }

+ 4 - 4
direct/src/dcparser/dcNumericRange.h

@@ -40,8 +40,8 @@ public:
 
 
   void generate_hash(HashGenerator &hashgen) const;
   void generate_hash(HashGenerator &hashgen) const;
 
 
-  void output(ostream &out, Number divisor = 1) const;
-  void output_char(ostream &out, Number divisor = 1) const;
+  void output(std::ostream &out, Number divisor = 1) const;
+  void output_char(std::ostream &out, Number divisor = 1) const;
 
 
 public:
 public:
   INLINE void clear();
   INLINE void clear();
@@ -60,8 +60,8 @@ private:
     Number _min;
     Number _min;
     Number _max;
     Number _max;
   };
   };
-  INLINE void output_minmax(ostream &out, Number divisor, const MinMax &range) const;
-  INLINE void output_minmax_char(ostream &out, const MinMax &range) const;
+  INLINE void output_minmax(std::ostream &out, Number divisor, const MinMax &range) const;
+  INLINE void output_minmax_char(std::ostream &out, const MinMax &range) const;
 
 
   typedef pvector<MinMax> Ranges;
   typedef pvector<MinMax> Ranges;
   Ranges _ranges;
   Ranges _ranges;

+ 2 - 2
direct/src/dcparser/dcPackData.I

@@ -89,9 +89,9 @@ get_rewrite_pointer(size_t position, size_t size) {
 /**
 /**
  * Returns the data buffer as a string.  Also see get_data().
  * Returns the data buffer as a string.  Also see get_data().
  */
  */
-INLINE string DCPackData::
+INLINE std::string DCPackData::
 get_string() const {
 get_string() const {
-  return string(_buffer, _used_length);
+  return std::string(_buffer, _used_length);
 }
 }
 
 
 /**
 /**

+ 1 - 1
direct/src/dcparser/dcPackData.h

@@ -34,7 +34,7 @@ public:
   INLINE char *get_rewrite_pointer(size_t position, size_t size);
   INLINE char *get_rewrite_pointer(size_t position, size_t size);
 
 
 PUBLISHED:
 PUBLISHED:
-  INLINE string get_string() const;
+  INLINE std::string get_string() const;
   INLINE size_t get_length() const;
   INLINE size_t get_length() const;
 public:
 public:
   INLINE const char *get_data() const;
   INLINE const char *get_data() const;

+ 19 - 19
direct/src/dcparser/dcPacker.I

@@ -123,10 +123,10 @@ get_pack_type() const {
  * Returns the name of the current field, if it has a name, or the empty
  * Returns the name of the current field, if it has a name, or the empty
  * string if the field does not have a name or there is no current field.
  * string if the field does not have a name or there is no current field.
  */
  */
-INLINE string DCPacker::
+INLINE std::string DCPacker::
 get_current_field_name() const {
 get_current_field_name() const {
   if (_current_field == nullptr) {
   if (_current_field == nullptr) {
-    return string();
+    return std::string();
   } else {
   } else {
     return _current_field->get_name();
     return _current_field->get_name();
   }
   }
@@ -206,7 +206,7 @@ pack_uint64(uint64_t value) {
  * Packs the indicated numeric or string value into the stream.
  * Packs the indicated numeric or string value into the stream.
  */
  */
 INLINE void DCPacker::
 INLINE void DCPacker::
-pack_string(const string &value) {
+pack_string(const std::string &value) {
   nassertv(_mode == M_pack || _mode == M_repack);
   nassertv(_mode == M_pack || _mode == M_repack);
   if (_current_field == nullptr) {
   if (_current_field == nullptr) {
     _pack_error = true;
     _pack_error = true;
@@ -221,7 +221,7 @@ pack_string(const string &value) {
  * packed field element, or a whole group of field elements at once.
  * packed field element, or a whole group of field elements at once.
  */
  */
 INLINE void DCPacker::
 INLINE void DCPacker::
-pack_literal_value(const string &value) {
+pack_literal_value(const std::string &value) {
   nassertv(_mode == M_pack || _mode == M_repack);
   nassertv(_mode == M_pack || _mode == M_repack);
   if (_current_field == nullptr) {
   if (_current_field == nullptr) {
     _pack_error = true;
     _pack_error = true;
@@ -329,9 +329,9 @@ unpack_uint64() {
 /**
 /**
  * Unpacks the current numeric or string value from the stream.
  * Unpacks the current numeric or string value from the stream.
  */
  */
-INLINE string DCPacker::
+INLINE std::string DCPacker::
 unpack_string() {
 unpack_string() {
-  string value;
+  std::string value;
   nassertr(_mode == M_unpack, value);
   nassertr(_mode == M_unpack, value);
   if (_current_field == nullptr) {
   if (_current_field == nullptr) {
     _pack_error = true;
     _pack_error = true;
@@ -349,12 +349,12 @@ unpack_string() {
  * Returns the literal string that represents the packed value of the current
  * Returns the literal string that represents the packed value of the current
  * field, and advances the field pointer.
  * field, and advances the field pointer.
  */
  */
-INLINE string DCPacker::
+INLINE std::string DCPacker::
 unpack_literal_value() {
 unpack_literal_value() {
   size_t start = _unpack_p;
   size_t start = _unpack_p;
   unpack_skip();
   unpack_skip();
-  nassertr(_unpack_p >= start, string());
-  return string(_unpack_data + start, _unpack_p - start);
+  nassertr(_unpack_p >= start, std::string());
+  return std::string(_unpack_data + start, _unpack_p - start);
 }
 }
 
 
 /**
 /**
@@ -441,7 +441,7 @@ unpack_uint64(uint64_t &value) {
  * Unpacks the current numeric or string value from the stream.
  * Unpacks the current numeric or string value from the stream.
  */
  */
 INLINE void DCPacker::
 INLINE void DCPacker::
-unpack_string(string &value) {
+unpack_string(std::string &value) {
   nassertv(_mode == M_unpack);
   nassertv(_mode == M_unpack);
   if (_current_field == nullptr) {
   if (_current_field == nullptr) {
     _pack_error = true;
     _pack_error = true;
@@ -458,7 +458,7 @@ unpack_string(string &value) {
  * field, and advances the field pointer.
  * field, and advances the field pointer.
  */
  */
 INLINE void DCPacker::
 INLINE void DCPacker::
-unpack_literal_value(string &value) {
+unpack_literal_value(std::string &value) {
   size_t start = _unpack_p;
   size_t start = _unpack_p;
   unpack_skip();
   unpack_skip();
   nassertv(_unpack_p >= start);
   nassertv(_unpack_p >= start);
@@ -536,7 +536,7 @@ get_length() const {
 /**
 /**
  * Returns the packed data buffer as a string.  Also see get_data().
  * Returns the packed data buffer as a string.  Also see get_data().
  */
  */
-INLINE string DCPacker::
+INLINE std::string DCPacker::
 get_string() const {
 get_string() const {
   return _pack_data.get_string();
   return _pack_data.get_string();
 }
 }
@@ -556,16 +556,16 @@ get_unpack_length() const {
  * unpacking; it is separate from the pack data returned by get_string(),
  * unpacking; it is separate from the pack data returned by get_string(),
  * which is filled during packing.  Also see get_unpack_data().
  * which is filled during packing.  Also see get_unpack_data().
  */
  */
-INLINE string DCPacker::
+INLINE std::string DCPacker::
 get_unpack_string() const {
 get_unpack_string() const {
-  return string(_unpack_data, _unpack_length);
+  return std::string(_unpack_data, _unpack_length);
 }
 }
 
 
 /**
 /**
  * Copies the packed data into the indicated string.  Also see get_data().
  * Copies the packed data into the indicated string.  Also see get_data().
  */
  */
 INLINE void DCPacker::
 INLINE void DCPacker::
-get_string(string &data) const {
+get_string(std::string &data) const {
   data.assign(_pack_data.get_data(), _pack_data.get_length());
   data.assign(_pack_data.get_data(), _pack_data.get_length());
 }
 }
 
 
@@ -722,7 +722,7 @@ raw_pack_float64(double value) {
  * Packs the data into the buffer between packing sessions.
  * Packs the data into the buffer between packing sessions.
  */
  */
 INLINE void DCPacker::
 INLINE void DCPacker::
-raw_pack_string(const string &value) {
+raw_pack_string(const std::string &value) {
   nassertv(_mode == M_idle);
   nassertv(_mode == M_idle);
   DCPackerInterface::do_pack_uint16(_pack_data.get_write_pointer(2), value.length());
   DCPackerInterface::do_pack_uint16(_pack_data.get_write_pointer(2), value.length());
   _pack_data.append_data(value.data(), value.length());
   _pack_data.append_data(value.data(), value.length());
@@ -863,9 +863,9 @@ raw_unpack_float64() {
 /**
 /**
  * Unpacks the data from the buffer between unpacking sessions.
  * Unpacks the data from the buffer between unpacking sessions.
  */
  */
-INLINE string DCPacker::
+INLINE std::string DCPacker::
 raw_unpack_string() {
 raw_unpack_string() {
-  string value;
+  std::string value;
   raw_unpack_string(value);
   raw_unpack_string(value);
   return value;
   return value;
 }
 }
@@ -958,7 +958,7 @@ raw_unpack_float64(double &value) {
  * Unpacks the data from the buffer between unpacking sessions.
  * Unpacks the data from the buffer between unpacking sessions.
  */
  */
 INLINE void DCPacker::
 INLINE void DCPacker::
-raw_unpack_string(string &value) {
+raw_unpack_string(std::string &value) {
   nassertv(_mode == M_idle && _unpack_data != nullptr);
   nassertv(_mode == M_idle && _unpack_data != nullptr);
   unsigned int string_length = raw_unpack_uint16();
   unsigned int string_length = raw_unpack_uint16();
 
 

+ 8 - 2
direct/src/dcparser/dcPacker.cxx

@@ -23,6 +23,12 @@
 #include "py_panda.h"
 #include "py_panda.h"
 #endif
 #endif
 
 
+using std::istream;
+using std::istringstream;
+using std::ostream;
+using std::ostringstream;
+using std::string;
+
 DCPacker::StackElement *DCPacker::StackElement::_deleted_chain = nullptr;
 DCPacker::StackElement *DCPacker::StackElement::_deleted_chain = nullptr;
 int DCPacker::StackElement::_num_ever_allocated = 0;
 int DCPacker::StackElement::_num_ever_allocated = 0;
 
 
@@ -786,7 +792,7 @@ pack_object(PyObject *object) {
           pack_object(element);
           pack_object(element);
           Py_DECREF(element);
           Py_DECREF(element);
         } else {
         } else {
-          cerr << "Unable to extract item " << i << " from sequence.\n";
+          std::cerr << "Unable to extract item " << i << " from sequence.\n";
         }
         }
       }
       }
       pop();
       pop();
@@ -903,7 +909,7 @@ unpack_object() {
           // constructor, create the class object instead of just a tuple.
           // constructor, create the class object instead of just a tuple.
           object = unpack_class_object(dclass);
           object = unpack_class_object(dclass);
           if (object == nullptr) {
           if (object == nullptr) {
-            cerr << "Unable to construct object of class "
+            std::cerr << "Unable to construct object of class "
                  << dclass->get_name() << "\n";
                  << dclass->get_name() << "\n";
           } else {
           } else {
             break;
             break;

+ 21 - 21
direct/src/dcparser/dcPacker.h

@@ -41,7 +41,7 @@ PUBLISHED:
   void begin_pack(const DCPackerInterface *root);
   void begin_pack(const DCPackerInterface *root);
   bool end_pack();
   bool end_pack();
 
 
-  void set_unpack_data(const string &data);
+  void set_unpack_data(const std::string &data);
 public:
 public:
   void set_unpack_data(const char *unpack_data, size_t unpack_length,
   void set_unpack_data(const char *unpack_data, size_t unpack_length,
                        bool owns_unpack_data);
                        bool owns_unpack_data);
@@ -53,7 +53,7 @@ PUBLISHED:
   void begin_repack(const DCPackerInterface *root);
   void begin_repack(const DCPackerInterface *root);
   bool end_repack();
   bool end_repack();
 
 
-  bool seek(const string &field_name);
+  bool seek(const std::string &field_name);
   bool seek(int seek_index);
   bool seek(int seek_index);
 
 
   INLINE bool has_nested_fields() const;
   INLINE bool has_nested_fields() const;
@@ -64,7 +64,7 @@ PUBLISHED:
   INLINE const DCPackerInterface *get_current_field() const;
   INLINE const DCPackerInterface *get_current_field() const;
   INLINE const DCSwitchParameter *get_last_switch() const;
   INLINE const DCSwitchParameter *get_last_switch() const;
   INLINE DCPackType get_pack_type() const;
   INLINE DCPackType get_pack_type() const;
-  INLINE string get_current_field_name() const;
+  INLINE std::string get_current_field_name() const;
 
 
   void push();
   void push();
   void pop();
   void pop();
@@ -74,8 +74,8 @@ PUBLISHED:
   INLINE void pack_uint(unsigned int value);
   INLINE void pack_uint(unsigned int value);
   INLINE void pack_int64(int64_t value);
   INLINE void pack_int64(int64_t value);
   INLINE void pack_uint64(uint64_t value);
   INLINE void pack_uint64(uint64_t value);
-  INLINE void pack_string(const string &value);
-  INLINE void pack_literal_value(const string &value);
+  INLINE void pack_string(const std::string &value);
+  INLINE void pack_literal_value(const std::string &value);
   void pack_default_value();
   void pack_default_value();
 
 
   INLINE double unpack_double();
   INLINE double unpack_double();
@@ -83,8 +83,8 @@ PUBLISHED:
   INLINE unsigned int unpack_uint();
   INLINE unsigned int unpack_uint();
   INLINE int64_t unpack_int64();
   INLINE int64_t unpack_int64();
   INLINE uint64_t unpack_uint64();
   INLINE uint64_t unpack_uint64();
-  INLINE string unpack_string();
-  INLINE string unpack_literal_value();
+  INLINE std::string unpack_string();
+  INLINE std::string unpack_literal_value();
   void unpack_validate();
   void unpack_validate();
   void unpack_skip();
   void unpack_skip();
 
 
@@ -96,8 +96,8 @@ public:
   INLINE void unpack_uint(unsigned int &value);
   INLINE void unpack_uint(unsigned int &value);
   INLINE void unpack_int64(int64_t &value);
   INLINE void unpack_int64(int64_t &value);
   INLINE void unpack_uint64(uint64_t &value);
   INLINE void unpack_uint64(uint64_t &value);
-  INLINE void unpack_string(string &value);
-  INLINE void unpack_literal_value(string &value);
+  INLINE void unpack_string(std::string &value);
+  INLINE void unpack_literal_value(std::string &value);
 
 
 PUBLISHED:
 PUBLISHED:
 
 
@@ -106,10 +106,10 @@ PUBLISHED:
   PyObject *unpack_object();
   PyObject *unpack_object();
 #endif
 #endif
 
 
-  bool parse_and_pack(const string &formatted_object);
-  bool parse_and_pack(istream &in);
-  string unpack_and_format(bool show_field_names = true);
-  void unpack_and_format(ostream &out, bool show_field_names = true);
+  bool parse_and_pack(const std::string &formatted_object);
+  bool parse_and_pack(std::istream &in);
+  std::string unpack_and_format(bool show_field_names = true);
+  void unpack_and_format(std::ostream &out, bool show_field_names = true);
 
 
   INLINE bool had_parse_error() const;
   INLINE bool had_parse_error() const;
   INLINE bool had_pack_error() const;
   INLINE bool had_pack_error() const;
@@ -118,11 +118,11 @@ PUBLISHED:
   INLINE size_t get_num_unpacked_bytes() const;
   INLINE size_t get_num_unpacked_bytes() const;
 
 
   INLINE size_t get_length() const;
   INLINE size_t get_length() const;
-  INLINE string get_string() const;
+  INLINE std::string get_string() const;
   INLINE size_t get_unpack_length() const;
   INLINE size_t get_unpack_length() const;
-  INLINE string get_unpack_string() const;
+  INLINE std::string get_unpack_string() const;
 public:
 public:
-  INLINE void get_string(string &data) const;
+  INLINE void get_string(std::string &data) const;
   INLINE const char *get_data() const;
   INLINE const char *get_data() const;
   INLINE char *take_data();
   INLINE char *take_data();
 
 
@@ -147,7 +147,7 @@ PUBLISHED:
   INLINE void raw_pack_uint32(unsigned int value);
   INLINE void raw_pack_uint32(unsigned int value);
   INLINE void raw_pack_uint64(uint64_t value);
   INLINE void raw_pack_uint64(uint64_t value);
   INLINE void raw_pack_float64(double value);
   INLINE void raw_pack_float64(double value);
-  INLINE void raw_pack_string(const string &value);
+  INLINE void raw_pack_string(const std::string &value);
 
 
 // this is a hack to allw me to get in and out of 32bit Mode Faster need to
 // this is a hack to allw me to get in and out of 32bit Mode Faster need to
 // agree with channel_type in dcbase.h
 // agree with channel_type in dcbase.h
@@ -164,7 +164,7 @@ PUBLISHED:
   INLINE unsigned int raw_unpack_uint32();
   INLINE unsigned int raw_unpack_uint32();
   INLINE uint64_t raw_unpack_uint64();
   INLINE uint64_t raw_unpack_uint64();
   INLINE double raw_unpack_float64();
   INLINE double raw_unpack_float64();
-  INLINE string raw_unpack_string();
+  INLINE std::string raw_unpack_string();
 
 
 public:
 public:
   INLINE void raw_unpack_int8(int &value);
   INLINE void raw_unpack_int8(int &value);
@@ -176,11 +176,11 @@ public:
   INLINE void raw_unpack_uint32(unsigned int &value);
   INLINE void raw_unpack_uint32(unsigned int &value);
   INLINE void raw_unpack_uint64(uint64_t &value);
   INLINE void raw_unpack_uint64(uint64_t &value);
   INLINE void raw_unpack_float64(double &value);
   INLINE void raw_unpack_float64(double &value);
-  INLINE void raw_unpack_string(string &value);
+  INLINE void raw_unpack_string(std::string &value);
 
 
 public:
 public:
-  static void enquote_string(ostream &out, char quote_mark, const string &str);
-  static void output_hex_string(ostream &out, const string &str);
+  static void enquote_string(std::ostream &out, char quote_mark, const std::string &str);
+  static void output_hex_string(std::ostream &out, const std::string &str);
 
 
 private:
 private:
   INLINE void advance();
   INLINE void advance();

+ 1 - 1
direct/src/dcparser/dcPackerCatalog.I

@@ -52,7 +52,7 @@ get_entry(int n) const {
  * get_entry().
  * get_entry().
  */
  */
 int DCPackerCatalog::LiveCatalog::
 int DCPackerCatalog::LiveCatalog::
-find_entry_by_name(const string &name) const {
+find_entry_by_name(const std::string &name) const {
   return _catalog->find_entry_by_name(name);
   return _catalog->find_entry_by_name(name);
 }
 }
 
 

+ 2 - 0
direct/src/dcparser/dcPackerCatalog.cxx

@@ -16,6 +16,8 @@
 #include "dcPacker.h"
 #include "dcPacker.h"
 #include "dcSwitchParameter.h"
 #include "dcSwitchParameter.h"
 
 
+using std::string;
+
 /**
 /**
  * The catalog is created only by DCPackerInterface::get_catalog().
  * The catalog is created only by DCPackerInterface::get_catalog().
  */
  */

+ 7 - 7
direct/src/dcparser/dcPackerCatalog.h

@@ -37,7 +37,7 @@ public:
   // and its relationship to its parent.
   // and its relationship to its parent.
   class Entry {
   class Entry {
   public:
   public:
-    string _name;
+    std::string _name;
     const DCPackerInterface *_field;
     const DCPackerInterface *_field;
     const DCPackerInterface *_parent;
     const DCPackerInterface *_parent;
     int _field_index;
     int _field_index;
@@ -58,7 +58,7 @@ public:
 
 
     INLINE int get_num_entries() const;
     INLINE int get_num_entries() const;
     INLINE const Entry &get_entry(int n) const;
     INLINE const Entry &get_entry(int n) const;
-    INLINE int find_entry_by_name(const string &name) const;
+    INLINE int find_entry_by_name(const std::string &name) const;
     INLINE int find_entry_by_field(const DCPackerInterface *field) const;
     INLINE int find_entry_by_field(const DCPackerInterface *field) const;
 
 
   private:
   private:
@@ -71,17 +71,17 @@ public:
 
 
   INLINE int get_num_entries() const;
   INLINE int get_num_entries() const;
   INLINE const Entry &get_entry(int n) const;
   INLINE const Entry &get_entry(int n) const;
-  int find_entry_by_name(const string &name) const;
+  int find_entry_by_name(const std::string &name) const;
   int find_entry_by_field(const DCPackerInterface *field) const;
   int find_entry_by_field(const DCPackerInterface *field) const;
 
 
   const LiveCatalog *get_live_catalog(const char *data, size_t length) const;
   const LiveCatalog *get_live_catalog(const char *data, size_t length) const;
   void release_live_catalog(const LiveCatalog *live_catalog) const;
   void release_live_catalog(const LiveCatalog *live_catalog) const;
 
 
 private:
 private:
-  void add_entry(const string &name, const DCPackerInterface *field,
+  void add_entry(const std::string &name, const DCPackerInterface *field,
                  const DCPackerInterface *parent, int field_index);
                  const DCPackerInterface *parent, int field_index);
 
 
-  void r_fill_catalog(const string &name_prefix, const DCPackerInterface *field,
+  void r_fill_catalog(const std::string &name_prefix, const DCPackerInterface *field,
                       const DCPackerInterface *parent, int field_index);
                       const DCPackerInterface *parent, int field_index);
   void r_fill_live_catalog(LiveCatalog *live_catalog, DCPacker &packer,
   void r_fill_live_catalog(LiveCatalog *live_catalog, DCPacker &packer,
                            const DCSwitchParameter *&last_switch) const;
                            const DCSwitchParameter *&last_switch) const;
@@ -96,7 +96,7 @@ private:
   typedef pvector<Entry> Entries;
   typedef pvector<Entry> Entries;
   Entries _entries;
   Entries _entries;
 
 
-  typedef pmap<string, int> EntriesByName;
+  typedef pmap<std::string, int> EntriesByName;
   EntriesByName _entries_by_name;
   EntriesByName _entries_by_name;
 
 
   typedef pmap<const DCPackerInterface *, int> EntriesByField;
   typedef pmap<const DCPackerInterface *, int> EntriesByField;
@@ -105,7 +105,7 @@ private:
   typedef pmap<const DCPackerInterface *, DCPackerCatalog *> SwitchCatalogs;
   typedef pmap<const DCPackerInterface *, DCPackerCatalog *> SwitchCatalogs;
   SwitchCatalogs _switch_catalogs;
   SwitchCatalogs _switch_catalogs;
 
 
-  typedef pmap<const DCSwitchParameter *, string> SwitchPrefixes;
+  typedef pmap<const DCSwitchParameter *, std::string> SwitchPrefixes;
   SwitchPrefixes _switch_prefixes;
   SwitchPrefixes _switch_prefixes;
 
 
   friend class DCPackerInterface;
   friend class DCPackerInterface;

+ 1 - 1
direct/src/dcparser/dcPackerInterface.I

@@ -14,7 +14,7 @@
 /**
 /**
  * Returns the name of this field, or empty string if the field is unnamed.
  * Returns the name of this field, or empty string if the field is unnamed.
  */
  */
-INLINE const string &DCPackerInterface::
+INLINE const std::string &DCPackerInterface::
 get_name() const {
 get_name() const {
   return _name;
   return _name;
 }
 }

+ 3 - 1
direct/src/dcparser/dcPackerInterface.cxx

@@ -17,6 +17,8 @@
 #include "dcParserDefs.h"
 #include "dcParserDefs.h"
 #include "dcLexerDefs.h"
 #include "dcLexerDefs.h"
 
 
+using std::string;
+
 /**
 /**
  *
  *
  */
  */
@@ -139,7 +141,7 @@ bool DCPackerInterface::
 check_match(const string &description, DCFile *dcfile) const {
 check_match(const string &description, DCFile *dcfile) const {
   bool match = false;
   bool match = false;
 
 
-  istringstream strm(description);
+  std::istringstream strm(description);
   dc_init_parser_parameter_description(strm, "check_match", dcfile);
   dc_init_parser_parameter_description(strm, "check_match", dcfile);
   dcyyparse();
   dcyyparse();
   dc_cleanup_parser();
   dc_cleanup_parser();

+ 8 - 8
direct/src/dcparser/dcPackerInterface.h

@@ -66,13 +66,13 @@ END_PUBLISH
  */
  */
 class DCPackerInterface {
 class DCPackerInterface {
 public:
 public:
-  DCPackerInterface(const string &name = string());
+  DCPackerInterface(const std::string &name = std::string());
   DCPackerInterface(const DCPackerInterface &copy);
   DCPackerInterface(const DCPackerInterface &copy);
   virtual ~DCPackerInterface();
   virtual ~DCPackerInterface();
 
 
 PUBLISHED:
 PUBLISHED:
-  INLINE const string &get_name() const;
-  int find_seek_index(const string &name) const;
+  INLINE const std::string &get_name() const;
+  int find_seek_index(const std::string &name) const;
 
 
   virtual DCField *as_field();
   virtual DCField *as_field();
   virtual const DCField *as_field() const;
   virtual const DCField *as_field() const;
@@ -82,10 +82,10 @@ PUBLISHED:
   virtual const DCClassParameter *as_class_parameter() const;
   virtual const DCClassParameter *as_class_parameter() const;
 
 
   INLINE bool check_match(const DCPackerInterface *other) const;
   INLINE bool check_match(const DCPackerInterface *other) const;
-  bool check_match(const string &description, DCFile *dcfile = nullptr) const;
+  bool check_match(const std::string &description, DCFile *dcfile = nullptr) const;
 
 
 public:
 public:
-  virtual void set_name(const string &name);
+  virtual void set_name(const std::string &name);
   INLINE bool has_fixed_byte_size() const;
   INLINE bool has_fixed_byte_size() const;
   INLINE size_t get_fixed_byte_size() const;
   INLINE size_t get_fixed_byte_size() const;
   INLINE bool has_fixed_structure() const;
   INLINE bool has_fixed_structure() const;
@@ -111,7 +111,7 @@ public:
                           bool &pack_error, bool &range_error) const;
                           bool &pack_error, bool &range_error) const;
   virtual void pack_uint64(DCPackData &pack_data, uint64_t value,
   virtual void pack_uint64(DCPackData &pack_data, uint64_t value,
                            bool &pack_error, bool &range_error) const;
                            bool &pack_error, bool &range_error) const;
-  virtual void pack_string(DCPackData &pack_data, const string &value,
+  virtual void pack_string(DCPackData &pack_data, const std::string &value,
                            bool &pack_error, bool &range_error) const;
                            bool &pack_error, bool &range_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
 
 
@@ -126,7 +126,7 @@ public:
   virtual void unpack_uint64(const char *data, size_t length, size_t &p,
   virtual void unpack_uint64(const char *data, size_t length, size_t &p,
                              uint64_t &value, bool &pack_error, bool &range_error) const;
                              uint64_t &value, bool &pack_error, bool &range_error) const;
   virtual void unpack_string(const char *data, size_t length, size_t &p,
   virtual void unpack_string(const char *data, size_t length, size_t &p,
-                             string &value, bool &pack_error, bool &range_error) const;
+                             std::string &value, bool &pack_error, bool &range_error) const;
   virtual bool unpack_validate(const char *data, size_t length, size_t &p,
   virtual bool unpack_validate(const char *data, size_t length, size_t &p,
                                bool &pack_error, bool &range_error) const;
                                bool &pack_error, bool &range_error) const;
   virtual bool unpack_skip(const char *data, size_t length, size_t &p,
   virtual bool unpack_skip(const char *data, size_t length, size_t &p,
@@ -184,7 +184,7 @@ private:
   void make_catalog();
   void make_catalog();
 
 
 protected:
 protected:
-  string _name;
+  std::string _name;
   bool _has_fixed_byte_size;
   bool _has_fixed_byte_size;
   size_t _fixed_byte_size;
   size_t _fixed_byte_size;
   bool _has_fixed_structure;
   bool _has_fixed_structure;

+ 3 - 0
direct/src/dcparser/dcParameter.cxx

@@ -17,6 +17,9 @@
 #include "dcindent.h"
 #include "dcindent.h"
 #include "dcTypedef.h"
 #include "dcTypedef.h"
 
 
+using std::ostream;
+using std::string;
+
 /**
 /**
  *
  *
  */
  */

+ 12 - 12
direct/src/dcparser/dcParameter.h

@@ -60,18 +60,18 @@ public:
   void set_typedef(const DCTypedef *dtypedef);
   void set_typedef(const DCTypedef *dtypedef);
   virtual DCParameter *append_array_specification(const DCUnsignedIntRange &size);
   virtual DCParameter *append_array_specification(const DCUnsignedIntRange &size);
 
 
-  virtual void output(ostream &out, bool brief) const;
-  virtual void write(ostream &out, bool brief, int indent_level) const;
-  virtual void output_instance(ostream &out, bool brief, const string &prename,
-                               const string &name, const string &postname) const=0;
-  virtual void write_instance(ostream &out, bool brief, int indent_level,
-                              const string &prename, const string &name,
-                              const string &postname) const;
-  void output_typedef_name(ostream &out, bool brief, const string &prename,
-                           const string &name, const string &postname) const;
-  void write_typedef_name(ostream &out, bool brief, int indent_level,
-                          const string &prename, const string &name,
-                          const string &postname) const;
+  virtual void output(std::ostream &out, bool brief) const;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const;
+  virtual void output_instance(std::ostream &out, bool brief, const std::string &prename,
+                               const std::string &name, const std::string &postname) const=0;
+  virtual void write_instance(std::ostream &out, bool brief, int indent_level,
+                              const std::string &prename, const std::string &name,
+                              const std::string &postname) const;
+  void output_typedef_name(std::ostream &out, bool brief, const std::string &prename,
+                           const std::string &name, const std::string &postname) const;
+  void write_typedef_name(std::ostream &out, bool brief, int indent_level,
+                          const std::string &prename, const std::string &name,
+                          const std::string &postname) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
 
 
 private:
 private:

+ 4 - 0
direct/src/dcparser/dcParser.cxx.prebuilt

@@ -101,6 +101,10 @@
 #define YYINITDEPTH 1000
 #define YYINITDEPTH 1000
 #define YYMAXDEPTH 1000
 #define YYMAXDEPTH 1000
 
 
+using std::istream;
+using std::ostringstream;
+using std::string;
+
 DCFile *dc_file = (DCFile *)NULL;
 DCFile *dc_file = (DCFile *)NULL;
 static DCClass *current_class = (DCClass *)NULL;
 static DCClass *current_class = (DCClass *)NULL;
 static DCSwitch *current_switch = (DCSwitch *)NULL;
 static DCSwitch *current_switch = (DCSwitch *)NULL;

+ 4 - 0
direct/src/dcparser/dcParser.yxx

@@ -29,6 +29,10 @@
 #define YYINITDEPTH 1000
 #define YYINITDEPTH 1000
 #define YYMAXDEPTH 1000
 #define YYMAXDEPTH 1000
 
 
+using std::istream;
+using std::ostringstream;
+using std::string;
+
 DCFile *dc_file = nullptr;
 DCFile *dc_file = nullptr;
 static DCClass *current_class = nullptr;
 static DCClass *current_class = nullptr;
 static DCSwitch *current_switch = nullptr;
 static DCSwitch *current_switch = nullptr;

+ 4 - 4
direct/src/dcparser/dcParserDefs.h

@@ -26,10 +26,10 @@ class DCParameter;
 class DCKeyword;
 class DCKeyword;
 class DCPacker;
 class DCPacker;
 
 
-void dc_init_parser(istream &in, const string &filename, DCFile &file);
-void dc_init_parser_parameter_value(istream &in, const string &filename,
+void dc_init_parser(std::istream &in, const std::string &filename, DCFile &file);
+void dc_init_parser_parameter_value(std::istream &in, const std::string &filename,
                                     DCPacker &packer);
                                     DCPacker &packer);
-void dc_init_parser_parameter_description(istream &in, const string &filename,
+void dc_init_parser_parameter_description(std::istream &in, const std::string &filename,
                                           DCFile *file);
                                           DCFile *file);
 DCField *dc_get_parameter_description();
 DCField *dc_get_parameter_description();
 void dc_cleanup_parser();
 void dc_cleanup_parser();
@@ -60,7 +60,7 @@ public:
     DCParameter *parameter;
     DCParameter *parameter;
     const DCKeyword *keyword;
     const DCKeyword *keyword;
   } u;
   } u;
-  string str;
+  std::string str;
 };
 };
 
 
 // The yacc-generated code expects to use the symbol 'YYSTYPE' to refer to the
 // The yacc-generated code expects to use the symbol 'YYSTYPE' to refer to the

+ 3 - 1
direct/src/dcparser/dcSimpleParameter.cxx

@@ -20,6 +20,8 @@
 #include "hashGenerator.h"
 #include "hashGenerator.h"
 #include <math.h>
 #include <math.h>
 
 
+using std::string;
+
 DCSimpleParameter::NestedFieldMap DCSimpleParameter::_nested_field_map;
 DCSimpleParameter::NestedFieldMap DCSimpleParameter::_nested_field_map;
 DCClassParameter *DCSimpleParameter::_uint32uint8_type = nullptr;
 DCClassParameter *DCSimpleParameter::_uint32uint8_type = nullptr;
 
 
@@ -2171,7 +2173,7 @@ unpack_skip(const char *data, size_t length, size_t &p,
  * identifier.
  * identifier.
  */
  */
 void DCSimpleParameter::
 void DCSimpleParameter::
-output_instance(ostream &out, bool brief, const string &prename,
+output_instance(std::ostream &out, bool brief, const string &prename,
                 const string &name, const string &postname) const {
                 const string &name, const string &postname) const {
   if (get_typedef() != nullptr) {
   if (get_typedef() != nullptr) {
     output_typedef_name(out, brief, prename, name, postname);
     output_typedef_name(out, brief, prename, name, postname);

+ 4 - 4
direct/src/dcparser/dcSimpleParameter.h

@@ -60,7 +60,7 @@ public:
                           bool &pack_error, bool &range_error) const;
                           bool &pack_error, bool &range_error) const;
   virtual void pack_uint64(DCPackData &pack_data, uint64_t value,
   virtual void pack_uint64(DCPackData &pack_data, uint64_t value,
                            bool &pack_error, bool &range_error) const;
                            bool &pack_error, bool &range_error) const;
-  virtual void pack_string(DCPackData &pack_data, const string &value,
+  virtual void pack_string(DCPackData &pack_data, const std::string &value,
                            bool &pack_error, bool &range_error) const;
                            bool &pack_error, bool &range_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
 
 
@@ -75,14 +75,14 @@ public:
   virtual void unpack_uint64(const char *data, size_t length, size_t &p,
   virtual void unpack_uint64(const char *data, size_t length, size_t &p,
                              uint64_t &value, bool &pack_error, bool &range_error) const;
                              uint64_t &value, bool &pack_error, bool &range_error) const;
   virtual void unpack_string(const char *data, size_t length, size_t &p,
   virtual void unpack_string(const char *data, size_t length, size_t &p,
-                             string &value, bool &pack_error, bool &range_error) const;
+                             std::string &value, bool &pack_error, bool &range_error) const;
   virtual bool unpack_validate(const char *data, size_t length, size_t &p,
   virtual bool unpack_validate(const char *data, size_t length, size_t &p,
                                bool &pack_error, bool &range_error) const;
                                bool &pack_error, bool &range_error) const;
   virtual bool unpack_skip(const char *data, size_t length, size_t &p,
   virtual bool unpack_skip(const char *data, size_t length, size_t &p,
                            bool &pack_error) const;
                            bool &pack_error) const;
 
 
-  virtual void output_instance(ostream &out, bool brief, const string &prename,
-                               const string &name, const string &postname) const;
+  virtual void output_instance(std::ostream &out, bool brief, const std::string &prename,
+                               const std::string &name, const std::string &postname) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
 
 
 protected:
 protected:

+ 2 - 2
direct/src/dcparser/dcSubatomicType.cxx

@@ -13,8 +13,8 @@
 
 
 #include "dcSubatomicType.h"
 #include "dcSubatomicType.h"
 
 
-ostream &
-operator << (ostream &out, DCSubatomicType type) {
+std::ostream &
+operator << (std::ostream &out, DCSubatomicType type) {
   switch (type) {
   switch (type) {
   case ST_int8:
   case ST_int8:
     return out << "int8";
     return out << "int8";

+ 1 - 1
direct/src/dcparser/dcSubatomicType.h

@@ -60,6 +60,6 @@ enum DCSubatomicType {
 };
 };
 END_PUBLISH
 END_PUBLISH
 
 
-ostream &operator << (ostream &out, DCSubatomicType type);
+std::ostream &operator << (std::ostream &out, DCSubatomicType type);
 
 
 #endif
 #endif

+ 3 - 0
direct/src/dcparser/dcSwitch.cxx

@@ -18,6 +18,9 @@
 #include "dcindent.h"
 #include "dcindent.h"
 #include "dcPacker.h"
 #include "dcPacker.h"
 
 
+using std::ostream;
+using std::string;
+
 /**
 /**
  * The key_parameter must be recently allocated via new; it will be deleted
  * The key_parameter must be recently allocated via new; it will be deleted
  * via delete when the switch destructs.
  * via delete when the switch destructs.

+ 21 - 21
direct/src/dcparser/dcSwitch.h

@@ -29,29 +29,29 @@ class DCField;
  */
  */
 class DCSwitch : public DCDeclaration {
 class DCSwitch : public DCDeclaration {
 public:
 public:
-  DCSwitch(const string &name, DCField *key_parameter);
+  DCSwitch(const std::string &name, DCField *key_parameter);
   virtual ~DCSwitch();
   virtual ~DCSwitch();
 
 
 PUBLISHED:
 PUBLISHED:
   virtual DCSwitch *as_switch();
   virtual DCSwitch *as_switch();
   virtual const DCSwitch *as_switch() const;
   virtual const DCSwitch *as_switch() const;
 
 
-  const string &get_name() const;
+  const std::string &get_name() const;
   DCField *get_key_parameter() const;
   DCField *get_key_parameter() const;
 
 
   int get_num_cases() const;
   int get_num_cases() const;
-  int get_case_by_value(const string &case_value) const;
+  int get_case_by_value(const std::string &case_value) const;
   DCPackerInterface *get_case(int n) const;
   DCPackerInterface *get_case(int n) const;
   DCPackerInterface *get_default_case() const;
   DCPackerInterface *get_default_case() const;
 
 
-  string get_value(int case_index) const;
+  std::string get_value(int case_index) const;
   int get_num_fields(int case_index) const;
   int get_num_fields(int case_index) const;
   DCField *get_field(int case_index, int n) const;
   DCField *get_field(int case_index, int n) const;
-  DCField *get_field_by_name(int case_index, const string &name) const;
+  DCField *get_field_by_name(int case_index, const std::string &name) const;
 
 
 public:
 public:
   bool is_field_valid() const;
   bool is_field_valid() const;
-  int add_case(const string &value);
+  int add_case(const std::string &value);
   void add_invalid_case();
   void add_invalid_case();
   bool add_default();
   bool add_default();
   bool add_field(DCField *field);
   bool add_field(DCField *field);
@@ -59,13 +59,13 @@ public:
 
 
   const DCPackerInterface *apply_switch(const char *value_data, size_t length) const;
   const DCPackerInterface *apply_switch(const char *value_data, size_t length) const;
 
 
-  virtual void output(ostream &out, bool brief) const;
-  virtual void write(ostream &out, bool brief, int indent_level) const;
-  void output_instance(ostream &out, bool brief, const string &prename,
-                       const string &name, const string &postname) const;
-  void write_instance(ostream &out, bool brief, int indent_level,
-                      const string &prename, const string &name,
-                      const string &postname) const;
+  virtual void output(std::ostream &out, bool brief) const;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const;
+  void output_instance(std::ostream &out, bool brief, const std::string &prename,
+                       const std::string &name, const std::string &postname) const;
+  void write_instance(std::ostream &out, bool brief, int indent_level,
+                      const std::string &prename, const std::string &name,
+                      const std::string &postname) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
 
 
@@ -73,19 +73,19 @@ public:
 
 
 public:
 public:
   typedef pvector<DCField *> Fields;
   typedef pvector<DCField *> Fields;
-  typedef pmap<string, DCField *> FieldsByName;
+  typedef pmap<std::string, DCField *> FieldsByName;
 
 
   class SwitchFields : public DCPackerInterface {
   class SwitchFields : public DCPackerInterface {
   public:
   public:
-    SwitchFields(const string &name);
+    SwitchFields(const std::string &name);
     ~SwitchFields();
     ~SwitchFields();
     virtual DCPackerInterface *get_nested_field(int n) const;
     virtual DCPackerInterface *get_nested_field(int n) const;
 
 
     bool add_field(DCField *field);
     bool add_field(DCField *field);
     bool do_check_match_switch_case(const SwitchFields *other) const;
     bool do_check_match_switch_case(const SwitchFields *other) const;
 
 
-    void output(ostream &out, bool brief) const;
-    void write(ostream &out, bool brief, int indent_level) const;
+    void output(std::ostream &out, bool brief) const;
+    void write(std::ostream &out, bool brief, int indent_level) const;
 
 
   protected:
   protected:
     virtual bool do_check_match(const DCPackerInterface *other) const;
     virtual bool do_check_match(const DCPackerInterface *other) const;
@@ -98,13 +98,13 @@ public:
 
 
   class SwitchCase {
   class SwitchCase {
   public:
   public:
-    SwitchCase(const string &value, SwitchFields *fields);
+    SwitchCase(const std::string &value, SwitchFields *fields);
     ~SwitchCase();
     ~SwitchCase();
 
 
     bool do_check_match_switch_case(const SwitchCase *other) const;
     bool do_check_match_switch_case(const SwitchCase *other) const;
 
 
   public:
   public:
-    string _value;
+    std::string _value;
     SwitchFields *_fields;
     SwitchFields *_fields;
   };
   };
 
 
@@ -112,7 +112,7 @@ private:
   SwitchFields *start_new_case();
   SwitchFields *start_new_case();
 
 
 private:
 private:
-  string _name;
+  std::string _name;
   DCField *_key_parameter;
   DCField *_key_parameter;
 
 
   typedef pvector<SwitchCase *> Cases;
   typedef pvector<SwitchCase *> Cases;
@@ -137,7 +137,7 @@ private:
   bool _fields_added;
   bool _fields_added;
 
 
   // This map indexes into the _cases vector, above.
   // This map indexes into the _cases vector, above.
-  typedef pmap<string, int> CasesByValue;
+  typedef pmap<std::string, int> CasesByValue;
   CasesByValue _cases_by_value;
   CasesByValue _cases_by_value;
 };
 };
 
 

+ 4 - 2
direct/src/dcparser/dcSwitchParameter.cxx

@@ -15,6 +15,8 @@
 #include "dcSwitch.h"
 #include "dcSwitch.h"
 #include "hashGenerator.h"
 #include "hashGenerator.h"
 
 
+using std::string;
+
 /**
 /**
  *
  *
  */
  */
@@ -153,7 +155,7 @@ apply_switch(const char *value_data, size_t length) const {
  * identifier.
  * identifier.
  */
  */
 void DCSwitchParameter::
 void DCSwitchParameter::
-output_instance(ostream &out, bool brief, const string &prename,
+output_instance(std::ostream &out, bool brief, const string &prename,
                 const string &name, const string &postname) const {
                 const string &name, const string &postname) const {
   if (get_typedef() != nullptr) {
   if (get_typedef() != nullptr) {
     output_typedef_name(out, brief, prename, name, postname);
     output_typedef_name(out, brief, prename, name, postname);
@@ -168,7 +170,7 @@ output_instance(ostream &out, bool brief, const string &prename,
  * identifier.
  * identifier.
  */
  */
 void DCSwitchParameter::
 void DCSwitchParameter::
-write_instance(ostream &out, bool brief, int indent_level,
+write_instance(std::ostream &out, bool brief, int indent_level,
                const string &prename, const string &name,
                const string &prename, const string &name,
                const string &postname) const {
                const string &postname) const {
   if (get_typedef() != nullptr) {
   if (get_typedef() != nullptr) {

+ 5 - 5
direct/src/dcparser/dcSwitchParameter.h

@@ -41,11 +41,11 @@ public:
 
 
   const DCPackerInterface *apply_switch(const char *value_data, size_t length) const;
   const DCPackerInterface *apply_switch(const char *value_data, size_t length) const;
 
 
-  virtual void output_instance(ostream &out, bool brief, const string &prename,
-                               const string &name, const string &postname) const;
-  virtual void write_instance(ostream &out, bool brief, int indent_level,
-                              const string &prename, const string &name,
-                              const string &postname) const;
+  virtual void output_instance(std::ostream &out, bool brief, const std::string &prename,
+                               const std::string &name, const std::string &postname) const;
+  virtual void write_instance(std::ostream &out, bool brief, int indent_level,
+                              const std::string &prename, const std::string &name,
+                              const std::string &postname) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual void generate_hash(HashGenerator &hashgen) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
   virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const;
 
 

+ 5 - 3
direct/src/dcparser/dcTypedef.cxx

@@ -16,6 +16,8 @@
 #include "dcSimpleParameter.h"
 #include "dcSimpleParameter.h"
 #include "dcindent.h"
 #include "dcindent.h"
 
 
+using std::string;
+
 /**
 /**
  * The DCTypedef object becomes the owner of the supplied parameter pointer
  * The DCTypedef object becomes the owner of the supplied parameter pointer
  * and will delete it upon destruction.
  * and will delete it upon destruction.
@@ -72,7 +74,7 @@ get_name() const {
  */
  */
 string DCTypedef::
 string DCTypedef::
 get_description() const {
 get_description() const {
-  ostringstream strm;
+  std::ostringstream strm;
   _parameter->output(strm, true);
   _parameter->output(strm, true);
   return strm.str();
   return strm.str();
 }
 }
@@ -122,7 +124,7 @@ set_number(int number) {
  * Write a string representation of this instance to <out>.
  * Write a string representation of this instance to <out>.
  */
  */
 void DCTypedef::
 void DCTypedef::
-output(ostream &out, bool brief) const {
+output(std::ostream &out, bool brief) const {
   out << "typedef ";
   out << "typedef ";
   _parameter->output(out, false);
   _parameter->output(out, false);
 }
 }
@@ -131,7 +133,7 @@ output(ostream &out, bool brief) const {
  *
  *
  */
  */
 void DCTypedef::
 void DCTypedef::
-write(ostream &out, bool brief, int indent_level) const {
+write(std::ostream &out, bool brief, int indent_level) const {
   indent(out, indent_level)
   indent(out, indent_level)
     << "typedef ";
     << "typedef ";
 
 

+ 5 - 5
direct/src/dcparser/dcTypedef.h

@@ -26,13 +26,13 @@ class DCParameter;
 class DCTypedef : public DCDeclaration {
 class DCTypedef : public DCDeclaration {
 public:
 public:
   DCTypedef(DCParameter *parameter, bool implicit = false);
   DCTypedef(DCParameter *parameter, bool implicit = false);
-  DCTypedef(const string &name);
+  DCTypedef(const std::string &name);
   virtual ~DCTypedef();
   virtual ~DCTypedef();
 
 
 PUBLISHED:
 PUBLISHED:
   int get_number() const;
   int get_number() const;
-  const string &get_name() const;
-  string get_description() const;
+  const std::string &get_name() const;
+  std::string get_description() const;
 
 
   bool is_bogus_typedef() const;
   bool is_bogus_typedef() const;
   bool is_implicit_typedef() const;
   bool is_implicit_typedef() const;
@@ -41,8 +41,8 @@ public:
   DCParameter *make_new_parameter() const;
   DCParameter *make_new_parameter() const;
 
 
   void set_number(int number);
   void set_number(int number);
-  virtual void output(ostream &out, bool brief) const;
-  virtual void write(ostream &out, bool brief, int indent_level) const;
+  virtual void output(std::ostream &out, bool brief) const;
+  virtual void write(std::ostream &out, bool brief, int indent_level) const;
 
 
 private:
 private:
   DCParameter *_parameter;
   DCParameter *_parameter;

+ 2 - 2
direct/src/dcparser/dcindent.cxx

@@ -18,8 +18,8 @@
 /**
 /**
  *
  *
  */
  */
-ostream &
-indent(ostream &out, int indent_level) {
+std::ostream &
+indent(std::ostream &out, int indent_level) {
   for (int i = 0; i < indent_level; i++) {
   for (int i = 0; i < indent_level; i++) {
     out << ' ';
     out << ' ';
   }
   }

+ 2 - 2
direct/src/dcparser/dcindent.h

@@ -29,8 +29,8 @@
  * stream itself.  Useful for indenting a series of lines of text by a given
  * stream itself.  Useful for indenting a series of lines of text by a given
  * amount.
  * amount.
  */
  */
-ostream &
-indent(ostream &out, int indent_level);
+std::ostream &
+indent(std::ostream &out, int indent_level);
 
 
 #endif  // WITHIN_PANDA
 #endif  // WITHIN_PANDA
 
 

+ 2 - 2
direct/src/dcparser/hashGenerator.cxx

@@ -48,9 +48,9 @@ add_int(int num) {
  * Adds a string to the hash, by breaking it down into a sequence of integers.
  * Adds a string to the hash, by breaking it down into a sequence of integers.
  */
  */
 void HashGenerator::
 void HashGenerator::
-add_string(const string &str) {
+add_string(const std::string &str) {
   add_int(str.length());
   add_int(str.length());
-  string::const_iterator si;
+  std::string::const_iterator si;
   for (si = str.begin(); si != str.end(); ++si) {
   for (si = str.begin(); si != str.end(); ++si) {
     add_int(*si);
     add_int(*si);
   }
   }

+ 1 - 1
direct/src/dcparser/hashGenerator.h

@@ -25,7 +25,7 @@ public:
   HashGenerator();
   HashGenerator();
 
 
   void add_int(int num);
   void add_int(int num);
-  void add_string(const string &str);
+  void add_string(const std::string &str);
 
 
   unsigned long get_hash() const;
   unsigned long get_hash() const;
 
 

+ 1 - 1
direct/src/dcparser/primeNumberGenerator.h

@@ -22,7 +22,7 @@
 #include "vector_int.h"
 #include "vector_int.h"
 
 
 #else
 #else
-typedef vector<int> vector_int;
+typedef std::vector<int> vector_int;
 #endif
 #endif
 
 
 /**
 /**

+ 5 - 5
direct/src/deadrec/smoothMover.cxx

@@ -95,7 +95,7 @@ mark_position() {
       LVector3 pos_delta = _sample._pos - _smooth_pos;
       LVector3 pos_delta = _sample._pos - _smooth_pos;
       LVecBase3 hpr_delta = _sample._hpr - _smooth_hpr;
       LVecBase3 hpr_delta = _sample._hpr - _smooth_hpr;
       double age = timestamp - _smooth_timestamp;
       double age = timestamp - _smooth_timestamp;
-      age = min(age, _max_position_age);
+      age = std::min(age, _max_position_age);
 
 
       set_smooth_pos(_sample._pos, _sample._hpr, timestamp);
       set_smooth_pos(_sample._pos, _sample._hpr, timestamp);
       if (age != 0.0) {
       if (age != 0.0) {
@@ -272,13 +272,13 @@ compute_smooth_position(double timestamp) {
 
 
   // Find the newest of the points before the indicated time.  Assume that
   // Find the newest of the points before the indicated time.  Assume that
   // this will be no older than _last_point_before.
   // this will be no older than _last_point_before.
-  i = max(0, _last_point_before);
+  i = std::max(0, _last_point_before);
   while (i < num_points && _points[i]._timestamp < timestamp) {
   while (i < num_points && _points[i]._timestamp < timestamp) {
     point_before = i;
     point_before = i;
     timestamp_before = _points[i]._timestamp;
     timestamp_before = _points[i]._timestamp;
     ++i;
     ++i;
   }
   }
-  point_way_before = max(point_before - 1, -1);
+  point_way_before = std::max(point_before - 1, -1);
 
 
   // Now the next point is presumably the oldest point after the indicated
   // Now the next point is presumably the oldest point after the indicated
   // time.
   // time.
@@ -527,7 +527,7 @@ get_latest_position() {
  *
  *
  */
  */
 void SmoothMover::
 void SmoothMover::
-output(ostream &out) const {
+output(std::ostream &out) const {
   out << "SmoothMover, " << _points.size() << " sample points.";
   out << "SmoothMover, " << _points.size() << " sample points.";
 }
 }
 
 
@@ -535,7 +535,7 @@ output(ostream &out) const {
  *
  *
  */
  */
 void SmoothMover::
 void SmoothMover::
-write(ostream &out) const {
+write(std::ostream &out) const {
   out << "SmoothMover, " << _points.size() << " sample points:\n";
   out << "SmoothMover, " << _points.size() << " sample points:\n";
   int num_points = _points.size();
   int num_points = _points.size();
   for (int i = 0; i < num_points; i++) {
   for (int i = 0; i < num_points; i++) {

+ 2 - 2
direct/src/deadrec/smoothMover.h

@@ -137,8 +137,8 @@ PUBLISHED:
   INLINE void set_default_to_standing_still(bool flag);
   INLINE void set_default_to_standing_still(bool flag);
   INLINE bool get_default_to_standing_still();
   INLINE bool get_default_to_standing_still();
 
 
-  void output(ostream &out) const;
-  void write(ostream &out) const;
+  void output(std::ostream &out) const;
+  void write(std::ostream &out) const;
 
 
 private:
 private:
   void set_smooth_pos(const LPoint3 &pos, const LVecBase3 &hpr,
   void set_smooth_pos(const LPoint3 &pos, const LVecBase3 &hpr,

+ 6 - 1
direct/src/directd/directd.cxx

@@ -34,6 +34,11 @@
   #error Buildsystem error: BUILDING_DIRECT_DIRECTD not defined
   #error Buildsystem error: BUILDING_DIRECT_DIRECTD not defined
 #endif
 #endif
 
 
+using std::cerr;
+using std::cout;
+using std::endl;
+using std::string;
+
 namespace {
 namespace {
   // ...This section is part of the old stuff from the original
   // ...This section is part of the old stuff from the original
   // implementation.  The new stuff that uses job objects doesn't need this
   // implementation.  The new stuff that uses job objects doesn't need this
@@ -148,7 +153,7 @@ DirectD::~DirectD() {
 int
 int
 DirectD::client_ready(const string& server_host, int port,
 DirectD::client_ready(const string& server_host, int port,
     const string& cmd) {
     const string& cmd) {
-  stringstream ss;
+  std::stringstream ss;
   ss<<"!"<<cmd;
   ss<<"!"<<cmd;
   send_one_message(server_host, port, ss.str());
   send_one_message(server_host, port, ss.str());
   return 0;
   return 0;

+ 10 - 10
direct/src/directd/directd.h

@@ -73,7 +73,7 @@ PUBLISHED:
  * one command, you should use connect_to(), send_command(), and
  * one command, you should use connect_to(), send_command(), and
  * disconnect_from().
  * disconnect_from().
  */
  */
-  int client_ready(const string& server_host, int port, const string& cmd);
+  int client_ready(const std::string& server_host, int port, const std::string& cmd);
 
 
 /**
 /**
  * Tell the server to do the command cmd.  cmd is one of the following:
  * Tell the server to do the command cmd.  cmd is one of the following:
@@ -85,7 +85,7 @@ PUBLISHED:
  * client_ready(), it prefixes "!" for you.  A new connection will be created
  * client_ready(), it prefixes "!" for you.  A new connection will be created
  * and closed.
  * and closed.
  */
  */
-  int tell_server(const string& server_host, int port, const string& cmd);
+  int tell_server(const std::string& server_host, int port, const std::string& cmd);
 
 
 /**
 /**
  * Call this function from the client after calling <count> client_ready()
  * Call this function from the client after calling <count> client_ready()
@@ -102,7 +102,7 @@ PUBLISHED:
  * Call this function from the server when import ShowbaseGlobal is nearly
  * Call this function from the server when import ShowbaseGlobal is nearly
  * finished.
  * finished.
  */
  */
-  int server_ready(const string& client_host, int port);
+  int server_ready(const std::string& client_host, int port);
 
 
 /**
 /**
  * Call connect_to from client for each server.  returns the port number of
  * Call connect_to from client for each server.  returns the port number of
@@ -110,28 +110,28 @@ PUBLISHED:
  * second argument).  The return value can be used for the port arguemnt in
  * second argument).  The return value can be used for the port arguemnt in
  * disconnect_from().
  * disconnect_from().
  */
  */
-  int connect_to(const string& server_host, int port);
+  int connect_to(const std::string& server_host, int port);
 
 
 /**
 /**
  * This is the counterpart to connect_to().  Pass the same server_host as for
  * This is the counterpart to connect_to().  Pass the same server_host as for
  * connect_to(), but pass the return value from connect_to() for the port, not
  * connect_to(), but pass the return value from connect_to() for the port, not
  * the port passed to connect_to().
  * the port passed to connect_to().
  */
  */
-  void disconnect_from(const string& server_host, int port);
+  void disconnect_from(const std::string& server_host, int port);
 
 
 /**
 /**
  * Send the same command string to all current connections.
  * Send the same command string to all current connections.
  */
  */
-  void send_command(const string& cmd);
+  void send_command(const std::string& cmd);
 
 
 protected:
 protected:
-  void start_app(const string& cmd);
+  void start_app(const std::string& cmd);
   void kill_app(int index);
   void kill_app(int index);
   void kill_all();
   void kill_all();
-  virtual void handle_command(const string& cmd);
+  virtual void handle_command(const std::string& cmd);
   void handle_datagram(NetDatagram& datagram);
   void handle_datagram(NetDatagram& datagram);
-  void send_one_message(const string& host_name,
-      int port, const string& message);
+  void send_one_message(const std::string& host_name,
+      int port, const std::string& message);
 
 
   QueuedConnectionManager _cm;
   QueuedConnectionManager _cm;
   QueuedConnectionReader _reader;
   QueuedConnectionReader _reader;

+ 6 - 0
direct/src/directdServer/directdClient.cxx

@@ -13,6 +13,12 @@
 
 
 #include "directdClient.h"
 #include "directdClient.h"
 
 
+using std::cerr;
+using std::cin;
+using std::cout;
+using std::endl;
+using std::string;
+
 DirectDClient::DirectDClient() {
 DirectDClient::DirectDClient() {
 }
 }
 
 

+ 2 - 2
direct/src/directdServer/directdClient.h

@@ -21,8 +21,8 @@ public:
   DirectDClient();
   DirectDClient();
   ~DirectDClient();
   ~DirectDClient();
 
 
-  void run_client(const string& host, int port);
+  void run_client(const std::string& host, int port);
 
 
 protected:
 protected:
-  void cli_command(const string& cmd);
+  void cli_command(const std::string& cmd);
 };
 };

+ 6 - 2
direct/src/directdServer/directdServer.cxx

@@ -13,6 +13,10 @@
 
 
 #include "directdServer.h"
 #include "directdServer.h"
 
 
+using std::cerr;
+using std::endl;
+using std::string;
+
 DirectDServer::DirectDServer() {
 DirectDServer::DirectDServer() {
 }
 }
 
 
@@ -61,8 +65,8 @@ void
 DirectDServer::read_command(string& cmd) {
 DirectDServer::read_command(string& cmd) {
   try {
   try {
     pifstream f;
     pifstream f;
-    f.open("directdCommand", ios::in | ios::binary);
-    stringstream ss;
+    f.open("directdCommand", std::ios::in | std::ios::binary);
+    std::stringstream ss;
     const int buf_size=512;
     const int buf_size=512;
     char buf[buf_size];
     char buf[buf_size];
     f.getline(buf, buf_size);
     f.getline(buf, buf_size);

+ 2 - 2
direct/src/directdServer/directdServer.h

@@ -29,6 +29,6 @@ public:
   void run_server(int port);
   void run_server(int port);
 
 
 protected:
 protected:
-  void read_command(string& cmd);
-  virtual void handle_command(const string& cmd);
+  void read_command(std::string& cmd);
+  virtual void handle_command(const std::string& cmd);
 };
 };

+ 1 - 1
direct/src/distributed/cConnectionRepository.I

@@ -220,7 +220,7 @@ get_msg_type() const {
  * Returns event string that will be thrown if the datagram reader queue
  * Returns event string that will be thrown if the datagram reader queue
  * overflows.
  * overflows.
  */
  */
-INLINE const string &CConnectionRepository::
+INLINE const std::string &CConnectionRepository::
 get_overflow_event_name() {
 get_overflow_event_name() {
   return _overflow_event_name;
   return _overflow_event_name;
 }
 }

+ 5 - 2
direct/src/distributed/cConnectionRepository.cxx

@@ -28,6 +28,9 @@
 #include "py_panda.h"
 #include "py_panda.h"
 #endif
 #endif
 
 
+using std::endl;
+using std::string;
+
 const string CConnectionRepository::_overflow_event_name = "CRDatagramOverflow";
 const string CConnectionRepository::_overflow_event_name = "CRDatagramOverflow";
 
 
 #ifndef CPPPARSER
 #ifndef CPPPARSER
@@ -406,7 +409,7 @@ send_datagram(const Datagram &dg) {
     bool result = _bdc.SendMessage(dg);
     bool result = _bdc.SendMessage(dg);
     if (!result && _bdc.IsConnected()) {
     if (!result && _bdc.IsConnected()) {
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
-      ostringstream s;
+      std::ostringstream s;
 
 
 #if PY_VERSION_HEX >= 0x03030000
 #if PY_VERSION_HEX >= 0x03030000
       PyObject *exc_type = PyExc_ConnectionError;
       PyObject *exc_type = PyExc_ConnectionError;
@@ -884,7 +887,7 @@ handle_update_field_owner() {
  * description on the indicated output stream.
  * description on the indicated output stream.
  */
  */
 void CConnectionRepository::
 void CConnectionRepository::
-describe_message(ostream &out, const string &prefix,
+describe_message(std::ostream &out, const string &prefix,
                  const Datagram &dg) const {
                  const Datagram &dg) const {
   DCPacker packer;
   DCPacker packer;
 
 

+ 4 - 4
direct/src/distributed/cConnectionRepository.h

@@ -122,7 +122,7 @@ PUBLISHED:
 // INLINE unsigned char get_sec_code() const;
 // INLINE unsigned char get_sec_code() const;
   BLOCKING INLINE unsigned int get_msg_type() const;
   BLOCKING INLINE unsigned int get_msg_type() const;
 
 
-  INLINE static const string &get_overflow_event_name();
+  INLINE static const std::string &get_overflow_event_name();
 
 
   BLOCKING bool is_connected();
   BLOCKING bool is_connected();
 
 
@@ -161,7 +161,7 @@ private:
   bool handle_update_field();
   bool handle_update_field();
   bool handle_update_field_owner();
   bool handle_update_field_owner();
 
 
-  void describe_message(ostream &out, const string &prefix,
+  void describe_message(std::ostream &out, const std::string &prefix,
                         const Datagram &dg) const;
                         const Datagram &dg) const;
 
 
 private:
 private:
@@ -205,11 +205,11 @@ private:
   CHANNEL_TYPE                          _msg_sender;
   CHANNEL_TYPE                          _msg_sender;
   unsigned int                          _msg_type;
   unsigned int                          _msg_type;
 
 
-  static const string _overflow_event_name;
+  static const std::string _overflow_event_name;
 
 
   bool _want_message_bundling;
   bool _want_message_bundling;
   unsigned int _bundling_msgs;
   unsigned int _bundling_msgs;
-  typedef std::vector< string > BundledMsgVector;
+  typedef std::vector< std::string > BundledMsgVector;
   BundledMsgVector _bundle_msgs;
   BundledMsgVector _bundle_msgs;
 
 
   static PStatCollector _update_pcollector;
   static PStatCollector _update_pcollector;

+ 4 - 4
direct/src/distributed/cDistributedSmoothNodeBase.cxx

@@ -268,7 +268,7 @@ broadcast_pos_hpr_xy() {
  * indicated field name, up until the arguments.
  * indicated field name, up until the arguments.
  */
  */
 void CDistributedSmoothNodeBase::
 void CDistributedSmoothNodeBase::
-begin_send_update(DCPacker &packer, const string &field_name) {
+begin_send_update(DCPacker &packer, const std::string &field_name) {
   DCField *field = _dclass->get_field_by_name(field_name);
   DCField *field = _dclass->get_field_by_name(field_name);
   nassertv(field != nullptr);
   nassertv(field != nullptr);
 
 
@@ -325,14 +325,14 @@ finish_send_update(DCPacker &packer) {
   } else {
   } else {
 #ifndef NDEBUG
 #ifndef NDEBUG
     if (packer.had_range_error()) {
     if (packer.had_range_error()) {
-      ostringstream error;
+      std::ostringstream error;
       error << "Node position out of range for DC file: "
       error << "Node position out of range for DC file: "
             << _node_path << " pos = " << _store_xyz
             << _node_path << " pos = " << _store_xyz
             << " hpr = " << _store_hpr
             << " hpr = " << _store_hpr
             << " zoneId = " << _currL[0];
             << " zoneId = " << _currL[0];
 
 
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
-      string message = error.str();
+      std::string message = error.str();
       distributed_cat.warning()
       distributed_cat.warning()
         << message << "\n";
         << message << "\n";
       PyErr_SetString(PyExc_ValueError, message.c_str());
       PyErr_SetString(PyExc_ValueError, message.c_str());
@@ -364,5 +364,5 @@ set_curr_l(uint64_t l) {
 
 
 void CDistributedSmoothNodeBase::
 void CDistributedSmoothNodeBase::
 print_curr_l() {
 print_curr_l() {
-  cout << "printCurrL: sent l: " << _currL[1] << " last set l: " << _currL[0] << "\n";
+  std::cout << "printCurrL: sent l: " << _currL[1] << " last set l: " << _currL[0] << "\n";
 }
 }

+ 1 - 1
direct/src/distributed/cDistributedSmoothNodeBase.h

@@ -69,7 +69,7 @@ private:
   INLINE void d_setSmPosHpr(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r);
   INLINE void d_setSmPosHpr(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r);
   INLINE void d_setSmPosHprL(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r, uint64_t l);
   INLINE void d_setSmPosHprL(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r, uint64_t l);
 
 
-  void begin_send_update(DCPacker &packer, const string &field_name);
+  void begin_send_update(DCPacker &packer, const std::string &field_name);
   void finish_send_update(DCPacker &packer);
   void finish_send_update(DCPacker &packer);
 
 
   enum Flags {
   enum Flags {

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff