diff --git a/contrib/src/ai/aiBehaviors.h b/contrib/src/ai/aiBehaviors.h index 6a20876db8..3524a32b63 100644 --- a/contrib/src/ai/aiBehaviors.h +++ b/contrib/src/ai/aiBehaviors.h @@ -28,8 +28,8 @@ class PathFollow; class PathFind; class ObstacleAvoidance; -typedef list > ListFlee; -typedef list > ListEvade; +typedef std::list > ListFlee; +typedef std::list > ListEvade; /** * This class implements all the steering behaviors of the AI framework, such @@ -113,21 +113,21 @@ public: ~AIBehaviors(); 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(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(); - void accumulate_force(string force_type, LVecBase3 force); + void accumulate_force(std::string force_type, LVecBase3 force); LVecBase3 calculate_prioritized(); void flock_activate(); LVecBase3 do_flock(); - int char_to_int(string ai_type); + int char_to_int(std::string ai_type); PUBLISHED: void seek(NodePath target_object, float seek_wt = 1.0); @@ -150,21 +150,21 @@ PUBLISHED: void path_follow(float follow_wt); void add_to_path(LVecBase3 pos); - void start_follow(string type = "normal"); + void start_follow(std::string type = "normal"); // should have different function names. 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_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 diff --git a/contrib/src/ai/aiCharacter.h b/contrib/src/ai/aiCharacter.h index 30adf21ced..81b3a01210 100644 --- a/contrib/src/ai/aiCharacter.h +++ b/contrib/src/ai/aiCharacter.h @@ -32,7 +32,7 @@ class EXPCL_PANDAAI AICharacter : public ReferenceCount { double _max_force; LVecBase3 _velocity; LVecBase3 _steering_force; - string _name; + std::string _name; double _movt_force; unsigned int _ai_char_flock_id; AIWorld *_world; @@ -63,7 +63,7 @@ PUBLISHED: // This function is used to enable or disable the guides for path finding. 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(); }; diff --git a/contrib/src/ai/aiWorld.h b/contrib/src/ai/aiWorld.h index 3848e054dc..67576c6745 100644 --- a/contrib/src/ai/aiWorld.h +++ b/contrib/src/ai/aiWorld.h @@ -37,14 +37,14 @@ class EXPCL_PANDAAI AIWorld { std::vector _obstacles; typedef std::vector FlockPool; FlockPool _flock_pool; - void remove_ai_char_from_flock(string name); + void remove_ai_char_from_flock(std::string name); PUBLISHED: AIWorld(NodePath render); ~AIWorld(); 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 flock_off(unsigned int flock_id); diff --git a/contrib/src/ai/pathFind.h b/contrib/src/ai/pathFind.h index ffeb50abf0..cd26cc234f 100644 --- a/contrib/src/ai/pathFind.h +++ b/contrib/src/ai/pathFind.h @@ -56,8 +56,8 @@ public: void clear_previous_obstacles(); 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 dynamic_avoid(NodePath obstacle); }; diff --git a/contrib/src/ai/pathFollow.h b/contrib/src/ai/pathFollow.h index e2d09a27bc..16b221314e 100644 --- a/contrib/src/ai/pathFollow.h +++ b/contrib/src/ai/pathFollow.h @@ -13,18 +13,18 @@ class EXPCL_PANDAAI PathFollow { public: AICharacter *_ai_char; float _follow_weight; - vector _path; + std::vector _path; int _curr_path_waypoint; bool _start; NodePath _dummy; - string _type; + std::string _type; ClockObject *_myClock; float _time; PathFollow(AICharacter *ai_ch, float follow_wt); ~PathFollow(); void add_to_path(LVecBase3 pos); - void start(string type); + void start(std::string type); void do_follow(); bool check_if_possible(); }; diff --git a/contrib/src/rplight/gpuCommand.I b/contrib/src/rplight/gpuCommand.I index 3531eed2ba..0171442b08 100644 --- a/contrib/src/rplight/gpuCommand.I +++ b/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) { 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; } _data[_current_index++] = v; diff --git a/contrib/src/rplight/gpuCommand.h b/contrib/src/rplight/gpuCommand.h index 7fa784b975..c6d5809b37 100644 --- a/contrib/src/rplight/gpuCommand.h +++ b/contrib/src/rplight/gpuCommand.h @@ -73,7 +73,7 @@ PUBLISHED: inline static bool get_uses_integer_packing(); void write_to(const PTA_uchar &dest, size_t command_index); - void write(ostream &out) const; + void write(std::ostream &out) const; private: diff --git a/contrib/src/rplight/pointerSlotStorage.h b/contrib/src/rplight/pointerSlotStorage.h index 401e133b81..c37102574f 100644 --- a/contrib/src/rplight/pointerSlotStorage.h +++ b/contrib/src/rplight/pointerSlotStorage.h @@ -203,7 +203,7 @@ public: nassertv(slot >= 0 && slot < SIZE); nassertv(_data[slot] == nullptr); // Slot already taken! 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; _num_entries++; } diff --git a/contrib/src/rplight/rpLight.I b/contrib/src/rplight/rpLight.I index 9b21906310..9cde259478 100644 --- a/contrib/src/rplight/rpLight.I +++ b/contrib/src/rplight/rpLight.I @@ -278,7 +278,7 @@ inline RPLight::LightType RPLight::get_light_type() const { */ inline void RPLight::set_casts_shadows(bool flag) { 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; } _casts_shadows = flag; diff --git a/contrib/src/rplight/rpLight.h b/contrib/src/rplight/rpLight.h index 13665c23ad..1a104f8ac7 100644 --- a/contrib/src/rplight/rpLight.h +++ b/contrib/src/rplight/rpLight.h @@ -122,7 +122,7 @@ protected: LightType _light_type; float _near_plane; - vector _shadow_sources; + std::vector _shadow_sources; }; #include "rpLight.I" diff --git a/contrib/src/rplight/shadowAtlas.I b/contrib/src/rplight/shadowAtlas.I index f48fc451f1..0b1812fa28 100644 --- a/contrib/src/rplight/shadowAtlas.I +++ b/contrib/src/rplight/shadowAtlas.I @@ -118,7 +118,7 @@ inline int ShadowAtlas::get_required_tiles(size_t resolution) const { if (resolution % _tile_size != 0) { 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 resolution / _tile_size; diff --git a/contrib/src/rplight/shadowManager.I b/contrib/src/rplight/shadowManager.I index f5d87c463e..983c044f6f 100644 --- a/contrib/src/rplight/shadowManager.I +++ b/contrib/src/rplight/shadowManager.I @@ -52,7 +52,7 @@ inline void ShadowManager::set_max_updates(size_t max_updates) { nassertv(max_updates >= 0); nassertv(_atlas == nullptr); // ShadowManager was already initialized 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; } @@ -170,7 +170,7 @@ inline bool ShadowManager::add_update(const ShadowSource* source) { if (_queued_updates.size() >= _max_updates) { 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; } diff --git a/contrib/src/rplight/tagStateManager.I b/contrib/src/rplight/tagStateManager.I index 058832e60d..2da15e4ecd 100644 --- a/contrib/src/rplight/tagStateManager.I +++ b/contrib/src/rplight/tagStateManager.I @@ -35,7 +35,7 @@ * @param source Camera which will be used to render shadows */ inline void TagStateManager:: -register_camera(const string& name, Camera* source) { +register_camera(const std::string& name, Camera* source) { ContainerList::iterator entry = _containers.find(name); nassertv(entry != _containers.end()); register_camera(entry->second, source); @@ -49,7 +49,7 @@ register_camera(const string& name, Camera* source) { * @param source Camera to unregister */ inline void TagStateManager:: -unregister_camera(const string& name, Camera* source) { +unregister_camera(const std::string& name, Camera* source) { ContainerList::iterator entry = _containers.find(name); nassertv(entry != _containers.end()); 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. */ 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); nassertv(entry != _containers.end()); 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 */ inline BitMask32 TagStateManager:: -get_mask(const string &container_name) { +get_mask(const std::string &container_name) { if (container_name == "gbuffer") { return BitMask32::bit(1); } diff --git a/contrib/src/rplight/tagStateManager.h b/contrib/src/rplight/tagStateManager.h index 6c26e5cbf6..b05e364333 100644 --- a/contrib/src/rplight/tagStateManager.h +++ b/contrib/src/rplight/tagStateManager.h @@ -52,36 +52,36 @@ PUBLISHED: TagStateManager(NodePath main_cam_node); ~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(); - 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: - typedef vector CameraList; - typedef pmap TagStateList; + typedef std::vector CameraList; + typedef pmap TagStateList; struct StateContainer { CameraList cameras; TagStateList tag_states; - string tag_name; + std::string tag_name; BitMask32 mask; bool write_color; 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) {}; }; 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 register_camera(StateContainer &container, Camera* source); void unregister_camera(StateContainer &container, Camera* source); - typedef pmap ContainerList; + typedef pmap ContainerList; ContainerList _containers; NodePath _main_cam_node; diff --git a/direct/src/dcparser/dcArrayParameter.h b/direct/src/dcparser/dcArrayParameter.h index 10a8f022c2..fd5008fb97 100644 --- a/direct/src/dcparser/dcArrayParameter.h +++ b/direct/src/dcparser/dcArrayParameter.h @@ -46,14 +46,14 @@ public: virtual DCPackerInterface *get_nested_field(int n) 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 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; 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, - string &value, bool &pack_error, bool &range_error) const; + std::string &value, bool &pack_error, bool &range_error) const; protected: virtual bool do_check_match(const DCPackerInterface *other) const; diff --git a/direct/src/dcparser/dcAtomicField.h b/direct/src/dcparser/dcAtomicField.h index c002ecf15a..e0d7cee58e 100644 --- a/direct/src/dcparser/dcAtomicField.h +++ b/direct/src/dcparser/dcAtomicField.h @@ -29,7 +29,7 @@ */ class DCAtomicField : public DCField { public: - DCAtomicField(const string &name, DCClass *dclass, bool bogus_field); + DCAtomicField(const std::string &name, DCClass *dclass, bool bogus_field); virtual ~DCAtomicField(); PUBLISHED: @@ -40,17 +40,17 @@ PUBLISHED: DCParameter *get_element(int n) const; // 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; - string get_element_name(int n) const; + std::string get_element_name(int n) const; DCSubatomicType get_element_type(int n) const; int get_element_divisor(int n) const; public: 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 DCPackerInterface *get_nested_field(int n) const; @@ -60,7 +60,7 @@ protected: virtual bool do_check_match_atomic_field(const DCAtomicField *other) const; private: - void output_element(ostream &out, bool brief, DCParameter *element) const; + void output_element(std::ostream &out, bool brief, DCParameter *element) const; typedef pvector Elements; Elements _elements; diff --git a/direct/src/dcparser/dcClass.I b/direct/src/dcparser/dcClass.I index a33fe53bc5..edba84f726 100644 --- a/direct/src/dcparser/dcClass.I +++ b/direct/src/dcparser/dcClass.I @@ -22,7 +22,7 @@ get_dc_file() const { /** * Returns the name of this class. */ -INLINE const string &DCClass:: +INLINE const std::string &DCClass:: get_name() const { return _name; } diff --git a/direct/src/dcparser/dcClass.h b/direct/src/dcparser/dcClass.h index 73ad9e43d3..9f7945b372 100644 --- a/direct/src/dcparser/dcClass.h +++ b/direct/src/dcparser/dcClass.h @@ -43,7 +43,7 @@ class DCParameter; */ class DCClass : public DCDeclaration { public: - DCClass(DCFile *dc_file, const string &name, + DCClass(DCFile *dc_file, const std::string &name, bool is_struct, bool bogus_class); ~DCClass(); @@ -53,7 +53,7 @@ PUBLISHED: INLINE DCFile *get_dc_file() const; - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE int get_number() const; int get_num_parents() const; @@ -65,7 +65,7 @@ PUBLISHED: int get_num_fields() 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; int get_num_inherited_fields() const; @@ -78,7 +78,7 @@ PUBLISHED: INLINE void start_generate(); INLINE void stop_generate(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; #ifdef HAVE_PYTHON bool has_class_def() const; @@ -94,9 +94,9 @@ PUBLISHED: void receive_update_all_required(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); bool pack_required_field(Datagram &datagram, PyObject *distobj, 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; - 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; - 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; 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, @@ -120,10 +120,10 @@ PUBLISHED: #endif 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 clear_inherited_fields(); void rebuild_inherited_fields(); @@ -133,7 +133,7 @@ public: void set_number(int number); private: - void shadow_inherited_field(const string &name); + void shadow_inherited_field(const std::string &name); #ifdef WITHIN_PANDA PStatCollector _class_update_pcollector; @@ -144,7 +144,7 @@ private: DCFile *_dc_file; - string _name; + std::string _name; bool _is_struct; bool _bogus_class; int _number; @@ -157,7 +157,7 @@ private: typedef pvector Fields; Fields _fields, _inherited_fields; - typedef pmap FieldsByName; + typedef pmap FieldsByName; FieldsByName _fields_by_name; typedef pmap FieldsByIndex; diff --git a/direct/src/dcparser/dcClassParameter.h b/direct/src/dcparser/dcClassParameter.h index e846d48f88..3657190bf9 100644 --- a/direct/src/dcparser/dcClassParameter.h +++ b/direct/src/dcparser/dcClassParameter.h @@ -39,8 +39,8 @@ PUBLISHED: public: 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; protected: diff --git a/direct/src/dcparser/dcDeclaration.h b/direct/src/dcparser/dcDeclaration.h index 218473aef4..0fd4392ca6 100644 --- a/direct/src/dcparser/dcDeclaration.h +++ b/direct/src/dcparser/dcDeclaration.h @@ -36,15 +36,15 @@ PUBLISHED: virtual DCSwitch *as_switch(); 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: - 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); return out; } diff --git a/direct/src/dcparser/dcField.I b/direct/src/dcparser/dcField.I index 24a14cff08..aabf5cf114 100644 --- a/direct/src/dcparser/dcField.I +++ b/direct/src/dcparser/dcField.I @@ -42,7 +42,7 @@ has_default_value() const { * explicitly set (e.g. has_default_value() returns true), returns that * value; otherwise, returns an implicit default for the field. */ -INLINE const string &DCField:: +INLINE const std::string &DCField:: get_default_value() const { if (_default_value_stale) { ((DCField *)this)->refresh_default_value(); @@ -138,7 +138,7 @@ is_airecv() const { * Write a string representation of this instance to . */ INLINE void DCField:: -output(ostream &out) const { +output(std::ostream &out) const { output(out, true); } @@ -146,7 +146,7 @@ output(ostream &out) const { * Write a string representation of this instance to . */ INLINE void DCField:: -write(ostream &out, int indent_level) const { +write(std::ostream &out, int indent_level) const { write(out, false, indent_level); } @@ -172,7 +172,7 @@ set_class(DCClass *dclass) { * Establishes a default value for this field. */ INLINE void DCField:: -set_default_value(const string &default_value) { +set_default_value(const std::string &default_value) { _default_value = default_value; _has_default_value = true; _default_value_stale = false; diff --git a/direct/src/dcparser/dcField.h b/direct/src/dcparser/dcField.h index e7f2dbcd3c..6744ea93d4 100644 --- a/direct/src/dcparser/dcField.h +++ b/direct/src/dcparser/dcField.h @@ -37,7 +37,7 @@ class HashGenerator; class DCField : public DCPackerInterface, public DCKeywordList { public: DCField(); - DCField(const string &name, DCClass *dclass); + DCField(const std::string &name, DCClass *dclass); virtual ~DCField(); PUBLISHED: @@ -53,13 +53,13 @@ PUBLISHED: virtual DCParameter *as_parameter(); 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 const string &get_default_value() const; + INLINE const std::string &get_default_value() const; INLINE bool is_bogus_field() const; @@ -73,8 +73,8 @@ PUBLISHED: INLINE bool is_ownrecv() 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 bool pack_args(DCPacker &packer, PyObject *sequence) const; @@ -90,18 +90,18 @@ PUBLISHED: #endif 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 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_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 - static string get_pystr(PyObject *value); + static std::string get_pystr(PyObject *value); #endif protected: @@ -115,14 +115,14 @@ protected: bool _bogus_field; private: - string _default_value; + std::string _default_value; #ifdef WITHIN_PANDA PStatCollector _field_update_pcollector; #endif }; -INLINE ostream &operator << (ostream &out, const DCField &field) { +INLINE std::ostream &operator << (std::ostream &out, const DCField &field) { field.output(out); return out; } diff --git a/direct/src/dcparser/dcFile.h b/direct/src/dcparser/dcFile.h index 8ad67e1ace..7d7550804f 100644 --- a/direct/src/dcparser/dcFile.h +++ b/direct/src/dcparser/dcFile.h @@ -41,32 +41,32 @@ PUBLISHED: #endif 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(ostream &out, bool brief) const; + bool write(std::ostream &out, bool brief) const; int get_num_classes() 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; INLINE bool all_objects_valid() 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; - string get_import_symbol(int n, int i) const; + std::string get_import_symbol(int n, int i) const; int get_num_typedefs() 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; 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; @@ -74,10 +74,10 @@ public: void generate_hash(HashGenerator &hashgen) const; bool add_class(DCClass *dclass); 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_keyword(const string &name); + bool add_keyword(const std::string &name); void add_thing_to_delete(DCDeclaration *decl); void set_new_index_number(DCField *field); @@ -91,13 +91,13 @@ private: typedef pvector Classes; Classes _classes; - typedef pmap ThingsByName; + typedef pmap ThingsByName; ThingsByName _things_by_name; - typedef pvector ImportSymbols; + typedef pvector ImportSymbols; class Import { public: - string _module; + std::string _module; ImportSymbols _symbols; }; @@ -107,7 +107,7 @@ private: typedef pvector Typedefs; Typedefs _typedefs; - typedef pmap TypedefsByName; + typedef pmap TypedefsByName; TypedefsByName _typedefs_by_name; DCKeywordList _keywords; diff --git a/direct/src/dcparser/dcKeyword.h b/direct/src/dcparser/dcKeyword.h index 76c212c093..a82bd1ef0f 100644 --- a/direct/src/dcparser/dcKeyword.h +++ b/direct/src/dcparser/dcKeyword.h @@ -27,22 +27,22 @@ class HashGenerator; */ class DCKeyword : public DCDeclaration { public: - DCKeyword(const string &name, int historical_flag = ~0); + DCKeyword(const std::string &name, int historical_flag = ~0); virtual ~DCKeyword(); PUBLISHED: - const string &get_name() const; + const std::string &get_name() const; public: int get_historical_flag() const; 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; private: - const string _name; + const std::string _name; // This flag is only kept for historical reasons, so we can preserve the // file's hash code if no new flags are in use. diff --git a/direct/src/dcparser/dcKeywordList.h b/direct/src/dcparser/dcKeywordList.h index ada61ffaa0..d9905c64db 100644 --- a/direct/src/dcparser/dcKeywordList.h +++ b/direct/src/dcparser/dcKeywordList.h @@ -31,11 +31,11 @@ public: ~DCKeywordList(); PUBLISHED: - bool has_keyword(const string &name) const; + bool has_keyword(const std::string &name) const; bool has_keyword(const DCKeyword *keyword) const; int get_num_keywords() 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; @@ -45,14 +45,14 @@ public: bool add_keyword(const DCKeyword *keyword); void clear_keywords(); - void output_keywords(ostream &out) const; + void output_keywords(std::ostream &out) const; void generate_hash(HashGenerator &hashgen) const; private: typedef pvector Keywords; Keywords _keywords; - typedef pmap KeywordsByName; + typedef pmap KeywordsByName; KeywordsByName _keywords_by_name; int _flags; diff --git a/direct/src/dcparser/dcLexerDefs.h b/direct/src/dcparser/dcLexerDefs.h index 8c480ad98a..eb6b517045 100644 --- a/direct/src/dcparser/dcLexerDefs.h +++ b/direct/src/dcparser/dcLexerDefs.h @@ -16,14 +16,14 @@ #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_description(); int dc_error_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(); diff --git a/direct/src/dcparser/dcMolecularField.h b/direct/src/dcparser/dcMolecularField.h index 6d532a1b23..db7d850e00 100644 --- a/direct/src/dcparser/dcMolecularField.h +++ b/direct/src/dcparser/dcMolecularField.h @@ -27,7 +27,7 @@ class DCParameter; */ class DCMolecularField : public DCField { public: - DCMolecularField(const string &name, DCClass *dclass); + DCMolecularField(const std::string &name, DCClass *dclass); PUBLISHED: virtual DCMolecularField *as_molecular_field(); @@ -39,8 +39,8 @@ PUBLISHED: public: 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 DCPackerInterface *get_nested_field(int n) const; diff --git a/direct/src/dcparser/dcNumericRange.I b/direct/src/dcparser/dcNumericRange.I index 8983204d48..bd41418205 100644 --- a/direct/src/dcparser/dcNumericRange.I +++ b/direct/src/dcparser/dcNumericRange.I @@ -125,7 +125,7 @@ generate_hash(HashGenerator &hashgen) const { */ template void DCNumericRange:: -output(ostream &out, Number divisor) const { +output(std::ostream &out, Number divisor) const { if (!_ranges.empty()) { typename Ranges::const_iterator ri; ri = _ranges.begin(); @@ -145,7 +145,7 @@ output(ostream &out, Number divisor) const { */ template void DCNumericRange:: -output_char(ostream &out, Number divisor) const { +output_char(std::ostream &out, Number divisor) const { if (divisor != 1) { output(out, divisor); @@ -248,7 +248,7 @@ get_max(int n) const { */ template INLINE void DCNumericRange:: -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 (range._min == range._max) { out << range._min; @@ -271,12 +271,12 @@ output_minmax(ostream &out, Number divisor, const MinMax &range) const { */ template INLINE void DCNumericRange:: -output_minmax_char(ostream &out, const MinMax &range) const { +output_minmax_char(std::ostream &out, const MinMax &range) const { if (range._min == range._max) { - DCPacker::enquote_string(out, '\'', string(1, range._min)); + DCPacker::enquote_string(out, '\'', std::string(1, range._min)); } else { - DCPacker::enquote_string(out, '\'', string(1, range._min)); + DCPacker::enquote_string(out, '\'', std::string(1, range._min)); out << "-"; - DCPacker::enquote_string(out, '\'', string(1, range._max)); + DCPacker::enquote_string(out, '\'', std::string(1, range._max)); } } diff --git a/direct/src/dcparser/dcNumericRange.h b/direct/src/dcparser/dcNumericRange.h index 6539c05422..b3450f89e4 100644 --- a/direct/src/dcparser/dcNumericRange.h +++ b/direct/src/dcparser/dcNumericRange.h @@ -40,8 +40,8 @@ public: 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: INLINE void clear(); @@ -60,8 +60,8 @@ private: Number _min; 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 Ranges; Ranges _ranges; diff --git a/direct/src/dcparser/dcPackData.I b/direct/src/dcparser/dcPackData.I index e1523f09ad..ac68d40313 100644 --- a/direct/src/dcparser/dcPackData.I +++ b/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(). */ -INLINE string DCPackData:: +INLINE std::string DCPackData:: get_string() const { - return string(_buffer, _used_length); + return std::string(_buffer, _used_length); } /** diff --git a/direct/src/dcparser/dcPackData.h b/direct/src/dcparser/dcPackData.h index 99cd0abbd5..7f891a1d5d 100644 --- a/direct/src/dcparser/dcPackData.h +++ b/direct/src/dcparser/dcPackData.h @@ -34,7 +34,7 @@ public: INLINE char *get_rewrite_pointer(size_t position, size_t size); PUBLISHED: - INLINE string get_string() const; + INLINE std::string get_string() const; INLINE size_t get_length() const; public: INLINE const char *get_data() const; diff --git a/direct/src/dcparser/dcPacker.I b/direct/src/dcparser/dcPacker.I index 9bb4607dd6..8c640d77b1 100644 --- a/direct/src/dcparser/dcPacker.I +++ b/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 * 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 { if (_current_field == nullptr) { - return string(); + return std::string(); } else { return _current_field->get_name(); } @@ -206,7 +206,7 @@ pack_uint64(uint64_t value) { * Packs the indicated numeric or string value into the stream. */ INLINE void DCPacker:: -pack_string(const string &value) { +pack_string(const std::string &value) { nassertv(_mode == M_pack || _mode == M_repack); if (_current_field == nullptr) { _pack_error = true; @@ -221,7 +221,7 @@ pack_string(const string &value) { * packed field element, or a whole group of field elements at once. */ INLINE void DCPacker:: -pack_literal_value(const string &value) { +pack_literal_value(const std::string &value) { nassertv(_mode == M_pack || _mode == M_repack); if (_current_field == nullptr) { _pack_error = true; @@ -329,9 +329,9 @@ unpack_uint64() { /** * Unpacks the current numeric or string value from the stream. */ -INLINE string DCPacker:: +INLINE std::string DCPacker:: unpack_string() { - string value; + std::string value; nassertr(_mode == M_unpack, value); if (_current_field == nullptr) { _pack_error = true; @@ -349,12 +349,12 @@ unpack_string() { * Returns the literal string that represents the packed value of the current * field, and advances the field pointer. */ -INLINE string DCPacker:: +INLINE std::string DCPacker:: unpack_literal_value() { size_t start = _unpack_p; 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. */ INLINE void DCPacker:: -unpack_string(string &value) { +unpack_string(std::string &value) { nassertv(_mode == M_unpack); if (_current_field == nullptr) { _pack_error = true; @@ -458,7 +458,7 @@ unpack_string(string &value) { * field, and advances the field pointer. */ INLINE void DCPacker:: -unpack_literal_value(string &value) { +unpack_literal_value(std::string &value) { size_t start = _unpack_p; unpack_skip(); nassertv(_unpack_p >= start); @@ -536,7 +536,7 @@ get_length() const { /** * Returns the packed data buffer as a string. Also see get_data(). */ -INLINE string DCPacker:: +INLINE std::string DCPacker:: get_string() const { 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(), * which is filled during packing. Also see get_unpack_data(). */ -INLINE string DCPacker:: +INLINE std::string DCPacker:: 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(). */ INLINE void DCPacker:: -get_string(string &data) const { +get_string(std::string &data) const { 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. */ INLINE void DCPacker:: -raw_pack_string(const string &value) { +raw_pack_string(const std::string &value) { nassertv(_mode == M_idle); DCPackerInterface::do_pack_uint16(_pack_data.get_write_pointer(2), 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. */ -INLINE string DCPacker:: +INLINE std::string DCPacker:: raw_unpack_string() { - string value; + std::string value; raw_unpack_string(value); return value; } @@ -958,7 +958,7 @@ raw_unpack_float64(double &value) { * Unpacks the data from the buffer between unpacking sessions. */ INLINE void DCPacker:: -raw_unpack_string(string &value) { +raw_unpack_string(std::string &value) { nassertv(_mode == M_idle && _unpack_data != nullptr); unsigned int string_length = raw_unpack_uint16(); diff --git a/direct/src/dcparser/dcPacker.h b/direct/src/dcparser/dcPacker.h index 380d40600c..9de32ff2cd 100644 --- a/direct/src/dcparser/dcPacker.h +++ b/direct/src/dcparser/dcPacker.h @@ -41,7 +41,7 @@ PUBLISHED: void begin_pack(const DCPackerInterface *root); bool end_pack(); - void set_unpack_data(const string &data); + void set_unpack_data(const std::string &data); public: void set_unpack_data(const char *unpack_data, size_t unpack_length, bool owns_unpack_data); @@ -53,7 +53,7 @@ PUBLISHED: void begin_repack(const DCPackerInterface *root); bool end_repack(); - bool seek(const string &field_name); + bool seek(const std::string &field_name); bool seek(int seek_index); INLINE bool has_nested_fields() const; @@ -64,7 +64,7 @@ PUBLISHED: INLINE const DCPackerInterface *get_current_field() const; INLINE const DCSwitchParameter *get_last_switch() 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 pop(); @@ -74,8 +74,8 @@ PUBLISHED: INLINE void pack_uint(unsigned int value); INLINE void pack_int64(int64_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(); INLINE double unpack_double(); @@ -83,8 +83,8 @@ PUBLISHED: INLINE unsigned int unpack_uint(); INLINE int64_t unpack_int64(); 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_skip(); @@ -96,8 +96,8 @@ public: INLINE void unpack_uint(unsigned int &value); INLINE void unpack_int64(int64_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: @@ -106,10 +106,10 @@ PUBLISHED: PyObject *unpack_object(); #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_pack_error() const; @@ -118,11 +118,11 @@ PUBLISHED: INLINE size_t get_num_unpacked_bytes() 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 string get_unpack_string() const; + INLINE std::string get_unpack_string() const; public: - INLINE void get_string(string &data) const; + INLINE void get_string(std::string &data) const; INLINE const char *get_data() const; INLINE char *take_data(); @@ -147,7 +147,7 @@ PUBLISHED: INLINE void raw_pack_uint32(unsigned int value); INLINE void raw_pack_uint64(uint64_t 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 // agree with channel_type in dcbase.h @@ -164,7 +164,7 @@ PUBLISHED: INLINE unsigned int raw_unpack_uint32(); INLINE uint64_t raw_unpack_uint64(); INLINE double raw_unpack_float64(); - INLINE string raw_unpack_string(); + INLINE std::string raw_unpack_string(); public: INLINE void raw_unpack_int8(int &value); @@ -176,11 +176,11 @@ public: INLINE void raw_unpack_uint32(unsigned int &value); INLINE void raw_unpack_uint64(uint64_t &value); INLINE void raw_unpack_float64(double &value); - INLINE void raw_unpack_string(string &value); + INLINE void raw_unpack_string(std::string &value); 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: INLINE void advance(); diff --git a/direct/src/dcparser/dcPackerCatalog.I b/direct/src/dcparser/dcPackerCatalog.I index 657609927d..1755db75e8 100644 --- a/direct/src/dcparser/dcPackerCatalog.I +++ b/direct/src/dcparser/dcPackerCatalog.I @@ -52,7 +52,7 @@ get_entry(int n) const { * get_entry(). */ 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); } diff --git a/direct/src/dcparser/dcPackerCatalog.h b/direct/src/dcparser/dcPackerCatalog.h index 71469d6744..c03b1b5fc6 100644 --- a/direct/src/dcparser/dcPackerCatalog.h +++ b/direct/src/dcparser/dcPackerCatalog.h @@ -37,7 +37,7 @@ public: // and its relationship to its parent. class Entry { public: - string _name; + std::string _name; const DCPackerInterface *_field; const DCPackerInterface *_parent; int _field_index; @@ -58,7 +58,7 @@ public: INLINE int get_num_entries() 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; private: @@ -71,17 +71,17 @@ public: INLINE int get_num_entries() 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; const LiveCatalog *get_live_catalog(const char *data, size_t length) const; void release_live_catalog(const LiveCatalog *live_catalog) const; 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); - 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); void r_fill_live_catalog(LiveCatalog *live_catalog, DCPacker &packer, const DCSwitchParameter *&last_switch) const; @@ -96,7 +96,7 @@ private: typedef pvector Entries; Entries _entries; - typedef pmap EntriesByName; + typedef pmap EntriesByName; EntriesByName _entries_by_name; typedef pmap EntriesByField; @@ -105,7 +105,7 @@ private: typedef pmap SwitchCatalogs; SwitchCatalogs _switch_catalogs; - typedef pmap SwitchPrefixes; + typedef pmap SwitchPrefixes; SwitchPrefixes _switch_prefixes; friend class DCPackerInterface; diff --git a/direct/src/dcparser/dcPackerInterface.I b/direct/src/dcparser/dcPackerInterface.I index a97964bc47..160cc4fdd9 100644 --- a/direct/src/dcparser/dcPackerInterface.I +++ b/direct/src/dcparser/dcPackerInterface.I @@ -14,7 +14,7 @@ /** * 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 { return _name; } diff --git a/direct/src/dcparser/dcPackerInterface.h b/direct/src/dcparser/dcPackerInterface.h index 0157d3c5ce..171ed3f0ca 100644 --- a/direct/src/dcparser/dcPackerInterface.h +++ b/direct/src/dcparser/dcPackerInterface.h @@ -66,13 +66,13 @@ END_PUBLISH */ class DCPackerInterface { public: - DCPackerInterface(const string &name = string()); + DCPackerInterface(const std::string &name = std::string()); DCPackerInterface(const DCPackerInterface ©); virtual ~DCPackerInterface(); 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 const DCField *as_field() const; @@ -82,10 +82,10 @@ PUBLISHED: virtual const DCClassParameter *as_class_parameter() 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: - virtual void set_name(const string &name); + virtual void set_name(const std::string &name); INLINE bool has_fixed_byte_size() const; INLINE size_t get_fixed_byte_size() const; INLINE bool has_fixed_structure() const; @@ -111,7 +111,7 @@ public: bool &pack_error, bool &range_error) const; virtual void pack_uint64(DCPackData &pack_data, uint64_t value, 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; 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, uint64_t &value, bool &pack_error, bool &range_error) const; 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, bool &pack_error, bool &range_error) const; virtual bool unpack_skip(const char *data, size_t length, size_t &p, @@ -184,7 +184,7 @@ private: void make_catalog(); protected: - string _name; + std::string _name; bool _has_fixed_byte_size; size_t _fixed_byte_size; bool _has_fixed_structure; diff --git a/direct/src/dcparser/dcParameter.h b/direct/src/dcparser/dcParameter.h index 6c8ae910a6..59a34dc440 100644 --- a/direct/src/dcparser/dcParameter.h +++ b/direct/src/dcparser/dcParameter.h @@ -60,18 +60,18 @@ public: void set_typedef(const DCTypedef *dtypedef); 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; private: diff --git a/direct/src/dcparser/dcParserDefs.h b/direct/src/dcparser/dcParserDefs.h index fec0ab95a5..da1747ab15 100644 --- a/direct/src/dcparser/dcParserDefs.h +++ b/direct/src/dcparser/dcParserDefs.h @@ -26,10 +26,10 @@ class DCParameter; class DCKeyword; 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); -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); DCField *dc_get_parameter_description(); void dc_cleanup_parser(); @@ -60,7 +60,7 @@ public: DCParameter *parameter; const DCKeyword *keyword; } u; - string str; + std::string str; }; // The yacc-generated code expects to use the symbol 'YYSTYPE' to refer to the diff --git a/direct/src/dcparser/dcSimpleParameter.h b/direct/src/dcparser/dcSimpleParameter.h index 5e2e39c498..b6da9a8bff 100644 --- a/direct/src/dcparser/dcSimpleParameter.h +++ b/direct/src/dcparser/dcSimpleParameter.h @@ -60,7 +60,7 @@ public: bool &pack_error, bool &range_error) const; virtual void pack_uint64(DCPackData &pack_data, uint64_t value, 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; 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, uint64_t &value, bool &pack_error, bool &range_error) const; 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, bool &pack_error, bool &range_error) const; virtual bool unpack_skip(const char *data, size_t length, size_t &p, 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; protected: diff --git a/direct/src/dcparser/dcSubatomicType.h b/direct/src/dcparser/dcSubatomicType.h index 383533857b..03b0f68fd4 100644 --- a/direct/src/dcparser/dcSubatomicType.h +++ b/direct/src/dcparser/dcSubatomicType.h @@ -60,6 +60,6 @@ enum DCSubatomicType { }; END_PUBLISH -ostream &operator << (ostream &out, DCSubatomicType type); +std::ostream &operator << (std::ostream &out, DCSubatomicType type); #endif diff --git a/direct/src/dcparser/dcSwitch.h b/direct/src/dcparser/dcSwitch.h index 77eefdbb6f..17e4e856a2 100644 --- a/direct/src/dcparser/dcSwitch.h +++ b/direct/src/dcparser/dcSwitch.h @@ -29,29 +29,29 @@ class DCField; */ class DCSwitch : public DCDeclaration { public: - DCSwitch(const string &name, DCField *key_parameter); + DCSwitch(const std::string &name, DCField *key_parameter); virtual ~DCSwitch(); PUBLISHED: virtual DCSwitch *as_switch(); virtual const DCSwitch *as_switch() const; - const string &get_name() const; + const std::string &get_name() const; DCField *get_key_parameter() 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_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; 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: bool is_field_valid() const; - int add_case(const string &value); + int add_case(const std::string &value); void add_invalid_case(); bool add_default(); bool add_field(DCField *field); @@ -59,13 +59,13 @@ public: 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 bool pack_default_value(DCPackData &pack_data, bool &pack_error) const; @@ -73,19 +73,19 @@ public: public: typedef pvector Fields; - typedef pmap FieldsByName; + typedef pmap FieldsByName; class SwitchFields : public DCPackerInterface { public: - SwitchFields(const string &name); + SwitchFields(const std::string &name); ~SwitchFields(); virtual DCPackerInterface *get_nested_field(int n) const; bool add_field(DCField *field); 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: virtual bool do_check_match(const DCPackerInterface *other) const; @@ -98,13 +98,13 @@ public: class SwitchCase { public: - SwitchCase(const string &value, SwitchFields *fields); + SwitchCase(const std::string &value, SwitchFields *fields); ~SwitchCase(); bool do_check_match_switch_case(const SwitchCase *other) const; public: - string _value; + std::string _value; SwitchFields *_fields; }; @@ -112,7 +112,7 @@ private: SwitchFields *start_new_case(); private: - string _name; + std::string _name; DCField *_key_parameter; typedef pvector Cases; @@ -137,7 +137,7 @@ private: bool _fields_added; // This map indexes into the _cases vector, above. - typedef pmap CasesByValue; + typedef pmap CasesByValue; CasesByValue _cases_by_value; }; diff --git a/direct/src/dcparser/dcSwitchParameter.h b/direct/src/dcparser/dcSwitchParameter.h index 0303af620f..51b8b673f6 100644 --- a/direct/src/dcparser/dcSwitchParameter.h +++ b/direct/src/dcparser/dcSwitchParameter.h @@ -41,11 +41,11 @@ public: 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 bool pack_default_value(DCPackData &pack_data, bool &pack_error) const; diff --git a/direct/src/dcparser/dcTypedef.h b/direct/src/dcparser/dcTypedef.h index 62797fc8ff..654c8998a8 100644 --- a/direct/src/dcparser/dcTypedef.h +++ b/direct/src/dcparser/dcTypedef.h @@ -26,13 +26,13 @@ class DCParameter; class DCTypedef : public DCDeclaration { public: DCTypedef(DCParameter *parameter, bool implicit = false); - DCTypedef(const string &name); + DCTypedef(const std::string &name); virtual ~DCTypedef(); PUBLISHED: 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_implicit_typedef() const; @@ -41,8 +41,8 @@ public: DCParameter *make_new_parameter() const; 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: DCParameter *_parameter; diff --git a/direct/src/dcparser/dcindent.h b/direct/src/dcparser/dcindent.h index 48cfddb7d7..a14f982199 100644 --- a/direct/src/dcparser/dcindent.h +++ b/direct/src/dcparser/dcindent.h @@ -29,8 +29,8 @@ * stream itself. Useful for indenting a series of lines of text by a given * amount. */ -ostream & -indent(ostream &out, int indent_level); +std::ostream & +indent(std::ostream &out, int indent_level); #endif // WITHIN_PANDA diff --git a/direct/src/dcparser/hashGenerator.h b/direct/src/dcparser/hashGenerator.h index 6137196a39..94031cd2f6 100644 --- a/direct/src/dcparser/hashGenerator.h +++ b/direct/src/dcparser/hashGenerator.h @@ -25,7 +25,7 @@ public: HashGenerator(); void add_int(int num); - void add_string(const string &str); + void add_string(const std::string &str); unsigned long get_hash() const; diff --git a/direct/src/dcparser/primeNumberGenerator.h b/direct/src/dcparser/primeNumberGenerator.h index d66a6f536d..8b24ae6b5c 100644 --- a/direct/src/dcparser/primeNumberGenerator.h +++ b/direct/src/dcparser/primeNumberGenerator.h @@ -22,7 +22,7 @@ #include "vector_int.h" #else -typedef vector vector_int; +typedef std::vector vector_int; #endif /** diff --git a/direct/src/deadrec/smoothMover.h b/direct/src/deadrec/smoothMover.h index aee12bca8e..f456f00518 100644 --- a/direct/src/deadrec/smoothMover.h +++ b/direct/src/deadrec/smoothMover.h @@ -137,8 +137,8 @@ PUBLISHED: INLINE void set_default_to_standing_still(bool flag); 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: void set_smooth_pos(const LPoint3 &pos, const LVecBase3 &hpr, diff --git a/direct/src/directd/directd.h b/direct/src/directd/directd.h index 0623c09b4d..a1f4d34d09 100644 --- a/direct/src/directd/directd.h +++ b/direct/src/directd/directd.h @@ -73,7 +73,7 @@ PUBLISHED: * one command, you should use connect_to(), send_command(), and * 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: @@ -85,7 +85,7 @@ PUBLISHED: * client_ready(), it prefixes "!" for you. A new connection will be created * 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 client_ready() @@ -102,7 +102,7 @@ PUBLISHED: * Call this function from the server when import ShowbaseGlobal is nearly * 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 @@ -110,28 +110,28 @@ PUBLISHED: * second argument). The return value can be used for the port arguemnt in * 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 * connect_to(), but pass the return value from connect_to() for the port, not * 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. */ - void send_command(const string& cmd); + void send_command(const std::string& cmd); protected: - void start_app(const string& cmd); + void start_app(const std::string& cmd); void kill_app(int index); void kill_all(); - virtual void handle_command(const string& cmd); + virtual void handle_command(const std::string& cmd); 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; QueuedConnectionReader _reader; diff --git a/direct/src/directdServer/directdClient.h b/direct/src/directdServer/directdClient.h index 9c50908950..8c5dd03fc2 100644 --- a/direct/src/directdServer/directdClient.h +++ b/direct/src/directdServer/directdClient.h @@ -21,8 +21,8 @@ public: DirectDClient(); ~DirectDClient(); - void run_client(const string& host, int port); + void run_client(const std::string& host, int port); protected: - void cli_command(const string& cmd); + void cli_command(const std::string& cmd); }; diff --git a/direct/src/directdServer/directdServer.h b/direct/src/directdServer/directdServer.h index 767f34807a..ec76fff41d 100644 --- a/direct/src/directdServer/directdServer.h +++ b/direct/src/directdServer/directdServer.h @@ -29,6 +29,6 @@ public: void run_server(int port); 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); }; diff --git a/direct/src/distributed/cConnectionRepository.I b/direct/src/distributed/cConnectionRepository.I index 16e57ba432..7395a48c2d 100644 --- a/direct/src/distributed/cConnectionRepository.I +++ b/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 * overflows. */ -INLINE const string &CConnectionRepository:: +INLINE const std::string &CConnectionRepository:: get_overflow_event_name() { return _overflow_event_name; } diff --git a/direct/src/distributed/cConnectionRepository.h b/direct/src/distributed/cConnectionRepository.h index 420c995e37..c67d4aad23 100644 --- a/direct/src/distributed/cConnectionRepository.h +++ b/direct/src/distributed/cConnectionRepository.h @@ -122,7 +122,7 @@ PUBLISHED: // INLINE unsigned char get_sec_code() 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(); @@ -161,7 +161,7 @@ private: bool handle_update_field(); 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; private: @@ -205,11 +205,11 @@ private: CHANNEL_TYPE _msg_sender; unsigned int _msg_type; - static const string _overflow_event_name; + static const std::string _overflow_event_name; bool _want_message_bundling; unsigned int _bundling_msgs; - typedef std::vector< string > BundledMsgVector; + typedef std::vector< std::string > BundledMsgVector; BundledMsgVector _bundle_msgs; static PStatCollector _update_pcollector; diff --git a/direct/src/distributed/cDistributedSmoothNodeBase.h b/direct/src/distributed/cDistributedSmoothNodeBase.h index d2c43e285c..6c57f6a2bf 100644 --- a/direct/src/distributed/cDistributedSmoothNodeBase.h +++ b/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_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); enum Flags { diff --git a/direct/src/interval/cConstrainHprInterval.h b/direct/src/interval/cConstrainHprInterval.h index 73c790100d..6338814b7d 100644 --- a/direct/src/interval/cConstrainHprInterval.h +++ b/direct/src/interval/cConstrainHprInterval.h @@ -26,7 +26,7 @@ */ class EXPCL_DIRECT_INTERVAL CConstrainHprInterval : public CConstraintInterval { PUBLISHED: - explicit CConstrainHprInterval(const string &name, double duration, + explicit CConstrainHprInterval(const std::string &name, double duration, const NodePath &node, const NodePath &target, bool wrt, const LVecBase3 hprOffset=LVector3::zero()); @@ -34,7 +34,7 @@ PUBLISHED: INLINE const NodePath &get_target() const; virtual void priv_step(double t); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: NodePath _node; diff --git a/direct/src/interval/cConstrainPosHprInterval.h b/direct/src/interval/cConstrainPosHprInterval.h index 44fedae0f6..a96aa097de 100644 --- a/direct/src/interval/cConstrainPosHprInterval.h +++ b/direct/src/interval/cConstrainPosHprInterval.h @@ -26,7 +26,7 @@ */ class EXPCL_DIRECT_INTERVAL CConstrainPosHprInterval : public CConstraintInterval { PUBLISHED: - explicit CConstrainPosHprInterval(const string &name, double duration, + explicit CConstrainPosHprInterval(const std::string &name, double duration, const NodePath &node, const NodePath &target, bool wrt, const LVecBase3 posOffset=LVector3::zero(), const LVecBase3 hprOffset=LVector3::zero()); @@ -35,7 +35,7 @@ PUBLISHED: INLINE const NodePath &get_target() const; virtual void priv_step(double t); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: NodePath _node; diff --git a/direct/src/interval/cConstrainPosInterval.h b/direct/src/interval/cConstrainPosInterval.h index 1e66d3aca0..edb379559f 100644 --- a/direct/src/interval/cConstrainPosInterval.h +++ b/direct/src/interval/cConstrainPosInterval.h @@ -25,7 +25,7 @@ */ class EXPCL_DIRECT_INTERVAL CConstrainPosInterval : public CConstraintInterval { PUBLISHED: - explicit CConstrainPosInterval(const string &name, double duration, + explicit CConstrainPosInterval(const std::string &name, double duration, const NodePath &node, const NodePath &target, bool wrt, const LVecBase3 posOffset=LVector3::zero()); @@ -33,7 +33,7 @@ PUBLISHED: INLINE const NodePath &get_target() const; virtual void priv_step(double t); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: NodePath _node; diff --git a/direct/src/interval/cConstrainTransformInterval.h b/direct/src/interval/cConstrainTransformInterval.h index a4bb537ec1..41da174670 100644 --- a/direct/src/interval/cConstrainTransformInterval.h +++ b/direct/src/interval/cConstrainTransformInterval.h @@ -24,7 +24,7 @@ */ class EXPCL_DIRECT_INTERVAL CConstrainTransformInterval : public CConstraintInterval { PUBLISHED: - explicit CConstrainTransformInterval(const string &name, double duration, + explicit CConstrainTransformInterval(const std::string &name, double duration, const NodePath &node, const NodePath &target, bool wrt); @@ -32,7 +32,7 @@ PUBLISHED: INLINE const NodePath &get_target() const; virtual void priv_step(double t); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: NodePath _node; diff --git a/direct/src/interval/cConstraintInterval.h b/direct/src/interval/cConstraintInterval.h index 96a47946ec..97a174b51f 100644 --- a/direct/src/interval/cConstraintInterval.h +++ b/direct/src/interval/cConstraintInterval.h @@ -26,7 +26,7 @@ PUBLISHED: bool bogus_variable; public: - CConstraintInterval(const string &name, double duration); + CConstraintInterval(const std::string &name, double duration); public: static TypeHandle get_class_type() { diff --git a/direct/src/interval/cInterval.I b/direct/src/interval/cInterval.I index 7650bddbee..f42fe8e62a 100644 --- a/direct/src/interval/cInterval.I +++ b/direct/src/interval/cInterval.I @@ -14,7 +14,7 @@ /** * Returns the interval's name. */ -INLINE const string &CInterval:: +INLINE const std::string &CInterval:: get_name() const { return _name; } @@ -64,7 +64,7 @@ is_stopped() const { * own. */ INLINE void CInterval:: -set_done_event(const string &event) { +set_done_event(const std::string &event) { _done_event = event; } @@ -73,7 +73,7 @@ set_done_event(const string &event) { * state, whether it is explicitly finished or whether it gets there on its * own. */ -INLINE const string &CInterval:: +INLINE const std::string &CInterval:: get_done_event() const { return _done_event; } @@ -219,8 +219,8 @@ check_started(TypeHandle type, const char *method_name) const { } } -INLINE ostream & -operator << (ostream &out, const CInterval &ival) { +INLINE std::ostream & +operator << (std::ostream &out, const CInterval &ival) { ival.output(out); return out; } diff --git a/direct/src/interval/cInterval.h b/direct/src/interval/cInterval.h index 07672f352f..979dba4547 100644 --- a/direct/src/interval/cInterval.h +++ b/direct/src/interval/cInterval.h @@ -34,11 +34,11 @@ class CIntervalManager; */ class EXPCL_DIRECT_INTERVAL CInterval : public TypedReferenceCount { public: - CInterval(const string &name, double duration, bool open_ended); + CInterval(const std::string &name, double duration, bool open_ended); virtual ~CInterval(); PUBLISHED: - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE double get_duration() const; INLINE bool get_open_ended() const; @@ -63,8 +63,8 @@ PUBLISHED: INLINE State get_state() const; INLINE bool is_stopped() const; - INLINE void set_done_event(const string &event); - INLINE const string &get_done_event() const; + INLINE void set_done_event(const std::string &event); + INLINE const std::string &get_done_event() const; void set_t(double t); INLINE double get_t() const; @@ -110,8 +110,8 @@ PUBLISHED: virtual void priv_reverse_finalize(); virtual void priv_interrupt(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; void setup_play(double start_time, double end_time, double play_rate, bool do_loop); @@ -147,9 +147,9 @@ protected: State _state; double _curr_t; - string _name; - string _pname; - string _done_event; + std::string _name; + std::string _pname; + std::string _done_event; double _duration; bool _auto_pause; @@ -201,8 +201,8 @@ private: friend class CMetaInterval; }; -INLINE ostream &operator << (ostream &out, const CInterval &ival); -EXPCL_DIRECT_INTERVAL ostream &operator << (ostream &out, CInterval::State state); +INLINE std::ostream &operator << (std::ostream &out, const CInterval &ival); +EXPCL_DIRECT_INTERVAL std::ostream &operator << (std::ostream &out, CInterval::State state); #include "cInterval.I" diff --git a/direct/src/interval/cIntervalManager.I b/direct/src/interval/cIntervalManager.I index 44ca1062cc..c2622fb5e8 100644 --- a/direct/src/interval/cIntervalManager.I +++ b/direct/src/interval/cIntervalManager.I @@ -34,8 +34,8 @@ get_event_queue() const { return _event_queue; } -INLINE ostream & -operator << (ostream &out, const CIntervalManager &ival_mgr) { +INLINE std::ostream & +operator << (std::ostream &out, const CIntervalManager &ival_mgr) { ival_mgr.output(out); return out; } diff --git a/direct/src/interval/cIntervalManager.h b/direct/src/interval/cIntervalManager.h index d4279c25fb..33f3d29ff1 100644 --- a/direct/src/interval/cIntervalManager.h +++ b/direct/src/interval/cIntervalManager.h @@ -45,7 +45,7 @@ PUBLISHED: INLINE EventQueue *get_event_queue() const; int add_c_interval(CInterval *interval, bool external); - int find_c_interval(const string &name) const; + int find_c_interval(const std::string &name) const; CInterval *get_c_interval(int index) const; void remove_c_interval(int index); @@ -58,8 +58,8 @@ PUBLISHED: int get_next_event(); int get_next_removal(); - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; static CIntervalManager *get_global_ptr(); @@ -79,7 +79,7 @@ private: }; typedef pvector Intervals; Intervals _intervals; - typedef pmap NameIndex; + typedef pmap NameIndex; NameIndex _name_index; typedef vector_int Removed; Removed _removed; @@ -93,7 +93,7 @@ private: static CIntervalManager *_global_ptr; }; -INLINE ostream &operator << (ostream &out, const CInterval &ival_mgr); +INLINE std::ostream &operator << (std::ostream &out, const CInterval &ival_mgr); #include "cIntervalManager.I" diff --git a/direct/src/interval/cLerpAnimEffectInterval.I b/direct/src/interval/cLerpAnimEffectInterval.I index cc9c42adf8..08c48949f2 100644 --- a/direct/src/interval/cLerpAnimEffectInterval.I +++ b/direct/src/interval/cLerpAnimEffectInterval.I @@ -15,7 +15,7 @@ * */ INLINE CLerpAnimEffectInterval:: -CLerpAnimEffectInterval(const string &name, double duration, +CLerpAnimEffectInterval(const std::string &name, double duration, CLerpInterval::BlendType blend_type) : CLerpInterval(name, duration, blend_type) { @@ -30,7 +30,7 @@ CLerpAnimEffectInterval(const string &name, double duration, * for output. */ INLINE void CLerpAnimEffectInterval:: -add_control(AnimControl *control, const string &name, +add_control(AnimControl *control, const std::string &name, float begin_effect, float end_effect) { _controls.push_back(ControlDef(control, name, begin_effect, end_effect)); } @@ -39,7 +39,7 @@ add_control(AnimControl *control, const string &name, * */ INLINE CLerpAnimEffectInterval::ControlDef:: -ControlDef(AnimControl *control, const string &name, +ControlDef(AnimControl *control, const std::string &name, float begin_effect, float end_effect) : _control(control), _name(name), diff --git a/direct/src/interval/cLerpAnimEffectInterval.h b/direct/src/interval/cLerpAnimEffectInterval.h index af657cb7cc..6200ffea9c 100644 --- a/direct/src/interval/cLerpAnimEffectInterval.h +++ b/direct/src/interval/cLerpAnimEffectInterval.h @@ -31,23 +31,23 @@ */ class EXPCL_DIRECT_INTERVAL CLerpAnimEffectInterval : public CLerpInterval { PUBLISHED: - INLINE explicit CLerpAnimEffectInterval(const string &name, double duration, + INLINE explicit CLerpAnimEffectInterval(const std::string &name, double duration, BlendType blend_type); - INLINE void add_control(AnimControl *control, const string &name, + INLINE void add_control(AnimControl *control, const std::string &name, float begin_effect, float end_effect); virtual void priv_step(double t); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: class ControlDef { public: - INLINE ControlDef(AnimControl *control, const string &name, + INLINE ControlDef(AnimControl *control, const std::string &name, float begin_effect, float end_effect); PT(AnimControl) _control; - string _name; + std::string _name; float _begin_effect; float _end_effect; }; diff --git a/direct/src/interval/cLerpInterval.I b/direct/src/interval/cLerpInterval.I index 04b37b438a..c0c101cfc4 100644 --- a/direct/src/interval/cLerpInterval.I +++ b/direct/src/interval/cLerpInterval.I @@ -15,7 +15,7 @@ * */ INLINE CLerpInterval:: -CLerpInterval(const string &name, double duration, +CLerpInterval(const std::string &name, double duration, CLerpInterval::BlendType blend_type) : CInterval(name, duration, true), _blend_type(blend_type) diff --git a/direct/src/interval/cLerpInterval.h b/direct/src/interval/cLerpInterval.h index 7011fd70e9..6587066f04 100644 --- a/direct/src/interval/cLerpInterval.h +++ b/direct/src/interval/cLerpInterval.h @@ -32,13 +32,13 @@ PUBLISHED: }; public: - INLINE CLerpInterval(const string &name, double duration, + INLINE CLerpInterval(const std::string &name, double duration, BlendType blend_type); PUBLISHED: INLINE BlendType get_blend_type() const; - static BlendType string_blend_type(const string &blend_type); + static BlendType string_blend_type(const std::string &blend_type); protected: double compute_delta(double t) const; diff --git a/direct/src/interval/cLerpNodePathInterval.h b/direct/src/interval/cLerpNodePathInterval.h index a134faebf0..d079f8eaa0 100644 --- a/direct/src/interval/cLerpNodePathInterval.h +++ b/direct/src/interval/cLerpNodePathInterval.h @@ -25,7 +25,7 @@ */ class EXPCL_DIRECT_INTERVAL CLerpNodePathInterval : public CLerpInterval { PUBLISHED: - explicit CLerpNodePathInterval(const string &name, double duration, + explicit CLerpNodePathInterval(const std::string &name, double duration, BlendType blend_type, bool bake_in_start, bool fluid, const NodePath &node, const NodePath &other); @@ -68,7 +68,7 @@ PUBLISHED: virtual void priv_reverse_initialize(double t); virtual void priv_reverse_instant(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: void setup_slerp(); diff --git a/direct/src/interval/cMetaInterval.h b/direct/src/interval/cMetaInterval.h index f1956f4167..40fb03d102 100644 --- a/direct/src/interval/cMetaInterval.h +++ b/direct/src/interval/cMetaInterval.h @@ -31,7 +31,7 @@ */ class EXPCL_DIRECT_INTERVAL CMetaInterval : public CInterval { PUBLISHED: - explicit CMetaInterval(const string &name); + explicit CMetaInterval(const std::string &name); virtual ~CMetaInterval(); enum RelativeStart { @@ -44,20 +44,20 @@ PUBLISHED: INLINE double get_precision() const; void clear_intervals(); - int push_level(const string &name, + int push_level(const std::string &name, double rel_time, RelativeStart rel_to); int add_c_interval(CInterval *c_interval, double rel_time = 0.0f, RelativeStart rel_to = RS_previous_end); - int add_ext_index(int ext_index, const string &name, + int add_ext_index(int ext_index, const std::string &name, double duration, bool open_ended, double rel_time, RelativeStart rel_to); int pop_level(double duration = -1.0); - bool set_interval_start_time(const string &name, double rel_time, + bool set_interval_start_time(const std::string &name, double rel_time, RelativeStart rel_to = RS_level_begin); - double get_interval_start_time(const string &name) const; - double get_interval_end_time(const string &name) const; + double get_interval_start_time(const std::string &name) const; + double get_interval_end_time(const std::string &name) const; enum DefType { DT_c_interval, @@ -86,8 +86,8 @@ PUBLISHED: INLINE EventType get_event_type() const; void pop_event(); - virtual void write(ostream &out, int indent_level) const; - void timeline(ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; + void timeline(std::ostream &out) const; protected: virtual void do_recompute(); @@ -98,7 +98,7 @@ private: DefType _type; PT(CInterval) _c_interval; int _ext_index; - string _ext_name; + std::string _ext_name; double _ext_duration; bool _ext_open_ended; double _rel_time; @@ -159,7 +159,7 @@ private: int get_begin_time(const IntervalDef &def, int level_begin, int previous_begin, int previous_end); - void write_event_desc(ostream &out, const IntervalDef &def, + void write_event_desc(std::ostream &out, const IntervalDef &def, int &extra_indent_level) const; diff --git a/direct/src/interval/hideInterval.h b/direct/src/interval/hideInterval.h index 91cd1a9bda..8428d3ab70 100644 --- a/direct/src/interval/hideInterval.h +++ b/direct/src/interval/hideInterval.h @@ -23,7 +23,7 @@ */ class EXPCL_DIRECT_INTERVAL HideInterval : public CInterval { PUBLISHED: - explicit HideInterval(const NodePath &node, const string &name = string()); + explicit HideInterval(const NodePath &node, const std::string &name = std::string()); virtual void priv_instant(); virtual void priv_reverse_instant(); diff --git a/direct/src/interval/showInterval.h b/direct/src/interval/showInterval.h index bff66d8366..c50db953a2 100644 --- a/direct/src/interval/showInterval.h +++ b/direct/src/interval/showInterval.h @@ -23,7 +23,7 @@ */ class EXPCL_DIRECT_INTERVAL ShowInterval : public CInterval { PUBLISHED: - explicit ShowInterval(const NodePath &node, const string &name = string()); + explicit ShowInterval(const NodePath &node, const std::string &name = std::string()); virtual void priv_instant(); virtual void priv_reverse_instant(); diff --git a/direct/src/plugin/binaryXml.h b/direct/src/plugin/binaryXml.h index 4bdd9d29cf..664c7fb5e6 100644 --- a/direct/src/plugin/binaryXml.h +++ b/direct/src/plugin/binaryXml.h @@ -25,7 +25,7 @@ using namespace std; // but this is a smidge more efficient and gives us more control. void init_xml(); -void write_xml(ostream &out, TiXmlDocument *doc, ostream &logfile); -TiXmlDocument *read_xml(istream &in, ostream &logfile); +void write_xml(std::ostream &out, TiXmlDocument *doc, std::ostream &logfile); +TiXmlDocument *read_xml(std::istream &in, std::ostream &logfile); #endif diff --git a/direct/src/plugin/fileSpec.I b/direct/src/plugin/fileSpec.I index e82e099fb8..22e6f26f81 100644 --- a/direct/src/plugin/fileSpec.I +++ b/direct/src/plugin/fileSpec.I @@ -15,7 +15,7 @@ * Returns the relative path to this file on disk, within the package root * directory. */ -inline const string &FileSpec:: +inline const std::string &FileSpec:: get_filename() const { return _filename; } @@ -25,15 +25,15 @@ get_filename() const { * directory. */ inline void FileSpec:: -set_filename(const string &filename) { +set_filename(const std::string &filename) { _filename = filename; } /** * Returns the full path to this file on disk. */ -inline string FileSpec:: -get_pathname(const string &package_dir) const { +inline std::string FileSpec:: +get_pathname(const std::string &package_dir) const { return package_dir + "/" + _filename; } diff --git a/direct/src/plugin/fileSpec.h b/direct/src/plugin/fileSpec.h index 8dc39aebcf..e393b680fa 100644 --- a/direct/src/plugin/fileSpec.h +++ b/direct/src/plugin/fileSpec.h @@ -33,39 +33,39 @@ public: void load_xml(TiXmlElement *xelement); void store_xml(TiXmlElement *xelement); - inline const string &get_filename() const; - inline void set_filename(const string &filename); - inline string get_pathname(const string &package_dir) const; + inline const std::string &get_filename() const; + inline void set_filename(const std::string &filename); + inline std::string get_pathname(const std::string &package_dir) const; inline size_t get_size() const; inline time_t get_timestamp() const; inline bool has_hash() const; - bool quick_verify(const string &package_dir); - bool quick_verify_pathname(const string &pathname); - bool full_verify(const string &package_dir); + bool quick_verify(const std::string &package_dir); + bool quick_verify_pathname(const std::string &pathname); + bool full_verify(const std::string &package_dir); inline const FileSpec *get_actual_file() const; - const FileSpec *force_get_actual_file(const string &pathname); + const FileSpec *force_get_actual_file(const std::string &pathname); - bool check_hash(const string &pathname) const; - bool read_hash(const string &pathname); - bool read_hash_stream(istream &in); + bool check_hash(const std::string &pathname) const; + bool read_hash(const std::string &pathname); + bool read_hash_stream(std::istream &in); int compare_hash(const FileSpec &other) const; - void write(ostream &out) const; - void output_hash(ostream &out) const; + void write(std::ostream &out) const; + void output_hash(std::ostream &out) const; private: - bool priv_check_hash(const string &pathname, void *stp); + bool priv_check_hash(const std::string &pathname, void *stp); static inline int decode_hexdigit(char c); static inline char encode_hexdigit(int c); static bool decode_hex(unsigned char *dest, const char *source, size_t size); static void encode_hex(char *dest, const unsigned char *source, size_t size); - static void stream_hex(ostream &out, const unsigned char *source, size_t size); + static void stream_hex(std::ostream &out, const unsigned char *source, size_t size); enum { hash_size = 16 }; - string _filename; + std::string _filename; size_t _size; time_t _timestamp; unsigned char _hash[hash_size]; diff --git a/direct/src/plugin/find_root_dir.h b/direct/src/plugin/find_root_dir.h index cdbb25ec91..977a64cc37 100644 --- a/direct/src/plugin/find_root_dir.h +++ b/direct/src/plugin/find_root_dir.h @@ -18,10 +18,10 @@ #include using namespace std; -string find_root_dir(); +std::string find_root_dir(); #ifdef __APPLE__ -string find_osx_root_dir(); +std::string find_osx_root_dir(); #endif // __APPLE__ #endif diff --git a/direct/src/plugin/handleStream.I b/direct/src/plugin/handleStream.I index 5003b98e82..60021cee96 100644 --- a/direct/src/plugin/handleStream.I +++ b/direct/src/plugin/handleStream.I @@ -15,7 +15,7 @@ * */ inline HandleStream:: -HandleStream() : iostream(&_buf) { +HandleStream() : std::iostream(&_buf) { } /** @@ -32,10 +32,10 @@ inline HandleStream:: */ inline void HandleStream:: open_read(FHandle handle) { - clear((ios::iostate)0); + clear((std::ios::iostatetate)0); _buf.open_read(handle); if (!_buf.is_open_read()) { - clear(ios::failbit); + clear(std::ios::failbit); } } @@ -45,10 +45,10 @@ open_read(FHandle handle) { */ inline void HandleStream:: open_write(FHandle handle) { - clear((ios::iostate)0); + clear((std::ios::iostatetate)0); _buf.open_write(handle); if (!_buf.is_open_write()) { - clear(ios::failbit); + clear(std::ios::failbit); } } diff --git a/direct/src/plugin/handleStream.h b/direct/src/plugin/handleStream.h index abe8b0dee3..b28dec5f6a 100644 --- a/direct/src/plugin/handleStream.h +++ b/direct/src/plugin/handleStream.h @@ -21,7 +21,7 @@ * Windows' HANDLE objects, or Posix file descriptors. This is necessary to * map low-level pipes into an iostream for tinyxml. */ -class HandleStream : public iostream { +class HandleStream : public std::iostream { public: inline HandleStream(); inline ~HandleStream(); diff --git a/direct/src/plugin/handleStreamBuf.h b/direct/src/plugin/handleStreamBuf.h index 68486ec69f..19610a0c45 100644 --- a/direct/src/plugin/handleStreamBuf.h +++ b/direct/src/plugin/handleStreamBuf.h @@ -23,7 +23,7 @@ using namespace std; /** * */ -class HandleStreamBuf : public streambuf { +class HandleStreamBuf : public std::streambuf { public: HandleStreamBuf(); virtual ~HandleStreamBuf(); diff --git a/direct/src/plugin/load_plugin.h b/direct/src/plugin/load_plugin.h index b6a41a3f9c..58f160ef7d 100644 --- a/direct/src/plugin/load_plugin.h +++ b/direct/src/plugin/load_plugin.h @@ -59,24 +59,24 @@ extern P3D_request_finish_func *P3D_request_finish_ptr; extern P3D_instance_feed_url_stream_func *P3D_instance_feed_url_stream_ptr; extern P3D_instance_handle_event_func *P3D_instance_handle_event_ptr; -string get_plugin_basename(); +std::string get_plugin_basename(); bool -load_plugin(const string &p3d_plugin_filename, - const string &contents_filename, const string &host_url, - P3D_verify_contents verify_contents, const string &platform, - const string &log_directory, const string &log_basename, +load_plugin(const std::string &p3d_plugin_filename, + const std::string &contents_filename, const std::string &host_url, + P3D_verify_contents verify_contents, const std::string &platform, + const std::string &log_directory, const std::string &log_basename, bool trusted_environment, bool console_environment, - const string &root_dir, const string &host_dir, - const string &start_dir, ostream &logfile); + const std::string &root_dir, const std::string &host_dir, + const std::string &start_dir, std::ostream &logfile); bool -init_plugin(const string &contents_filename, const string &host_url, - P3D_verify_contents verify_contents, const string &platform, - const string &log_directory, const string &log_basename, +init_plugin(const std::string &contents_filename, const std::string &host_url, + P3D_verify_contents verify_contents, const std::string &platform, + const std::string &log_directory, const std::string &log_basename, bool trusted_environment, bool console_environment, - const string &root_dir, const string &host_dir, - const string &start_dir, ostream &logfile); + const std::string &root_dir, const std::string &host_dir, + const std::string &start_dir, std::ostream &logfile); -void unload_plugin(ostream &logfile); +void unload_plugin(std::ostream &logfile); bool is_plugin_loaded(); #endif diff --git a/direct/src/plugin/mkdir_complete.h b/direct/src/plugin/mkdir_complete.h index 9b9521a9bd..5ba165e6be 100644 --- a/direct/src/plugin/mkdir_complete.h +++ b/direct/src/plugin/mkdir_complete.h @@ -18,12 +18,12 @@ #include using namespace std; -bool mkdir_complete(const string &dirname, ostream &logfile); -bool mkfile_complete(const string &dirname, ostream &logfile); +bool mkdir_complete(const std::string &dirname, std::ostream &logfile); +bool mkfile_complete(const std::string &dirname, std::ostream &logfile); #ifdef _WIN32 -bool mkdir_complete_w(const wstring &dirname, ostream &logfile); -bool mkfile_complete_w(const wstring &dirname, ostream &logfile); +bool mkdir_complete_w(const std::wstring &dirname, std::ostream &logfile); +bool mkfile_complete_w(const std::wstring &dirname, std::ostream &logfile); #endif // _WIN32 #endif diff --git a/direct/src/plugin/p3dAuthSession.h b/direct/src/plugin/p3dAuthSession.h index 3df7894279..f37f24d9e3 100644 --- a/direct/src/plugin/p3dAuthSession.h +++ b/direct/src/plugin/p3dAuthSession.h @@ -56,13 +56,13 @@ private: private: P3DInstance *_inst; - string _start_dir; + std::string _start_dir; // This information is passed to create_process(). P3DTemporaryFile *_cert_filename; - string _cert_dir; - string _p3dcert_exe; - string _env; + std::string _cert_dir; + std::string _p3dcert_exe; + std::string _env; #ifdef _WIN32 HANDLE _p3dcert_handle; diff --git a/direct/src/plugin/p3dBoolObject.h b/direct/src/plugin/p3dBoolObject.h index 83a950cb76..85eb0a127c 100644 --- a/direct/src/plugin/p3dBoolObject.h +++ b/direct/src/plugin/p3dBoolObject.h @@ -29,7 +29,7 @@ public: virtual P3D_object_type get_type(); virtual bool get_bool(); virtual int get_int(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); private: bool _value; diff --git a/direct/src/plugin/p3dCert.h b/direct/src/plugin/p3dCert.h index d5dbdd76a4..1583727565 100644 --- a/direct/src/plugin/p3dCert.h +++ b/direct/src/plugin/p3dCert.h @@ -50,9 +50,9 @@ class ViewCertDialog; class AuthDialog : public Fl_Window { public: #ifdef _WIN32 - AuthDialog(const wstring &cert_filename, const wstring &cert_dir); + AuthDialog(const std::wstring &cert_filename, const std::wstring &cert_dir); #else - AuthDialog(const string &cert_filename, const string &cert_dir); + AuthDialog(const std::string &cert_filename, const std::string &cert_dir); #endif virtual ~AuthDialog(); @@ -64,9 +64,9 @@ public: private: #ifdef _WIN32 - void read_cert_file(const wstring &cert_filename); + void read_cert_file(const std::wstring &cert_filename); #else - void read_cert_file(const string &cert_filename); + void read_cert_file(const std::string &cert_filename); #endif void get_friendly_name(); void verify_cert(); @@ -81,9 +81,9 @@ public: private: #ifdef _WIN32 - wstring _cert_dir; + std::wstring _cert_dir; #else - string _cert_dir; + std::string _cert_dir; #endif X509 *_cert; STACK_OF(X509) *_stack; @@ -92,7 +92,7 @@ private: char _text[1024]; char _text_clean[2048]; - string _friendly_name; + std::string _friendly_name; int _verify_result; }; diff --git a/direct/src/plugin/p3dCert_wx.h b/direct/src/plugin/p3dCert_wx.h index 05f0053b74..bced0ec91f 100644 --- a/direct/src/plugin/p3dCert_wx.h +++ b/direct/src/plugin/p3dCert_wx.h @@ -48,8 +48,8 @@ public: virtual bool OnCmdLineParsed(wxCmdLineParser &parser); private: - string _cert_filename; - string _cert_dir; + std::string _cert_filename; + std::string _cert_dir; }; /** @@ -62,7 +62,7 @@ private: */ class AuthDialog : public wxDialog { public: - AuthDialog(const string &cert_filename, const string &cert_dir); + AuthDialog(const std::string &cert_filename, const std::string &cert_dir); virtual ~AuthDialog(); void run_clicked(wxCommandEvent &event); @@ -72,7 +72,7 @@ public: void approve_cert(); private: - void read_cert_file(const string &cert_filename); + void read_cert_file(const std::string &cert_filename); void get_friendly_name(); void verify_cert(); int load_certificates_from_der_ram(X509_STORE *store, @@ -88,7 +88,7 @@ private: // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() - string _cert_dir; + std::string _cert_dir; X509 *_cert; STACK_OF(X509) *_stack; diff --git a/direct/src/plugin/p3dConcreteSequence.h b/direct/src/plugin/p3dConcreteSequence.h index e77b08b823..09b489c5ba 100644 --- a/direct/src/plugin/p3dConcreteSequence.h +++ b/direct/src/plugin/p3dConcreteSequence.h @@ -34,10 +34,10 @@ public: virtual P3D_object_type get_type(); virtual bool get_bool(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); - virtual P3D_object *get_property(const string &property); - virtual bool set_property(const string &property, P3D_object *value); + virtual P3D_object *get_property(const std::string &property); + virtual bool set_property(const std::string &property, P3D_object *value); virtual bool fill_xml(TiXmlElement *xvalue, P3DSession *session); virtual P3D_object **get_object_array(); @@ -49,7 +49,7 @@ public: void append(P3D_object *value); private: - typedef vector Elements; + typedef std::vector Elements; Elements _elements; }; diff --git a/direct/src/plugin/p3dConcreteStruct.h b/direct/src/plugin/p3dConcreteStruct.h index 565bb35ae3..cccd35bbeb 100644 --- a/direct/src/plugin/p3dConcreteStruct.h +++ b/direct/src/plugin/p3dConcreteStruct.h @@ -32,19 +32,19 @@ public: virtual P3D_object_type get_type(); virtual bool get_bool(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); - virtual P3D_object *get_property(const string &property); - virtual bool set_property(const string &property, P3D_object *value); + virtual P3D_object *get_property(const std::string &property); + virtual bool set_property(const std::string &property, P3D_object *value); - virtual bool has_method(const string &method_name); - virtual P3D_object *call(const string &method_name, bool needs_response, + virtual bool has_method(const std::string &method_name); + virtual P3D_object *call(const std::string &method_name, bool needs_response, P3D_object *params[], int num_params); virtual bool fill_xml(TiXmlElement *xvalue, P3DSession *session); private: - typedef map Elements; + typedef std::map Elements; Elements _elements; }; diff --git a/direct/src/plugin/p3dDownload.I b/direct/src/plugin/p3dDownload.I index e32370669c..c248948612 100644 --- a/direct/src/plugin/p3dDownload.I +++ b/direct/src/plugin/p3dDownload.I @@ -14,7 +14,7 @@ /** * Returns the URL that we are querying. */ -const string &P3DDownload:: +const std::string &P3DDownload:: get_url() const { return _url; } diff --git a/direct/src/plugin/p3dDownload.h b/direct/src/plugin/p3dDownload.h index e36d5b19c5..ad2cd872a5 100644 --- a/direct/src/plugin/p3dDownload.h +++ b/direct/src/plugin/p3dDownload.h @@ -32,8 +32,8 @@ public: P3DDownload(const P3DDownload ©); virtual ~P3DDownload(); - void set_url(const string &url); - inline const string &get_url() const; + void set_url(const std::string &url); + inline const std::string &get_url() const; inline void set_instance(P3DInstance *instance); inline P3DInstance *get_instance() const; @@ -78,7 +78,7 @@ protected: private: bool _canceled; int _download_id; - string _url; + std::string _url; P3DInstance *_instance; }; diff --git a/direct/src/plugin/p3dFileDownload.I b/direct/src/plugin/p3dFileDownload.I index 187db8945d..af4e2b1ec8 100644 --- a/direct/src/plugin/p3dFileDownload.I +++ b/direct/src/plugin/p3dFileDownload.I @@ -14,7 +14,7 @@ /** * Returns the filename that we are downloading into. */ -const string &P3DFileDownload:: +const std::string &P3DFileDownload:: get_filename() const { return _filename; } diff --git a/direct/src/plugin/p3dFileDownload.h b/direct/src/plugin/p3dFileDownload.h index f256706ac6..923f8ec0ec 100644 --- a/direct/src/plugin/p3dFileDownload.h +++ b/direct/src/plugin/p3dFileDownload.h @@ -28,8 +28,8 @@ public: P3DFileDownload(); P3DFileDownload(const P3DFileDownload ©); - bool set_filename(const string &filename); - inline const string &get_filename() const; + bool set_filename(const std::string &filename); + inline const std::string &get_filename() const; protected: virtual bool open_file(); @@ -42,7 +42,7 @@ protected: ofstream _file; private: - string _filename; + std::string _filename; }; #include "p3dFileDownload.I" diff --git a/direct/src/plugin/p3dFileParams.I b/direct/src/plugin/p3dFileParams.I index e7eb45788d..8565c47a90 100644 --- a/direct/src/plugin/p3dFileParams.I +++ b/direct/src/plugin/p3dFileParams.I @@ -14,7 +14,7 @@ /** * Returns the filename that was passed to set_p3d_filename(). */ -inline const string &P3DFileParams:: +inline const std::string &P3DFileParams:: get_p3d_filename() const { return _p3d_filename; } @@ -31,7 +31,7 @@ get_p3d_offset() const { /** * Returns the string that was passed to set_p3d_url(). */ -inline const string &P3DFileParams:: +inline const std::string &P3DFileParams:: get_p3d_url() const { return _p3d_url; } @@ -47,7 +47,7 @@ get_num_tokens() const { /** * Returns the keyword of the nth token. */ -inline const string &P3DFileParams:: +inline const std::string &P3DFileParams:: get_token_keyword(int n) const { assert(n >= 0 && n < (int)_tokens.size()); return _tokens[n]._keyword; @@ -56,7 +56,7 @@ get_token_keyword(int n) const { /** * Returns the value of the nth token. */ -inline const string &P3DFileParams:: +inline const std::string &P3DFileParams:: get_token_value(int n) const { assert(n >= 0 && n < (int)_tokens.size()); return _tokens[n]._value; diff --git a/direct/src/plugin/p3dFileParams.h b/direct/src/plugin/p3dFileParams.h index 1cb54d1b3a..53b2630680 100644 --- a/direct/src/plugin/p3dFileParams.h +++ b/direct/src/plugin/p3dFileParams.h @@ -27,38 +27,38 @@ public: P3DFileParams(const P3DFileParams ©); void operator = (const P3DFileParams &other); - void set_p3d_filename(const string &p3d_filename); + void set_p3d_filename(const std::string &p3d_filename); void set_p3d_offset(const int &p3d_offset); - void set_p3d_url(const string &p3d_url); + void set_p3d_url(const std::string &p3d_url); void set_tokens(const P3D_token tokens[], size_t num_tokens); void set_token(const char *keyword, const char *value); void set_args(int argc, const char *argv[]); - inline const string &get_p3d_filename() const; + inline const std::string &get_p3d_filename() const; inline int get_p3d_offset() const; - inline const string &get_p3d_url() const; - string lookup_token(const string &keyword) const; - int lookup_token_int(const string &keyword) const; - bool has_token(const string &keyword) const; + inline const std::string &get_p3d_url() const; + std::string lookup_token(const std::string &keyword) const; + int lookup_token_int(const std::string &keyword) const; + bool has_token(const std::string &keyword) const; inline int get_num_tokens() const; - inline const string &get_token_keyword(int n) const; - inline const string &get_token_value(int n) const; + inline const std::string &get_token_keyword(int n) const; + inline const std::string &get_token_value(int n) const; TiXmlElement *make_xml(); private: class Token { public: - string _keyword; - string _value; + std::string _keyword; + std::string _value; }; - typedef vector Tokens; - typedef vector Args; + typedef std::vector Tokens; + typedef std::vector Args; - string _p3d_filename; + std::string _p3d_filename; int _p3d_offset; - string _p3d_url; + std::string _p3d_url; Tokens _tokens; Args _args; }; diff --git a/direct/src/plugin/p3dFloatObject.h b/direct/src/plugin/p3dFloatObject.h index 1fbb79251b..13f7ba8358 100644 --- a/direct/src/plugin/p3dFloatObject.h +++ b/direct/src/plugin/p3dFloatObject.h @@ -30,7 +30,7 @@ public: virtual bool get_bool(); virtual int get_int(); virtual double get_float(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); private: double _value; diff --git a/direct/src/plugin/p3dHost.I b/direct/src/plugin/p3dHost.I index 27f3e2a8f8..9fb3672205 100644 --- a/direct/src/plugin/p3dHost.I +++ b/direct/src/plugin/p3dHost.I @@ -26,7 +26,7 @@ has_host_dir() const { * bootstrapped; if there is some danger of calling this early in the * initialization process, you should check has_host_dir() first. */ -inline const string &P3DHost:: +inline const std::string &P3DHost:: get_host_dir() const { assert(has_host_dir()); return _host_dir; @@ -36,7 +36,7 @@ get_host_dir() const { * Returns the root URL of this particular host, as passed from the package * file. This is a unique string that identifies each host. */ -inline const string &P3DHost:: +inline const std::string &P3DHost:: get_host_url() const { return _host_url; } @@ -48,7 +48,7 @@ get_host_url() const { * * Also see get_download_url_prefix(). */ -inline const string &P3DHost:: +inline const std::string &P3DHost:: get_host_url_prefix() const { return _host_url_prefix; } @@ -58,7 +58,7 @@ get_host_url_prefix() const { * the contents.xml file. This is often the same as get_host_url_prefix(), * but it may be different in the case of an https server for contents.xml. */ -inline const string &P3DHost:: +inline const std::string &P3DHost:: get_download_url_prefix() const { return _download_url_prefix; } @@ -68,7 +68,7 @@ get_download_url_prefix() const { * url if no descriptive name is provided. This will be available after * read_contents_file() has been called. */ -inline const string &P3DHost:: +inline const std::string &P3DHost:: get_descriptive_name() const { return _descriptive_name; } @@ -101,6 +101,6 @@ get_contents_iseq() const { * contents.xml file (as provided by the server), false otherwise. */ inline bool P3DHost:: -check_contents_hash(const string &pathname) const { +check_contents_hash(const std::string &pathname) const { return _contents_spec.check_hash(pathname); } diff --git a/direct/src/plugin/p3dHost.h b/direct/src/plugin/p3dHost.h index adc66501c7..fd880ccde0 100644 --- a/direct/src/plugin/p3dHost.h +++ b/direct/src/plugin/p3dHost.h @@ -27,84 +27,84 @@ class P3DPackage; */ class P3DHost { private: - P3DHost(const string &host_url, const string &host_dir = ""); + P3DHost(const std::string &host_url, const std::string &host_dir = ""); ~P3DHost(); public: inline bool has_host_dir() const; - inline const string &get_host_dir() const; - inline const string &get_host_url() const; - inline const string &get_host_url_prefix() const; - inline const string &get_download_url_prefix() const; - inline const string &get_descriptive_name() const; + inline const std::string &get_host_dir() const; + inline const std::string &get_host_url() const; + inline const std::string &get_host_url_prefix() const; + inline const std::string &get_download_url_prefix() const; + inline const std::string &get_descriptive_name() const; - P3DHost *get_alt_host(const string &alt_host); + P3DHost *get_alt_host(const std::string &alt_host); inline bool has_contents_file() const; bool has_current_contents_file(P3DInstanceManager *inst_mgr) const; inline int get_contents_iseq() const; - inline bool check_contents_hash(const string &pathname) const; + inline bool check_contents_hash(const std::string &pathname) const; bool read_contents_file(); - bool read_contents_file(const string &contents_filename, bool fresh_download); + bool read_contents_file(const std::string &contents_filename, bool fresh_download); void read_xhost(TiXmlElement *xhost); - P3DPackage *get_package(const string &package_name, - const string &package_version, - const string &package_platform, - const string &package_seq, - const string &alt_host = ""); - bool choose_suitable_platform(string &selected_platform, + P3DPackage *get_package(const std::string &package_name, + const std::string &package_version, + const std::string &package_platform, + const std::string &package_seq, + const std::string &alt_host = ""); + bool choose_suitable_platform(std::string &selected_platform, bool &per_platform, - const string &package_name, - const string &package_version, - const string &package_platform); + const std::string &package_name, + const std::string &package_version, + const std::string &package_platform); bool get_package_desc_file(FileSpec &desc_file, - string &package_seq, + std::string &package_seq, bool &package_solo, - const string &package_name, - const string &package_version, - const string &package_platform); + const std::string &package_name, + const std::string &package_version, + const std::string &package_platform); - void forget_package(P3DPackage *package, const string &alt_host = ""); - void migrate_package_host(P3DPackage *package, const string &alt_host, P3DHost *new_host); + void forget_package(P3DPackage *package, const std::string &alt_host = ""); + void migrate_package_host(P3DPackage *package, const std::string &alt_host, P3DHost *new_host); - void choose_random_mirrors(vector &result, int num_mirrors); - void add_mirror(string mirror_url); + void choose_random_mirrors(std::vector &result, int num_mirrors); + void add_mirror(std::string mirror_url); void uninstall(); private: - void determine_host_dir(const string &host_dir_basename); + void determine_host_dir(const std::string &host_dir_basename); - static string standardize_filename(const string &filename); - static bool copy_file(const string &from_filename, const string &to_filename); - static bool save_xml_file(TiXmlDocument *doc, const string &to_filename); - static int compare_seq(const string &seq_a, const string &seq_b); + static std::string standardize_filename(const std::string &filename); + static bool copy_file(const std::string &from_filename, const std::string &to_filename); + static bool save_xml_file(TiXmlDocument *doc, const std::string &to_filename); + static int compare_seq(const std::string &seq_a, const std::string &seq_b); static int compare_seq_int(const char *&num_a, const char *&num_b); private: - string _host_dir; - string _host_url; - string _host_url_prefix; - string _download_url_prefix; - string _descriptive_name; + std::string _host_dir; + std::string _host_url; + std::string _host_url_prefix; + std::string _download_url_prefix; + std::string _descriptive_name; TiXmlElement *_xcontents; time_t _contents_expiration; int _contents_iseq; FileSpec _contents_spec; - typedef vector Mirrors; + typedef std::vector Mirrors; Mirrors _mirrors; - typedef map AltHosts; + typedef std::map AltHosts; AltHosts _alt_hosts; - typedef vector PlatformPackages; - typedef map PackageMap; - typedef map Packages; + typedef std::vector PlatformPackages; + typedef std::map PackageMap; + typedef std::map Packages; Packages _packages; - typedef vector FailedPackages; + typedef std::vector FailedPackages; FailedPackages _failed_packages; friend class P3DInstanceManager; diff --git a/direct/src/plugin/p3dInstance.I b/direct/src/plugin/p3dInstance.I index 13aacd8b6b..63765832d3 100644 --- a/direct/src/plugin/p3dInstance.I +++ b/direct/src/plugin/p3dInstance.I @@ -42,7 +42,7 @@ get_instance_id() const { * is guaranteed to be unique for each unique session required for different * P3DInstances. */ -inline const string &P3DInstance:: +inline const std::string &P3DInstance:: get_session_key() const { return _session_key; } @@ -56,7 +56,7 @@ get_session_key() const { * Presumably all of the platform-specific packages that are downloaded * subsequently must be of the exact same platform. */ -inline const string &P3DInstance:: +inline const std::string &P3DInstance:: get_session_platform() const { return _session_platform; } diff --git a/direct/src/plugin/p3dInstance.h b/direct/src/plugin/p3dInstance.h index 325e368003..7972ef7fbe 100644 --- a/direct/src/plugin/p3dInstance.h +++ b/direct/src/plugin/p3dInstance.h @@ -56,9 +56,9 @@ public: ~P3DInstance(); void cleanup(); - void set_p3d_url(const string &p3d_url); - void set_p3d_filename(const string &p3d_filename, const int &p3d_offset = 0); - int make_p3d_stream(const string &p3d_url); + void set_p3d_url(const std::string &p3d_url); + void set_p3d_filename(const std::string &p3d_filename, const int &p3d_offset = 0); + int make_p3d_stream(const std::string &p3d_url); inline const P3DFileParams &get_fparams() const; void set_wparams(const P3DWindowParams &wparams); @@ -84,16 +84,16 @@ public: bool handle_event(const P3D_event_data &event); inline int get_instance_id() const; - inline const string &get_session_key() const; - const string &get_log_pathname() const; - inline const string &get_session_platform() const; + inline const std::string &get_session_key() const; + const std::string &get_log_pathname() const; + inline const std::string &get_session_platform() const; inline P3DSession *get_session() const; inline P3D_request_ready_func *get_request_ready_func() const; - void add_package(const string &name, const string &version, - const string &seq, P3DHost *host); + void add_package(const std::string &name, const std::string &version, + const std::string &seq, P3DHost *host); void add_package(P3DPackage *package); void remove_package(P3DPackage *package); bool get_packages_info_ready() const; @@ -161,14 +161,14 @@ private: IT_num_image_types, // Not a real value }; - void priv_set_p3d_filename(const string &p3d_filename, const int &p3d_offset = -1); - void determine_p3d_basename(const string &p3d_url); + void priv_set_p3d_filename(const std::string &p3d_filename, const int &p3d_offset = -1); + void determine_p3d_basename(const std::string &p3d_url); - bool check_matches_origin(const string &origin_match); - bool check_matches_origin_one(const string &origin_match); - bool check_matches_hostname(const string &orig, const string &match); - void separate_components(vector &components, const string &str); - bool check_matches_component(const string &orig, const string &match); + bool check_matches_origin(const std::string &origin_match); + bool check_matches_origin_one(const std::string &origin_match); + bool check_matches_hostname(const std::string &orig, const std::string &match); + void separate_components(std::vector &components, const std::string &str); + bool check_matches_component(const std::string &orig, const std::string &match); void check_p3d_signature(); void mark_p3d_untrusted(); @@ -176,15 +176,15 @@ private: void scan_app_desc_file(TiXmlDocument *doc); void add_panda3d_package(); void add_packages(); - string find_alt_host_url(const string &host_url, const string &alt_host); + std::string find_alt_host_url(const std::string &host_url, const std::string &alt_host); void get_host_info(P3DHost *host); - string get_start_dir_suffix() const; + std::string get_start_dir_suffix() const; void send_browser_script_object(); P3D_request *make_p3d_request(TiXmlElement *xrequest); - void handle_notify_request(const string &message); - void handle_script_request(const string &operation, P3D_object *object, - const string &property_name, P3D_object *value, + void handle_notify_request(const std::string &message); + void handle_script_request(const std::string &operation, P3D_object *object, + const std::string &property_name, P3D_object *value, bool needs_response, int unique_id); void set_failed(); @@ -201,7 +201,7 @@ private: size_t received_data); void report_package_progress(P3DPackage *package, double progress); void report_package_done(P3DPackage *package, bool success); - void set_install_label(const string &install_label); + void set_install_label(const std::string &install_label); void paint_window(); @@ -217,7 +217,7 @@ private: void add_carbon_modifier_flags(unsigned int &swb_flags, int modifiers); void add_cocoa_modifier_flags(unsigned int &swb_flags, int modifiers); - void send_notify(const string &message); + void send_notify(const std::string &message); #ifdef __APPLE__ void alloc_swbuffer(); @@ -228,10 +228,10 @@ private: P3D_request_ready_func *_func; P3D_object *_dom_object; P3DMainObject *_main_object; - string _p3d_basename; - string _origin_protocol; - string _origin_hostname; - string _origin_port; + std::string _p3d_basename; + std::string _origin_protocol; + std::string _origin_hostname; + std::string _origin_port; // We need a list of previous time reports so we can average the predicted // download time over the past few seconds. @@ -240,7 +240,7 @@ private: double _total; double _report_time; }; - typedef deque TimeReports; + typedef std::deque TimeReports; TimeReports _time_reports; double _total_time_reports; @@ -258,7 +258,7 @@ private: bool _use_standard_image; P3DTemporaryFile *_temp_filename; - string _filename; + std::string _filename; P3DSplashWindow::ImagePlacement _image_placement; }; ImageFile _image_files[IT_num_image_types]; @@ -283,11 +283,11 @@ private: P3DPackage *_p3dcert_package; int _instance_id; - string _session_key; - string _log_basename; - string _session_platform; - string _prc_name; - string _start_dir; + std::string _session_key; + std::string _log_basename; + std::string _session_platform; + std::string _prc_name; + std::string _start_dir; bool _hidden; bool _matches_run_origin; bool _matches_script_origin; @@ -301,14 +301,14 @@ private: P3DSession *_session; P3DAuthSession *_auth_session; - string _log_pathname; + std::string _log_pathname; #ifdef __APPLE__ // On OSX, we have to get a copy of the framebuffer data back from the child // process, and draw it to the window, here in the parent process. Crazy! int _shared_fd; size_t _shared_mmap_size; - string _shared_filename; + std::string _shared_filename; SubprocessWindowBuffer *_swbuffer; char *_reversed_buffer; CFDataRef _buffer_data; @@ -323,7 +323,7 @@ private: #endif // __APPLE__ P3DSplashWindow *_splash_window; - string _install_label; + std::string _install_label; bool _instance_window_opened; bool _instance_window_attached; bool _stuff_to_download; @@ -341,7 +341,7 @@ private: // for more than a couple of seconds. bool _show_dl_instance_progress; - typedef vector Packages; + typedef std::vector Packages; Packages _packages; Packages _downloading_packages; int _download_package_index; @@ -357,19 +357,19 @@ private: // it's in the above vector also. P3DPackage *_panda3d_package; - typedef map Downloads; + typedef std::map Downloads; Downloads _downloads; // The _raw_requests queue might be filled up by the read thread, so we // protect it in a lock. LOCK _request_lock; - typedef deque RawRequests; + typedef std::deque RawRequests; RawRequests _raw_requests; bool _requested_stop; // The _baked_requests queue is only touched in the main thread; no lock // needed. - typedef deque BakedRequests; + typedef std::deque BakedRequests; BakedRequests _baked_requests; friend class P3DSession; diff --git a/direct/src/plugin/p3dInstanceManager.I b/direct/src/plugin/p3dInstanceManager.I index 90a13c810a..3241fea0cf 100644 --- a/direct/src/plugin/p3dInstanceManager.I +++ b/direct/src/plugin/p3dInstanceManager.I @@ -73,7 +73,7 @@ get_api_version() const { * PANDA_PACKAGE_HOST_URL, but it might be set to something different by the * -u parameter on the panda3d executable. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_host_url() const { return _host_url; } @@ -83,7 +83,7 @@ get_host_url() const { * downloaded and installed. This must be a writable directory or nothing * will work. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_root_dir() const { return _root_dir; } @@ -92,7 +92,7 @@ get_root_dir() const { * Returns the directory that the .p3d file should be mounted to and run from. * This is usually the "start" subdirectory of the root_dir. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_start_dir() const { return _start_dir; } @@ -102,7 +102,7 @@ get_start_dir() const { * running. This string will be used to determine the appropriate packages to * download. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_platform() const { return _platform; } @@ -112,7 +112,7 @@ get_platform() const { * written. This filename will end with a slash, so that full pathnames may * be made by concatenting directly with this string. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_temp_directory() const { return _temp_directory; } @@ -122,7 +122,7 @@ get_temp_directory() const { * written. This filename will end with a slash, so that full pathnames may * be made by concatenting directly with this string. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_log_directory() const { return _log_directory; } @@ -133,7 +133,7 @@ get_log_directory() const { * different from the session log file(s), which represent the output from a * particular Python session. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_log_pathname() const { return _log_pathname; } @@ -187,7 +187,7 @@ get_num_supported_platforms() const { * environment will support, in order of preference--preferred platforms * appear first in the list. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_supported_platform(int n) const { return _supported_platforms.at(n); } @@ -230,7 +230,7 @@ get_plugin_official_version() const { * Returns the "distributor" reported by the plugin. This should represent * the entity that built and hosted the plugin. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_plugin_distributor() const { return _plugin_distributor; } @@ -240,7 +240,7 @@ get_plugin_distributor() const { * the plugin). This is for reporting purposes only; see get_host_url() for * the URL to contact to actually download content. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_coreapi_host_url() const { return _coreapi_host_url; } @@ -261,7 +261,7 @@ get_coreapi_timestamp() const { * not provide a number here. If provided, this will be a string of dot- * separated integers. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_coreapi_set_ver() const { return _coreapi_set_ver; } @@ -269,7 +269,7 @@ get_coreapi_set_ver() const { /** * Returns the "super mirror" URL. See p3d_plugin.h. */ -inline const string &P3DInstanceManager:: +inline const std::string &P3DInstanceManager:: get_super_mirror() const { return _super_mirror_url; } diff --git a/direct/src/plugin/p3dInstanceManager.h b/direct/src/plugin/p3dInstanceManager.h index a148c760a2..f175e90aeb 100644 --- a/direct/src/plugin/p3dInstanceManager.h +++ b/direct/src/plugin/p3dInstanceManager.h @@ -47,17 +47,17 @@ private: ~P3DInstanceManager(); public: - bool initialize(int api_version, const string &contents_filename, - const string &host_url, + bool initialize(int api_version, const std::string &contents_filename, + const std::string &host_url, P3D_verify_contents verify_contents, - const string &platform, - const string &log_directory, - const string &log_basename, + const std::string &platform, + const std::string &log_directory, + const std::string &log_basename, bool trusted_environment, bool console_environment, - const string &root_dir = "", - const string &host_dir = "", - const string &start_dir = ""); + const std::string &root_dir = "", + const std::string &host_dir = "", + const std::string &start_dir = ""); inline bool is_initialized() const; inline void reconsider_runtime_environment(); @@ -65,35 +65,35 @@ public: inline void reset_verify_contents(); inline int get_api_version() const; - inline const string &get_host_url() const; - inline const string &get_root_dir() const; - inline const string &get_start_dir() const; - inline const string &get_platform() const; - inline const string &get_temp_directory() const; - inline const string &get_log_directory() const; - inline const string &get_log_pathname() const; + inline const std::string &get_host_url() const; + inline const std::string &get_root_dir() const; + inline const std::string &get_start_dir() const; + inline const std::string &get_platform() const; + inline const std::string &get_temp_directory() const; + inline const std::string &get_log_directory() const; + inline const std::string &get_log_pathname() const; inline bool get_trusted_environment() const; inline bool get_console_environment() const; inline int get_num_supported_platforms() const; - inline const string &get_supported_platform(int n) const; + inline const std::string &get_supported_platform(int n) const; void set_plugin_version(int major, int minor, int sequence, - bool official, const string &distributor, - const string &coreapi_host_url, + bool official, const std::string &distributor, + const std::string &coreapi_host_url, time_t coreapi_timestamp, - const string &coreapi_set_ver); + const std::string &coreapi_set_ver); inline int get_plugin_major_version() const; inline int get_plugin_minor_version() const; inline int get_plugin_sequence_version() const; inline bool get_plugin_official_version() const; - inline const string &get_plugin_distributor() const; - inline const string &get_coreapi_host_url() const; + inline const std::string &get_plugin_distributor() const; + inline const std::string &get_coreapi_host_url() const; inline time_t get_coreapi_timestamp() const; - inline const string &get_coreapi_set_ver() const; + inline const std::string &get_coreapi_set_ver() const; - void set_super_mirror(const string &super_mirror_url); - inline const string &get_super_mirror() const; + void set_super_mirror(const std::string &super_mirror_url); + inline const std::string &get_super_mirror() const; P3DInstance * create_instance(P3D_request_ready_func *func, @@ -101,8 +101,8 @@ public: int argc, const char *argv[], void *user_data); bool set_p3d_filename(P3DInstance *inst, bool is_local, - const string &p3d_filename, const int &p3d_offset); - int make_p3d_stream(P3DInstance *inst, const string &p3d_url); + const std::string &p3d_filename, const int &p3d_offset); + int make_p3d_stream(P3DInstance *inst, const std::string &p3d_url); bool start_instance(P3DInstance *inst); void finish_instance(P3DInstance *inst); P3DAuthSession *authorize_instance(P3DInstance *inst); @@ -112,7 +112,7 @@ public: P3DInstance *check_request(); void wait_request(double timeout); - P3DHost *get_host(const string &host_url); + P3DHost *get_host(const std::string &host_url); void forget_host(P3DHost *host); inline int get_num_instances() const; @@ -126,13 +126,13 @@ public: inline P3D_object *new_none_object(); inline P3D_object *new_bool_object(bool value); - string make_temp_filename(const string &extension); - void release_temp_filename(const string &filename); + std::string make_temp_filename(const std::string &extension); + void release_temp_filename(const std::string &filename); bool find_cert(X509 *cert); void read_certlist(P3DPackage *package); - string get_cert_dir(X509 *cert); - static string cert_to_der(X509 *cert); + std::string get_cert_dir(X509 *cert); + static std::string cert_to_der(X509 *cert); void uninstall_all(); @@ -140,19 +140,19 @@ public: static void delete_global_ptr(); static inline char encode_hexdigit(int c); - static bool scan_directory(const string &dirname, vector &contents); - static bool scan_directory_recursively(const string &dirname, - vector &filename_contents, - vector &dirname_contents, - const string &prefix = ""); - static void delete_directory_recursively(const string &root_dir); - static bool remove_file_from_list(vector &contents, const string &filename); + static bool scan_directory(const std::string &dirname, std::vector &contents); + static bool scan_directory_recursively(const std::string &dirname, + std::vector &filename_contents, + std::vector &dirname_contents, + const std::string &prefix = ""); + static void delete_directory_recursively(const std::string &root_dir); + static bool remove_file_from_list(std::vector &contents, const std::string &filename); - static void append_safe_dir(string &root, const string &basename); + static void append_safe_dir(std::string &root, const std::string &basename); private: void create_runtime_environment(); - static void append_safe_dir_component(string &root, const string &component); + static void append_safe_dir_component(std::string &root, const std::string &component); private: // The notify thread. This thread runs only for the purpose of generating @@ -168,30 +168,30 @@ private: bool _is_initialized; bool _created_runtime_environment; int _api_version; - string _host_url; - string _root_dir; - string _host_dir; - string _start_dir; - string _certs_dir; + std::string _host_url; + std::string _root_dir; + std::string _host_dir; + std::string _start_dir; + std::string _certs_dir; P3D_verify_contents _verify_contents; - string _platform; - string _log_directory; - string _log_basename; - string _log_pathname; - string _temp_directory; + std::string _platform; + std::string _log_directory; + std::string _log_basename; + std::string _log_pathname; + std::string _temp_directory; bool _trusted_environment; bool _console_environment; int _plugin_major_version; int _plugin_minor_version; int _plugin_sequence_version; bool _plugin_official_version; - string _plugin_distributor; - string _coreapi_host_url; + std::string _plugin_distributor; + std::string _coreapi_host_url; time_t _coreapi_timestamp; - string _coreapi_set_ver; - string _super_mirror_url; + std::string _coreapi_set_ver; + std::string _super_mirror_url; - typedef vector SupportedPlatforms; + typedef std::vector SupportedPlatforms; SupportedPlatforms _supported_platforms; P3D_object *_undefined_object; @@ -199,20 +199,20 @@ private: P3D_object *_true_object; P3D_object *_false_object; - typedef set ApprovedCerts; + typedef std::set ApprovedCerts; ApprovedCerts _approved_certs; - typedef set Instances; + typedef std::set Instances; Instances _instances; P3DAuthSession *_auth_session; - typedef map Sessions; + typedef std::map Sessions; Sessions _sessions; - typedef map Hosts; + typedef std::map Hosts; Hosts _hosts; - typedef set TempFilenames; + typedef std::set TempFilenames; TempFilenames _temp_filenames; int _next_temp_filename_counter; @@ -228,7 +228,7 @@ private: THREAD _notify_thread; // This queue of instances that need to send notifications is protected by // _notify_ready's mutex. - typedef vector NotifyInstances; + typedef std::vector NotifyInstances; NotifyInstances _notify_instances; P3DConditionVar _notify_ready; diff --git a/direct/src/plugin/p3dIntObject.h b/direct/src/plugin/p3dIntObject.h index 899e422142..d77c0d689a 100644 --- a/direct/src/plugin/p3dIntObject.h +++ b/direct/src/plugin/p3dIntObject.h @@ -29,7 +29,7 @@ public: virtual P3D_object_type get_type(); virtual bool get_bool(); virtual int get_int(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); private: int _value; diff --git a/direct/src/plugin/p3dMainObject.h b/direct/src/plugin/p3dMainObject.h index 7ed634c44c..fafad0ff16 100644 --- a/direct/src/plugin/p3dMainObject.h +++ b/direct/src/plugin/p3dMainObject.h @@ -45,17 +45,17 @@ public: virtual int get_int(); virtual double get_float(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); - virtual P3D_object *get_property(const string &property); - virtual bool set_property(const string &property, bool needs_response, + virtual P3D_object *get_property(const std::string &property); + virtual bool set_property(const std::string &property, bool needs_response, P3D_object *value); - virtual bool has_method(const string &method_name); - virtual P3D_object *call(const string &method_name, bool needs_response, + virtual bool has_method(const std::string &method_name); + virtual P3D_object *call(const std::string &method_name, bool needs_response, P3D_object *params[], int num_params); - virtual void output(ostream &out); + virtual void output(std::ostream &out); void set_pyobj(P3D_object *pyobj); P3D_object *get_pyobj() const; @@ -68,11 +68,11 @@ private: P3D_object *call_read_game_log(P3D_object *params[], int num_params); P3D_object *call_read_system_log(P3D_object *params[], int num_params); P3D_object *call_read_log(P3D_object *params[], int num_params); - P3D_object *read_log(const string &log_pathname, + P3D_object *read_log(const std::string &log_pathname, P3D_object *params[], int num_params); - void read_log_file(const string &log_pathname, + void read_log_file(const std::string &log_pathname, size_t tail_bytes, size_t head_bytes, - ostringstream &log_data); + std::ostringstream &log_data); P3D_object *call_uninstall(P3D_object *params[], int num_params); private: @@ -80,12 +80,12 @@ private: P3DInstance *_inst; bool _unauth_play; - string _game_log_pathname; + std::string _game_log_pathname; // This map is used to store properties and retrieve until set_pyobj() is // called for the firs ttime. At that point, the properties stored here are // transferred down to the internal PyObject. - typedef map Properties; + typedef std::map Properties; Properties _properties; }; diff --git a/direct/src/plugin/p3dMultifileReader.I b/direct/src/plugin/p3dMultifileReader.I index eb072e0a3b..ff3daf31b8 100644 --- a/direct/src/plugin/p3dMultifileReader.I +++ b/direct/src/plugin/p3dMultifileReader.I @@ -48,7 +48,7 @@ read_uint32() { */ inline size_t P3DMultifileReader::Subfile:: get_last_byte_pos() const { - return max(_index_start + _index_length, _data_start + _data_length) - 1; + return std::max(_index_start + _index_length, _data_start + _data_length) - 1; } /** diff --git a/direct/src/plugin/p3dMultifileReader.h b/direct/src/plugin/p3dMultifileReader.h index 64a788c263..8f80a1f67c 100644 --- a/direct/src/plugin/p3dMultifileReader.h +++ b/direct/src/plugin/p3dMultifileReader.h @@ -27,14 +27,14 @@ class P3DMultifileReader { public: P3DMultifileReader(); - bool open_read(const string &pathname, const int &offset = 0); + bool open_read(const std::string &pathname, const int &offset = 0); inline bool is_open() const; void close(); - bool extract_all(const string &to_dir, P3DPackage *package, + bool extract_all(const std::string &to_dir, P3DPackage *package, P3DPackage::InstallStepThreaded *step); - bool extract_one(ostream &out, const string &filename); + bool extract_one(std::ostream &out, const std::string &filename); class CertRecord { public: @@ -43,16 +43,16 @@ public: inline ~CertRecord(); X509 *_cert; }; - typedef vector CertChain; + typedef std::vector CertChain; int get_num_signatures() const; const CertChain &get_signature(int n) const; private: class Subfile; - bool read_header(const string &pathname); + bool read_header(const std::string &pathname); bool read_index(); - bool extract_subfile(ostream &out, const Subfile &s); + bool extract_subfile(std::ostream &out, const Subfile &s); void check_signatures(); @@ -73,7 +73,7 @@ private: public: inline size_t get_last_byte_pos() const; - string _filename; + std::string _filename; size_t _index_start; size_t _index_length; size_t _data_start; @@ -85,12 +85,12 @@ private: bool _is_open; int _read_offset; - typedef vector Subfiles; + typedef std::vector Subfiles; Subfiles _subfiles; Subfiles _cert_special; size_t _last_data_byte; - typedef vector Certificates; + typedef std::vector Certificates; Certificates _signatures; static const char _header[]; diff --git a/direct/src/plugin/p3dNoneObject.h b/direct/src/plugin/p3dNoneObject.h index e0272f04cb..06fffe89f9 100644 --- a/direct/src/plugin/p3dNoneObject.h +++ b/direct/src/plugin/p3dNoneObject.h @@ -28,7 +28,7 @@ public: public: virtual P3D_object_type get_type(); virtual bool get_bool(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); }; #endif diff --git a/direct/src/plugin/p3dObject.h b/direct/src/plugin/p3dObject.h index 0cedd291ad..8e69e5bec7 100644 --- a/direct/src/plugin/p3dObject.h +++ b/direct/src/plugin/p3dObject.h @@ -39,18 +39,18 @@ public: int get_string(char *buffer, int buffer_length); int get_repr(char *buffer, int buffer_length); - virtual void make_string(string &value)=0; + virtual void make_string(std::string &value)=0; - virtual P3D_object *get_property(const string &property); - virtual bool set_property(const string &property, bool needs_response, + virtual P3D_object *get_property(const std::string &property); + virtual bool set_property(const std::string &property, bool needs_response, P3D_object *value); - virtual bool has_method(const string &method_name); - virtual P3D_object *call(const string &method_name, bool needs_response, + virtual bool has_method(const std::string &method_name); + virtual P3D_object *call(const std::string &method_name, bool needs_response, P3D_object *params[], int num_params); - virtual P3D_object *eval(const string &expression); + virtual P3D_object *eval(const std::string &expression); - virtual void output(ostream &out); + virtual void output(std::ostream &out); virtual bool fill_xml(TiXmlElement *xvalue, P3DSession *session); virtual P3D_object **get_object_array(); virtual int get_object_array_size(); @@ -58,19 +58,19 @@ public: virtual P3DPythonObject *as_python_object(); // Convenience functions. - bool get_bool_property(const string &property); - void set_bool_property(const string &property, bool value); + bool get_bool_property(const std::string &property); + void set_bool_property(const std::string &property, bool value); - int get_int_property(const string &property); - void set_int_property(const string &property, int value); + int get_int_property(const std::string &property); + void set_int_property(const std::string &property, int value); - double get_float_property(const string &property); - void set_float_property(const string &property, double value); + double get_float_property(const std::string &property); + void set_float_property(const std::string &property, double value); - string get_string_property(const string &property); - void set_string_property(const string &property, const string &value); + std::string get_string_property(const std::string &property); + void set_string_property(const std::string &property, const std::string &value); - void set_undefined_property(const string &property); + void set_undefined_property(const std::string &property); public: static P3D_class_definition _object_class; @@ -83,7 +83,7 @@ public: // method to write the output simply. (For classes that inherit only from // P3D_object, we have to use the generic C method defined in // p3d_plugin_common.h, a little clumsier.) -inline ostream &operator << (ostream &out, P3DObject &value) { +inline std::ostream &operator << (std::ostream &out, P3DObject &value) { value.output(out); return out; } diff --git a/direct/src/plugin/p3dOsxSplashWindow.h b/direct/src/plugin/p3dOsxSplashWindow.h index 2a725412eb..9a2a6225bc 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.h +++ b/direct/src/plugin/p3dOsxSplashWindow.h @@ -32,9 +32,9 @@ public: virtual void set_wparams(const P3DWindowParams &wparams); virtual void set_visible(bool visible); - virtual void set_image_filename(const string &image_filename, + virtual void set_image_filename(const std::string &image_filename, ImagePlacement image_placement); - virtual void set_install_label(const string &install_label); + virtual void set_install_label(const std::string &install_label); virtual void set_install_progress(double install_progress, bool is_progress_known, size_t received_data); @@ -50,7 +50,7 @@ private: bool handle_event_osx_cocoa(const P3D_event_data &event); class OsxImageData; - void load_image(OsxImageData &image, const string &image_filename); + void load_image(OsxImageData &image, const std::string &image_filename); bool paint_image(CGContextRef context, const OsxImageData &image); void paint_progress_bar(CGContextRef context); @@ -82,7 +82,7 @@ private: CFDictionaryRef _font_attribs; - string _install_label; + std::string _install_label; double _install_progress; bool _progress_known; size_t _received_data; diff --git a/direct/src/plugin/p3dPackage.I b/direct/src/plugin/p3dPackage.I index 2b5f40ff73..371491f5c2 100644 --- a/direct/src/plugin/p3dPackage.I +++ b/direct/src/plugin/p3dPackage.I @@ -60,7 +60,7 @@ get_host() const { /** * Returns the directory into which this package is installed. */ -inline const string &P3DPackage:: +inline const std::string &P3DPackage:: get_package_dir() const { return _package_dir; } @@ -71,7 +71,7 @@ get_package_dir() const { * will not contain spaces. See also get_package_display_name() for a name * suitable for displaying to the user. */ -inline const string &P3DPackage:: +inline const std::string &P3DPackage:: get_package_name() const { return _package_name; } @@ -79,7 +79,7 @@ get_package_name() const { /** * Returns the version string of this package. */ -inline const string &P3DPackage:: +inline const std::string &P3DPackage:: get_package_version() const { return _package_version; } @@ -87,7 +87,7 @@ get_package_version() const { /** * Returns the platform string of this package. */ -inline const string &P3DPackage:: +inline const std::string &P3DPackage:: get_package_platform() const { return _package_platform; } @@ -95,7 +95,7 @@ get_package_platform() const { /** * Returns the display_name name of this package, as set in the desc file. */ -inline const string &P3DPackage:: +inline const std::string &P3DPackage:: get_package_display_name() const { return _package_display_name; } @@ -114,7 +114,7 @@ get_xconfig() const { * package, the desc file itself represents the entire contents of the * package. */ -inline const string &P3DPackage:: +inline const std::string &P3DPackage:: get_desc_file_pathname() const { return _desc_file_pathname; } @@ -123,7 +123,7 @@ get_desc_file_pathname() const { * Returns the relative path, on the host, of the directory that contains the * desc file (and to which all of the paths in the desc file are relative). */ -inline const string &P3DPackage:: +inline const std::string &P3DPackage:: get_desc_file_dirname() const { return _desc_file_dirname; } @@ -132,7 +132,7 @@ get_desc_file_dirname() const { * Returns the full path to the package's uncompressed archive file. This is * only valid if get_ready() is true and the package is not a "solo" package. */ -inline string P3DPackage:: +inline std::string P3DPackage:: get_archive_file_pathname() const { return _uncompressed_archive.get_pathname(_package_dir); } @@ -154,7 +154,7 @@ get_progress() const { if (_bytes_needed == 0) { return 1.0; } - return min((double)_bytes_done / (double)_bytes_needed, 1.0); + return std::min((double)_bytes_done / (double)_bytes_needed, 1.0); } /** @@ -169,8 +169,8 @@ report_step_progress() { * */ inline P3DPackage::RequiredPackage:: -RequiredPackage(const string &package_name, const string &package_version, - const string &package_seq, P3DHost *host) : +RequiredPackage(const std::string &package_name, const std::string &package_version, + const std::string &package_seq, P3DHost *host) : _package_name(package_name), _package_version(package_version), _package_seq(package_seq), diff --git a/direct/src/plugin/p3dPackage.h b/direct/src/plugin/p3dPackage.h index b65290f836..4d44282c67 100644 --- a/direct/src/plugin/p3dPackage.h +++ b/direct/src/plugin/p3dPackage.h @@ -38,10 +38,10 @@ class P3DTemporaryFile; class P3DPackage { private: P3DPackage(P3DHost *host, - const string &package_name, - const string &package_version, - const string &package_platform, - const string &alt_host); + const std::string &package_name, + const std::string &package_version, + const std::string &package_platform, + const std::string &alt_host); ~P3DPackage(); public: @@ -52,17 +52,17 @@ public: inline bool get_ready() const; inline bool get_failed() const; inline P3DHost *get_host() const; - inline const string &get_package_dir() const; - inline const string &get_package_name() const; - inline const string &get_package_version() const; - inline const string &get_package_platform() const; - inline const string &get_package_display_name() const; - string get_formatted_name() const; + inline const std::string &get_package_dir() const; + inline const std::string &get_package_name() const; + inline const std::string &get_package_version() const; + inline const std::string &get_package_platform() const; + inline const std::string &get_package_display_name() const; + std::string get_formatted_name() const; inline const TiXmlElement *get_xconfig() const; - inline const string &get_desc_file_pathname() const; - inline const string &get_desc_file_dirname() const; - inline string get_archive_file_pathname() const; + inline const std::string &get_desc_file_pathname() const; + inline const std::string &get_desc_file_dirname() const; + inline std::string get_archive_file_pathname() const; void add_instance(P3DInstance *inst); void remove_instance(P3DInstance *inst); @@ -73,7 +73,7 @@ public: TiXmlElement *make_xml(); private: - typedef vector Extracts; + typedef std::vector Extracts; enum DownloadType { DT_contents_file, @@ -82,7 +82,7 @@ private: DT_install_step, }; - typedef vector TryUrls; + typedef std::vector TryUrls; class Download : public P3DFileDownload { public: @@ -123,7 +123,7 @@ private: virtual ~InstallStep(); virtual InstallToken do_step(bool download_finished) = 0; - virtual void output(ostream &out) = 0; + virtual void output(std::ostream &out) = 0; inline double get_effort() const; inline double get_progress() const; @@ -141,10 +141,10 @@ private: virtual ~InstallStepDownloadFile(); virtual InstallToken do_step(bool download_finished); - virtual void output(ostream &out); + virtual void output(std::ostream &out); - string _urlbase; - string _pathname; + std::string _urlbase; + std::string _pathname; FileSpec _file; Download *_download; }; @@ -174,7 +174,7 @@ private: InstallStepUncompressFile(P3DPackage *package, const FileSpec &source, const FileSpec &target, bool verify_target); virtual InstallToken thread_step(); - virtual void output(ostream &out); + virtual void output(std::ostream &out); FileSpec _source; FileSpec _target; @@ -185,7 +185,7 @@ private: public: InstallStepUnpackArchive(P3DPackage *package, size_t unpack_size); virtual InstallToken thread_step(); - virtual void output(ostream &out); + virtual void output(std::ostream &out); }; class InstallStepApplyPatch : public InstallStepThreaded { @@ -195,13 +195,13 @@ private: const FileSpec &source, const FileSpec &target); virtual InstallToken thread_step(); - virtual void output(ostream &out); + virtual void output(std::ostream &out); P3DPatchfileReader _reader; }; - typedef deque InstallPlan; - typedef deque InstallPlans; + typedef std::deque InstallPlan; + typedef std::deque InstallPlans; InstallPlans _install_plans; bool _computed_plan_size; @@ -230,52 +230,52 @@ private: void report_progress(InstallStep *step); void report_info_ready(); void report_done(bool success); - Download *start_download(DownloadType dtype, const string &urlbase, - const string &pathname, const FileSpec &file_spec); + Download *start_download(DownloadType dtype, const std::string &urlbase, + const std::string &pathname, const FileSpec &file_spec); void set_active_download(Download *download); void set_saved_download(Download *download); - bool is_extractable(FileSpec &file, const string &filename) const; + bool is_extractable(FileSpec &file, const std::string &filename) const; bool instance_terminating(P3DInstance *instance); void set_fullname(); public: class RequiredPackage { public: - inline RequiredPackage(const string &package_name, - const string &package_version, - const string &package_seq, + inline RequiredPackage(const std::string &package_name, + const std::string &package_version, + const std::string &package_seq, P3DHost *host); - string _package_name; - string _package_version; - string _package_seq; + std::string _package_name; + std::string _package_version; + std::string _package_seq; P3DHost *_host; }; - typedef vector Requires; + typedef std::vector Requires; Requires _requires; private: P3DHost *_host; int _host_contents_iseq; - string _package_name; - string _package_version; - string _package_platform; + std::string _package_name; + std::string _package_version; + std::string _package_platform; bool _per_platform; int _patch_version; - string _alt_host; + std::string _alt_host; bool _package_solo; - string _package_display_name; - string _package_fullname; - string _package_dir; + std::string _package_display_name; + std::string _package_fullname; + std::string _package_dir; TiXmlElement *_xconfig; P3DTemporaryFile *_temp_contents_file; FileSpec _desc_file; - string _desc_file_dirname; - string _desc_file_basename; - string _desc_file_pathname; + std::string _desc_file_dirname; + std::string _desc_file_basename; + std::string _desc_file_pathname; bool _info_ready; bool _allow_data_download; @@ -284,7 +284,7 @@ private: Download *_active_download; Download *_saved_download; - typedef vector Instances; + typedef std::vector Instances; Instances _instances; FileSpec _compressed_archive; diff --git a/direct/src/plugin/p3dPatchFinder.h b/direct/src/plugin/p3dPatchFinder.h index d3ee7d02b7..f25145a8e3 100644 --- a/direct/src/plugin/p3dPatchFinder.h +++ b/direct/src/plugin/p3dPatchFinder.h @@ -34,26 +34,26 @@ public: class Patchfile; class PackageVersion; - typedef vector Patchfiles; - typedef vector PackageVersionsList; + typedef std::vector Patchfiles; + typedef std::vector PackageVersionsList; // This class is used to index into a map to locate PackageVersion objects, // below. class PackageVersionKey { public: - PackageVersionKey(const string &package_name, - const string &platform, - const string &version, - const string &host_url, + PackageVersionKey(const std::string &package_name, + const std::string &platform, + const std::string &version, + const std::string &host_url, const FileSpec &file); bool operator < (const PackageVersionKey &other) const; - void output(ostream &out) const; + void output(std::ostream &out) const; public: - string _package_name; - string _platform; - string _version; - string _host_url; + std::string _package_name; + std::string _platform; + std::string _version; + std::string _host_url; FileSpec _file; }; @@ -68,12 +68,12 @@ public: const PackageVersionsList &already_visited_in); public: - string _package_name; - string _platform; - string _version; - string _host_url; + std::string _package_name; + std::string _platform; + std::string _version; + std::string _host_url; FileSpec _file; - string _print_name; + std::string _print_name; // The Package object that produces this version if this is the current // form or the base form, respectively. @@ -98,10 +98,10 @@ public: public: Package *_package; - string _package_name; - string _platform; - string _version; - string _host_url; + std::string _package_name; + std::string _platform; + std::string _version; + std::string _host_url; // The patchfile itself FileSpec _file; @@ -132,10 +132,10 @@ public: bool read_desc_file(TiXmlDocument *doc); public: - string _package_name; - string _platform; - string _version; - string _host_url; + std::string _package_name; + std::string _platform; + std::string _version; + std::string _host_url; PackageVersion *_current_pv; PackageVersion *_base_pv; @@ -162,16 +162,16 @@ private: void record_patchfile(Patchfile *patchfile); private: - typedef map PackageVersions; + typedef std::map PackageVersions; PackageVersions _package_versions; - typedef vector Packages; + typedef std::vector Packages; Packages _packages; }; #include "p3dPatchFinder.I" -inline ostream &operator << (ostream &out, const P3DPatchFinder::PackageVersionKey &key) { +inline std::ostream &operator << (std::ostream &out, const P3DPatchFinder::PackageVersionKey &key) { key.output(out); return out; } diff --git a/direct/src/plugin/p3dPatchfileReader.h b/direct/src/plugin/p3dPatchfileReader.h index 1ad097a5ba..1c9501f5d1 100644 --- a/direct/src/plugin/p3dPatchfileReader.h +++ b/direct/src/plugin/p3dPatchfileReader.h @@ -29,7 +29,7 @@ */ class P3DPatchfileReader { public: - P3DPatchfileReader(const string &package_dir, + P3DPatchfileReader(const std::string &package_dir, const FileSpec &patchfile, const FileSpec &source, const FileSpec &target); @@ -45,18 +45,18 @@ public: void close(); private: - bool copy_bytes(istream &in, size_t copy_byte_count); + bool copy_bytes(std::istream &in, size_t copy_byte_count); inline unsigned int read_uint16(); inline unsigned int read_uint32(); inline int read_int32(); private: - string _package_dir; + std::string _package_dir; FileSpec _patchfile; FileSpec _source; FileSpec _target; - string _output_pathname; + std::string _output_pathname; ifstream _patch_in; ifstream _source_in; ofstream _target_out; diff --git a/direct/src/plugin/p3dPythonObject.h b/direct/src/plugin/p3dPythonObject.h index 980617257e..a4f9c5d7d0 100644 --- a/direct/src/plugin/p3dPythonObject.h +++ b/direct/src/plugin/p3dPythonObject.h @@ -35,20 +35,20 @@ public: virtual int get_int(); virtual double get_float(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); - virtual P3D_object *get_property(const string &property); - virtual bool set_property(const string &property, bool needs_response, P3D_object *value); - bool set_property_insecure(const string &property, bool needs_response, + virtual P3D_object *get_property(const std::string &property); + virtual bool set_property(const std::string &property, bool needs_response, P3D_object *value); + bool set_property_insecure(const std::string &property, bool needs_response, P3D_object *value); - virtual bool has_method(const string &method_name); - virtual P3D_object *call(const string &method_name, bool needs_response, + virtual bool has_method(const std::string &method_name); + virtual P3D_object *call(const std::string &method_name, bool needs_response, P3D_object *params[], int num_params); - P3D_object *call_insecure(const string &method_name, bool needs_response, + P3D_object *call_insecure(const std::string &method_name, bool needs_response, P3D_object *params[], int num_params); - virtual void output(ostream &out); + virtual void output(std::ostream &out); virtual bool fill_xml(TiXmlElement *xvalue, P3DSession *session); virtual P3DPythonObject *as_python_object(); @@ -60,7 +60,7 @@ private: P3DSession *_session; int _object_id; - typedef map HasMethod; + typedef std::map HasMethod; HasMethod _has_method; }; diff --git a/direct/src/plugin/p3dPythonRun.h b/direct/src/plugin/p3dPythonRun.h index 17a8e35371..e478670cca 100644 --- a/direct/src/plugin/p3dPythonRun.h +++ b/direct/src/plugin/p3dPythonRun.h @@ -156,10 +156,10 @@ private: int _py_argc; #if PY_MAJOR_VERSION >= 3 wchar_t *_py_argv[2]; - wstring _program_name; + std::wstring _program_name; #else char *_py_argv[2]; - string _program_name; + std::string _program_name; #endif bool _interactive_console; diff --git a/direct/src/plugin/p3dSession.I b/direct/src/plugin/p3dSession.I index 2ab1155788..010a81c172 100644 --- a/direct/src/plugin/p3dSession.I +++ b/direct/src/plugin/p3dSession.I @@ -15,7 +15,7 @@ * Returns a string that uniquely identifies this session. See * P3dInstance::get_session_key(). */ -inline const string &P3DSession:: +inline const std::string &P3DSession:: get_session_key() const { return _session_key; } @@ -25,7 +25,7 @@ get_session_key() const { * started and if it has a log file. Returns empty string if the session * never started or if it lacks a log file. */ -inline const string &P3DSession:: +inline const std::string &P3DSession:: get_log_pathname() const { return _log_pathname; } diff --git a/direct/src/plugin/p3dSession.h b/direct/src/plugin/p3dSession.h index 88db279379..eca5702fd6 100644 --- a/direct/src/plugin/p3dSession.h +++ b/direct/src/plugin/p3dSession.h @@ -39,8 +39,8 @@ public: void shutdown(); - inline const string &get_session_key() const; - inline const string &get_log_pathname() const; + inline const std::string &get_session_key() const; + inline const std::string &get_log_pathname() const; inline bool get_matches_script_origin() const; void start_instance(P3DInstance *inst); @@ -67,7 +67,7 @@ private: void spawn_read_thread(); void join_read_thread(); - static void replace_slashes(string &str); + static void replace_slashes(std::string &str); private: // These methods run only within the read thread. @@ -87,42 +87,42 @@ private: THREAD_CALLBACK_DECLARATION(P3DSession, p3dpython_thread_run); void p3dpython_thread_run(); - static bool get_env(string &value, const string &varname); + static bool get_env(std::string &value, const std::string &varname); void write_env() const; private: int _session_id; - string _session_key; - string _log_pathname; - string _python_root_dir; - string _start_dir; + std::string _session_key; + std::string _log_pathname; + std::string _python_root_dir; + std::string _start_dir; bool _matches_script_origin; bool _keep_user_env; bool _failed; // This information is passed to create_process(), or to // p3dpython_thread_run(). - string _p3dpython_exe; - string _p3dpython_dll; - string _mf_filename; - string _env; + std::string _p3dpython_exe; + std::string _p3dpython_dll; + std::string _mf_filename; + std::string _env; FHandle _input_handle, _output_handle; bool _interactive_console; - typedef map Instances; + typedef std::map Instances; Instances _instances; LOCK _instances_lock; // Commands that are queued up to send down the pipe. Normally these only // accumulate before the python process has been started; after that, // commands are written to the pipe directly. - typedef vector Commands; + typedef std::vector Commands; Commands _commands; // This map keeps track of the P3D_object pointers we have delivered to the // child process. We have to keep each of these until the child process // tells us it's safe to delete them. - typedef map SentObjects; + typedef std::map SentObjects; SentObjects _sent_objects; P3DPackage *_panda3d; @@ -146,7 +146,7 @@ private: bool _p3dpython_running; // The _response_ready mutex protects this structure. - typedef map Responses; + typedef std::map Responses; Responses _responses; P3DConditionVar _response_ready; diff --git a/direct/src/plugin/p3dSplashWindow.h b/direct/src/plugin/p3dSplashWindow.h index 65c7301d7c..4f67b5c1c0 100644 --- a/direct/src/plugin/p3dSplashWindow.h +++ b/direct/src/plugin/p3dSplashWindow.h @@ -60,7 +60,7 @@ public: FW_black = 900 }; - virtual void set_image_filename(const string &image_filename, + virtual void set_image_filename(const std::string &image_filename, ImagePlacement image_placement); void set_fgcolor(int r, int g, int b); void set_bgcolor(int r, int g, int b); @@ -70,11 +70,11 @@ public: void set_bar_bottom(int bottom); void set_bar_width(int width, bool percent=false); void set_bar_height(int height, bool percent=false); - void set_font_family(const string &family); + void set_font_family(const std::string &family); void set_font_size(int size); void set_font_style(FontStyle style); void set_font_weight(int weight); - virtual void set_install_label(const string &install_label); + virtual void set_install_label(const std::string &install_label); virtual void set_install_progress(double install_progress, bool is_progress_known, size_t received_data); @@ -93,8 +93,8 @@ protected: int _width, _height, _num_channels; }; - bool read_image_data(ImageData &image, string &data, - const string &image_filename); + bool read_image_data(ImageData &image, std::string &data, + const std::string &image_filename); void get_bar_placement(int &bar_x, int &bar_y, int &bar_width, int &bar_height); void set_button_range(const ImageData &image); @@ -131,7 +131,7 @@ private: double _bar_width_ratio, _bar_height_ratio; protected: - string _font_family; + std::string _font_family; int _font_size; FontStyle _font_style; int _font_weight; diff --git a/direct/src/plugin/p3dStringObject.h b/direct/src/plugin/p3dStringObject.h index 22366023f7..3e358e56b9 100644 --- a/direct/src/plugin/p3dStringObject.h +++ b/direct/src/plugin/p3dStringObject.h @@ -22,7 +22,7 @@ */ class P3DStringObject : public P3DObject { public: - P3DStringObject(const string &value); + P3DStringObject(const std::string &value); P3DStringObject(const char *data, size_t size); P3DStringObject(const P3DStringObject ©); @@ -31,12 +31,12 @@ public: virtual P3D_object_type get_type(); virtual bool get_bool(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); - virtual void output(ostream &out); + virtual void output(std::ostream &out); private: - string _value; + std::string _value; }; #endif diff --git a/direct/src/plugin/p3dTemporaryFile.I b/direct/src/plugin/p3dTemporaryFile.I index 104fefa420..c1d8eeb7e2 100644 --- a/direct/src/plugin/p3dTemporaryFile.I +++ b/direct/src/plugin/p3dTemporaryFile.I @@ -14,7 +14,7 @@ /** * Returns the temporary filename. */ -inline const string &P3DTemporaryFile:: +inline const std::string &P3DTemporaryFile:: get_filename() const { return _filename; } diff --git a/direct/src/plugin/p3dTemporaryFile.h b/direct/src/plugin/p3dTemporaryFile.h index f4b87df247..57fb6cef5a 100644 --- a/direct/src/plugin/p3dTemporaryFile.h +++ b/direct/src/plugin/p3dTemporaryFile.h @@ -26,16 +26,16 @@ */ class P3DTemporaryFile { public: - P3DTemporaryFile(const string &extension); + P3DTemporaryFile(const std::string &extension); ~P3DTemporaryFile(); - inline const string &get_filename() const; + inline const std::string &get_filename() const; private: - string _filename; + std::string _filename; }; -inline ostream &operator << (ostream &out, P3DTemporaryFile &tfile) { +inline std::ostream &operator << (std::ostream &out, P3DTemporaryFile &tfile) { return out << tfile.get_filename(); } diff --git a/direct/src/plugin/p3dUndefinedObject.h b/direct/src/plugin/p3dUndefinedObject.h index 9ab8189de6..3cba1d73b4 100644 --- a/direct/src/plugin/p3dUndefinedObject.h +++ b/direct/src/plugin/p3dUndefinedObject.h @@ -29,7 +29,7 @@ public: public: virtual P3D_object_type get_type(); virtual bool get_bool(); - virtual void make_string(string &value); + virtual void make_string(std::string &value); }; #endif diff --git a/direct/src/plugin/p3dWinSplashWindow.h b/direct/src/plugin/p3dWinSplashWindow.h index 852d794cb8..713157c921 100644 --- a/direct/src/plugin/p3dWinSplashWindow.h +++ b/direct/src/plugin/p3dWinSplashWindow.h @@ -34,9 +34,9 @@ public: virtual void set_wparams(const P3DWindowParams &wparams); virtual void set_visible(bool visible); - virtual void set_image_filename(const string &image_filename, + virtual void set_image_filename(const std::string &image_filename, ImagePlacement image_placement); - virtual void set_install_label(const string &install_label); + virtual void set_install_label(const std::string &install_label); virtual void set_install_progress(double install_progress, bool is_progress_known, size_t received_data); virtual void request_keyboard_focus(); @@ -75,7 +75,7 @@ private: inline ~WinImageData(); void dump_image(); - string _filename; + std::string _filename; bool _filename_changed; HBITMAP _bitmap; }; @@ -86,14 +86,14 @@ private: WinImageData _button_click_image; bool _got_install; - string _install_label; + std::string _install_label; double _install_progress; bool _progress_known; size_t _received_data; LOCK _install_lock; ButtonState _drawn_bstate; - string _drawn_label; + std::string _drawn_label; double _drawn_progress; bool _drawn_progress_known; size_t _drawn_received_data; diff --git a/direct/src/plugin/p3dX11SplashWindow.h b/direct/src/plugin/p3dX11SplashWindow.h index 892fc6e4cb..72c6ac00d0 100644 --- a/direct/src/plugin/p3dX11SplashWindow.h +++ b/direct/src/plugin/p3dX11SplashWindow.h @@ -34,9 +34,9 @@ public: virtual void set_wparams(const P3DWindowParams &wparams); virtual void set_visible(bool visible); - virtual void set_image_filename(const string &image_filename, + virtual void set_image_filename(const std::string &image_filename, ImagePlacement image_placement); - virtual void set_install_label(const string &install_label); + virtual void set_install_label(const std::string &install_label); virtual void set_install_progress(double install_progress, bool is_progress_known, size_t received_data); @@ -85,12 +85,12 @@ private: void update_image(X11ImageData &image); void compose_image(); - bool scale_image(vector &image0, int &image0_width, int &image0_height, + bool scale_image(std::vector &image0, int &image0_width, int &image0_height, X11ImageData &image); - void compose_two_images(vector &image0, int &image0_width, int &image0_height, - const vector &image1, int image1_width, int image1_height, - const vector &image2, int image2_width, int image2_height); + void compose_two_images(std::vector &image0, int &image0_width, int &image0_height, + const std::vector &image1, int image1_width, int image1_height, + const std::vector &image2, int image2_width, int image2_height); private: // Data members that are stored in the subprocess. @@ -99,9 +99,9 @@ private: inline X11ImageData(); inline ~X11ImageData(); - string _filename; + std::string _filename; bool _filename_changed; - string _data; + std::string _data; }; X11ImageData _background_image; @@ -116,12 +116,12 @@ private: bool _subprocess_continue; bool _own_display; - string _install_label; + std::string _install_label; double _install_progress; bool _progress_known; size_t _received_data; - string _label_text; + std::string _label_text; X11_Display *_display; int _screen; diff --git a/direct/src/plugin/p3d_plugin_common.h b/direct/src/plugin/p3d_plugin_common.h index 538f69f466..748005c48d 100644 --- a/direct/src/plugin/p3d_plugin_common.h +++ b/direct/src/plugin/p3d_plugin_common.h @@ -37,15 +37,15 @@ using namespace std; // Appears in p3dInstanceManager.cxx. -extern ostream *nout_stream; +extern std::ostream *nout_stream; #define nout (*nout_stream) // Appears in p3d_plugin.cxx. extern LOCK _api_lock; // A convenience function for formatting a generic P3D_object to an ostream. -inline ostream & -operator << (ostream &out, P3D_object &value) { +inline std::ostream & +operator << (std::ostream &out, P3D_object &value) { int size = P3D_OBJECT_GET_REPR(&value, nullptr, 0); char *buffer = new char[size]; P3D_OBJECT_GET_REPR(&value, buffer, size); diff --git a/direct/src/plugin/parse_color.h b/direct/src/plugin/parse_color.h index cbbed95e03..ba5dd152a8 100644 --- a/direct/src/plugin/parse_color.h +++ b/direct/src/plugin/parse_color.h @@ -17,6 +17,6 @@ #include using namespace std; -bool parse_color(int &r, int &g, int &b, const string &color); +bool parse_color(int &r, int &g, int &b, const std::string &color); #endif diff --git a/direct/src/plugin/wstring_encode.h b/direct/src/plugin/wstring_encode.h index 8f36f88209..5d5ebab4de 100644 --- a/direct/src/plugin/wstring_encode.h +++ b/direct/src/plugin/wstring_encode.h @@ -21,13 +21,13 @@ using namespace std; // the only place they are needed. (Only Windows requires wstrings for // filenames.) #ifdef _WIN32 -bool wstring_to_string(string &result, const wstring &source); -bool string_to_wstring(wstring &result, const string &source); +bool wstring_to_string(std::string &result, const std::wstring &source); +bool string_to_wstring(std::wstring &result, const std::string &source); // We declare this inline so it won't conflict with the similar function // defined in Panda's textEncoder.h. -inline ostream &operator << (ostream &out, const wstring &str) { - string result; +inline std::ostream &operator << (std::ostream &out, const std::wstring &str) { + std::string result; if (wstring_to_string(result, str)) { out << result; } diff --git a/direct/src/plugin/xml_helpers.h b/direct/src/plugin/xml_helpers.h index ea540bcf7a..d64047f55a 100644 --- a/direct/src/plugin/xml_helpers.h +++ b/direct/src/plugin/xml_helpers.h @@ -16,7 +16,7 @@ #include "get_tinyxml.h" -bool parse_bool_attrib(TiXmlElement *xelem, const string &attrib, +bool parse_bool_attrib(TiXmlElement *xelem, const std::string &attrib, bool default_value); #endif diff --git a/direct/src/plugin_activex/PPInstance.h b/direct/src/plugin_activex/PPInstance.h index 1c80168aea..8b59b6a3ac 100644 --- a/direct/src/plugin_activex/PPInstance.h +++ b/direct/src/plugin_activex/PPInstance.h @@ -81,7 +81,7 @@ protected: bool HandleRequest( P3D_request *request ); static void HandleRequestGetUrl( void *data ); - static int compare_seq(const string &seq_a, const string &seq_b); + static int compare_seq(const std::string &seq_a, const std::string &seq_b); static int compare_seq_int(const char *&num_a, const char *&num_b); void set_failed(); @@ -100,7 +100,7 @@ protected: std::string _download_url_prefix; typedef std::vector Mirrors; Mirrors _mirrors; - string _coreapi_set_ver; + std::string _coreapi_set_ver; FileSpec _coreapi_dll; time_t _contents_expiration; bool _failed; diff --git a/direct/src/plugin_npapi/nppanda3d_common.h b/direct/src/plugin_npapi/nppanda3d_common.h index 512281ea3d..a3bb8f0191 100644 --- a/direct/src/plugin_npapi/nppanda3d_common.h +++ b/direct/src/plugin_npapi/nppanda3d_common.h @@ -33,10 +33,10 @@ using namespace std; // Appears in startup.cxx. -extern ostream *nout_stream; +extern std::ostream *nout_stream; #define nout (*nout_stream) -extern string global_root_dir; +extern std::string global_root_dir; extern bool has_plugin_thread_async_call; #ifdef _WIN32 diff --git a/direct/src/plugin_npapi/ppBrowserObject.h b/direct/src/plugin_npapi/ppBrowserObject.h index 8274ea8f34..3b0835b450 100644 --- a/direct/src/plugin_npapi/ppBrowserObject.h +++ b/direct/src/plugin_npapi/ppBrowserObject.h @@ -32,13 +32,13 @@ public: ~PPBrowserObject(); int get_repr(char *buffer, int buffer_length) const; - P3D_object *get_property(const string &property) const; - bool set_property(const string &property, bool needs_response, + P3D_object *get_property(const std::string &property) const; + bool set_property(const std::string &property, bool needs_response, P3D_object *value); - P3D_object *call(const string &method_name, + P3D_object *call(const std::string &method_name, P3D_object *params[], int num_params) const; - P3D_object *eval(const string &expression) const; + P3D_object *eval(const std::string &expression) const; static void clear_class_definition(); diff --git a/direct/src/plugin_npapi/ppInstance.h b/direct/src/plugin_npapi/ppInstance.h index 86fa9bbf93..f24ebb6443 100644 --- a/direct/src/plugin_npapi/ppInstance.h +++ b/direct/src/plugin_npapi/ppInstance.h @@ -74,38 +74,38 @@ public: void p3dobj_to_variant(NPVariant *result, P3D_object *object); P3D_object *variant_to_p3dobj(const NPVariant *variant); - static void output_np_variant(ostream &out, const NPVariant &result); + static void output_np_variant(std::ostream &out, const NPVariant &result); private: void find_host(TiXmlElement *xcontents); void read_xhost(TiXmlElement *xhost); - void add_mirror(string mirror_url); - void choose_random_mirrors(vector &result, int num_mirrors); + void add_mirror(std::string mirror_url); + void choose_random_mirrors(std::vector &result, int num_mirrors); static void request_ready(P3D_instance *instance); - void start_download(const string &url, PPDownloadRequest *req); - void downloaded_file(PPDownloadRequest *req, const string &filename); - static string get_filename_from_url(const string &url); - void feed_file(PPDownloadRequest *req, const string &filename); + void start_download(const std::string &url, PPDownloadRequest *req); + void downloaded_file(PPDownloadRequest *req, const std::string &filename); + static std::string get_filename_from_url(const std::string &url); + void feed_file(PPDownloadRequest *req, const std::string &filename); void open_p3d_temp_file(); void send_p3d_temp_file_data(); - void downloaded_contents_file(const string &filename); - bool read_contents_file(const string &contents_filename, bool fresh_download); + void downloaded_contents_file(const std::string &filename); + bool read_contents_file(const std::string &contents_filename, bool fresh_download); void get_core_api(); - void downloaded_plugin(const string &filename); + void downloaded_plugin(const std::string &filename); void do_load_plugin(); void create_instance(); void send_window(); void cleanup_window(); - bool copy_file(const string &from_filename, const string &to_filename); + bool copy_file(const std::string &from_filename, const std::string &to_filename); - string lookup_token(const string &keyword) const; - bool has_token(const string &keyword) const; - static int compare_seq(const string &seq_a, const string &seq_b); + std::string lookup_token(const std::string &keyword) const; + bool has_token(const std::string &keyword) const; + static int compare_seq(const std::string &seq_a, const std::string &seq_b); static int compare_seq_int(const char *&num_a, const char *&num_b); void set_failed(); @@ -123,15 +123,15 @@ private: class EventAuxData { public: - wstring _characters; - wstring _characters_im; - wstring _text; + std::wstring _characters; + std::wstring _characters_im; + std::wstring _text; }; #ifdef MACOSX_HAS_EVENT_MODELS static void copy_cocoa_event(P3DCocoaEvent *p3d_event, NPCocoaEvent *np_event, EventAuxData &aux_data); - static const wchar_t *make_ansi_string(wstring &result, NPNSString *ns_string); + static const wchar_t *make_ansi_string(std::wstring &result, NPNSString *ns_string); void handle_cocoa_event(const P3DCocoaEvent *p3d_event); void osx_get_twirl_images(); void osx_release_twirl_images(); @@ -157,24 +157,24 @@ private: unsigned int _npp_mode; P3D_window_handle_type _window_handle_type; P3D_event_type _event_type; - typedef vector Tokens; + typedef std::vector Tokens; Tokens _tokens; // Set from fgcolor & bgcolor. int _fgcolor_r, _fgcolor_b, _fgcolor_g; int _bgcolor_r, _bgcolor_b, _bgcolor_g; - string _root_dir; - string _standard_url_prefix; - string _download_url_prefix; - typedef vector Mirrors; + std::string _root_dir; + std::string _standard_url_prefix; + std::string _download_url_prefix; + typedef std::vector Mirrors; Mirrors _mirrors; // A list of URL's that we will attempt to download the core API from. - typedef vector CoreUrls; + typedef std::vector CoreUrls; CoreUrls _core_urls; - string _coreapi_set_ver; + std::string _coreapi_set_ver; FileSpec _coreapi_dll; time_t _contents_expiration; bool _failed; @@ -199,11 +199,11 @@ private: size_t _current_size; size_t _total_size; ofstream _stream; - string _filename; + std::string _filename; }; bool _got_instance_url; - string _instance_url; + std::string _instance_url; int _p3d_instance_id; StreamTempFile _p3d_temp_file; StreamTempFile _contents_temp_file; @@ -212,14 +212,14 @@ private: // We need to keep a list of the NPStream objects that the instance owns, // because Safari (at least) won't automatically delete all of the // outstanding streams when the instance is destroyed. - typedef vector Streams; + typedef std::vector Streams; Streams _streams; // This class is used for feeding local files (accessed via a "file:" url) // into the core API. class StreamingFileData { public: - StreamingFileData(PPDownloadRequest *req, const string &filename, + StreamingFileData(PPDownloadRequest *req, const std::string &filename, P3D_instance *p3d_inst); ~StreamingFileData(); @@ -235,7 +235,7 @@ private: P3D_instance *_p3d_inst; int _user_id; - string _filename; + std::string _filename; ifstream _file; size_t _file_size; size_t _total_count; @@ -243,7 +243,7 @@ private: THREAD _thread; }; - typedef vector FileDatas; + typedef std::vector FileDatas; static FileDatas _file_datas; bool _use_xembed; diff --git a/direct/src/plugin_npapi/ppPandaObject.h b/direct/src/plugin_npapi/ppPandaObject.h index 762f6a9c94..89a87d02af 100644 --- a/direct/src/plugin_npapi/ppPandaObject.h +++ b/direct/src/plugin_npapi/ppPandaObject.h @@ -49,7 +49,7 @@ private: bool enumerate(NPIdentifier **value, uint32_t *count); private: - static string identifier_to_string(NPIdentifier ident); + static std::string identifier_to_string(NPIdentifier ident); private: diff --git a/direct/src/plugin_standalone/p3dEmbed.h b/direct/src/plugin_standalone/p3dEmbed.h index 98a73ec8fc..7d1da92883 100644 --- a/direct/src/plugin_standalone/p3dEmbed.h +++ b/direct/src/plugin_standalone/p3dEmbed.h @@ -35,9 +35,9 @@ class P3DEmbed : public Panda3DBase { public: P3DEmbed(bool console_environment); - int run_embedded(streampos read_offset, int argc, char *argv[]); + int run_embedded(std::streampos read_offset, int argc, char *argv[]); - streampos _read_offset_check; + std::streampos _read_offset_check; }; #endif diff --git a/direct/src/plugin_standalone/panda3d.h b/direct/src/plugin_standalone/panda3d.h index 8333177bb2..a9b647fc7d 100644 --- a/direct/src/plugin_standalone/panda3d.h +++ b/direct/src/plugin_standalone/panda3d.h @@ -43,7 +43,7 @@ protected: bool read_contents_file(const Filename &contents_filename, bool fresh_download); void find_host(TiXmlElement *xcontents); void read_xhost(TiXmlElement *xhost); - void add_mirror(string mirror_url); + void add_mirror(std::string mirror_url); void choose_random_mirrors(vector_string &result, int num_mirrors); bool get_core_api(); bool download_core_api(); @@ -51,14 +51,14 @@ protected: void usage(); protected: - string _super_mirror_url; - string _host_url_prefix; - string _download_url_prefix; - string _super_mirror_url_prefix; - typedef pvector Mirrors; + std::string _super_mirror_url; + std::string _host_url_prefix; + std::string _download_url_prefix; + std::string _super_mirror_url_prefix; + typedef pvector Mirrors; Mirrors _mirrors; - string _coreapi_set_ver; + std::string _coreapi_set_ver; FileSpec _coreapi_dll; }; diff --git a/direct/src/plugin_standalone/panda3dBase.h b/direct/src/plugin_standalone/panda3dBase.h index fd277ce9ec..3b41aab07c 100644 --- a/direct/src/plugin_standalone/panda3dBase.h +++ b/direct/src/plugin_standalone/panda3dBase.h @@ -45,17 +45,17 @@ protected: void make_parent_window(); P3D_instance * - create_instance(const string &p3d, bool start_instance, + create_instance(const std::string &p3d, bool start_instance, char **args, int num_args, int p3d_offset = 0); void delete_instance(P3D_instance *instance); bool read_p3d_info(const Filename &p3d_filename, int p3d_offset = 0); bool parse_token(const char *arg); bool parse_int_pair(const char *arg, int &x, int &y); - string lookup_token(const string &keyword) const; - static int compare_seq(const string &seq_a, const string &seq_b); + std::string lookup_token(const std::string &keyword) const; + static int compare_seq(const std::string &seq_a, const std::string &seq_b); static int compare_seq_int(const char *&num_a, const char *&num_b); - static bool is_url(const string ¶m); + static bool is_url(const std::string ¶m); void report_downloading_package(P3D_instance *instance); void report_download_complete(P3D_instance *instance); @@ -68,14 +68,14 @@ protected: #endif protected: - string _host_url; - string _root_dir; - string _host_dir; - string _start_dir; - string _log_dirname; - string _log_basename; - string _this_platform; - string _coreapi_platform; + std::string _host_url; + std::string _root_dir; + std::string _host_dir; + std::string _start_dir; + std::string _log_dirname; + std::string _log_basename; + std::string _this_platform; + std::string _coreapi_platform; P3D_verify_contents _verify_contents; time_t _contents_expiration; @@ -101,7 +101,7 @@ protected: class URLGetter { public: URLGetter(P3D_instance *instance, int unique_id, - const URLSpec &url, const string &post_data); + const URLSpec &url, const std::string &post_data); bool run(); inline P3D_instance *get_instance(); @@ -110,7 +110,7 @@ protected: P3D_instance *_instance; int _unique_id; URLSpec _url; - string _post_data; + std::string _post_data; PT(HTTPChannel) _channel; Ramfile _rf; diff --git a/dtool/src/cppparser/cppArrayType.h b/dtool/src/cppparser/cppArrayType.h index 9e2489be72..a0ca28680d 100644 --- a/dtool/src/cppparser/cppArrayType.h +++ b/dtool/src/cppparser/cppArrayType.h @@ -44,12 +44,12 @@ public: virtual bool is_copy_constructible() const; virtual bool is_equivalent(const CPPType &other) const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; - virtual void output_instance(ostream &out, int indent_level, + virtual void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name) const; + bool complete, const std::string &prename, + const std::string &name) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppBisonDefs.h b/dtool/src/cppparser/cppBisonDefs.h index 1ae1caece8..1c7be65b85 100644 --- a/dtool/src/cppparser/cppBisonDefs.h +++ b/dtool/src/cppparser/cppBisonDefs.h @@ -66,7 +66,7 @@ extern CPPPreprocessor *current_lexer; class cppyystype { public: - string str; + std::string str; union { unsigned long long integer; long double real; diff --git a/dtool/src/cppparser/cppClassTemplateParameter.h b/dtool/src/cppparser/cppClassTemplateParameter.h index 5192619ed2..8ff6fe1538 100644 --- a/dtool/src/cppparser/cppClassTemplateParameter.h +++ b/dtool/src/cppparser/cppClassTemplateParameter.h @@ -29,7 +29,7 @@ public: CPPType *default_type = nullptr); virtual bool is_fully_specified() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppClosureType.h b/dtool/src/cppparser/cppClosureType.h index 96ac38ed17..9e11a2f124 100644 --- a/dtool/src/cppparser/cppClosureType.h +++ b/dtool/src/cppparser/cppClosureType.h @@ -35,7 +35,7 @@ public: void operator = (const CPPClosureType ©); struct Capture { - string _name; + std::string _name; CaptureType _type; CPPExpression *_initializer; }; @@ -44,7 +44,7 @@ public: CaptureType _default_capture; - void add_capture(string name, CaptureType type, CPPExpression *initializer = nullptr); + void add_capture(std::string name, CaptureType type, CPPExpression *initializer = nullptr); virtual bool is_fully_specified() const; @@ -52,7 +52,7 @@ public: virtual bool is_copy_constructible() const; virtual bool is_destructible() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; virtual CPPClosureType *as_closure_type(); diff --git a/dtool/src/cppparser/cppCommentBlock.h b/dtool/src/cppparser/cppCommentBlock.h index 614012ce61..e31b3b6278 100644 --- a/dtool/src/cppparser/cppCommentBlock.h +++ b/dtool/src/cppparser/cppCommentBlock.h @@ -33,7 +33,7 @@ public: int _col_number; int _last_line; bool _c_style; - string _comment; + std::string _comment; }; typedef std::list CPPComments; diff --git a/dtool/src/cppparser/cppConstType.h b/dtool/src/cppparser/cppConstType.h index ef0943ca13..4f49a94c54 100644 --- a/dtool/src/cppparser/cppConstType.h +++ b/dtool/src/cppparser/cppConstType.h @@ -46,12 +46,12 @@ public: virtual bool is_convertible_to(const CPPType *other) const; virtual bool is_equivalent(const CPPType &other) const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; - virtual void output_instance(ostream &out, int indent_level, + virtual void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name) const; + bool complete, const std::string &prename, + const std::string &name) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppDeclaration.h b/dtool/src/cppparser/cppDeclaration.h index f590f435fa..d472c277fd 100644 --- a/dtool/src/cppparser/cppDeclaration.h +++ b/dtool/src/cppparser/cppDeclaration.h @@ -107,15 +107,15 @@ public: CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink = nullptr) const; - typedef map SubstDecl; + typedef std::map SubstDecl; virtual CPPDeclaration *substitute_decl(SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope); - typedef set Instantiations; + typedef std::set Instantiations; Instantiations _instantiations; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const=0; virtual SubType get_subtype() const=0; @@ -224,13 +224,13 @@ protected: virtual bool is_less(const CPPDeclaration *other) const; }; -inline ostream & -operator << (ostream &out, const CPPDeclaration &decl) { +inline std::ostream & +operator << (std::ostream &out, const CPPDeclaration &decl) { decl.output(out, 0, nullptr, false); return out; } -ostream & -operator << (ostream &out, const CPPDeclaration::SubstDecl &decl); +std::ostream & +operator << (std::ostream &out, const CPPDeclaration::SubstDecl &decl); #endif diff --git a/dtool/src/cppparser/cppEnumType.h b/dtool/src/cppparser/cppEnumType.h index a218feead4..678e1985c3 100644 --- a/dtool/src/cppparser/cppEnumType.h +++ b/dtool/src/cppparser/cppEnumType.h @@ -39,7 +39,7 @@ public: bool is_scoped() const; CPPType *get_underlying_type(); - CPPInstance *add_element(const string &name, CPPExpression *value, + CPPInstance *add_element(const std::string &name, CPPExpression *value, CPPPreprocessor *preprocessor, const cppyyltype &pos); virtual bool is_incomplete() const; @@ -49,7 +49,7 @@ public: CPPScope *current_scope, CPPScope *global_scope); - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; @@ -59,7 +59,7 @@ public: CPPScope *_scope; CPPType *_element_type; - typedef vector Elements; + typedef std::vector Elements; Elements _elements; CPPExpression *_last_value; }; diff --git a/dtool/src/cppparser/cppExpression.h b/dtool/src/cppparser/cppExpression.h index 0f9bc880e4..4482727f53 100644 --- a/dtool/src/cppparser/cppExpression.h +++ b/dtool/src/cppparser/cppExpression.h @@ -73,7 +73,7 @@ public: CPPExpression(bool value); CPPExpression(unsigned long long value); CPPExpression(int value); - CPPExpression(const string &value); + CPPExpression(const std::string &value); CPPExpression(long double value); CPPExpression(CPPIdentifier *ident, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink = nullptr); @@ -96,7 +96,7 @@ public: static CPPExpression literal(unsigned long long value, CPPInstance *lit_op); static CPPExpression literal(long double value, CPPInstance *lit_op); static CPPExpression literal(CPPExpression *value, CPPInstance *lit_op); - static CPPExpression raw_literal(const string &raw, CPPInstance *lit_op); + static CPPExpression raw_literal(const std::string &raw, CPPInstance *lit_op); static const CPPExpression &get_nullptr(); static const CPPExpression &get_default(); @@ -120,7 +120,7 @@ public: double as_real() const; void *as_pointer() const; bool as_boolean() const; - void output(ostream &out) const; + void output(std::ostream &out) const; ResultType _type; union { @@ -140,14 +140,14 @@ public: CPPScope *current_scope, CPPScope *global_scope); - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; virtual CPPExpression *as_expression(); Type _type; - string _str; + std::string _str; union { bool _boolean; unsigned long long _integer; @@ -191,8 +191,8 @@ protected: virtual bool is_less(const CPPDeclaration *other) const; }; -inline ostream & -operator << (ostream &out, const CPPExpression::Result &result) { +inline std::ostream & +operator << (std::ostream &out, const CPPExpression::Result &result) { result.output(out); return out; } diff --git a/dtool/src/cppparser/cppExpressionParser.h b/dtool/src/cppparser/cppExpressionParser.h index f9ef78dafc..9a2cdf67a4 100644 --- a/dtool/src/cppparser/cppExpressionParser.h +++ b/dtool/src/cppparser/cppExpressionParser.h @@ -29,18 +29,18 @@ public: CPPExpressionParser(CPPScope *current_scope, CPPScope *global_scope); ~CPPExpressionParser(); - bool parse_expr(const string &expr); - bool parse_expr(const string &expr, const CPPPreprocessor &filepos); + bool parse_expr(const std::string &expr); + bool parse_expr(const std::string &expr, const CPPPreprocessor &filepos); - void output(ostream &out) const; + void output(std::ostream &out) const; CPPScope *_current_scope; CPPScope *_global_scope; CPPExpression *_expr; }; -inline ostream & -operator << (ostream &out, const CPPExpressionParser &ep) { +inline std::ostream & +operator << (std::ostream &out, const CPPExpressionParser &ep) { ep.output(out); return out; } diff --git a/dtool/src/cppparser/cppExtensionType.h b/dtool/src/cppparser/cppExtensionType.h index 5a44788af2..b47c084c88 100644 --- a/dtool/src/cppparser/cppExtensionType.h +++ b/dtool/src/cppparser/cppExtensionType.h @@ -41,9 +41,9 @@ public: CPPExtensionType(Type type, CPPIdentifier *ident, CPPScope *current_scope, const CPPFile &file); - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; virtual bool is_incomplete() const; virtual bool is_tbd() const; @@ -64,7 +64,7 @@ public: virtual bool is_equivalent(const CPPType &other) const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; @@ -75,6 +75,6 @@ public: CPPExpression *_alignment; }; -ostream &operator << (ostream &out, CPPExtensionType::Type type); +std::ostream &operator << (std::ostream &out, CPPExtensionType::Type type); #endif diff --git a/dtool/src/cppparser/cppFile.h b/dtool/src/cppparser/cppFile.h index f3644fce3c..cd049e780f 100644 --- a/dtool/src/cppparser/cppFile.h +++ b/dtool/src/cppparser/cppFile.h @@ -59,7 +59,7 @@ public: mutable bool _pragma_once; }; -inline ostream &operator << (ostream &out, const CPPFile &file) { +inline std::ostream &operator << (std::ostream &out, const CPPFile &file) { return out << file._filename; } diff --git a/dtool/src/cppparser/cppFunctionGroup.h b/dtool/src/cppparser/cppFunctionGroup.h index c33eee3907..3fced8f4ab 100644 --- a/dtool/src/cppparser/cppFunctionGroup.h +++ b/dtool/src/cppparser/cppFunctionGroup.h @@ -28,20 +28,20 @@ class CPPInstance; */ class CPPFunctionGroup : public CPPDeclaration { public: - CPPFunctionGroup(const string &name); + CPPFunctionGroup(const std::string &name); ~CPPFunctionGroup(); CPPType *get_return_type() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; virtual CPPFunctionGroup *as_function_group(); - typedef vector Instances; + typedef std::vector Instances; Instances _instances; - string _name; + std::string _name; }; #endif diff --git a/dtool/src/cppparser/cppFunctionType.h b/dtool/src/cppparser/cppFunctionType.h index b6bdff7ac6..83fc3ababd 100644 --- a/dtool/src/cppparser/cppFunctionType.h +++ b/dtool/src/cppparser/cppFunctionType.h @@ -69,18 +69,18 @@ public: virtual bool is_tbd() const; virtual bool is_trivial() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; - void output(ostream &out, int indent_level, CPPScope *scope, + void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete, int num_default_parameters) const; - virtual void output_instance(ostream &out, int indent_level, + virtual void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name) const; - void output_instance(ostream &out, int indent_level, + bool complete, const std::string &prename, + const std::string &name) const; + void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name, + bool complete, const std::string &prename, + const std::string &name, int num_default_parameters) const; int get_num_default_parameters() const; diff --git a/dtool/src/cppparser/cppGlobals.h b/dtool/src/cppparser/cppGlobals.h index 9cf4e8711a..39755f18d7 100644 --- a/dtool/src/cppparser/cppGlobals.h +++ b/dtool/src/cppparser/cppGlobals.h @@ -20,7 +20,7 @@ // 64-bit integer, but don't recognize "long long int". To parse (and // generate) code for these compilers, set this string to the 64-bit integer // typename keyword. -extern string cpp_longlong_keyword; +extern std::string cpp_longlong_keyword; #endif diff --git a/dtool/src/cppparser/cppIdentifier.h b/dtool/src/cppparser/cppIdentifier.h index 57daf3b469..8916320450 100644 --- a/dtool/src/cppparser/cppIdentifier.h +++ b/dtool/src/cppparser/cppIdentifier.h @@ -34,11 +34,11 @@ class CPPTemplateParameterList; */ class CPPIdentifier { public: - CPPIdentifier(const string &name, const CPPFile &file = CPPFile()); + CPPIdentifier(const std::string &name, const CPPFile &file = CPPFile()); CPPIdentifier(const CPPNameComponent &name, const CPPFile &file = CPPFile()); - CPPIdentifier(const string &name, const cppyyltype &loc); + CPPIdentifier(const std::string &name, const cppyyltype &loc); CPPIdentifier(const CPPNameComponent &name, const cppyyltype &loc); - void add_name(const string &name); + void add_name(const std::string &name); void add_name(const CPPNameComponent &name); bool operator == (const CPPIdentifier &other) const; @@ -47,9 +47,9 @@ public: bool is_scoped() const; - string get_simple_name() const; - string get_local_name(CPPScope *scope = nullptr) const; - string get_fully_scoped_name() const; + std::string get_simple_name() const; + std::string get_local_name(CPPScope *scope = nullptr) const; + std::string get_fully_scoped_name() const; bool is_fully_specified() const; bool is_tbd() const; @@ -85,17 +85,17 @@ public: CPPScope *current_scope, CPPScope *global_scope); - void output(ostream &out, CPPScope *scope) const; - void output_local_name(ostream &out, CPPScope *scope) const; - void output_fully_scoped_name(ostream &out) const; + void output(std::ostream &out, CPPScope *scope) const; + void output_local_name(std::ostream &out, CPPScope *scope) const; + void output_fully_scoped_name(std::ostream &out) const; - typedef vector Names; + typedef std::vector Names; Names _names; CPPScope *_native_scope; cppyyltype _loc; }; -inline ostream &operator << (ostream &out, const CPPIdentifier &identifier) { +inline std::ostream &operator << (std::ostream &out, const CPPIdentifier &identifier) { identifier.output(out, nullptr); return out; } diff --git a/dtool/src/cppparser/cppInstance.h b/dtool/src/cppparser/cppInstance.h index 137bbe56b7..0cfd4bea43 100644 --- a/dtool/src/cppparser/cppInstance.h +++ b/dtool/src/cppparser/cppInstance.h @@ -73,7 +73,7 @@ public: SC_parameter_pack = 0x40000, }; - CPPInstance(CPPType *type, const string &name, int storage_class = 0); + CPPInstance(CPPType *type, const std::string &name, int storage_class = 0); CPPInstance(CPPType *type, CPPIdentifier *ident, int storage_class = 0); CPPInstance(CPPType *type, CPPInstanceIdentifier *ii, int storage_class, const CPPFile &file); @@ -96,9 +96,9 @@ public: CPPScope *get_scope(CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink = nullptr) const; - string get_simple_name() const; - string get_local_name(CPPScope *scope = nullptr) const; - string get_fully_scoped_name() const; + std::string get_simple_name() const; + std::string get_local_name(CPPScope *scope = nullptr) const; + std::string get_fully_scoped_name() const; void check_for_constructor(CPPScope *current_scope, CPPScope *global_scope); @@ -112,9 +112,9 @@ public: CPPScope *current_scope, CPPScope *global_scope); - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; - void output(ostream &out, int indent_level, CPPScope *scope, + void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete, int num_default_parameters) const; virtual SubType get_subtype() const; @@ -129,7 +129,7 @@ public: int _bit_width; private: - typedef map Instantiations; + typedef std::map Instantiations; Instantiations _instantiations; }; diff --git a/dtool/src/cppparser/cppInstanceIdentifier.h b/dtool/src/cppparser/cppInstanceIdentifier.h index 582e149e2c..795677513e 100644 --- a/dtool/src/cppparser/cppInstanceIdentifier.h +++ b/dtool/src/cppparser/cppInstanceIdentifier.h @@ -85,7 +85,7 @@ public: CPPExpression *_expr; CPPType *_trailing_return_type; }; - typedef vector Modifiers; + typedef std::vector Modifiers; Modifiers _modifiers; // If not -1, indicates a bitfield diff --git a/dtool/src/cppparser/cppMakeProperty.h b/dtool/src/cppparser/cppMakeProperty.h index d97369fc7d..2967ee3b09 100644 --- a/dtool/src/cppparser/cppMakeProperty.h +++ b/dtool/src/cppparser/cppMakeProperty.h @@ -91,11 +91,11 @@ public: CPPMakeProperty(CPPIdentifier *ident, Type type, CPPScope *current_scope, const CPPFile &file); - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppMakeSeq.h b/dtool/src/cppparser/cppMakeSeq.h index 9d4eae4261..1db722d9bb 100644 --- a/dtool/src/cppparser/cppMakeSeq.h +++ b/dtool/src/cppparser/cppMakeSeq.h @@ -32,11 +32,11 @@ public: CPPFunctionGroup *element_getter, CPPScope *current_scope, const CPPFile &file); - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppManifest.h b/dtool/src/cppparser/cppManifest.h index dc5e7701a5..c397a3fb51 100644 --- a/dtool/src/cppparser/cppManifest.h +++ b/dtool/src/cppparser/cppManifest.h @@ -30,18 +30,18 @@ class CPPType; */ class CPPManifest { public: - CPPManifest(const string &args, const cppyyltype &loc); - CPPManifest(const string ¯o, const string &definition); + CPPManifest(const std::string &args, const cppyyltype &loc); + CPPManifest(const std::string ¯o, const std::string &definition); ~CPPManifest(); - static string stringify(const string &source); - string expand(const vector_string &args = vector_string()) const; + static std::string stringify(const std::string &source); + std::string expand(const vector_string &args = vector_string()) const; CPPType *determine_type() const; - void output(ostream &out) const; + void output(std::ostream &out) const; - string _name; + std::string _name; bool _has_parameters; int _num_parameters; int _variadic_param; @@ -54,25 +54,25 @@ public: CPPVisibility _vis; private: - void parse_parameters(const string &args, size_t &p, + void parse_parameters(const std::string &args, size_t &p, vector_string ¶meter_names); - void save_expansion(const string &exp, + void save_expansion(const std::string &exp, const vector_string ¶meter_names); class ExpansionNode { public: ExpansionNode(int parm_number, bool stringify, bool paste); - ExpansionNode(const string &str, bool paste = false); + ExpansionNode(const std::string &str, bool paste = false); int _parm_number; bool _stringify; bool _paste; - string _str; + std::string _str; }; - typedef vector Expansion; + typedef std::vector Expansion; Expansion _expansion; }; -inline ostream &operator << (ostream &out, const CPPManifest &manifest) { +inline std::ostream &operator << (std::ostream &out, const CPPManifest &manifest) { manifest.output(out); return out; } diff --git a/dtool/src/cppparser/cppNameComponent.h b/dtool/src/cppparser/cppNameComponent.h index 9e6981e3d8..cdeb293fca 100644 --- a/dtool/src/cppparser/cppNameComponent.h +++ b/dtool/src/cppparser/cppNameComponent.h @@ -26,31 +26,31 @@ class CPPScope; class CPPNameComponent { public: - CPPNameComponent(const string &name); + CPPNameComponent(const std::string &name); bool operator == (const CPPNameComponent &other) const; bool operator != (const CPPNameComponent &other) const; bool operator < (const CPPNameComponent &other) const; - string get_name() const; - string get_name_with_templ(CPPScope *scope = nullptr) const; + std::string get_name() const; + std::string get_name_with_templ(CPPScope *scope = nullptr) const; CPPTemplateParameterList *get_templ() const; bool empty() const; bool has_templ() const; bool is_tbd() const; - void set_name(const string &name); - void append_name(const string &name); + void set_name(const std::string &name); + void append_name(const std::string &name); void set_templ(CPPTemplateParameterList *templ); - void output(ostream &out) const; + void output(std::ostream &out) const; private: - string _name; + std::string _name; CPPTemplateParameterList *_templ; }; -inline ostream &operator << (ostream &out, const CPPNameComponent &name) { +inline std::ostream &operator << (std::ostream &out, const CPPNameComponent &name) { name.output(out); return out; } diff --git a/dtool/src/cppparser/cppNamespace.h b/dtool/src/cppparser/cppNamespace.h index c0dd98132e..ca4d1dcf04 100644 --- a/dtool/src/cppparser/cppNamespace.h +++ b/dtool/src/cppparser/cppNamespace.h @@ -29,12 +29,12 @@ public: CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file); - string get_simple_name() const; - string get_local_name(CPPScope *scope = nullptr) const; - string get_fully_scoped_name() const; + std::string get_simple_name() const; + std::string get_local_name(CPPScope *scope = nullptr) const; + std::string get_fully_scoped_name() const; CPPScope *get_scope() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppParameterList.h b/dtool/src/cppparser/cppParameterList.h index 77c7b2b889..a5e5d327e9 100644 --- a/dtool/src/cppparser/cppParameterList.h +++ b/dtool/src/cppparser/cppParameterList.h @@ -49,16 +49,16 @@ public: // This vector contains a list of formal parameters, in order. A parameter // may have an empty identifer name. - typedef vector Parameters; + typedef std::vector Parameters; Parameters _parameters; bool _includes_ellipsis; - void output(ostream &out, CPPScope *scope, bool parameter_names, + void output(std::ostream &out, CPPScope *scope, bool parameter_names, int num_default_parameters = -1) const; }; -inline ostream & -operator << (ostream &out, const CPPParameterList &plist) { +inline std::ostream & +operator << (std::ostream &out, const CPPParameterList &plist) { plist.output(out, nullptr, true); return out; } diff --git a/dtool/src/cppparser/cppParser.h b/dtool/src/cppparser/cppParser.h index f3b4405b7e..82ac2abd08 100644 --- a/dtool/src/cppparser/cppParser.h +++ b/dtool/src/cppparser/cppParser.h @@ -33,8 +33,8 @@ public: bool parse_file(const Filename &filename); - CPPExpression *parse_expr(const string &expr); - CPPType *parse_type(const string &type); + CPPExpression *parse_expr(const std::string &expr); + CPPType *parse_type(const std::string &type); }; /* diff --git a/dtool/src/cppparser/cppPointerType.h b/dtool/src/cppparser/cppPointerType.h index 3fce00b2f5..b5f42c57a2 100644 --- a/dtool/src/cppparser/cppPointerType.h +++ b/dtool/src/cppparser/cppPointerType.h @@ -44,12 +44,12 @@ public: virtual bool is_copy_assignable() const; virtual bool is_equivalent(const CPPType &other) const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; - virtual void output_instance(ostream &out, int indent_level, + virtual void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name) const; + bool complete, const std::string &prename, + const std::string &name) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppPreprocessor.h b/dtool/src/cppparser/cppPreprocessor.h index 02f3715339..3102386fee 100644 --- a/dtool/src/cppparser/cppPreprocessor.h +++ b/dtool/src/cppparser/cppPreprocessor.h @@ -57,10 +57,10 @@ public: int _token_index; #endif - void warning(const string &message); - void warning(const string &message, const YYLTYPE &loc); - void error(const string &message); - void error(const string &message, const YYLTYPE &loc); + void warning(const std::string &message); + void warning(const std::string &message, const YYLTYPE &loc); + void error(const std::string &message); + void error(const std::string &message, const YYLTYPE &loc); void show_line(const YYLTYPE &loc); CPPCommentBlock *get_comment_before(int line, CPPFile file); @@ -69,11 +69,11 @@ public: int get_warning_count() const; int get_error_count() const; - typedef map Manifests; + typedef std::map Manifests; Manifests _manifests; typedef pvector ManifestStack; - map _manifest_stack; + std::map _manifest_stack; pvector _quote_include_kind; DSearchPath _quote_include_path; @@ -82,14 +82,14 @@ public: CPPComments _comments; - typedef set ParsedFiles; + typedef std::set ParsedFiles; ParsedFiles _parsed_files; - typedef set Includes; + typedef std::set Includes; Includes _quote_includes; Includes _angle_includes; - set _explicit_files; + std::set _explicit_files; // This is normally true, to indicate that the preprocessor should decode // identifiers like foo::bar into a single IDENTIFIER, @@ -109,14 +109,14 @@ public: protected: bool init_cpp(const CPPFile &file); - bool init_const_expr(const string &expr); - bool init_type(const string &type); + bool init_const_expr(const std::string &expr); + bool init_type(const std::string &type); bool push_file(const CPPFile &file); - bool push_string(const string &input, bool lock_position); + bool push_string(const std::string &input, bool lock_position); - string expand_manifests(const string &input_expr, bool expand_undefined, + std::string expand_manifests(const std::string &input_expr, bool expand_undefined, const YYLTYPE &loc); - CPPExpression *parse_expr(const string &expr, CPPScope *current_scope, + CPPExpression *parse_expr(const std::string &expr, CPPScope *current_scope, CPPScope *global_scope, const YYLTYPE &loc); private: @@ -130,43 +130,43 @@ private: int skip_digit_separator(int c); int process_directive(int c); - int get_preprocessor_command(int c, string &command); - int get_preprocessor_args(int c, string &args); + int get_preprocessor_command(int c, std::string &command); + int get_preprocessor_args(int c, std::string &args); - void handle_define_directive(const string &args, const YYLTYPE &loc); - void handle_undef_directive(const string &args, const YYLTYPE &loc); - void handle_ifdef_directive(const string &args, const YYLTYPE &loc); - void handle_ifndef_directive(const string &args, const YYLTYPE &loc); - void handle_if_directive(const string &args, const YYLTYPE &loc); - void handle_include_directive(const string &args, const YYLTYPE &loc); - void handle_pragma_directive(const string &args, const YYLTYPE &loc); - void handle_error_directive(const string &args, const YYLTYPE &loc); + void handle_define_directive(const std::string &args, const YYLTYPE &loc); + void handle_undef_directive(const std::string &args, const YYLTYPE &loc); + void handle_ifdef_directive(const std::string &args, const YYLTYPE &loc); + void handle_ifndef_directive(const std::string &args, const YYLTYPE &loc); + void handle_if_directive(const std::string &args, const YYLTYPE &loc); + void handle_include_directive(const std::string &args, const YYLTYPE &loc); + void handle_pragma_directive(const std::string &args, const YYLTYPE &loc); + void handle_error_directive(const std::string &args, const YYLTYPE &loc); void skip_false_if_block(bool consider_elifs); - bool is_manifest_defined(const string &manifest_name); + bool is_manifest_defined(const std::string &manifest_name); bool find_include(Filename &filename, bool angle_quotes, CPPFile::Source &source); CPPToken get_quoted_char(int c); CPPToken get_quoted_string(int c); CPPToken get_identifier(int c); - CPPToken get_literal(int token, YYLTYPE loc, const string &str, + CPPToken get_literal(int token, YYLTYPE loc, const std::string &str, const YYSTYPE &result = YYSTYPE()); CPPToken expand_manifest(const CPPManifest *manifest); - void extract_manifest_args(const string &name, int num_args, + void extract_manifest_args(const std::string &name, int num_args, int va_arg, vector_string &args); - void expand_defined_function(string &expr, size_t q, size_t &p); - void expand_has_include_function(string &expr, size_t q, size_t &p, YYLTYPE loc); - void expand_manifest_inline(string &expr, size_t q, size_t &p, + void expand_defined_function(std::string &expr, size_t q, size_t &p); + void expand_has_include_function(std::string &expr, size_t q, size_t &p, YYLTYPE loc); + void expand_manifest_inline(std::string &expr, size_t q, size_t &p, const CPPManifest *manifest); - void extract_manifest_args_inline(const string &name, int num_args, + void extract_manifest_args_inline(const std::string &name, int num_args, int va_arg, vector_string &args, - const string &expr, size_t &p); + const std::string &expr, size_t &p); CPPToken get_number(int c); - static int check_keyword(const string &name); + static int check_keyword(const std::string &name); int scan_escape_sequence(int c); - string scan_quoted(int c); - string scan_raw(int c); + std::string scan_quoted(int c); + std::string scan_raw(int c); bool should_ignore_manifest(const CPPManifest *manifest) const; bool should_ignore_preprocessor() const; @@ -186,14 +186,14 @@ private: ~InputFile(); bool open(const CPPFile &file); - bool connect_input(const string &input); + bool connect_input(const std::string &input); int get(); int peek(); const CPPManifest *_ignore_manifest; CPPFile _file; - string _input; - istream *_in; + std::string _input; + std::istream *_in; int _line_number; int _col_number; int _next_line_number; @@ -204,7 +204,7 @@ private: // This must be a list and not a vector because we don't have a good copy // constructor defined for InputFile. - typedef list Files; + typedef std::list Files; Files _files; enum State { @@ -222,7 +222,7 @@ private: bool _last_cpp_comment; bool _save_comments; - vector _saved_tokens; + std::vector _saved_tokens; int _warning_count; int _error_count; diff --git a/dtool/src/cppparser/cppReferenceType.h b/dtool/src/cppparser/cppReferenceType.h index 89feba8d2c..273f645377 100644 --- a/dtool/src/cppparser/cppReferenceType.h +++ b/dtool/src/cppparser/cppReferenceType.h @@ -50,12 +50,12 @@ public: virtual bool is_destructible() const; virtual bool is_equivalent(const CPPType &other) const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; - virtual void output_instance(ostream &out, int indent_level, + virtual void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name) const; + bool complete, const std::string &prename, + const std::string &name) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppScope.h b/dtool/src/cppparser/cppScope.h index d7df06b481..44fcc25fef 100644 --- a/dtool/src/cppparser/cppScope.h +++ b/dtool/src/cppparser/cppScope.h @@ -82,28 +82,28 @@ public: CPPScope *current_scope, CPPScope *global_scope) const; - CPPType *find_type(const string &name, bool recurse = true) const; - CPPType *find_type(const string &name, + CPPType *find_type(const std::string &name, bool recurse = true) const; + CPPType *find_type(const std::string &name, CPPDeclaration::SubstDecl &subst, CPPScope *global_scope, bool recurse = true) const; - CPPScope *find_scope(const string &name, CPPScope *global_scope, + CPPScope *find_scope(const std::string &name, CPPScope *global_scope, bool recurse = true) const; - CPPScope *find_scope(const string &name, + CPPScope *find_scope(const std::string &name, CPPDeclaration::SubstDecl &subst, CPPScope *global_scope, bool recurse = true) const; - CPPDeclaration *find_symbol(const string &name, + CPPDeclaration *find_symbol(const std::string &name, bool recurse = true) const; - CPPDeclaration *find_template(const string &name, + CPPDeclaration *find_template(const std::string &name, bool recurse = true) const; - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; - virtual void output(ostream &out, CPPScope *scope) const; - void write(ostream &out, int indent, CPPScope *scope) const; + virtual void output(std::ostream &out, CPPScope *scope) const; + void write(std::ostream &out, int indent, CPPScope *scope) const; CPPTemplateScope *get_template_scope(); virtual CPPTemplateScope *as_template_scope(); @@ -117,30 +117,30 @@ private: CPPPreprocessor *error_sink = nullptr); public: - typedef vector Declarations; + typedef std::vector Declarations; Declarations _declarations; - typedef map ExtensionTypes; + typedef std::map ExtensionTypes; ExtensionTypes _structs; ExtensionTypes _classes; ExtensionTypes _unions; ExtensionTypes _enums; - typedef map Namespaces; + typedef std::map Namespaces; Namespaces _namespaces; - typedef map Types; + typedef std::map Types; Types _types; - typedef map Variables; + typedef std::map Variables; Variables _variables; Variables _enum_values; - typedef map Functions; + typedef std::map Functions; Functions _functions; - typedef map Templates; + typedef std::map Templates; Templates _templates; CPPNameComponent _name; - typedef set Using; + typedef std::set Using; Using _using; protected: @@ -149,7 +149,7 @@ protected: CPPVisibility _current_vis; private: - typedef map Instantiations; + typedef std::map Instantiations; Instantiations _instantiations; bool _is_fully_specified; @@ -158,8 +158,8 @@ private: bool _subst_decl_recursive_protect; }; -inline ostream & -operator << (ostream &out, const CPPScope &scope) { +inline std::ostream & +operator << (std::ostream &out, const CPPScope &scope) { scope.output(out, nullptr); return out; } diff --git a/dtool/src/cppparser/cppSimpleType.h b/dtool/src/cppparser/cppSimpleType.h index 850353e9eb..a674374502 100644 --- a/dtool/src/cppparser/cppSimpleType.h +++ b/dtool/src/cppparser/cppSimpleType.h @@ -79,9 +79,9 @@ public: virtual bool is_destructible() const; virtual bool is_parameter_expr() const; - virtual string get_preferred_name() const; + virtual std::string get_preferred_name() const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppStructType.h b/dtool/src/cppparser/cppStructType.h index fc8a9e45b2..57537b389e 100644 --- a/dtool/src/cppparser/cppStructType.h +++ b/dtool/src/cppparser/cppStructType.h @@ -86,7 +86,7 @@ public: CPPScope *current_scope, CPPScope *global_scope); - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; @@ -98,17 +98,17 @@ public: class Base { public: - void output(ostream &out) const; + void output(std::ostream &out) const; CPPType *_base; CPPVisibility _vis; bool _is_virtual; }; - typedef vector Derivation; + typedef std::vector Derivation; Derivation _derivation; - typedef list VFunctions; + typedef std::list VFunctions; void get_virtual_funcs(VFunctions &funcs) const; void get_pure_virtual_funcs(VFunctions &funcs) const; @@ -117,11 +117,11 @@ protected: virtual bool is_less(const CPPDeclaration *other) const; bool _subst_decl_recursive_protect; - typedef vector Proxies; + typedef std::vector Proxies; Proxies _proxies; }; -inline ostream &operator << (ostream &out, const CPPStructType::Base &base) { +inline std::ostream &operator << (std::ostream &out, const CPPStructType::Base &base) { base.output(out); return out; } diff --git a/dtool/src/cppparser/cppTBDType.h b/dtool/src/cppparser/cppTBDType.h index f72833e3ff..beec68adeb 100644 --- a/dtool/src/cppparser/cppTBDType.h +++ b/dtool/src/cppparser/cppTBDType.h @@ -35,15 +35,15 @@ public: virtual bool is_tbd() const; - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; virtual CPPDeclaration *substitute_decl(SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope); - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppTemplateParameterList.h b/dtool/src/cppparser/cppTemplateParameterList.h index 50b97247ea..d47f8fdd9e 100644 --- a/dtool/src/cppparser/cppTemplateParameterList.h +++ b/dtool/src/cppparser/cppTemplateParameterList.h @@ -33,7 +33,7 @@ class CPPTemplateParameterList { public: CPPTemplateParameterList(); - string get_string() const; + std::string get_string() const; void build_subst_decl(const CPPTemplateParameterList &formal_params, CPPDeclaration::SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) const; @@ -49,15 +49,15 @@ public: CPPScope *current_scope, CPPScope *global_scope); - void output(ostream &out, CPPScope *scope) const; - void write_formal(ostream &out, CPPScope *scope) const; + void output(std::ostream &out, CPPScope *scope) const; + void write_formal(std::ostream &out, CPPScope *scope) const; - typedef vector Parameters; + typedef std::vector Parameters; Parameters _parameters; }; -inline ostream & -operator << (ostream &out, const CPPTemplateParameterList &plist) { +inline std::ostream & +operator << (std::ostream &out, const CPPTemplateParameterList &plist) { plist.output(out, nullptr); return out; } diff --git a/dtool/src/cppparser/cppTemplateScope.h b/dtool/src/cppparser/cppTemplateScope.h index 0cd987145e..8a30b686a5 100644 --- a/dtool/src/cppparser/cppTemplateScope.h +++ b/dtool/src/cppparser/cppTemplateScope.h @@ -44,11 +44,11 @@ public: virtual bool is_fully_specified() const; - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; - virtual void output(ostream &out, CPPScope *scope) const; + virtual void output(std::ostream &out, CPPScope *scope) const; virtual CPPTemplateScope *as_template_scope(); diff --git a/dtool/src/cppparser/cppToken.h b/dtool/src/cppparser/cppToken.h index 0c14af3171..735ef0aac2 100644 --- a/dtool/src/cppparser/cppToken.h +++ b/dtool/src/cppparser/cppToken.h @@ -25,10 +25,10 @@ class CPPToken { public: CPPToken(int token, int line_number = 0, int col_number = 0, const CPPFile &file = CPPFile(""), - const string &str = string(), + const std::string &str = std::string(), const YYSTYPE &lval = YYSTYPE()); CPPToken(int token, const YYLTYPE &loc, - const string &str = string(), + const std::string &str = std::string(), const YYSTYPE &lval = YYSTYPE()); CPPToken(const CPPToken ©); void operator = (const CPPToken ©); @@ -36,14 +36,14 @@ public: static CPPToken eof(); bool is_eof() const; - void output(ostream &out) const; + void output(std::ostream &out) const; int _token; YYSTYPE _lval; YYLTYPE _lloc; }; -inline ostream &operator << (ostream &out, const CPPToken &token) { +inline std::ostream &operator << (std::ostream &out, const CPPToken &token) { token.output(out); return out; } diff --git a/dtool/src/cppparser/cppType.h b/dtool/src/cppparser/cppType.h index 1bf89db2f5..82f634080c 100644 --- a/dtool/src/cppparser/cppType.h +++ b/dtool/src/cppparser/cppType.h @@ -36,7 +36,7 @@ public: */ class CPPType : public CPPDeclaration { public: - typedef vector Typedefs; + typedef std::vector Typedefs; Typedefs _typedefs; CPPType(const CPPFile &file); @@ -68,46 +68,46 @@ public: CPPType *remove_pointer(); bool has_typedef_name() const; - string get_typedef_name(CPPScope *scope = nullptr) const; + std::string get_typedef_name(CPPScope *scope = nullptr) const; - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; - virtual string get_preferred_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; + virtual std::string get_preferred_name() const; int get_num_alt_names() const; - string get_alt_name(int n) const; + std::string get_alt_name(int n) const; virtual bool is_incomplete() const; virtual bool is_convertible_to(const CPPType *other) const; virtual bool is_equivalent(const CPPType &other) const; - void output_instance(ostream &out, const string &name, + void output_instance(std::ostream &out, const std::string &name, CPPScope *scope) const; - virtual void output_instance(ostream &out, int indent_level, + virtual void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name) const; + bool complete, const std::string &prename, + const std::string &name) const; virtual CPPType *as_type(); static CPPType *new_type(CPPType *type); - static void record_alt_name_for(const CPPType *type, const string &name); - static string get_preferred_name_for(const CPPType *type); + static void record_alt_name_for(const CPPType *type, const std::string &name); + static std::string get_preferred_name_for(const CPPType *type); CPPTypeDeclaration *_declaration; bool _forcetype; protected: - typedef set Types; + typedef std::set Types; static Types _types; - typedef map PreferredNames; + typedef std::map PreferredNames; static PreferredNames _preferred_names; - typedef vector Names; - typedef map AltNames; + typedef std::vector Names; + typedef std::map AltNames; static AltNames _alt_names; }; diff --git a/dtool/src/cppparser/cppTypeDeclaration.h b/dtool/src/cppparser/cppTypeDeclaration.h index 9fb06debef..cd93ed0fdc 100644 --- a/dtool/src/cppparser/cppTypeDeclaration.h +++ b/dtool/src/cppparser/cppTypeDeclaration.h @@ -31,7 +31,7 @@ public: CPPScope *current_scope, CPPScope *global_scope); - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppTypeParser.h b/dtool/src/cppparser/cppTypeParser.h index af18e0e5b8..4064e84687 100644 --- a/dtool/src/cppparser/cppTypeParser.h +++ b/dtool/src/cppparser/cppTypeParser.h @@ -29,18 +29,18 @@ public: CPPTypeParser(CPPScope *current_scope, CPPScope *global_scope); ~CPPTypeParser(); - bool parse_type(const string &type); - bool parse_type(const string &type, const CPPPreprocessor &filepos); + bool parse_type(const std::string &type); + bool parse_type(const std::string &type, const CPPPreprocessor &filepos); - void output(ostream &out) const; + void output(std::ostream &out) const; CPPScope *_current_scope; CPPScope *_global_scope; CPPType *_type; }; -inline ostream & -operator << (ostream &out, const CPPTypeParser &ep) { +inline std::ostream & +operator << (std::ostream &out, const CPPTypeParser &ep) { ep.output(out); return out; } diff --git a/dtool/src/cppparser/cppTypeProxy.h b/dtool/src/cppparser/cppTypeProxy.h index fcd2ebe178..87d064a3b5 100644 --- a/dtool/src/cppparser/cppTypeProxy.h +++ b/dtool/src/cppparser/cppTypeProxy.h @@ -33,20 +33,20 @@ public: virtual bool is_tbd() const; bool has_typedef_name() const; - string get_typedef_name(CPPScope *scope = nullptr) const; + std::string get_typedef_name(CPPScope *scope = nullptr) const; - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; - virtual string get_preferred_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; + virtual std::string get_preferred_name() const; virtual bool is_incomplete() const; - virtual void output_instance(ostream &out, int indent_level, + virtual void output_instance(std::ostream &out, int indent_level, CPPScope *scope, - bool complete, const string &prename, - const string &name) const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + bool complete, const std::string &prename, + const std::string &name) const; + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppTypedefType.h b/dtool/src/cppparser/cppTypedefType.h index d3a3ea3245..c8d7ffd6be 100644 --- a/dtool/src/cppparser/cppTypedefType.h +++ b/dtool/src/cppparser/cppTypedefType.h @@ -27,7 +27,7 @@ class CPPInstanceIdentifier; */ class CPPTypedefType : public CPPType { public: - CPPTypedefType(CPPType *type, const string &name, CPPScope *current_scope); + CPPTypedefType(CPPType *type, const std::string &name, CPPScope *current_scope); CPPTypedefType(CPPType *type, CPPIdentifier *ident, CPPScope *current_scope); CPPTypedefType(CPPType *type, CPPInstanceIdentifier *ii, CPPScope *current_scope, const CPPFile &file); @@ -36,9 +36,9 @@ public: CPPScope *get_scope(CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink = nullptr) const; - virtual string get_simple_name() const; - virtual string get_local_name(CPPScope *scope = nullptr) const; - virtual string get_fully_scoped_name() const; + virtual std::string get_simple_name() const; + virtual std::string get_local_name(CPPScope *scope = nullptr) const; + virtual std::string get_fully_scoped_name() const; virtual bool is_incomplete() const; virtual bool is_tbd() const; @@ -68,7 +68,7 @@ public: virtual bool is_convertible_to(const CPPType *other) const; virtual bool is_equivalent(const CPPType &other) const; - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; @@ -83,7 +83,7 @@ protected: virtual bool is_less(const CPPDeclaration *other) const; bool _subst_decl_recursive_protect; - typedef vector Proxies; + typedef std::vector Proxies; Proxies _proxies; }; diff --git a/dtool/src/cppparser/cppUsing.h b/dtool/src/cppparser/cppUsing.h index 0ec72c8ebf..13de9ce855 100644 --- a/dtool/src/cppparser/cppUsing.h +++ b/dtool/src/cppparser/cppUsing.h @@ -28,7 +28,7 @@ class CPPUsing : public CPPDeclaration { public: CPPUsing(CPPIdentifier *ident, bool full_namespace, const CPPFile &file); - virtual void output(ostream &out, int indent_level, CPPScope *scope, + virtual void output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const; virtual SubType get_subtype() const; diff --git a/dtool/src/cppparser/cppVisibility.h b/dtool/src/cppparser/cppVisibility.h index 07d3bfdcb5..7165aaecc1 100644 --- a/dtool/src/cppparser/cppVisibility.h +++ b/dtool/src/cppparser/cppVisibility.h @@ -24,6 +24,6 @@ enum CPPVisibility { V_unknown }; -ostream &operator << (ostream &out, CPPVisibility vis); +std::ostream &operator << (std::ostream &out, CPPVisibility vis); #endif diff --git a/dtool/src/dconfig/dconfig.I b/dtool/src/dconfig/dconfig.I index 0497ffc067..e40db3c2b0 100644 --- a/dtool/src/dconfig/dconfig.I +++ b/dtool/src/dconfig/dconfig.I @@ -12,31 +12,31 @@ */ bool DConfig:: -GetBool(const string &sym, bool def) { +GetBool(const std::string &sym, bool def) { ConfigVariableBool var(sym, def, "DConfig", ConfigFlags::F_dconfig); return var.get_value(); } int DConfig:: -GetInt(const string &sym, int def) { +GetInt(const std::string &sym, int def) { ConfigVariableInt var(sym, def, "DConfig", ConfigFlags::F_dconfig); return var.get_value(); } float DConfig:: -GetFloat(const string &sym, float def) { +GetFloat(const std::string &sym, float def) { ConfigVariableDouble var(sym, (double)def, "DConfig", ConfigFlags::F_dconfig); return (float)var.get_value(); } double DConfig:: -GetDouble(const string &sym, double def) { +GetDouble(const std::string &sym, double def) { ConfigVariableDouble var(sym, def, "DConfig", ConfigFlags::F_dconfig); return var.get_value(); } -string DConfig:: -GetString(const string &sym, const string &def) { +std::string DConfig:: +GetString(const std::string &sym, const std::string &def) { ConfigVariableString var(sym, def, "DConfig", ConfigFlags::F_dconfig); return var.get_value(); } diff --git a/dtool/src/dconfig/dconfig.h b/dtool/src/dconfig/dconfig.h index ede79f596f..fca35685ed 100644 --- a/dtool/src/dconfig/dconfig.h +++ b/dtool/src/dconfig/dconfig.h @@ -32,11 +32,11 @@ */ class EXPCL_DTOOL_DCONFIG DConfig { PUBLISHED: - static INLINE bool GetBool(const string &sym, bool def = false); - static INLINE int GetInt(const string &sym, int def = 0); - static INLINE float GetFloat(const string &sym, float def = 0.); - static INLINE double GetDouble(const string &sym, double def = 0.); - static INLINE string GetString(const string &sym, const string &def = ""); + static INLINE bool GetBool(const std::string &sym, bool def = false); + static INLINE int GetInt(const std::string &sym, int def = 0); + static INLINE float GetFloat(const std::string &sym, float def = 0.); + static INLINE double GetDouble(const std::string &sym, double def = 0.); + static INLINE std::string GetString(const std::string &sym, const std::string &def = ""); }; #include "dconfig.I" diff --git a/dtool/src/dtoolbase/epvector.h b/dtool/src/dtoolbase/epvector.h index 78db158f39..e743ea4060 100644 --- a/dtool/src/dtoolbase/epvector.h +++ b/dtool/src/dtoolbase/epvector.h @@ -35,10 +35,10 @@ * kids. */ template -class epvector : public vector > { +class epvector : public std::vector > { public: typedef Eigen::aligned_allocator allocator; - typedef vector base_class; + typedef std::vector base_class; typedef typename base_class::size_type size_type; epvector(TypeHandle type_handle = pvector_type_handle) : base_class(allocator()) { } diff --git a/dtool/src/dtoolbase/fakestringstream.h b/dtool/src/dtoolbase/fakestringstream.h index 7132d6280e..da2ba6880f 100644 --- a/dtool/src/dtoolbase/fakestringstream.h +++ b/dtool/src/dtoolbase/fakestringstream.h @@ -24,7 +24,7 @@ public: _len = 0; _str = ""; } - fake_istream_buffer(const string &source) { + fake_istream_buffer(const std::string &source) { _len = source.length(); if (_len == 0) { _str = ""; @@ -43,20 +43,20 @@ public: char *_str; }; -class istringstream : public fake_istream_buffer, public istrstream { +class std::istringstream : public fake_istream_buffer, public istrstream { public: - istringstream(const string &input) : + std::istringstream(const std::string &input) : fake_istream_buffer(input), istrstream(_str, _len) { } }; -class ostringstream : public ostrstream { +class std::ostringstream : public ostrstream { public: - string str() { + std::string str() { // We must capture the length before we take the str(). int length = pcount(); char *s = ostrstream::str(); - string result(s, length); + std::string result(s, length); delete[] s; return result; } @@ -67,9 +67,9 @@ public: stringstream() : strstream() { _owns_str = true; } - stringstream(const string &input) : + std::stringstream(const std::string &input) : fake_istream_buffer(input), - strstream(_str, _len, ios::in) + strstream(_str, _len, std::ios::in) { _owns_str = false; } diff --git a/dtool/src/dtoolbase/indent.I b/dtool/src/dtoolbase/indent.I index db990ebe1d..3e612a369b 100644 --- a/dtool/src/dtoolbase/indent.I +++ b/dtool/src/dtoolbase/indent.I @@ -19,9 +19,9 @@ */ template void -write_long_list(ostream &out, int indent_level, +write_long_list(std::ostream &out, int indent_level, InputIterator first, InputIterator last, - string first_prefix, string later_prefix, + std::string first_prefix, std::string later_prefix, int max_col) { if (later_prefix.empty()) { later_prefix = first_prefix; @@ -30,9 +30,9 @@ write_long_list(ostream &out, int indent_level, if (first != last) { // We have to use an intermediate strstream object so we can count the // number of characters the item will have when it is output. - ostringstream item; + std::ostringstream item; item << *first; - string str = item.str(); + std::string str = item.str(); indent(out, indent_level) << first_prefix << str; int col = indent_level + (int)(first_prefix.length() + str.length()); @@ -40,9 +40,9 @@ write_long_list(ostream &out, int indent_level, ++first; while (first != last) { - ostringstream item; + std::ostringstream item; item << *first; - string str = item.str(); + std::string str = item.str(); col += 1 + str.length(); if (col > max_col) { diff --git a/dtool/src/dtoolbase/indent.h b/dtool/src/dtoolbase/indent.h index 93badf5e7d..c012ff1fe3 100644 --- a/dtool/src/dtoolbase/indent.h +++ b/dtool/src/dtoolbase/indent.h @@ -22,8 +22,8 @@ * stream itself. Useful for indenting a series of lines of text by a given * amount. */ -EXPCL_DTOOL_DTOOLBASE ostream & -indent(ostream &out, int indent_level); +EXPCL_DTOOL_DTOOLBASE std::ostream & +indent(std::ostream &out, int indent_level); /** * Writes a list of things to the indicated output stream, with a space @@ -33,10 +33,10 @@ indent(ostream &out, int indent_level); */ template void -write_long_list(ostream &out, int indent_level, +write_long_list(std::ostream &out, int indent_level, InputIterator ifirst, InputIterator ilast, - string first_prefix = "", - string later_prefix = "", + std::string first_prefix = "", + std::string later_prefix = "", int max_col = 72); #include "indent.I" diff --git a/dtool/src/dtoolbase/pallocator.T b/dtool/src/dtoolbase/pallocator.T index f2776eb39e..ed8349debe 100644 --- a/dtool/src/dtoolbase/pallocator.T +++ b/dtool/src/dtoolbase/pallocator.T @@ -20,7 +20,7 @@ pallocator_single(TypeHandle type_handle) noexcept : template INLINE Type *pallocator_single:: -allocate(typename pallocator_single::size_type n, typename allocator::const_pointer) { +allocate(typename pallocator_single::size_type n, typename std::allocator::const_pointer) { TAU_PROFILE("pallocator_single:allocate()", " ", TAU_USER); // This doesn't support allocating arrays. assert(n == 1); @@ -44,7 +44,7 @@ pallocator_array(TypeHandle type_handle) noexcept : template INLINE Type *pallocator_array:: -allocate(typename pallocator_array::size_type n, typename allocator::const_pointer) { +allocate(typename pallocator_array::size_type n, typename std::allocator::const_pointer) { return (typename pallocator_array::pointer) ASSUME_ALIGNED(_type_handle.allocate_array(n * sizeof(Type)), MEMORY_HOOK_ALIGNMENT); } diff --git a/dtool/src/dtoolbase/pallocator.h b/dtool/src/dtoolbase/pallocator.h index daca6fb275..b5158810df 100644 --- a/dtool/src/dtoolbase/pallocator.h +++ b/dtool/src/dtoolbase/pallocator.h @@ -44,15 +44,15 @@ using std::allocator; #else template -class pallocator_single : public allocator { +class pallocator_single : public std::allocator { public: // Nowadays we cannot implicitly inherit typedefs from base classes in a // template class; we must explicitly copy them here. - typedef typename allocator::pointer pointer; - typedef typename allocator::reference reference; - typedef typename allocator::const_pointer const_pointer; - typedef typename allocator::const_reference const_reference; - typedef typename allocator::size_type size_type; + typedef typename std::allocator::pointer pointer; + typedef typename std::allocator::reference reference; + typedef typename std::allocator::const_pointer const_pointer; + typedef typename std::allocator::const_reference const_reference; + typedef typename std::allocator::size_type size_type; INLINE pallocator_single(TypeHandle type_handle) noexcept; @@ -61,7 +61,7 @@ public: INLINE pallocator_single(const pallocator_single ©) noexcept : _type_handle(copy._type_handle) { } - INLINE Type *allocate(size_type n, allocator::const_pointer hint = 0) + INLINE Type *allocate(size_type n, std::allocator::const_pointer hint = 0) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT); INLINE void deallocate(pointer p, size_type n); @@ -73,15 +73,15 @@ public: }; template -class pallocator_array : public allocator { +class pallocator_array : public std::allocator { public: // Nowadays we cannot implicitly inherit typedefs from base classes in a // template class; we must explicitly copy them here. - typedef typename allocator::pointer pointer; - typedef typename allocator::reference reference; - typedef typename allocator::const_pointer const_pointer; - typedef typename allocator::const_reference const_reference; - typedef typename allocator::size_type size_type; + typedef typename std::allocator::pointer pointer; + typedef typename std::allocator::reference reference; + typedef typename std::allocator::const_pointer const_pointer; + typedef typename std::allocator::const_reference const_reference; + typedef typename std::allocator::size_type size_type; INLINE pallocator_array(TypeHandle type_handle = TypeHandle::none()) noexcept; @@ -90,7 +90,7 @@ public: INLINE pallocator_array(const pallocator_array ©) noexcept : _type_handle(copy._type_handle) { } - INLINE Type *allocate(size_type n, allocator::const_pointer hint = 0) + INLINE Type *allocate(size_type n, std::allocator::const_pointer hint = 0) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT); INLINE void deallocate(pointer p, size_type n); diff --git a/dtool/src/dtoolbase/pdeque.h b/dtool/src/dtoolbase/pdeque.h index a7de9f5bb0..b4c71c81eb 100644 --- a/dtool/src/dtoolbase/pdeque.h +++ b/dtool/src/dtoolbase/pdeque.h @@ -19,6 +19,7 @@ #include "register_type.h" #include + #if !defined(USE_STL_ALLOCATOR) || defined(CPPPARSER) // If we're not using custom allocators, just use the standard class // definition. @@ -34,13 +35,13 @@ using std::deque; * allocated memory. */ template -class pdeque : public deque > { +class pdeque : public std::deque > { public: typedef pallocator_array allocator; - typedef typename deque::size_type size_type; - pdeque(TypeHandle type_handle = pdeque_type_handle) : deque >(allocator(type_handle)) { } - pdeque(size_type n, TypeHandle type_handle = pdeque_type_handle) : deque >(n, Type(), allocator(type_handle)) { } - pdeque(size_type n, const Type &value, TypeHandle type_handle = pdeque_type_handle) : deque >(n, value, allocator(type_handle)) { } + typedef typename std::deque::size_type size_type; + pdeque(TypeHandle type_handle = pdeque_type_handle) : std::deque >(allocator(type_handle)) { } + pdeque(size_type n, TypeHandle type_handle = pdeque_type_handle) : std::deque >(n, Type(), allocator(type_handle)) { } + pdeque(size_type n, const Type &value, TypeHandle type_handle = pdeque_type_handle) : std::deque >(n, value, allocator(type_handle)) { } }; #endif // USE_STL_ALLOCATOR diff --git a/dtool/src/dtoolbase/plist.h b/dtool/src/dtoolbase/plist.h index 259eb68198..0ddef3c9f1 100644 --- a/dtool/src/dtoolbase/plist.h +++ b/dtool/src/dtoolbase/plist.h @@ -34,10 +34,10 @@ using std::list; * allocated memory. */ template -class plist : public list > { +class plist : public std::list > { public: typedef pallocator_single allocator; - typedef list base_class; + typedef std::list base_class; typedef typename base_class::size_type size_type; plist(TypeHandle type_handle = plist_type_handle) : base_class(allocator(type_handle)) { } plist(size_type n, TypeHandle type_handle = plist_type_handle) : base_class(n, Type(), allocator(type_handle)) { } diff --git a/dtool/src/dtoolbase/pmap.h b/dtool/src/dtoolbase/pmap.h index 1a53836dd3..0f960ac9d5 100644 --- a/dtool/src/dtoolbase/pmap.h +++ b/dtool/src/dtoolbase/pmap.h @@ -48,11 +48,11 @@ using std::multimap; * purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > -class pmap : public map > > { +template > +class pmap : public std::map > > { public: - typedef pallocator_single > allocator; - typedef map base_class; + typedef pallocator_single > allocator; + typedef std::map base_class; pmap(TypeHandle type_handle = pmap_type_handle) : base_class(Compare(), allocator(type_handle)) { } pmap(const Compare &comp, TypeHandle type_handle = pmap_type_handle) : base_class(comp, allocator(type_handle)) { } @@ -115,12 +115,12 @@ public: * purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > -class pmultimap : public multimap > > { +template > +class pmultimap : public std::multimap > > { public: - typedef pallocator_single > allocator; - pmultimap(TypeHandle type_handle = pmap_type_handle) : multimap(Compare(), allocator(type_handle)) { } - pmultimap(const Compare &comp, TypeHandle type_handle = pmap_type_handle) : multimap(comp, allocator(type_handle)) { } + typedef pallocator_single > allocator; + pmultimap(TypeHandle type_handle = pmap_type_handle) : std::multimap(Compare(), allocator(type_handle)) { } + pmultimap(const Compare &comp, TypeHandle type_handle = pmap_type_handle) : std::multimap(comp, allocator(type_handle)) { } }; #ifdef HAVE_STL_HASH @@ -129,11 +129,11 @@ public: * purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > > -class phash_map : public stdext::hash_map > > { +template > > +class phash_map : public stdext::hash_map > > { public: - phash_map() : stdext::hash_map > >() { } - phash_map(const Compare &comp) : stdext::hash_map > >(comp) { } + phash_map() : stdext::hash_map > >() { } + phash_map(const Compare &comp) : stdext::hash_map > >(comp) { } }; /** @@ -141,11 +141,11 @@ public: * main purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > > -class phash_multimap : public stdext::hash_multimap > > { +template > > +class phash_multimap : public stdext::hash_multimap > > { public: - phash_multimap() : stdext::hash_multimap > >() { } - phash_multimap(const Compare &comp) : stdext::hash_multimap > >(comp) { } + phash_multimap() : stdext::hash_multimap > >() { } + phash_multimap(const Compare &comp) : stdext::hash_multimap > >(comp) { } }; #else // HAVE_STL_HASH diff --git a/dtool/src/dtoolbase/pset.h b/dtool/src/dtoolbase/pset.h index 1c194dff9b..7b51cf787d 100644 --- a/dtool/src/dtoolbase/pset.h +++ b/dtool/src/dtoolbase/pset.h @@ -48,11 +48,11 @@ using std::multiset; * purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > -class pset : public set > { +template > +class pset : public std::set > { public: typedef pallocator_single allocator; - typedef set base_class; + typedef std::set base_class; pset(TypeHandle type_handle = pset_type_handle) : base_class(Compare(), allocator(type_handle)) { } pset(const Compare &comp, TypeHandle type_handle = pset_type_handle) : base_class(comp, type_handle) { } @@ -107,12 +107,12 @@ public: * purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > -class pmultiset : public multiset > { +template > +class pmultiset : public std::multiset > { public: typedef pallocator_single allocator; - pmultiset(TypeHandle type_handle = pset_type_handle) : multiset(Compare(), allocator(type_handle)) { } - pmultiset(const Compare &comp, TypeHandle type_handle = pset_type_handle) : multiset(comp, type_handle) { } + pmultiset(TypeHandle type_handle = pset_type_handle) : std::multiset(Compare(), allocator(type_handle)) { } + pmultiset(const Compare &comp, TypeHandle type_handle = pset_type_handle) : std::multiset(comp, type_handle) { } }; #ifdef HAVE_STL_HASH @@ -121,7 +121,7 @@ public: * purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > > +template > > class phash_set : public stdext::hash_set > { public: phash_set() : stdext::hash_set >() { } @@ -133,7 +133,7 @@ public: * main purpose is to call the hooks for MemoryUsage to properly track STL- * allocated memory. */ -template > > +template > > class phash_multiset : public stdext::hash_multiset > { public: phash_multiset() : stdext::hash_multiset >() { } diff --git a/dtool/src/dtoolbase/pvector.h b/dtool/src/dtoolbase/pvector.h index 8baf3c49c1..f88b625bca 100644 --- a/dtool/src/dtoolbase/pvector.h +++ b/dtool/src/dtoolbase/pvector.h @@ -41,15 +41,15 @@ using std::vector; * allocated memory. */ template -class pvector : public vector > { +class pvector : public std::vector > { public: typedef pallocator_array allocator; - typedef vector base_class; + typedef std::vector base_class; typedef typename base_class::size_type size_type; explicit pvector(TypeHandle type_handle = pvector_type_handle) : base_class(allocator(type_handle)) { } pvector(const pvector ©) : base_class(copy) { } - pvector(pvector &&from) noexcept : base_class(move(from)) {}; + pvector(pvector &&from) noexcept : base_class(std::move(from)) {}; explicit pvector(size_type n, TypeHandle type_handle = pvector_type_handle) : base_class(n, Type(), allocator(type_handle)) { } explicit pvector(size_type n, const Type &value, TypeHandle type_handle = pvector_type_handle) : base_class(n, value, allocator(type_handle)) { } pvector(const Type *begin, const Type *end, TypeHandle type_handle = pvector_type_handle) : base_class(begin, end, allocator(type_handle)) { } @@ -60,7 +60,7 @@ public: } pvector &operator =(pvector &&from) noexcept { - base_class::operator =(move(from)); + base_class::operator =(std::move(from)); return *this; } }; diff --git a/dtool/src/dtoolbase/register_type.I b/dtool/src/dtoolbase/register_type.I index 9d22794d20..0bd43e1501 100644 --- a/dtool/src/dtoolbase/register_type.I +++ b/dtool/src/dtoolbase/register_type.I @@ -19,18 +19,18 @@ * Register() and record_derivation() yourself. */ INLINE void -register_type(TypeHandle &type_handle, const string &name) { +register_type(TypeHandle &type_handle, const std::string &name) { TypeRegistry::ptr()->register_type(type_handle, name); } INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1) { if (TypeRegistry::ptr()->register_type(type_handle, name)) { TypeRegistry::ptr()->record_derivation(type_handle, parent1); } } INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2) { if (TypeRegistry::ptr()->register_type(type_handle, name)) { TypeRegistry::ptr()->record_derivation(type_handle, parent1); @@ -38,7 +38,7 @@ register_type(TypeHandle &type_handle, const string &name, } } INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3) { if (TypeRegistry::ptr()->register_type(type_handle, name)) { @@ -48,7 +48,7 @@ register_type(TypeHandle &type_handle, const string &name, } } INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3, TypeHandle parent4) { if (TypeRegistry::ptr()->register_type(type_handle, name)) { @@ -66,18 +66,18 @@ register_type(TypeHandle &type_handle, const string &name, * reference. */ INLINE TypeHandle -register_dynamic_type(const string &name) { +register_dynamic_type(const std::string &name) { return TypeRegistry::ptr()->register_dynamic_type(name); } INLINE TypeHandle -register_dynamic_type(const string &name, TypeHandle parent1) { +register_dynamic_type(const std::string &name, TypeHandle parent1) { TypeHandle type_handle = TypeRegistry::ptr()->register_dynamic_type(name); TypeRegistry::ptr()->record_derivation(type_handle, parent1); return type_handle; } INLINE TypeHandle -register_dynamic_type(const string &name, +register_dynamic_type(const std::string &name, TypeHandle parent1, TypeHandle parent2) { TypeHandle type_handle = TypeRegistry::ptr()->register_dynamic_type(name); @@ -86,7 +86,7 @@ register_dynamic_type(const string &name, return type_handle; } INLINE TypeHandle -register_dynamic_type(const string &name, +register_dynamic_type(const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3) { TypeHandle type_handle = @@ -97,7 +97,7 @@ register_dynamic_type(const string &name, return type_handle; } INLINE TypeHandle -register_dynamic_type(const string &name, +register_dynamic_type(const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3, TypeHandle parent4) { TypeHandle type_handle = diff --git a/dtool/src/dtoolbase/register_type.h b/dtool/src/dtoolbase/register_type.h index c6b27f2a94..a15cc9ddb1 100644 --- a/dtool/src/dtoolbase/register_type.h +++ b/dtool/src/dtoolbase/register_type.h @@ -27,23 +27,23 @@ * Register() and record_derivation() yourself. */ INLINE void -register_type(TypeHandle &type_handle, const string &name); +register_type(TypeHandle &type_handle, const std::string &name); INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1); INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2); INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3); INLINE void -register_type(TypeHandle &type_handle, const string &name, +register_type(TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3, TypeHandle parent4); @@ -55,22 +55,22 @@ register_type(TypeHandle &type_handle, const string &name, * reference. */ INLINE TypeHandle -register_dynamic_type(const string &name); +register_dynamic_type(const std::string &name); INLINE TypeHandle -register_dynamic_type(const string &name, TypeHandle parent1); +register_dynamic_type(const std::string &name, TypeHandle parent1); INLINE TypeHandle -register_dynamic_type(const string &name, +register_dynamic_type(const std::string &name, TypeHandle parent1, TypeHandle parent2); INLINE TypeHandle -register_dynamic_type(const string &name, +register_dynamic_type(const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3); INLINE TypeHandle -register_dynamic_type(const string &name, +register_dynamic_type(const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3, TypeHandle parent4); @@ -166,12 +166,12 @@ INLINE TypeHandle _get_type_handle(const float *) { } template<> -INLINE TypeHandle _get_type_handle(const string *) { +INLINE TypeHandle _get_type_handle(const std::string *) { return string_type_handle; } template<> -INLINE TypeHandle _get_type_handle(const wstring *) { +INLINE TypeHandle _get_type_handle(const std::wstring *) { return wstring_type_handle; } diff --git a/dtool/src/dtoolbase/stl_compares.h b/dtool/src/dtoolbase/stl_compares.h index 0afffbf9a2..946eab9b64 100644 --- a/dtool/src/dtoolbase/stl_compares.h +++ b/dtool/src/dtoolbase/stl_compares.h @@ -24,9 +24,7 @@ #ifdef HAVE_STL_HASH #include // for hash_compare -using std::less; - -template > +template > class stl_hash_compare : public stdext::hash_compare { public: INLINE bool is_equal(const Key &a, const Key &b) const { @@ -38,10 +36,8 @@ public: #include // for less -using std::less; - // This is declared for the cases in which we don't have STL_HASH available. -template > +template > class stl_hash_compare : public Compare { public: INLINE size_t operator () (const Key &key) const { @@ -122,7 +118,7 @@ public: * size_t typecast operator). It is the same as the system-provided * hash_compare. */ -template > +template > class integer_hash : public stl_hash_compare { public: INLINE static size_t add_hash(size_t start, const Key &key); @@ -132,7 +128,7 @@ public: * This is the default hash_compare class, which assumes the Key is a pointer * value. It is the same as the system-provided hash_compare. */ -class pointer_hash : public stl_hash_compare > { +class pointer_hash : public stl_hash_compare > { public: INLINE static size_t add_hash(size_t start, const void *key); }; @@ -154,7 +150,7 @@ public: * This hash_compare class hashes a string. It assumes the Key is a string or * provides begin() and end() methods that iterate through Key::value_type. */ -template > +template > class sequence_hash : public stl_hash_compare { public: INLINE size_t operator () (const Key &key) const; @@ -168,7 +164,7 @@ public: * This hash_compare class hashes a class object. It assumes the Key provides * a method called get_hash() that returns a size_t. */ -template > +template > class method_hash : public stl_hash_compare { public: INLINE size_t operator () (const Key &key) const; @@ -212,8 +208,8 @@ typedef floating_point_hash float_hash; typedef floating_point_hash double_hash; typedef integer_hash int_hash; typedef integer_hash size_t_hash; -typedef sequence_hash string_hash; -typedef sequence_hash wstring_hash; +typedef sequence_hash string_hash; +typedef sequence_hash wstring_hash; template class indirect_less_hash : public indirect_method_hash > { diff --git a/dtool/src/dtoolbase/typeHandle.I b/dtool/src/dtoolbase/typeHandle.I index c63524c18c..134d85581a 100644 --- a/dtool/src/dtoolbase/typeHandle.I +++ b/dtool/src/dtoolbase/typeHandle.I @@ -84,7 +84,7 @@ get_hash() const { * owns this TypeHandle. It is only used in case the TypeHandle is * inadvertantly undefined. */ -INLINE string TypeHandle:: +INLINE std::string TypeHandle:: get_name(TypedObject *object) const { if ((*this) == TypeHandle::none()) { return "none"; @@ -187,7 +187,7 @@ get_index() const { * */ INLINE void TypeHandle:: -output(ostream &out) const { +output(std::ostream &out) const { out << get_name(); } diff --git a/dtool/src/dtoolbase/typeHandle.h b/dtool/src/dtoolbase/typeHandle.h index 03d0cd269c..da66074750 100644 --- a/dtool/src/dtoolbase/typeHandle.h +++ b/dtool/src/dtoolbase/typeHandle.h @@ -108,7 +108,7 @@ PUBLISHED: INLINE int compare_to(const TypeHandle &other) const; INLINE size_t get_hash() const; - INLINE string get_name(TypedObject *object = nullptr) const; + INLINE std::string get_name(TypedObject *object = nullptr) const; INLINE bool is_derived_from(TypeHandle parent, TypedObject *object = nullptr) const; @@ -128,7 +128,7 @@ PUBLISHED: void dec_memory_usage(MemoryClass memory_class, size_t size); INLINE int get_index() const; - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; constexpr static TypeHandle none() { return TypeHandle(0); } INLINE operator bool () const; @@ -157,12 +157,12 @@ private: // It's handy to be able to output a TypeHandle directly, and see the type // name. -INLINE ostream &operator << (ostream &out, TypeHandle type) { +INLINE std::ostream &operator << (std::ostream &out, TypeHandle type) { type.output(out); return out; } -EXPCL_DTOOL_DTOOLBASE ostream &operator << (ostream &out, TypeHandle::MemoryClass mem_class); +EXPCL_DTOOL_DTOOLBASE std::ostream &operator << (std::ostream &out, TypeHandle::MemoryClass mem_class); // We must include typeRegistry at this point so we can call it from our // inline functions. This is a circular include that is strategically placed diff --git a/dtool/src/dtoolbase/typeRegistry.h b/dtool/src/dtoolbase/typeRegistry.h index 2227782862..dc7df60541 100644 --- a/dtool/src/dtoolbase/typeRegistry.h +++ b/dtool/src/dtoolbase/typeRegistry.h @@ -38,18 +38,18 @@ public: // User code shouldn't generally need to call TypeRegistry::register_type() // or record_derivation() directly; instead, use the register_type // convenience function, defined in register_type.h. - bool register_type(TypeHandle &type_handle, const string &name); + bool register_type(TypeHandle &type_handle, const std::string &name); PUBLISHED: - TypeHandle register_dynamic_type(const string &name); + TypeHandle register_dynamic_type(const std::string &name); void record_derivation(TypeHandle child, TypeHandle parent); - void record_alternate_name(TypeHandle type, const string &name); + void record_alternate_name(TypeHandle type, const std::string &name); - TypeHandle find_type(const string &name) const; + TypeHandle find_type(const std::string &name) const; TypeHandle find_type_by_id(int id) const; - string get_name(TypeHandle type, TypedObject *object) const; + std::string get_name(TypeHandle type, TypedObject *object) const; bool is_derived_from(TypeHandle child, TypeHandle base, TypedObject *child_object); @@ -74,7 +74,7 @@ PUBLISHED: static void reregister_types(); - void write(ostream &out) const; + void write(std::ostream &out) const; // ptr() returns the pointer to the global TypeRegistry object. static INLINE TypeRegistry *ptr(); @@ -94,8 +94,8 @@ private: INLINE void freshen_derivations(); void rebuild_derivations(); - void do_write(ostream &out) const; - void write_node(ostream &out, int indent_level, + void do_write(std::ostream &out) const; + void write_node(std::ostream &out, int indent_level, const TypeRegistryNode *node) const; static INLINE void init_lock(); @@ -103,7 +103,7 @@ private: typedef std::vector HandleRegistry; HandleRegistry _handle_registry; - typedef std::map NameRegistry; + typedef std::map NameRegistry; NameRegistry _name_registry; typedef std::vector RootClasses; diff --git a/dtool/src/dtoolbase/typeRegistryNode.h b/dtool/src/dtoolbase/typeRegistryNode.h index c459d64805..dd888cbf59 100644 --- a/dtool/src/dtoolbase/typeRegistryNode.h +++ b/dtool/src/dtoolbase/typeRegistryNode.h @@ -29,7 +29,7 @@ */ class EXPCL_DTOOL_DTOOLBASE TypeRegistryNode { public: - TypeRegistryNode(TypeHandle handle, const string &name, TypeHandle &ref); + TypeRegistryNode(TypeHandle handle, const std::string &name, TypeHandle &ref); static bool is_derived_from(const TypeRegistryNode *child, const TypeRegistryNode *base); @@ -41,7 +41,7 @@ public: void define_subtree(); TypeHandle _handle; - string _name; + std::string _name; TypeHandle &_ref; typedef std::vector Classes; Classes _parent_classes; diff --git a/dtool/src/dtoolutil/dSearchPath.I b/dtool/src/dtoolutil/dSearchPath.I index 3a958915d6..66055a7466 100644 --- a/dtool/src/dtoolutil/dSearchPath.I +++ b/dtool/src/dtoolutil/dSearchPath.I @@ -48,8 +48,8 @@ find_all_files(const Filename &filename) const { * searches that. */ INLINE Filename DSearchPath:: -search_path(const Filename &filename, const string &path, - const string &separator) { +search_path(const Filename &filename, const std::string &path, + const std::string &separator) { DSearchPath search(path, separator); return search.find_file(filename); } diff --git a/dtool/src/dtoolutil/dSearchPath.h b/dtool/src/dtoolutil/dSearchPath.h index 85184df77c..8cb769c378 100644 --- a/dtool/src/dtoolutil/dSearchPath.h +++ b/dtool/src/dtoolutil/dSearchPath.h @@ -41,8 +41,8 @@ PUBLISHED: INLINE Filename operator [] (size_t n) const; INLINE size_t size() const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; public: void add_file(const Filename &file); @@ -53,7 +53,7 @@ PUBLISHED: }; DSearchPath(); - DSearchPath(const string &path, const string &separator = string()); + DSearchPath(const std::string &path, const std::string &separator = std::string()); DSearchPath(const Filename &directory); DSearchPath(const DSearchPath ©); void operator = (const DSearchPath ©); @@ -62,8 +62,8 @@ PUBLISHED: void clear(); void append_directory(const Filename &directory); void prepend_directory(const Filename &directory); - void append_path(const string &path, - const string &separator = string()); + void append_path(const std::string &path, + const std::string &separator = std::string()); void append_path(const DSearchPath &path); void prepend_path(const DSearchPath &path); @@ -78,18 +78,18 @@ PUBLISHED: INLINE Results find_all_files(const Filename &filename) const; INLINE static Filename - search_path(const Filename &filename, const string &path, - const string &separator = string()); + search_path(const Filename &filename, const std::string &path, + const std::string &separator = std::string()); - void output(ostream &out, const string &separator = string()) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out, const std::string &separator = std::string()) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef pvector Directories; Directories _directories; }; -INLINE ostream &operator << (ostream &out, const DSearchPath &sp) { +INLINE std::ostream &operator << (std::ostream &out, const DSearchPath &sp) { sp.output(out); return out; } diff --git a/dtool/src/dtoolutil/executionEnvironment.I b/dtool/src/dtoolutil/executionEnvironment.I index b1fe554a29..4639ab0a36 100644 --- a/dtool/src/dtoolutil/executionEnvironment.I +++ b/dtool/src/dtoolutil/executionEnvironment.I @@ -15,7 +15,7 @@ * Returns true if the indicated environment variable is defined. */ INLINE bool ExecutionEnvironment:: -has_environment_variable(const string &var) { +has_environment_variable(const std::string &var) { return get_ptr()->ns_has_environment_variable(var); } @@ -23,8 +23,8 @@ has_environment_variable(const string &var) { * Returns the definition of the indicated environment variable, or the empty * string if the variable is undefined. */ -INLINE string ExecutionEnvironment:: -get_environment_variable(const string &var) { +INLINE std::string ExecutionEnvironment:: +get_environment_variable(const std::string &var) { return get_ptr()->ns_get_environment_variable(var); } @@ -32,7 +32,7 @@ get_environment_variable(const string &var) { * Changes the definition of the indicated environment variable. */ INLINE void ExecutionEnvironment:: -set_environment_variable(const string &var, const string &value) { +set_environment_variable(const std::string &var, const std::string &value) { get_ptr()->ns_set_environment_variable(var, value); } @@ -43,7 +43,7 @@ set_environment_variable(const string &var, const string &value) { * will return this new value. */ INLINE void ExecutionEnvironment:: -shadow_environment_variable(const string &var, const string &value) { +shadow_environment_variable(const std::string &var, const std::string &value) { get_ptr()->ns_shadow_environment_variable(var, value); } @@ -52,7 +52,7 @@ shadow_environment_variable(const string &var, const string &value) { * and lets the actual value of the variable show again. */ INLINE void ExecutionEnvironment:: -clear_shadow(const string &var) { +clear_shadow(const std::string &var) { get_ptr()->ns_clear_shadow(var); } @@ -70,7 +70,7 @@ get_num_args() { * .. get_num_args()). The first parameter, n == 0, is the first actual * parameter, not the binary name. */ -INLINE string ExecutionEnvironment:: +INLINE std::string ExecutionEnvironment:: get_arg(size_t n) { return get_ptr()->ns_get_arg(n); } @@ -79,7 +79,7 @@ get_arg(size_t n) { * Returns the name of the binary executable that started this program, if it * can be determined. */ -INLINE string ExecutionEnvironment:: +INLINE std::string ExecutionEnvironment:: get_binary_name() { return get_ptr()->ns_get_binary_name(); } @@ -88,7 +88,7 @@ get_binary_name() { * Returns the name of the libdtool DLL that is used in this program, if it * can be determined. */ -INLINE string ExecutionEnvironment:: +INLINE std::string ExecutionEnvironment:: get_dtool_name() { return get_ptr()->ns_get_dtool_name(); } @@ -97,7 +97,7 @@ get_dtool_name() { * Do not use. */ INLINE void ExecutionEnvironment:: -set_binary_name(const string &name) { +set_binary_name(const std::string &name) { get_ptr()->_binary_name = name; } @@ -105,6 +105,6 @@ set_binary_name(const string &name) { * Do not use. */ INLINE void ExecutionEnvironment:: -set_dtool_name(const string &name) { +set_dtool_name(const std::string &name) { get_ptr()->_dtool_name = name; } diff --git a/dtool/src/dtoolutil/executionEnvironment.h b/dtool/src/dtoolutil/executionEnvironment.h index 7415f19642..0ff0814cdd 100644 --- a/dtool/src/dtoolutil/executionEnvironment.h +++ b/dtool/src/dtoolutil/executionEnvironment.h @@ -31,23 +31,23 @@ private: ExecutionEnvironment(); PUBLISHED: - INLINE static bool has_environment_variable(const string &var); - INLINE static string get_environment_variable(const string &var); - INLINE static void set_environment_variable(const string &var, const string &value); + INLINE static bool has_environment_variable(const std::string &var); + INLINE static std::string get_environment_variable(const std::string &var); + INLINE static void set_environment_variable(const std::string &var, const std::string &value); - INLINE static void shadow_environment_variable(const string &var, const string &value); - INLINE static void clear_shadow(const string &var); + INLINE static void shadow_environment_variable(const std::string &var, const std::string &value); + INLINE static void clear_shadow(const std::string &var); - static string expand_string(const string &str); + static std::string expand_string(const std::string &str); INLINE static size_t get_num_args(); - INLINE static string get_arg(size_t n); + INLINE static std::string get_arg(size_t n); - INLINE static string get_binary_name(); - INLINE static string get_dtool_name(); + INLINE static std::string get_binary_name(); + INLINE static std::string get_dtool_name(); - INLINE static void set_binary_name(const string &name); - INLINE static void set_dtool_name(const string &name); + INLINE static void set_binary_name(const std::string &name); + INLINE static void set_dtool_name(const std::string &name); static Filename get_cwd(); @@ -61,17 +61,17 @@ PUBLISHED: MAKE_PROPERTY(cwd, get_cwd); private: - bool ns_has_environment_variable(const string &var) const; - string ns_get_environment_variable(const string &var) const; - void ns_set_environment_variable(const string &var, const string &value); - void ns_shadow_environment_variable(const string &var, const string &value); - void ns_clear_shadow(const string &var); + bool ns_has_environment_variable(const std::string &var) const; + std::string ns_get_environment_variable(const std::string &var) const; + void ns_set_environment_variable(const std::string &var, const std::string &value); + void ns_shadow_environment_variable(const std::string &var, const std::string &value); + void ns_clear_shadow(const std::string &var); size_t ns_get_num_args() const; - string ns_get_arg(size_t n) const; + std::string ns_get_arg(size_t n) const; - string ns_get_binary_name() const; - string ns_get_dtool_name() const; + std::string ns_get_binary_name() const; + std::string ns_get_dtool_name() const; static ExecutionEnvironment *get_ptr(); @@ -79,14 +79,14 @@ private: void read_args(); private: - typedef map EnvironmentVariables; + typedef std::map EnvironmentVariables; EnvironmentVariables _variables; typedef vector_string CommandArguments; CommandArguments _args; - string _binary_name; - string _dtool_name; + std::string _binary_name; + std::string _dtool_name; static ExecutionEnvironment *_global_ptr; }; diff --git a/dtool/src/dtoolutil/filename.I b/dtool/src/dtoolutil/filename.I index 989d77df98..b23947320f 100644 --- a/dtool/src/dtoolutil/filename.I +++ b/dtool/src/dtoolutil/filename.I @@ -15,7 +15,7 @@ * */ INLINE Filename:: -Filename(const string &filename) { +Filename(const std::string &filename) { _flags = 0; (*this) = filename; } @@ -24,7 +24,7 @@ Filename(const string &filename) { * */ INLINE Filename:: -Filename(const wstring &filename) { +Filename(const std::wstring &filename) { _flags = 0; (*this) = filename; } @@ -58,7 +58,7 @@ Filename(const Filename ©) : * */ INLINE Filename:: -Filename(string &&filename) noexcept : _flags(0) { +Filename(std::string &&filename) noexcept : _flags(0) { (*this) = std::move(filename); } @@ -85,10 +85,10 @@ INLINE Filename:: Filename() : _dirname_end(0), _basename_start(0), - _basename_end(string::npos), - _extension_start(string::npos), - _hash_start(string::npos), - _hash_end(string::npos), + _basename_end(std::string::npos), + _extension_start(std::string::npos), + _hash_start(std::string::npos), + _hash_end(std::string::npos), _flags(0) { } @@ -106,7 +106,7 @@ text_filename(const Filename &filename) { * */ INLINE Filename Filename:: -text_filename(const string &filename) { +text_filename(const std::string &filename) { Filename result(filename); result.set_text(); return result; @@ -126,7 +126,7 @@ binary_filename(const Filename &filename) { * */ INLINE Filename Filename:: -binary_filename(const string &filename) { +binary_filename(const std::string &filename) { Filename result(filename); result.set_binary(); return result; @@ -136,7 +136,7 @@ binary_filename(const string &filename) { * */ INLINE Filename Filename:: -dso_filename(const string &filename) { +dso_filename(const std::string &filename) { Filename result(filename); result.set_type(T_dso); return result; @@ -146,7 +146,7 @@ dso_filename(const string &filename) { * */ INLINE Filename Filename:: -executable_filename(const string &filename) { +executable_filename(const std::string &filename) { Filename result(filename); result.set_type(T_executable); return result; @@ -157,7 +157,7 @@ executable_filename(const string &filename) { * set_pattern(). */ INLINE Filename Filename:: -pattern_filename(const string &filename) { +pattern_filename(const std::string &filename) { Filename result(filename); result.set_pattern(true); return result; @@ -167,7 +167,7 @@ pattern_filename(const string &filename) { * */ INLINE Filename &Filename:: -operator = (const string &filename) { +operator = (const std::string &filename) { _filename = filename; locate_basename(); @@ -180,7 +180,7 @@ operator = (const string &filename) { * */ INLINE Filename &Filename:: -operator = (const wstring &filename) { +operator = (const std::wstring &filename) { TextEncoder encoder; encoder.set_encoding(get_filesystem_encoding()); encoder.set_wtext(filename); @@ -193,7 +193,7 @@ operator = (const wstring &filename) { INLINE Filename &Filename:: operator = (const char *filename) { assert(filename != nullptr); - return (*this) = string(filename); + return (*this) = std::string(filename); } /** @@ -216,7 +216,7 @@ operator = (const Filename ©) { * */ INLINE Filename &Filename:: -operator = (string &&filename) noexcept { +operator = (std::string &&filename) noexcept { _filename = std::move(filename); locate_basename(); @@ -245,7 +245,7 @@ operator = (Filename &&from) noexcept { * */ INLINE Filename:: -operator const string & () const { +operator const std::string & () const { return _filename; } @@ -285,7 +285,7 @@ operator [] (size_t n) const { /** * */ -INLINE string Filename:: +INLINE std::string Filename:: substr(size_t begin) const { return _filename.substr(begin); } @@ -293,7 +293,7 @@ substr(size_t begin) const { /** * */ -INLINE string Filename:: +INLINE std::string Filename:: substr(size_t begin, size_t end) const { return _filename.substr(begin, end); } @@ -304,7 +304,7 @@ substr(size_t begin, size_t end) const { * two parameters. */ INLINE void Filename:: -operator += (const string &other) { +operator += (const std::string &other) { _filename += other; locate_basename(); locate_extension(); @@ -315,7 +315,7 @@ operator += (const string &other) { * Returns a new Filename representing the concatenation of the two filenames. */ INLINE Filename Filename:: -operator + (const string &other) const { +operator + (const std::string &other) const { Filename a(*this); a += other; return a; @@ -334,7 +334,7 @@ operator / (const Filename &other) const { * Returns the entire filename: directory, basename, extension. This is the * same thing returned by the string typecast operator. */ -INLINE string Filename:: +INLINE std::string Filename:: get_fullpath() const { return _filename; } @@ -342,7 +342,7 @@ get_fullpath() const { /** * Returns the entire filename as a wide-character string. */ -INLINE wstring Filename:: +INLINE std::wstring Filename:: get_fullpath_w() const { TextEncoder encoder; encoder.set_encoding(get_filesystem_encoding()); @@ -354,7 +354,7 @@ get_fullpath_w() const { * Returns the directory part of the filename. This is everything in the * filename up to, but not including the rightmost slash. */ -INLINE string Filename:: +INLINE std::string Filename:: get_dirname() const { return _filename.substr(0, _dirname_end); } @@ -363,7 +363,7 @@ get_dirname() const { * Returns the basename part of the filename. This is everything in the * filename after the rightmost slash, including any extensions. */ -INLINE string Filename:: +INLINE std::string Filename:: get_basename() const { return _filename.substr(_basename_start); } @@ -373,7 +373,7 @@ get_basename() const { * Returns the full filename--directory and basename parts--except for the * extension. */ -INLINE string Filename:: +INLINE std::string Filename:: get_fullpath_wo_extension() const { return _filename.substr(0, _basename_end); } @@ -382,9 +382,9 @@ get_fullpath_wo_extension() const { /** * Returns the basename part of the filename, without the file extension. */ -INLINE string Filename:: +INLINE std::string Filename:: get_basename_wo_extension() const { - if (_basename_end == string::npos) { + if (_basename_end == std::string::npos) { return _filename.substr(_basename_start); } else { return _filename.substr(_basename_start, _basename_end - _basename_start); @@ -396,10 +396,10 @@ get_basename_wo_extension() const { * Returns the file extension. This is everything after the rightmost dot, if * there is one, or the empty string if there is not. */ -INLINE string Filename:: +INLINE std::string Filename:: get_extension() const { - if (_extension_start == string::npos) { - return string(); + if (_extension_start == std::string::npos) { + return std::string(); } else { return _filename.substr(_extension_start); } @@ -536,7 +536,7 @@ has_hash() const { * Returns the part of the filename beginning at the hash sequence (if any), * and continuing to the end of the filename. */ -INLINE string Filename:: +INLINE std::string Filename:: get_hash_to_end() const { return _filename.substr(_hash_start); } @@ -569,24 +569,24 @@ is_fully_qualified() const { * */ INLINE bool Filename:: -operator == (const string &other) const { - return (*(string *)this) == other; +operator == (const std::string &other) const { + return (*(std::string *)this) == other; } /** * */ INLINE bool Filename:: -operator != (const string &other) const { - return (*(string *)this) != other; +operator != (const std::string &other) const { + return (*(std::string *)this) != other; } /** * */ INLINE bool Filename:: -operator < (const string &other) const { - return (*(string *)this) < other; +operator < (const std::string &other) const { + return (*(std::string *)this) < other; } /** @@ -616,7 +616,7 @@ __nonzero__() const { * */ INLINE void Filename:: -output(ostream &out) const { +output(std::ostream &out) const { out << _filename; } diff --git a/dtool/src/dtoolutil/filename.h b/dtool/src/dtoolutil/filename.h index 01297dfbee..66b38356a6 100644 --- a/dtool/src/dtoolutil/filename.h +++ b/dtool/src/dtoolutil/filename.h @@ -55,10 +55,10 @@ public: }; INLINE Filename(const char *filename); - INLINE Filename(const string &filename); - INLINE Filename(const wstring &filename); + INLINE Filename(const std::string &filename); + INLINE Filename(const std::wstring &filename); INLINE Filename(const Filename ©); - INLINE Filename(string &&filename) noexcept; + INLINE Filename(std::string &&filename) noexcept; INLINE Filename(Filename &&from) noexcept; PUBLISHED: @@ -75,22 +75,22 @@ PUBLISHED: // or binary file. This is in lieu of calling set_text() or set_binary() or // set_type(). INLINE static Filename text_filename(const Filename &filename); - INLINE static Filename text_filename(const string &filename); + INLINE static Filename text_filename(const std::string &filename); INLINE static Filename binary_filename(const Filename &filename); - INLINE static Filename binary_filename(const string &filename); - INLINE static Filename dso_filename(const string &filename); - INLINE static Filename executable_filename(const string &filename); + INLINE static Filename binary_filename(const std::string &filename); + INLINE static Filename dso_filename(const std::string &filename); + INLINE static Filename executable_filename(const std::string &filename); - INLINE static Filename pattern_filename(const string &filename); + INLINE static Filename pattern_filename(const std::string &filename); - static Filename from_os_specific(const string &os_specific, + static Filename from_os_specific(const std::string &os_specific, Type type = T_general); - static Filename from_os_specific_w(const wstring &os_specific, + static Filename from_os_specific_w(const std::wstring &os_specific, Type type = T_general); - static Filename expand_from(const string &user_string, + static Filename expand_from(const std::string &user_string, Type type = T_general); - static Filename temporary(const string &dirname, const string &prefix, - const string &suffix = string(), + static Filename temporary(const std::string &dirname, const std::string &prefix, + const std::string &suffix = std::string(), Type type = T_general); static const Filename &get_home_directory(); @@ -99,15 +99,15 @@ PUBLISHED: static const Filename &get_common_appdata_directory(); // Assignment is via the = operator. - INLINE Filename &operator = (const string &filename); - INLINE Filename &operator = (const wstring &filename); + INLINE Filename &operator = (const std::string &filename); + INLINE Filename &operator = (const std::wstring &filename); INLINE Filename &operator = (const char *filename); INLINE Filename &operator = (const Filename ©); - INLINE Filename &operator = (string &&filename) noexcept; + INLINE Filename &operator = (std::string &&filename) noexcept; INLINE Filename &operator = (Filename &&from) noexcept; // And retrieval is by any of the classic string operations. - INLINE operator const string & () const; + INLINE operator const std::string & () const; INLINE const char *c_str() const; INLINE bool empty() const; INLINE size_t length() const; @@ -116,29 +116,29 @@ PUBLISHED: EXTENSION(PyObject *__repr__() const); EXTENSION(PyObject *__fspath__() const); - INLINE string substr(size_t begin) const; - INLINE string substr(size_t begin, size_t end) const; - INLINE void operator += (const string &other); - INLINE Filename operator + (const string &other) const; + INLINE std::string substr(size_t begin) const; + INLINE std::string substr(size_t begin, size_t end) const; + INLINE void operator += (const std::string &other); + INLINE Filename operator + (const std::string &other) const; INLINE Filename operator / (const Filename &other) const; // Or, you can use any of these. - INLINE string get_fullpath() const; - INLINE wstring get_fullpath_w() const; - INLINE string get_dirname() const; - INLINE string get_basename() const; - INLINE string get_fullpath_wo_extension() const; - INLINE string get_basename_wo_extension() const; - INLINE string get_extension() const; + INLINE std::string get_fullpath() const; + INLINE std::wstring get_fullpath_w() const; + INLINE std::string get_dirname() const; + INLINE std::string get_basename() const; + INLINE std::string get_fullpath_wo_extension() const; + INLINE std::string get_basename_wo_extension() const; + INLINE std::string get_extension() const; // You can also use any of these to reassign pieces of the filename. - void set_fullpath(const string &s); - void set_dirname(const string &s); - void set_basename(const string &s); - void set_fullpath_wo_extension(const string &s); - void set_basename_wo_extension(const string &s); - void set_extension(const string &s); + void set_fullpath(const std::string &s); + void set_dirname(const std::string &s); + void set_basename(const std::string &s); + void set_fullpath_wo_extension(const std::string &s); + void set_basename_wo_extension(const std::string &s); + void set_extension(const std::string &s); // Setting these flags appropriately is helpful when opening or searching // for a file; it helps the Filename resolve OS-specific conventions (for @@ -159,8 +159,8 @@ PUBLISHED: INLINE bool has_hash() const; Filename get_filename_index(int index) const; - INLINE string get_hash_to_end() const; - void set_hash_to_end(const string &s); + INLINE std::string get_hash_to_end() const; + void set_hash_to_end(const std::string &s); void extract_components(vector_string &components) const; void standardize(); @@ -175,11 +175,11 @@ PUBLISHED: bool make_canonical(); bool make_true_case(); - string to_os_specific() const; - wstring to_os_specific_w() const; - string to_os_generic() const; - string to_os_short_name() const; - string to_os_long_name() const; + std::string to_os_specific() const; + std::wstring to_os_specific_w() const; + std::string to_os_generic() const; + std::string to_os_short_name() const; + std::string to_os_long_name() const; bool exists() const; bool is_regular_file() const; @@ -191,10 +191,10 @@ PUBLISHED: bool other_missing_is_old = true) const; time_t get_timestamp() const; time_t get_access_timestamp() const; - streamsize get_file_size() const; + std::streamsize get_file_size() const; bool resolve_filename(const DSearchPath &searchpath, - const string &default_extension = string()); + const std::string &default_extension = std::string()); bool make_relative_to(Filename directory, bool allow_backups = true); int find_on_searchpath(const DSearchPath &searchpath); @@ -228,31 +228,31 @@ PUBLISHED: bool rmdir() const; // Comparison operators are handy. - INLINE bool operator == (const string &other) const; - INLINE bool operator != (const string &other) const; - INLINE bool operator < (const string &other) const; + INLINE bool operator == (const std::string &other) const; + INLINE bool operator != (const std::string &other) const; + INLINE bool operator < (const std::string &other) const; INLINE int compare_to(const Filename &other) const; INLINE bool __nonzero__() const; int get_hash() const; - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; INLINE static void set_filesystem_encoding(TextEncoder::Encoding encoding); INLINE static TextEncoder::Encoding get_filesystem_encoding(); public: - bool atomic_compare_and_exchange_contents(string &orig_contents, const string &old_contents, const string &new_contents) const; - bool atomic_read_contents(string &contents) const; + bool atomic_compare_and_exchange_contents(std::string &orig_contents, const std::string &old_contents, const std::string &new_contents) const; + bool atomic_read_contents(std::string &contents) const; protected: void locate_basename(); void locate_extension(); void locate_hash(); - size_t get_common_prefix(const string &other) const; - static int count_slashes(const string &str); + size_t get_common_prefix(const std::string &other) const; + static int count_slashes(const std::string &str); bool r_make_canonical(const Filename &cwd); - string _filename; + std::string _filename; // We'll make these size_t instead of string::size_type to help out // cppParser. size_t _dirname_end; @@ -272,7 +272,7 @@ protected: #ifdef ANDROID public: - static string _internal_data_dir; + static std::string _internal_data_dir; #endif public: @@ -287,7 +287,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const Filename &n) { +INLINE std::ostream &operator << (std::ostream &out, const Filename &n) { n.output(out); return out; } diff --git a/dtool/src/dtoolutil/filename_assist.h b/dtool/src/dtoolutil/filename_assist.h index ff1c91402c..ad4f08ef1d 100644 --- a/dtool/src/dtoolutil/filename_assist.h +++ b/dtool/src/dtoolutil/filename_assist.h @@ -20,10 +20,10 @@ #ifdef IS_OSX -string get_osx_home_directory(); -string get_osx_temp_directory(); -string get_osx_user_appdata_directory(); -string get_osx_common_appdata_directory(); +std::string get_osx_home_directory(); +std::string get_osx_temp_directory(); +std::string get_osx_user_appdata_directory(); +std::string get_osx_common_appdata_directory(); #endif // IS_OSX diff --git a/dtool/src/dtoolutil/globPattern.I b/dtool/src/dtoolutil/globPattern.I index c5d48d4d28..f0ab3a6c0e 100644 --- a/dtool/src/dtoolutil/globPattern.I +++ b/dtool/src/dtoolutil/globPattern.I @@ -15,7 +15,7 @@ * */ INLINE GlobPattern:: -GlobPattern(const string &pattern) : _pattern(pattern) { +GlobPattern(const std::string &pattern) : _pattern(pattern) { _case_sensitive = true; } @@ -69,14 +69,14 @@ operator < (const GlobPattern &other) const { * Changes the pattern string that the GlobPattern object matches. */ INLINE void GlobPattern:: -set_pattern(const string &pattern) { +set_pattern(const std::string &pattern) { _pattern = pattern; } /** * Returns the pattern string that the GlobPattern object matches. */ -INLINE const string &GlobPattern:: +INLINE const std::string &GlobPattern:: get_pattern() const { return _pattern; } @@ -103,14 +103,14 @@ get_case_sensitive() const { * Specifies a set of characters that are not matched by * or ?. */ INLINE void GlobPattern:: -set_nomatch_chars(const string &nomatch_chars) { +set_nomatch_chars(const std::string &nomatch_chars) { _nomatch_chars = nomatch_chars; } /** * Returns the set of characters that are not matched by * or ?. */ -INLINE const string &GlobPattern:: +INLINE const std::string &GlobPattern:: get_nomatch_chars() const { return _nomatch_chars; } @@ -119,7 +119,7 @@ get_nomatch_chars() const { * Returns true if the candidate string matches the pattern, false otherwise. */ INLINE bool GlobPattern:: -matches(const string &candidate) const { +matches(const std::string &candidate) const { return matches_substr(_pattern.begin(), _pattern.end(), candidate.begin(), candidate.end()); } @@ -128,6 +128,6 @@ matches(const string &candidate) const { * */ INLINE void GlobPattern:: -output(ostream &out) const { +output(std::ostream &out) const { out << _pattern; } diff --git a/dtool/src/dtoolutil/globPattern.h b/dtool/src/dtoolutil/globPattern.h index 015bde38f9..27dfb67777 100644 --- a/dtool/src/dtoolutil/globPattern.h +++ b/dtool/src/dtoolutil/globPattern.h @@ -31,7 +31,7 @@ */ class EXPCL_DTOOL_DTOOLUTIL GlobPattern { PUBLISHED: - INLINE GlobPattern(const string &pattern = string()); + INLINE GlobPattern(const std::string &pattern = std::string()); INLINE GlobPattern(const GlobPattern ©); INLINE void operator = (const GlobPattern ©); @@ -39,48 +39,48 @@ PUBLISHED: INLINE bool operator != (const GlobPattern &other) const; INLINE bool operator < (const GlobPattern &other) const; - INLINE void set_pattern(const string &pattern); - INLINE const string &get_pattern() const; + INLINE void set_pattern(const std::string &pattern); + INLINE const std::string &get_pattern() const; MAKE_PROPERTY(pattern, get_pattern, set_pattern); INLINE void set_case_sensitive(bool case_sensitive); INLINE bool get_case_sensitive() const; MAKE_PROPERTY(case_sensitive, get_case_sensitive, set_case_sensitive); - INLINE void set_nomatch_chars(const string &nomatch_chars); - INLINE const string &get_nomatch_chars() const; + INLINE void set_nomatch_chars(const std::string &nomatch_chars); + INLINE const std::string &get_nomatch_chars() const; MAKE_PROPERTY(nomatch_chars, get_nomatch_chars, set_nomatch_chars); - INLINE bool matches(const string &candidate) const; + INLINE bool matches(const std::string &candidate) const; - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; bool has_glob_characters() const; - string get_const_prefix() const; + std::string get_const_prefix() const; int match_files(vector_string &results, const Filename &cwd = Filename()) const; #ifdef HAVE_PYTHON EXTENSION(PyObject *match_files(const Filename &cwd = Filename()) const); #endif private: - bool matches_substr(string::const_iterator pi, - string::const_iterator pend, - string::const_iterator ci, - string::const_iterator cend) const; + bool matches_substr(std::string::const_iterator pi, + std::string::const_iterator pend, + std::string::const_iterator ci, + std::string::const_iterator cend) const; - bool matches_set(string::const_iterator &pi, - string::const_iterator pend, + bool matches_set(std::string::const_iterator &pi, + std::string::const_iterator pend, char ch) const; - int r_match_files(const Filename &prefix, const string &suffix, + int r_match_files(const Filename &prefix, const std::string &suffix, vector_string &results, const Filename &cwd); - string _pattern; + std::string _pattern; bool _case_sensitive; - string _nomatch_chars; + std::string _nomatch_chars; }; -INLINE ostream &operator << (ostream &out, const GlobPattern &glob) { +INLINE std::ostream &operator << (std::ostream &out, const GlobPattern &glob) { glob.output(out); return out; } diff --git a/dtool/src/dtoolutil/lineStream.I b/dtool/src/dtoolutil/lineStream.I index 67cab26cbe..8fcc880426 100644 --- a/dtool/src/dtoolutil/lineStream.I +++ b/dtool/src/dtoolutil/lineStream.I @@ -15,7 +15,7 @@ * */ INLINE LineStream:: -LineStream() : ostream(&_lsb) { +LineStream() : std::ostream(&_lsb) { } /** @@ -34,7 +34,7 @@ is_text_available() const { * has_newline() to determine whether or not there was an explicit newline * character written following this line. */ -INLINE string LineStream:: +INLINE std::string LineStream:: get_line() { return _lsb.get_line(); } diff --git a/dtool/src/dtoolutil/lineStream.h b/dtool/src/dtoolutil/lineStream.h index 7f9f5eff4a..845e6496ea 100644 --- a/dtool/src/dtoolutil/lineStream.h +++ b/dtool/src/dtoolutil/lineStream.h @@ -28,7 +28,7 @@ * otherwise affected when a line of text is extracted. More text can still * be written to it and continuously extracted. */ -class EXPCL_DTOOL_DTOOLUTIL LineStream : public ostream { +class EXPCL_DTOOL_DTOOLUTIL LineStream : public std::ostream { PUBLISHED: INLINE LineStream(); @@ -37,7 +37,7 @@ PUBLISHED: #endif INLINE bool is_text_available() const; - INLINE string get_line(); + INLINE std::string get_line(); INLINE bool has_newline() const; private: diff --git a/dtool/src/dtoolutil/lineStreamBuf.I b/dtool/src/dtoolutil/lineStreamBuf.I index 339248d2dd..2623afe787 100644 --- a/dtool/src/dtoolutil/lineStreamBuf.I +++ b/dtool/src/dtoolutil/lineStreamBuf.I @@ -34,6 +34,6 @@ has_newline() const { INLINE void LineStreamBuf:: write_chars(const char *start, size_t length) { if (length > 0) { - _data += string(start, length); + _data += std::string(start, length); } } diff --git a/dtool/src/dtoolutil/lineStreamBuf.h b/dtool/src/dtoolutil/lineStreamBuf.h index 7718371a03..967d3f1636 100644 --- a/dtool/src/dtoolutil/lineStreamBuf.h +++ b/dtool/src/dtoolutil/lineStreamBuf.h @@ -23,13 +23,13 @@ * whose contents can be continuously extracted as a sequence of lines of * text. */ -class EXPCL_DTOOL_DTOOLUTIL LineStreamBuf : public streambuf { +class EXPCL_DTOOL_DTOOLUTIL LineStreamBuf : public std::streambuf { public: LineStreamBuf(); virtual ~LineStreamBuf(); INLINE bool is_text_available() const; - string get_line(); + std::string get_line(); INLINE bool has_newline() const; protected: @@ -39,7 +39,7 @@ protected: private: INLINE void write_chars(const char *start, size_t length); - string _data; + std::string _data; bool _has_newline; }; diff --git a/dtool/src/dtoolutil/load_dso.h b/dtool/src/dtoolutil/load_dso.h index 2c0a5d9d24..40d00e579a 100644 --- a/dtool/src/dtoolutil/load_dso.h +++ b/dtool/src/dtoolutil/load_dso.h @@ -31,11 +31,11 @@ unload_dso(void *dso_handle); // Returns the error message from the last failed load_dso() call. -EXPCL_DTOOL_DTOOLUTIL string +EXPCL_DTOOL_DTOOLUTIL std::string load_dso_error(); // Returns a function pointer or other symbol from a loaded library. EXPCL_DTOOL_DTOOLUTIL void * -get_dso_symbol(void *handle, const string &name); +get_dso_symbol(void *handle, const std::string &name); #endif diff --git a/dtool/src/dtoolutil/pandaFileStream.I b/dtool/src/dtoolutil/pandaFileStream.I index a30a5fdcc0..7ee64e9b4e 100644 --- a/dtool/src/dtoolutil/pandaFileStream.I +++ b/dtool/src/dtoolutil/pandaFileStream.I @@ -15,14 +15,14 @@ * */ INLINE IFileStream:: -IFileStream() : istream(&_buf) { +IFileStream() : std::istream(&_buf) { } /** * */ INLINE IFileStream:: -IFileStream(const char *filename, ios::openmode mode) : istream(&_buf) { +IFileStream(const char *filename, std::ios::openmode mode) : std::istream(&_buf) { open(filename, mode); } @@ -38,11 +38,11 @@ INLINE IFileStream:: * */ INLINE void IFileStream:: -open(const char *filename, ios::openmode mode) { +open(const char *filename, std::ios::openmode mode) { clear((ios_iostate)0); _buf.open(filename, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } @@ -55,11 +55,11 @@ open(const char *filename, ios::openmode mode) { * This function is the Windows-specific variant. */ void IFileStream:: -attach(const char *filename, HANDLE handle, ios::openmode mode) { +attach(const char *filename, HANDLE handle, std::ios::openmode mode) { clear((ios_iostate)0); _buf.attach(filename, handle, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } #endif // _WIN32 @@ -73,11 +73,11 @@ attach(const char *filename, HANDLE handle, ios::openmode mode) { * This function is the Posix-specific variant. */ void IFileStream:: -attach(const char *filename, int fd, ios::openmode mode) { +attach(const char *filename, int fd, std::ios::openmode mode) { clear((ios_iostate)0); _buf.attach(filename, fd, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } #endif // _WIN32 @@ -94,14 +94,14 @@ close() { * */ INLINE OFileStream:: -OFileStream() : ostream(&_buf) { +OFileStream() : std::ostream(&_buf) { } /** * */ INLINE OFileStream:: -OFileStream(const char *filename, ios::openmode mode) : ostream(&_buf) { +OFileStream(const char *filename, std::ios::openmode mode) : std::ostream(&_buf) { open(filename, mode); } @@ -117,11 +117,11 @@ INLINE OFileStream:: * */ INLINE void OFileStream:: -open(const char *filename, ios::openmode mode) { +open(const char *filename, std::ios::openmode mode) { clear((ios_iostate)0); _buf.open(filename, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } @@ -134,11 +134,11 @@ open(const char *filename, ios::openmode mode) { * This function is the Windows-specific variant. */ void OFileStream:: -attach(const char *filename, HANDLE handle, ios::openmode mode) { +attach(const char *filename, HANDLE handle, std::ios::openmode mode) { clear((ios_iostate)0); _buf.attach(filename, handle, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } #endif // _WIN32 @@ -152,11 +152,11 @@ attach(const char *filename, HANDLE handle, ios::openmode mode) { * This function is the Posix-specific variant. */ void OFileStream:: -attach(const char *filename, int fd, ios::openmode mode) { +attach(const char *filename, int fd, std::ios::openmode mode) { clear((ios_iostate)0); _buf.attach(filename, fd, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } #endif // _WIN32 @@ -173,14 +173,14 @@ close() { * */ INLINE FileStream:: -FileStream() : iostream(&_buf) { +FileStream() : std::iostream(&_buf) { } /** * */ INLINE FileStream:: -FileStream(const char *filename, ios::openmode mode) : iostream(&_buf) { +FileStream(const char *filename, std::ios::openmode mode) : std::iostream(&_buf) { open(filename, mode); } @@ -196,11 +196,11 @@ INLINE FileStream:: * */ INLINE void FileStream:: -open(const char *filename, ios::openmode mode) { +open(const char *filename, std::ios::openmode mode) { clear((ios_iostate)0); _buf.open(filename, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } @@ -213,11 +213,11 @@ open(const char *filename, ios::openmode mode) { * This function is the Windows-specific variant. */ void FileStream:: -attach(const char *filename, HANDLE handle, ios::openmode mode) { +attach(const char *filename, HANDLE handle, std::ios::openmode mode) { clear((ios_iostate)0); _buf.attach(filename, handle, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } #endif // _WIN32 @@ -231,11 +231,11 @@ attach(const char *filename, HANDLE handle, ios::openmode mode) { * This function is the Posix-specific variant. */ void FileStream:: -attach(const char *filename, int fd, ios::openmode mode) { +attach(const char *filename, int fd, std::ios::openmode mode) { clear((ios_iostate)0); _buf.attach(filename, fd, mode); if (!_buf.is_open()) { - clear(ios::failbit); + clear(std::ios::failbit); } } #endif // _WIN32 diff --git a/dtool/src/dtoolutil/pandaFileStream.h b/dtool/src/dtoolutil/pandaFileStream.h index 462e3ce160..4d565f8ac2 100644 --- a/dtool/src/dtoolutil/pandaFileStream.h +++ b/dtool/src/dtoolutil/pandaFileStream.h @@ -26,19 +26,19 @@ * simple-threading implementation (using this interface will block only the * current thread, rather than the entire process, on I/O waits). */ -class EXPCL_DTOOL_DTOOLUTIL IFileStream : public istream { +class EXPCL_DTOOL_DTOOLUTIL IFileStream : public std::istream { PUBLISHED: INLINE IFileStream(); - INLINE explicit IFileStream(const char *filename, ios::openmode mode = ios::in); + INLINE explicit IFileStream(const char *filename, std::ios::openmode mode = std::ios::in); INLINE ~IFileStream(); - INLINE void open(const char *filename, ios::openmode mode = ios::in); + INLINE void open(const char *filename, std::ios::openmode mode = std::ios::in); public: #ifdef _WIN32 - INLINE void attach(const char *filename, HANDLE handle, ios::openmode mode = ios::in); + INLINE void attach(const char *filename, HANDLE handle, std::ios::openmode mode = std::ios::in); #else - INLINE void attach(const char *filename, int fd, ios::openmode mode = ios::in); + INLINE void attach(const char *filename, int fd, std::ios::openmode mode = std::ios::in); #endif PUBLISHED: @@ -54,19 +54,19 @@ private: * simple-threading implementation (using this interface will block only the * current thread, rather than the entire process, on I/O waits). */ -class EXPCL_DTOOL_DTOOLUTIL OFileStream : public ostream { +class EXPCL_DTOOL_DTOOLUTIL OFileStream : public std::ostream { PUBLISHED: INLINE OFileStream(); - INLINE explicit OFileStream(const char *filename, ios::openmode mode = ios::out); + INLINE explicit OFileStream(const char *filename, std::ios::openmode mode = std::ios::out); INLINE ~OFileStream(); - INLINE void open(const char *filename, ios::openmode mode = ios::out); + INLINE void open(const char *filename, std::ios::openmode mode = std::ios::out); public: #ifdef _WIN32 - INLINE void attach(const char *filename, HANDLE handle, ios::openmode mode = ios::out); + INLINE void attach(const char *filename, HANDLE handle, std::ios::openmode mode = std::ios::out); #else - INLINE void attach(const char *filename, int fd, ios::openmode mode = ios::out); + INLINE void attach(const char *filename, int fd, std::ios::openmode mode = std::ios::out); #endif PUBLISHED: @@ -83,19 +83,19 @@ private: * will block only the current thread, rather than the entire process, on I/O * waits). */ -class EXPCL_DTOOL_DTOOLUTIL FileStream : public iostream { +class EXPCL_DTOOL_DTOOLUTIL FileStream : public std::iostream { PUBLISHED: INLINE FileStream(); - INLINE explicit FileStream(const char *filename, ios::openmode mode = ios::in); + INLINE explicit FileStream(const char *filename, std::ios::openmode mode = std::ios::in); INLINE ~FileStream(); - INLINE void open(const char *filename, ios::openmode mode = ios::in); + INLINE void open(const char *filename, std::ios::openmode mode = std::ios::in); public: #ifdef _WIN32 - INLINE void attach(const char *filename, HANDLE handle, ios::openmode mode); + INLINE void attach(const char *filename, HANDLE handle, std::ios::openmode mode); #else - INLINE void attach(const char *filename, int fd, ios::openmode mode); + INLINE void attach(const char *filename, int fd, std::ios::openmode mode); #endif PUBLISHED: diff --git a/dtool/src/dtoolutil/pandaFileStreamBuf.h b/dtool/src/dtoolutil/pandaFileStreamBuf.h index 9ab6f84082..623aec6521 100644 --- a/dtool/src/dtoolutil/pandaFileStreamBuf.h +++ b/dtool/src/dtoolutil/pandaFileStreamBuf.h @@ -28,16 +28,16 @@ /** * The streambuf object that implements pifstream and pofstream. */ -class EXPCL_DTOOL_DTOOLUTIL PandaFileStreamBuf : public streambuf { +class EXPCL_DTOOL_DTOOLUTIL PandaFileStreamBuf : public std::streambuf { public: PandaFileStreamBuf(); virtual ~PandaFileStreamBuf(); - void open(const char *filename, ios::openmode mode); + void open(const char *filename, std::ios::openmode mode); #ifdef _WIN32 - void attach(const char *filename, HANDLE handle, ios::openmode mode); + void attach(const char *filename, HANDLE handle, std::ios::openmode mode); #else - void attach(const char *filename, int fd, ios::openmode mode); + void attach(const char *filename, int fd, std::ios::openmode mode); #endif bool is_open() const; @@ -53,8 +53,8 @@ public: static NewlineMode _newline_mode; protected: - virtual streampos seekoff(streamoff off, ios_seekdir dir, ios_openmode which); - virtual streampos seekpos(streampos pos, ios_openmode which); + virtual std::streampos seekoff(std::streamoff off, ios_seekdir dir, ios_openmode which); + virtual std::streampos seekpos(std::streampos pos, ios_openmode which); virtual int overflow(int c); virtual int sync(); @@ -78,9 +78,9 @@ private: const char *source, size_t source_length); private: - string _filename; + std::string _filename; bool _is_open; - ios::openmode _open_mode; + std::ios::openmode _open_mode; char _last_read_nl; @@ -91,15 +91,15 @@ private: #endif // _WIN32 char *_buffer; - streampos _ppos; - streampos _gpos; + std::streampos _ppos; + std::streampos _gpos; }; -EXPCL_DTOOL_DTOOLUTIL ostream & -operator << (ostream &out, PandaFileStreamBuf::NewlineMode newline_mode); +EXPCL_DTOOL_DTOOLUTIL std::ostream & +operator << (std::ostream &out, PandaFileStreamBuf::NewlineMode newline_mode); -EXPCL_DTOOL_DTOOLUTIL istream & -operator >> (istream &in, PandaFileStreamBuf::NewlineMode &newline_mode); +EXPCL_DTOOL_DTOOLUTIL std::istream & +operator >> (std::istream &in, PandaFileStreamBuf::NewlineMode &newline_mode); #endif // USE_PANDAFILESTREAM diff --git a/dtool/src/dtoolutil/pandaSystem.h b/dtool/src/dtoolutil/pandaSystem.h index c5adae4898..712b61e834 100644 --- a/dtool/src/dtoolutil/pandaSystem.h +++ b/dtool/src/dtoolutil/pandaSystem.h @@ -29,10 +29,10 @@ protected: ~PandaSystem(); PUBLISHED: - static string get_version_string(); - static string get_package_version_string(); - static string get_package_host_url(); - static string get_p3d_coreapi_version_string(); + static std::string get_version_string(); + static std::string get_package_version_string(); + static std::string get_package_host_url(); + static std::string get_p3d_coreapi_version_string(); static int get_major_version(); static int get_minor_version(); @@ -41,12 +41,12 @@ PUBLISHED: static int get_memory_alignment(); - static string get_distributor(); - static string get_compiler(); - static string get_build_date(); - static string get_git_commit(); + static std::string get_distributor(); + static std::string get_compiler(); + static std::string get_build_date(); + static std::string get_git_commit(); - static string get_platform(); + static std::string get_platform(); MAKE_PROPERTY(version_string, get_version_string); MAKE_PROPERTY(major_version, get_major_version); @@ -63,41 +63,41 @@ PUBLISHED: MAKE_PROPERTY(platform, get_platform); - bool has_system(const string &system) const; + bool has_system(const std::string &system) const; size_t get_num_systems() const; - string get_system(size_t n) const; + std::string get_system(size_t n) const; MAKE_SEQ(get_systems, get_num_systems, get_system); MAKE_SEQ_PROPERTY(systems, get_num_systems, get_system); - string get_system_tag(const string &system, const string &tag) const; + std::string get_system_tag(const std::string &system, const std::string &tag) const; - void add_system(const string &system); - void set_system_tag(const string &system, const string &tag, - const string &value); + void add_system(const std::string &system); + void set_system_tag(const std::string &system, const std::string &tag, + const std::string &value); bool heap_trim(size_t pad); - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; static PandaSystem *get_global_ptr(); private: void reset_system_names(); - void set_package_version_string(const string &package_version_string); - void set_package_host_url(const string &package_host_url); + void set_package_version_string(const std::string &package_version_string); + void set_package_host_url(const std::string &package_host_url); - typedef pmap SystemTags; - typedef pmap Systems; - typedef pvector SystemNames; + typedef pmap SystemTags; + typedef pmap Systems; + typedef pvector SystemNames; Systems _systems; SystemNames _system_names; bool _system_names_dirty; - string _package_version_string; - string _package_host_url; + std::string _package_version_string; + std::string _package_host_url; static PandaSystem *_global_ptr; @@ -115,7 +115,7 @@ private: friend class ConfigPageManager; }; -inline ostream &operator << (ostream &out, const PandaSystem &ps) { +inline std::ostream &operator << (std::ostream &out, const PandaSystem &ps) { ps.output(out); return out; } diff --git a/dtool/src/dtoolutil/pfstream.I b/dtool/src/dtoolutil/pfstream.I index c72a433453..4941f29ca2 100644 --- a/dtool/src/dtoolutil/pfstream.I +++ b/dtool/src/dtoolutil/pfstream.I @@ -12,7 +12,7 @@ */ INLINE IPipeStream::IPipeStream(const std::string cmd) - : istream(&_psb), _psb(PipeStreamBuf::Input) { + : std::istream(&_psb), _psb(PipeStreamBuf::Input) { _psb.command(cmd); } @@ -21,12 +21,12 @@ INLINE void IPipeStream::flush(void) { } INLINE IPipeStream::IPipeStream(void) - : istream(&_psb), _psb(PipeStreamBuf::Input) { - cerr << "should never call default constructor of IPipeStream" << endl; + : std::istream(&_psb), _psb(PipeStreamBuf::Input) { + std::cerr << "should never call default constructor of IPipeStream" << std::endl; } INLINE OPipeStream::OPipeStream(const std::string cmd) - : ostream(&_psb), _psb(PipeStreamBuf::Output) { + : std::ostream(&_psb), _psb(PipeStreamBuf::Output) { _psb.command(cmd); } @@ -35,6 +35,6 @@ INLINE void OPipeStream::flush(void) { } INLINE OPipeStream::OPipeStream(void) - : ostream(&_psb), _psb(PipeStreamBuf::Output) { - cerr << "should never call default constructor of OPipeStream" << endl; + : std::ostream(&_psb), _psb(PipeStreamBuf::Output) { + std::cerr << "should never call default constructor of OPipeStream" << std::endl; } diff --git a/dtool/src/dtoolutil/pfstream.h b/dtool/src/dtoolutil/pfstream.h index 6beccc16ca..e296655337 100644 --- a/dtool/src/dtoolutil/pfstream.h +++ b/dtool/src/dtoolutil/pfstream.h @@ -16,7 +16,7 @@ #include "pfstreamBuf.h" -class EXPCL_DTOOL_DTOOLUTIL IPipeStream : public istream { +class EXPCL_DTOOL_DTOOLUTIL IPipeStream : public std::istream { public: INLINE IPipeStream(const std::string); @@ -32,7 +32,7 @@ private: INLINE IPipeStream(); }; -class EXPCL_DTOOL_DTOOLUTIL OPipeStream : public ostream { +class EXPCL_DTOOL_DTOOLUTIL OPipeStream : public std::ostream { public: INLINE OPipeStream(const std::string); diff --git a/dtool/src/dtoolutil/pfstreamBuf.h b/dtool/src/dtoolutil/pfstreamBuf.h index ad0c132f0f..50875b2179 100644 --- a/dtool/src/dtoolutil/pfstreamBuf.h +++ b/dtool/src/dtoolutil/pfstreamBuf.h @@ -41,7 +41,7 @@ #endif // WIN_PIPE_CALLS -class EXPCL_DTOOL_DTOOLUTIL PipeStreamBuf : public streambuf { +class EXPCL_DTOOL_DTOOLUTIL PipeStreamBuf : public std::streambuf { public: enum Direction { Input, Output }; @@ -49,7 +49,7 @@ public: virtual ~PipeStreamBuf(void); void flush(); - void command(const string); + void command(const std::string); protected: virtual int overflow(int c); @@ -59,13 +59,13 @@ private: void init_pipe(); bool is_open() const; bool eof_pipe() const; - bool open_pipe(const string &cmd); + bool open_pipe(const std::string &cmd); void close_pipe(); size_t write_pipe(const char *data, size_t len); size_t read_pipe(char *data, size_t len); Direction _dir; - string _line_buffer; + std::string _line_buffer; #ifndef WIN_PIPE_CALLS FILE *_pipe; diff --git a/dtool/src/dtoolutil/stringDecoder.I b/dtool/src/dtoolutil/stringDecoder.I index 8ac51f52c6..f7a3b14701 100644 --- a/dtool/src/dtoolutil/stringDecoder.I +++ b/dtool/src/dtoolutil/stringDecoder.I @@ -15,7 +15,7 @@ * */ INLINE StringDecoder:: -StringDecoder(const string &input) : _input(input) { +StringDecoder(const std::string &input) : _input(input) { _p = 0; _eof = false; } @@ -46,12 +46,12 @@ test_eof() { * */ INLINE StringUtf8Decoder:: -StringUtf8Decoder(const string &input) : StringDecoder(input) { +StringUtf8Decoder(const std::string &input) : StringDecoder(input) { } /** * */ INLINE StringUnicodeDecoder:: -StringUnicodeDecoder(const string &input) : StringDecoder(input) { +StringUnicodeDecoder(const std::string &input) : StringDecoder(input) { } diff --git a/dtool/src/dtoolutil/stringDecoder.h b/dtool/src/dtoolutil/stringDecoder.h index 62c97cbe9e..c0b2534ee2 100644 --- a/dtool/src/dtoolutil/stringDecoder.h +++ b/dtool/src/dtoolutil/stringDecoder.h @@ -23,22 +23,22 @@ */ class EXPCL_DTOOL_DTOOLUTIL StringDecoder { public: - INLINE StringDecoder(const string &input); + INLINE StringDecoder(const std::string &input); virtual ~StringDecoder(); virtual int get_next_character(); INLINE bool is_eof(); - static void set_notify_ptr(ostream *ptr); - static ostream *get_notify_ptr(); + static void set_notify_ptr(std::ostream *ptr); + static std::ostream *get_notify_ptr(); protected: INLINE bool test_eof(); - string _input; + std::string _input; size_t _p; bool _eof; - static ostream *_notify_ptr; + static std::ostream *_notify_ptr; }; /** @@ -46,7 +46,7 @@ protected: */ class StringUtf8Decoder : public StringDecoder { public: - INLINE StringUtf8Decoder(const string &input); + INLINE StringUtf8Decoder(const std::string &input); virtual int get_next_character(); }; @@ -57,7 +57,7 @@ public: */ class StringUnicodeDecoder : public StringDecoder { public: - INLINE StringUnicodeDecoder(const string &input); + INLINE StringUnicodeDecoder(const std::string &input); virtual int get_next_character(); }; diff --git a/dtool/src/dtoolutil/string_utils.I b/dtool/src/dtoolutil/string_utils.I index f7878c3ba8..1861e86ffa 100644 --- a/dtool/src/dtoolutil/string_utils.I +++ b/dtool/src/dtoolutil/string_utils.I @@ -12,38 +12,38 @@ */ template -INLINE string +INLINE std::string format_string(const Thing &thing) { - ostringstream str; + std::ostringstream str; str << thing; return str.str(); } -INLINE string -format_string(const string &value) { +INLINE std::string +format_string(const std::string &value) { return value; } -INLINE string +INLINE std::string format_string(bool value) { - return string(value ? "true" : "false"); + return std::string(value ? "true" : "false"); } -INLINE string +INLINE std::string format_string(float value) { char buffer[32]; pdtoa((double)value, buffer); - return string(buffer); + return std::string(buffer); } -INLINE string +INLINE std::string format_string(double value) { char buffer[32]; pdtoa(value, buffer); - return string(buffer); + return std::string(buffer); } -INLINE string +INLINE std::string format_string(unsigned int value) { char buffer[11]; char *p = buffer + 10; @@ -53,10 +53,10 @@ format_string(unsigned int value) { value /= 10; } while (value > 0); - return string(p); + return std::string(p); } -INLINE string +INLINE std::string format_string(int value) { char buffer[12]; char *p = buffer + 11; @@ -76,10 +76,10 @@ format_string(int value) { } while (value > 0); } - return string(p); + return std::string(p); } -INLINE string +INLINE std::string format_string(int64_t value) { char buffer[21]; char *p = buffer + 20; @@ -99,5 +99,5 @@ format_string(int64_t value) { } while (value > 0); } - return string(p); + return std::string(p); } diff --git a/dtool/src/dtoolutil/string_utils.h b/dtool/src/dtoolutil/string_utils.h index 37f7679efe..01f7616fa9 100644 --- a/dtool/src/dtoolutil/string_utils.h +++ b/dtool/src/dtoolutil/string_utils.h @@ -22,58 +22,58 @@ // Case-insensitive string comparison, from Stroustrup's C++ third edition. // Works like strcmp(). -EXPCL_DTOOL_DTOOLUTIL int cmp_nocase(const string &s, const string &s2); +EXPCL_DTOOL_DTOOLUTIL int cmp_nocase(const std::string &s, const std::string &s2); // Similar, except it also accepts hyphen and underscore as equivalent. -EXPCL_DTOOL_DTOOLUTIL int cmp_nocase_uh(const string &s, const string &s2); +EXPCL_DTOOL_DTOOLUTIL int cmp_nocase_uh(const std::string &s, const std::string &s2); // Returns the string converted to lowercase. -EXPCL_DTOOL_DTOOLUTIL string downcase(const string &s); +EXPCL_DTOOL_DTOOLUTIL std::string downcase(const std::string &s); // Returns the string converted to uppercase. -EXPCL_DTOOL_DTOOLUTIL string upcase(const string &s); +EXPCL_DTOOL_DTOOLUTIL std::string upcase(const std::string &s); // Separates the string into words according to whitespace. -EXPCL_DTOOL_DTOOLUTIL int extract_words(const string &str, vector_string &words); -EXPCL_DTOOL_DTOOLUTIL int extract_words(const wstring &str, pvector &words); +EXPCL_DTOOL_DTOOLUTIL int extract_words(const std::string &str, vector_string &words); +EXPCL_DTOOL_DTOOLUTIL int extract_words(const std::wstring &str, pvector &words); // Separates the string into words according to the indicated delimiters. -EXPCL_DTOOL_DTOOLUTIL void tokenize(const string &str, vector_string &words, - const string &delimiters, +EXPCL_DTOOL_DTOOLUTIL void tokenize(const std::string &str, vector_string &words, + const std::string &delimiters, bool discard_repeated_delimiters = false); -EXPCL_DTOOL_DTOOLUTIL void tokenize(const wstring &str, pvector &words, - const wstring &delimiters, +EXPCL_DTOOL_DTOOLUTIL void tokenize(const std::wstring &str, pvector &words, + const std::wstring &delimiters, bool discard_repeated_delimiters = false); // Trims leading andor trailing whitespace from the string. -EXPCL_DTOOL_DTOOLUTIL string trim_left(const string &str); -EXPCL_DTOOL_DTOOLUTIL wstring trim_left(const wstring &str); -EXPCL_DTOOL_DTOOLUTIL string trim_right(const string &str); -EXPCL_DTOOL_DTOOLUTIL wstring trim_right(const wstring &str); -EXPCL_DTOOL_DTOOLUTIL string trim(const string &str); -EXPCL_DTOOL_DTOOLUTIL wstring trim(const wstring &str); +EXPCL_DTOOL_DTOOLUTIL std::string trim_left(const std::string &str); +EXPCL_DTOOL_DTOOLUTIL std::wstring trim_left(const std::wstring &str); +EXPCL_DTOOL_DTOOLUTIL std::string trim_right(const std::string &str); +EXPCL_DTOOL_DTOOLUTIL std::wstring trim_right(const std::wstring &str); +EXPCL_DTOOL_DTOOLUTIL std::string trim(const std::string &str); +EXPCL_DTOOL_DTOOLUTIL std::wstring trim(const std::wstring &str); // Functions to parse numeric values out of a string. -EXPCL_DTOOL_DTOOLUTIL int string_to_int(const string &str, string &tail); -EXPCL_DTOOL_DTOOLUTIL bool string_to_int(const string &str, int &result); -EXPCL_DTOOL_DTOOLUTIL double string_to_double(const string &str, string &tail); -EXPCL_DTOOL_DTOOLUTIL bool string_to_double(const string &str, double &result); -EXPCL_DTOOL_DTOOLUTIL bool string_to_float(const string &str, float &result); -EXPCL_DTOOL_DTOOLUTIL bool string_to_stdfloat(const string &str, PN_stdfloat &result); +EXPCL_DTOOL_DTOOLUTIL int string_to_int(const std::string &str, std::string &tail); +EXPCL_DTOOL_DTOOLUTIL bool string_to_int(const std::string &str, int &result); +EXPCL_DTOOL_DTOOLUTIL double string_to_double(const std::string &str, std::string &tail); +EXPCL_DTOOL_DTOOLUTIL bool string_to_double(const std::string &str, double &result); +EXPCL_DTOOL_DTOOLUTIL bool string_to_float(const std::string &str, float &result); +EXPCL_DTOOL_DTOOLUTIL bool string_to_stdfloat(const std::string &str, PN_stdfloat &result); // Convenience function to make a string from anything that has an ostream // operator. template -INLINE string format_string(const Thing &thing); +INLINE std::string format_string(const Thing &thing); // Fast specializations for some primitive types. -INLINE string format_string(const string &value); -INLINE string format_string(bool value); -INLINE string format_string(float value); -INLINE string format_string(double value); -INLINE string format_string(unsigned int value); -INLINE string format_string(int value); -INLINE string format_string(int64_t value); +INLINE std::string format_string(const std::string &value); +INLINE std::string format_string(bool value); +INLINE std::string format_string(float value); +INLINE std::string format_string(double value); +INLINE std::string format_string(unsigned int value); +INLINE std::string format_string(int value); +INLINE std::string format_string(int64_t value); #include "string_utils.I" diff --git a/dtool/src/dtoolutil/textEncoder.I b/dtool/src/dtoolutil/textEncoder.I index c46c03c0de..e07f489ab0 100644 --- a/dtool/src/dtoolutil/textEncoder.I +++ b/dtool/src/dtoolutil/textEncoder.I @@ -86,7 +86,7 @@ get_default_encoding() { * decoded version of the string. */ INLINE void TextEncoder:: -set_text(const string &text) { +set_text(const std::string &text) { if (!has_text() || _text != text) { _text = text; _flags = (_flags | F_got_text) & ~F_got_wtext; @@ -100,7 +100,7 @@ set_text(const string &text) { * whichever encoding is specified by set_encoding(). */ INLINE void TextEncoder:: -set_text(const string &text, TextEncoder::Encoding encoding) { +set_text(const std::string &text, TextEncoder::Encoding encoding) { set_wtext(decode_text(text, encoding)); } @@ -109,8 +109,8 @@ set_text(const string &text, TextEncoder::Encoding encoding) { */ INLINE void TextEncoder:: clear_text() { - _text = string(); - _wtext = wstring(); + _text = std::string(); + _wtext = std::wstring(); _flags |= (F_got_text | F_got_wtext); } @@ -129,7 +129,7 @@ has_text() const { /** * Returns the current text, as encoded via the current encoding system. */ -INLINE string TextEncoder:: +INLINE std::string TextEncoder:: get_text() const { if ((_flags & F_got_text) == 0) { ((TextEncoder *)this)->_text = encode_wtext(_wtext); @@ -141,7 +141,7 @@ get_text() const { /** * Returns the current text, as encoded via the indicated encoding system. */ -INLINE string TextEncoder:: +INLINE std::string TextEncoder:: get_text(TextEncoder::Encoding encoding) const { return encode_wtext(get_wtext(), encoding); } @@ -150,7 +150,7 @@ get_text(TextEncoder::Encoding encoding) const { * Appends the indicates string to the end of the stored text. */ INLINE void TextEncoder:: -append_text(const string &text) { +append_text(const std::string &text) { _text = get_text() + text; _flags = (_flags | F_got_text) & ~F_got_wtext; } @@ -161,7 +161,7 @@ append_text(const string &text) { */ INLINE void TextEncoder:: append_unicode_char(int character) { - _wtext = get_wtext() + wstring(1, (wchar_t)character); + _wtext = get_wtext() + std::wstring(1, (wchar_t)character); _flags = (_flags | F_got_wtext) & ~F_got_text; } @@ -207,7 +207,7 @@ set_unicode_char(size_t index, int character) { * Returns the nth char of the stored text, as a one-, two-, or three-byte * encoded string. */ -INLINE string TextEncoder:: +INLINE std::string TextEncoder:: get_encoded_char(size_t index) const { return get_encoded_char(index, get_encoding()); } @@ -216,9 +216,9 @@ get_encoded_char(size_t index) const { * Returns the nth char of the stored text, as a one-, two-, or three-byte * encoded string. */ -INLINE string TextEncoder:: +INLINE std::string TextEncoder:: get_encoded_char(size_t index, TextEncoder::Encoding encoding) const { - wstring wch(1, (wchar_t)get_unicode_char(index)); + std::wstring wch(1, (wchar_t)get_unicode_char(index)); return encode_wtext(wch, encoding); } @@ -235,7 +235,7 @@ get_encoded_char(size_t index, TextEncoder::Encoding encoding) const { * will be converted to ASCII, and the nonconvertible characters will remain * encoded in the encoding specified by set_encoding(). */ -INLINE string TextEncoder:: +INLINE std::string TextEncoder:: get_text_as_ascii() const { return encode_wtext(get_wtext_as_ascii()); } @@ -246,8 +246,8 @@ get_text_as_ascii() const { * and returns the newly encoded string. This does not change or affect any * properties on the TextEncoder itself. */ -INLINE string TextEncoder:: -reencode_text(const string &text, TextEncoder::Encoding from, +INLINE std::string TextEncoder:: +reencode_text(const std::string &text, TextEncoder::Encoding from, TextEncoder::Encoding to) { return encode_wtext(decode_text(text, from), to); } @@ -368,8 +368,8 @@ unicode_tolower(int character) { * Converts the string to uppercase, assuming the string is encoded in the * default encoding. */ -INLINE string TextEncoder:: -upper(const string &source) { +INLINE std::string TextEncoder:: +upper(const std::string &source) { return upper(source, get_default_encoding()); } @@ -377,8 +377,8 @@ upper(const string &source) { * Converts the string to uppercase, assuming the string is encoded in the * indicated encoding. */ -INLINE string TextEncoder:: -upper(const string &source, TextEncoder::Encoding encoding) { +INLINE std::string TextEncoder:: +upper(const std::string &source, TextEncoder::Encoding encoding) { TextEncoder encoder; encoder.set_encoding(encoding); encoder.set_text(source); @@ -390,8 +390,8 @@ upper(const string &source, TextEncoder::Encoding encoding) { * Converts the string to lowercase, assuming the string is encoded in the * default encoding. */ -INLINE string TextEncoder:: -lower(const string &source) { +INLINE std::string TextEncoder:: +lower(const std::string &source) { return lower(source, get_default_encoding()); } @@ -399,8 +399,8 @@ lower(const string &source) { * Converts the string to lowercase, assuming the string is encoded in the * indicated encoding. */ -INLINE string TextEncoder:: -lower(const string &source, TextEncoder::Encoding encoding) { +INLINE std::string TextEncoder:: +lower(const std::string &source, TextEncoder::Encoding encoding) { TextEncoder encoder; encoder.set_encoding(encoding); encoder.set_text(source); @@ -414,7 +414,7 @@ lower(const string &source, TextEncoder::Encoding encoding) { * encoded version of the string. */ INLINE void TextEncoder:: -set_wtext(const wstring &wtext) { +set_wtext(const std::wstring &wtext) { if (!has_text() || _wtext != wtext) { _wtext = wtext; _flags = (_flags | F_got_wtext) & ~F_got_text; @@ -425,7 +425,7 @@ set_wtext(const wstring &wtext) { * Returns the text associated with the TextEncoder, as a wide-character * string. */ -INLINE const wstring &TextEncoder:: +INLINE const std::wstring &TextEncoder:: get_wtext() const { if ((_flags & F_got_wtext) == 0) { ((TextEncoder *)this)->_wtext = decode_text(_text); @@ -438,7 +438,7 @@ get_wtext() const { * Appends the indicates string to the end of the stored wide-character text. */ INLINE void TextEncoder:: -append_wtext(const wstring &wtext) { +append_wtext(const std::wstring &wtext) { _wtext = get_wtext() + wtext; _flags = (_flags | F_got_wtext) & ~F_got_text; } @@ -447,8 +447,8 @@ append_wtext(const wstring &wtext) { * Encodes a wide-text string into a single-char string, according to the * current encoding. */ -INLINE string TextEncoder:: -encode_wtext(const wstring &wtext) const { +INLINE std::string TextEncoder:: +encode_wtext(const std::wstring &wtext) const { return encode_wtext(wtext, _encoding); } @@ -456,16 +456,16 @@ encode_wtext(const wstring &wtext) const { * Returns the given wstring decoded to a single-byte string, via the current * encoding system. */ -INLINE wstring TextEncoder:: -decode_text(const string &text) const { +INLINE std::wstring TextEncoder:: +decode_text(const std::string &text) const { return decode_text(text, _encoding); } /** * Uses the current default encoding to output the wstring. */ -INLINE ostream & -operator << (ostream &out, const wstring &str) { +INLINE std::ostream & +operator << (std::ostream &out, const std::wstring &str) { TextEncoder encoder; encoder.set_wtext(str); out << encoder.get_text(); diff --git a/dtool/src/dtoolutil/textEncoder.h b/dtool/src/dtoolutil/textEncoder.h index 3f57ed4c7f..a7eaf395ff 100644 --- a/dtool/src/dtoolutil/textEncoder.h +++ b/dtool/src/dtoolutil/textEncoder.h @@ -48,26 +48,26 @@ PUBLISHED: INLINE static Encoding get_default_encoding(); MAKE_PROPERTY(default_encoding, get_default_encoding, set_default_encoding); - INLINE void set_text(const string &text); - INLINE void set_text(const string &text, Encoding encoding); + INLINE void set_text(const std::string &text); + INLINE void set_text(const std::string &text, Encoding encoding); INLINE void clear_text(); INLINE bool has_text() const; void make_upper(); void make_lower(); - INLINE string get_text() const; - INLINE string get_text(Encoding encoding) const; - INLINE void append_text(const string &text); + INLINE std::string get_text() const; + INLINE std::string get_text(Encoding encoding) const; + INLINE void append_text(const std::string &text); INLINE void append_unicode_char(int character); INLINE size_t get_num_chars() const; INLINE int get_unicode_char(size_t index) const; INLINE void set_unicode_char(size_t index, int character); - INLINE string get_encoded_char(size_t index) const; - INLINE string get_encoded_char(size_t index, Encoding encoding) const; - INLINE string get_text_as_ascii() const; + INLINE std::string get_encoded_char(size_t index) const; + INLINE std::string get_encoded_char(size_t index, Encoding encoding) const; + INLINE std::string get_text_as_ascii() const; - INLINE static string reencode_text(const string &text, Encoding from, Encoding to); + INLINE static std::string reencode_text(const std::string &text, Encoding from, Encoding to); INLINE static bool unicode_isalpha(int character); INLINE static bool unicode_isdigit(int character); @@ -78,52 +78,52 @@ PUBLISHED: INLINE static int unicode_toupper(int character); INLINE static int unicode_tolower(int character); - INLINE static string upper(const string &source); - INLINE static string upper(const string &source, Encoding encoding); - INLINE static string lower(const string &source); - INLINE static string lower(const string &source, Encoding encoding); + INLINE static std::string upper(const std::string &source); + INLINE static std::string upper(const std::string &source, Encoding encoding); + INLINE static std::string lower(const std::string &source); + INLINE static std::string lower(const std::string &source, Encoding encoding); // Direct support for wide-character strings. Now publishable with the new // wstring support in interrogate. - INLINE void set_wtext(const wstring &wtext); - INLINE const wstring &get_wtext() const; - INLINE void append_wtext(const wstring &text); - wstring get_wtext_as_ascii() const; + INLINE void set_wtext(const std::wstring &wtext); + INLINE const std::wstring &get_wtext() const; + INLINE void append_wtext(const std::wstring &text); + std::wstring get_wtext_as_ascii() const; bool is_wtext() const; - static string encode_wchar(wchar_t ch, Encoding encoding); - INLINE string encode_wtext(const wstring &wtext) const; - static string encode_wtext(const wstring &wtext, Encoding encoding); - INLINE wstring decode_text(const string &text) const; - static wstring decode_text(const string &text, Encoding encoding); + static std::string encode_wchar(wchar_t ch, Encoding encoding); + INLINE std::string encode_wtext(const std::wstring &wtext) const; + static std::string encode_wtext(const std::wstring &wtext, Encoding encoding); + INLINE std::wstring decode_text(const std::string &text) const; + static std::wstring decode_text(const std::string &text, Encoding encoding); private: enum Flags { F_got_text = 0x0001, F_got_wtext = 0x0002, }; - static wstring decode_text_impl(StringDecoder &decoder); + static std::wstring decode_text_impl(StringDecoder &decoder); int _flags; Encoding _encoding; - string _text; - wstring _wtext; + std::string _text; + std::wstring _wtext; static Encoding _default_encoding; }; -EXPCL_DTOOL_DTOOLUTIL ostream & -operator << (ostream &out, TextEncoder::Encoding encoding); -EXPCL_DTOOL_DTOOLUTIL istream & -operator >> (istream &in, TextEncoder::Encoding &encoding); +EXPCL_DTOOL_DTOOLUTIL std::ostream & +operator << (std::ostream &out, TextEncoder::Encoding encoding); +EXPCL_DTOOL_DTOOLUTIL std::istream & +operator >> (std::istream &in, TextEncoder::Encoding &encoding); // We'll define the output operator for wstring here, too. Presumably this // will not be automatically defined by any system libraries. // This function is declared inline to minimize the risk of link conflicts // should another third-party module also define the same output operator. -INLINE EXPCL_DTOOL_DTOOLUTIL ostream & -operator << (ostream &out, const wstring &str); +INLINE EXPCL_DTOOL_DTOOLUTIL std::ostream & +operator << (std::ostream &out, const std::wstring &str); #include "textEncoder.I" diff --git a/dtool/src/dtoolutil/win32ArgParser.h b/dtool/src/dtoolutil/win32ArgParser.h index b7d427a81f..b4cfdecbf9 100644 --- a/dtool/src/dtoolutil/win32ArgParser.h +++ b/dtool/src/dtoolutil/win32ArgParser.h @@ -37,8 +37,8 @@ public: void clear(); - void set_command_line(const string &command_line); - void set_command_line(const wstring &command_line); + void set_command_line(const std::string &command_line); + void set_command_line(const std::wstring &command_line); void set_system_command_line(); char **get_argv(); @@ -47,9 +47,9 @@ public: static bool do_glob(); private: - string parse_quoted_arg(const char *&p); + std::string parse_quoted_arg(const char *&p); void parse_unquoted_arg(const char *&p); - void save_arg(const string &arg); + void save_arg(const std::string &arg); typedef vector_string Args; Args _args; diff --git a/dtool/src/interrogate/functionRemap.h b/dtool/src/interrogate/functionRemap.h index 7c12f65c3d..61ce48bcb6 100644 --- a/dtool/src/interrogate/functionRemap.h +++ b/dtool/src/interrogate/functionRemap.h @@ -48,19 +48,19 @@ public: InterfaceMaker *interface_maker); ~FunctionRemap(); - string get_parameter_name(int n) const; - string call_function(ostream &out, int indent_level, - bool convert_result, const string &container) const; - string call_function(ostream &out, int indent_level, - bool convert_result, const string &container, + std::string get_parameter_name(int n) const; + std::string call_function(std::ostream &out, int indent_level, + bool convert_result, const std::string &container) const; + std::string call_function(std::ostream &out, int indent_level, + bool convert_result, const std::string &container, const vector_string &pexprs) const; - void write_orig_prototype(ostream &out, int indent_level, bool local=false, + void write_orig_prototype(std::ostream &out, int indent_level, bool local=false, int num_default_args=0) const; FunctionWrapperIndex make_wrapper_entry(FunctionIndex function_index); - string get_call_str(const string &container, const vector_string &pexprs) const; + std::string get_call_str(const std::string &container, const vector_string &pexprs) const; int get_min_num_args() const; int get_max_num_args() const; @@ -68,7 +68,7 @@ public: class Parameter { public: bool _has_name; - string _name; + std::string _name; ParameterRemap *_remap; }; @@ -118,12 +118,12 @@ public: Type _type; int _flags; int _args_type; - string _expression; - string _function_signature; - string _hash; - string _unique_name; - string _reported_name; - string _wrapper_name; + std::string _expression; + std::string _function_signature; + std::string _hash; + std::string _unique_name; + std::string _reported_name; + std::string _wrapper_name; FunctionWrapperIndex _wrapper_index; bool _return_value_needs_management; @@ -138,7 +138,7 @@ public: bool _is_valid; private: - string get_parameter_expr(size_t n, const vector_string &pexprs) const; + std::string get_parameter_expr(size_t n, const vector_string &pexprs) const; bool setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_maker); }; diff --git a/dtool/src/interrogate/functionWriter.h b/dtool/src/interrogate/functionWriter.h index 11d4c90252..da2930ae0e 100644 --- a/dtool/src/interrogate/functionWriter.h +++ b/dtool/src/interrogate/functionWriter.h @@ -26,14 +26,14 @@ public: FunctionWriter(); virtual ~FunctionWriter(); - const string &get_name() const; + const std::string &get_name() const; virtual int compare_to(const FunctionWriter &other) const; - virtual void write_prototype(ostream &out); - virtual void write_code(ostream &out); + virtual void write_prototype(std::ostream &out); + virtual void write_code(std::ostream &out); protected: - string _name; + std::string _name; }; #endif diff --git a/dtool/src/interrogate/functionWriterPtrFromPython.h b/dtool/src/interrogate/functionWriterPtrFromPython.h index 36f59fa955..ca74f1dfdc 100644 --- a/dtool/src/interrogate/functionWriterPtrFromPython.h +++ b/dtool/src/interrogate/functionWriterPtrFromPython.h @@ -28,8 +28,8 @@ public: FunctionWriterPtrFromPython(CPPType *type); virtual ~FunctionWriterPtrFromPython(); - virtual void write_prototype(ostream &out); - virtual void write_code(ostream &out); + virtual void write_prototype(std::ostream &out); + virtual void write_code(std::ostream &out); CPPType *get_type() const; CPPType *get_pointer_type() const; diff --git a/dtool/src/interrogate/functionWriterPtrToPython.h b/dtool/src/interrogate/functionWriterPtrToPython.h index d36e025da1..f563d4fccb 100644 --- a/dtool/src/interrogate/functionWriterPtrToPython.h +++ b/dtool/src/interrogate/functionWriterPtrToPython.h @@ -27,8 +27,8 @@ public: FunctionWriterPtrToPython(CPPType *type); virtual ~FunctionWriterPtrToPython(); - virtual void write_prototype(ostream &out); - virtual void write_code(ostream &out); + virtual void write_prototype(std::ostream &out); + virtual void write_code(std::ostream &out); CPPType *get_pointer_type() const; private: diff --git a/dtool/src/interrogate/functionWriters.h b/dtool/src/interrogate/functionWriters.h index 41943c47f7..2da07ecd9c 100644 --- a/dtool/src/interrogate/functionWriters.h +++ b/dtool/src/interrogate/functionWriters.h @@ -31,8 +31,8 @@ public: FunctionWriter *add_writer(FunctionWriter *writer); - void write_prototypes(ostream &out); - void write_code(ostream &out); + void write_prototypes(std::ostream &out); + void write_code(std::ostream &out); protected: class IndirectCompareTo { diff --git a/dtool/src/interrogate/interfaceMaker.h b/dtool/src/interrogate/interfaceMaker.h index 620f42d275..e439105ea1 100644 --- a/dtool/src/interrogate/interfaceMaker.h +++ b/dtool/src/interrogate/interfaceMaker.h @@ -51,12 +51,12 @@ public: virtual void generate_wrappers(); - virtual void write_includes(ostream &out); - virtual void write_prototypes(ostream &out, ostream *out_h); - virtual void write_functions(ostream &out); - virtual void write_module_support(ostream &out, ostream *out_h, InterrogateModuleDef *def) {}; + virtual void write_includes(std::ostream &out); + virtual void write_prototypes(std::ostream &out, std::ostream *out_h); + virtual void write_functions(std::ostream &out); + virtual void write_module_support(std::ostream &out, std::ostream *out_h, InterrogateModuleDef *def) {}; - virtual void write_module(ostream &out, ostream *out_h, InterrogateModuleDef *def); + virtual void write_module(std::ostream &out, std::ostream *out_h, InterrogateModuleDef *def); virtual ParameterRemap *remap_parameter(CPPType *struct_type, CPPType *param_type); @@ -66,7 +66,7 @@ public: void get_function_remaps(std::vector &remaps); - static ostream &indent(ostream &out, int indent_level); + static std::ostream &indent(std::ostream &out, int indent_level); public: // This contains information about the number of arguments that the wrapping @@ -92,12 +92,12 @@ public: class Function { public: - Function(const string &name, + Function(const std::string &name, const InterrogateType &itype, const InterrogateFunction &ifunc); ~Function(); - string _name; + std::string _name; const InterrogateType &_itype; const InterrogateFunction &_ifunc; typedef std::vector Remaps; @@ -112,10 +112,10 @@ public: class MakeSeq { public: - MakeSeq(const string &name, const InterrogateMakeSeq &imake_seq); + MakeSeq(const std::string &name, const InterrogateMakeSeq &imake_seq); const InterrogateMakeSeq &_imake_seq; - string _name; + std::string _name; Function *_length_getter; Function *_element_getter; }; @@ -144,7 +144,7 @@ public: ~Object(); void check_protocols(); - bool is_static_method(const string &name); + bool is_static_method(const std::string &name); const InterrogateType &_itype; Functions _constructors; @@ -165,7 +165,7 @@ public: typedef std::map Objects; Objects _objects; - typedef std::map WrappersByHash; + typedef std::map WrappersByHash; WrappersByHash _wrappers_by_hash; virtual FunctionRemap * @@ -173,12 +173,12 @@ public: const InterrogateFunction &ifunc, CPPInstance *cppfunc, int num_default_parameters); - virtual string + virtual std::string get_wrapper_name(const InterrogateType &itype, const InterrogateFunction &ifunc, FunctionIndex func_index); - virtual string get_wrapper_prefix(); - virtual string get_unique_prefix(); + virtual std::string get_wrapper_prefix(); + virtual std::string get_unique_prefix(); Function * record_function(const InterrogateType &itype, FunctionIndex func_index); @@ -192,19 +192,19 @@ public: void hash_function_signature(FunctionRemap *remap); - string - manage_return_value(ostream &out, int indent_level, - FunctionRemap *remap, const string &return_expr) const; + std::string + manage_return_value(std::ostream &out, int indent_level, + FunctionRemap *remap, const std::string &return_expr) const; void - delete_return_value(ostream &out, int indent_level, - FunctionRemap *remap, const string &return_expr) const; + delete_return_value(std::ostream &out, int indent_level, + FunctionRemap *remap, const std::string &return_expr) const; - void output_ref(ostream &out, int indent_level, FunctionRemap *remap, - const string &varname) const; - void output_unref(ostream &out, int indent_level, FunctionRemap *remap, - const string &varname) const; - void write_spam_message(ostream &out, FunctionRemap *remap) const; + void output_ref(std::ostream &out, int indent_level, FunctionRemap *remap, + const std::string &varname) const; + void output_unref(std::ostream &out, int indent_level, FunctionRemap *remap, + const std::string &varname) const; + void write_spam_message(std::ostream &out, FunctionRemap *remap) const; protected: InterrogateModuleDef *_def; diff --git a/dtool/src/interrogate/interfaceMakerC.h b/dtool/src/interrogate/interfaceMakerC.h index 5eaf276815..91c8ef68bf 100644 --- a/dtool/src/interrogate/interfaceMakerC.h +++ b/dtool/src/interrogate/interfaceMakerC.h @@ -30,27 +30,27 @@ public: InterfaceMakerC(InterrogateModuleDef *def); virtual ~InterfaceMakerC(); - virtual void write_prototypes(ostream &out,ostream *out_h); - virtual void write_functions(ostream &out); + virtual void write_prototypes(std::ostream &out,std::ostream *out_h); + virtual void write_functions(std::ostream &out); virtual ParameterRemap *remap_parameter(CPPType *struct_type, CPPType *param_type); virtual bool synthesize_this_parameter(); protected: - virtual string get_wrapper_prefix(); - virtual string get_unique_prefix(); + virtual std::string get_wrapper_prefix(); + virtual std::string get_unique_prefix(); virtual void record_function_wrapper(InterrogateFunction &ifunc, FunctionWrapperIndex wrapper_index); private: - void write_prototype_for(ostream &out, Function *func); - void write_function_for(ostream &out, Function *func); - void write_function_instance(ostream &out, Function *func, + void write_prototype_for(std::ostream &out, Function *func); + void write_function_for(std::ostream &out, Function *func); + void write_function_instance(std::ostream &out, Function *func, FunctionRemap *remap); - void write_function_header(ostream &out, Function *func, + void write_function_header(std::ostream &out, Function *func, FunctionRemap *remap, bool newline); }; diff --git a/dtool/src/interrogate/interfaceMakerPython.h b/dtool/src/interrogate/interfaceMakerPython.h index 2d9bb84376..612e9ced17 100644 --- a/dtool/src/interrogate/interfaceMakerPython.h +++ b/dtool/src/interrogate/interfaceMakerPython.h @@ -30,10 +30,10 @@ protected: InterfaceMakerPython(InterrogateModuleDef *def); public: - virtual void write_includes(ostream &out); + virtual void write_includes(std::ostream &out); protected: - virtual void test_assert(ostream &out, int indent_level) const; + virtual void test_assert(std::ostream &out, int indent_level) const; }; #endif diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.h b/dtool/src/interrogate/interfaceMakerPythonNative.h index 72421f307a..00374397c9 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.h +++ b/dtool/src/interrogate/interfaceMakerPythonNative.h @@ -31,17 +31,17 @@ public: virtual ~InterfaceMakerPythonNative(); - virtual void write_prototypes(ostream &out, ostream *out_h); - void write_prototypes_class(ostream &out, ostream *out_h, Object *obj) ; - void write_prototypes_class_external(ostream &out, Object *obj); + virtual void write_prototypes(std::ostream &out, std::ostream *out_h); + void write_prototypes_class(std::ostream &out, std::ostream *out_h, Object *obj) ; + void write_prototypes_class_external(std::ostream &out, Object *obj); - virtual void write_functions(ostream &out); + virtual void write_functions(std::ostream &out); - virtual void write_module(ostream &out, ostream *out_h, InterrogateModuleDef *def); - virtual void write_module_support(ostream &out, ostream *out_h, InterrogateModuleDef *def); + virtual void write_module(std::ostream &out, std::ostream *out_h, InterrogateModuleDef *def); + virtual void write_module_support(std::ostream &out, std::ostream *out_h, InterrogateModuleDef *def); - void write_module_class(ostream &out, Object *cls); - virtual void write_sub_module(ostream &out, Object *obj); + void write_module_class(std::ostream &out, Object *cls); + virtual void write_sub_module(std::ostream &out, Object *obj); virtual bool synthesize_this_parameter(); virtual bool separate_overloading(); @@ -50,8 +50,8 @@ public: Property *record_property(const InterrogateType &itype, ElementIndex element_index); protected: - virtual string get_wrapper_prefix(); - virtual string get_unique_prefix(); + virtual std::string get_wrapper_prefix(); + virtual std::string get_unique_prefix(); virtual void record_function_wrapper(InterrogateFunction &ifunc, FunctionWrapperIndex wrapper_index); @@ -119,67 +119,67 @@ private: class SlottedFunctionDef { public: - string _answer_location; + std::string _answer_location; WrapperType _wrapper_type; int _min_version; - string _wrapper_name; - set _remaps; + std::string _wrapper_name; + std::set _remaps; bool _keep_method; }; - typedef std::map SlottedFunctions; + typedef std::map SlottedFunctions; static bool get_slotted_function_def(Object *obj, Function *func, FunctionRemap *remap, SlottedFunctionDef &def); - static void write_function_slot(ostream &out, int indent_level, + static void write_function_slot(std::ostream &out, int indent_level, const SlottedFunctions &slots, - const string &slot, const string &def = "nullptr"); + const std::string &slot, const std::string &def = "nullptr"); - void write_prototype_for_name(ostream &out, Function *func, const std::string &name); - void write_prototype_for(ostream &out, Function *func); - void write_function_for_top(ostream &out, Object *obj, Function *func); + void write_prototype_for_name(std::ostream &out, Function *func, const std::string &name); + void write_prototype_for(std::ostream &out, Function *func); + void write_function_for_top(std::ostream &out, Object *obj, Function *func); - void write_function_for_name(ostream &out, Object *obj, + void write_function_for_name(std::ostream &out, Object *obj, const Function::Remaps &remaps, - const std::string &name, string &expected_params, + const std::string &name, std::string &expected_params, bool coercion_allowed, ArgsType args_type, int return_flags); - void write_coerce_constructor(ostream &out, Object *obj, bool is_const); + void write_coerce_constructor(std::ostream &out, Object *obj, bool is_const); int collapse_default_remaps(std::map > &map_sets, int max_required_args); - void write_function_forset(ostream &out, + void write_function_forset(std::ostream &out, const std::set &remaps, int min_num_args, int max_num_args, - string &expected_params, int indent_level, + std::string &expected_params, int indent_level, bool coercion_allowed, bool report_errors, ArgsType args_type, int return_flags, bool check_exceptions = true, bool verify_const = true, - const string &first_expr = string()); + const std::string &first_expr = std::string()); - void write_function_instance(ostream &out, FunctionRemap *remap, + void write_function_instance(std::ostream &out, FunctionRemap *remap, int min_num_args, int max_num_args, - string &expected_params, int indent_level, + std::string &expected_params, int indent_level, bool coercion_allowed, bool report_errors, ArgsType args_type, int return_flags, bool check_exceptions = true, - const string &first_pexpr = string()); + const std::string &first_pexpr = std::string()); - void error_return(ostream &out, int indent_level, int return_flags); - void error_raise_return(ostream &out, int indent_level, int return_flags, - const string &exc_type, const string &message, - const string &format_args = ""); - void pack_return_value(ostream &out, int indent_level, FunctionRemap *remap, + void error_return(std::ostream &out, int indent_level, int return_flags); + void error_raise_return(std::ostream &out, int indent_level, int return_flags, + const std::string &exc_type, const std::string &message, + const std::string &format_args = ""); + void pack_return_value(std::ostream &out, int indent_level, FunctionRemap *remap, std::string return_expr, int return_flags); - void write_make_seq(ostream &out, Object *obj, const std::string &ClassName, + void write_make_seq(std::ostream &out, Object *obj, const std::string &ClassName, const std::string &cClassName, MakeSeq *make_seq); - void write_getset(ostream &out, Object *obj, Property *property); + void write_getset(std::ostream &out, Object *obj, Property *property); - void write_class_prototypes(ostream &out) ; - void write_class_declarations(ostream &out, ostream *out_h, Object *obj); - void write_class_details(ostream &out, Object *obj); + void write_class_prototypes(std::ostream &out) ; + void write_class_declarations(std::ostream &out, std::ostream *out_h, Object *obj); + void write_class_details(std::ostream &out, Object *obj); public: bool is_remap_legal(FunctionRemap *remap); @@ -204,14 +204,14 @@ public: void get_valid_child_classes(std::map &answer, CPPStructType *inclass, const std::string &upcast_seed = "", bool can_downcast = true); bool DoesInheritFromIsClass(const CPPStructType * inclass, const std::string &name); bool IsPandaTypedObject(CPPStructType * inclass) { return DoesInheritFromIsClass(inclass,"TypedObject"); }; - void write_python_instance(ostream &out, int indent_level, const std::string &return_expr, bool owns_memory, const InterrogateType &itype, bool is_const); + void write_python_instance(std::ostream &out, int indent_level, const std::string &return_expr, bool owns_memory, const InterrogateType &itype, bool is_const); bool has_get_class_type_function(CPPType *type); bool has_init_type_function(CPPType *type); int NeedsAStrFunction(const InterrogateType &itype_class); int NeedsAReprFunction(const InterrogateType &itype_class); bool NeedsARichCompareFunction(const InterrogateType &itype_class); - void output_quoted(ostream &out, int indent_level, const std::string &str, + void output_quoted(std::ostream &out, int indent_level, const std::string &str, bool first_line=true); // stash the forward declarations for this compile pass.. diff --git a/dtool/src/interrogate/interfaceMakerPythonObj.h b/dtool/src/interrogate/interfaceMakerPythonObj.h index df2263f8d7..be7e0d9913 100644 --- a/dtool/src/interrogate/interfaceMakerPythonObj.h +++ b/dtool/src/interrogate/interfaceMakerPythonObj.h @@ -37,32 +37,32 @@ public: InterfaceMakerPythonObj(InterrogateModuleDef *def); virtual ~InterfaceMakerPythonObj(); - virtual void write_prototypes(ostream &out,ostream *out_h); - virtual void write_functions(ostream &out); + virtual void write_prototypes(std::ostream &out,std::ostream *out_h); + virtual void write_functions(std::ostream &out); - virtual void write_module(ostream &out,ostream *out_h, InterrogateModuleDef *def); + virtual void write_module(std::ostream &out,std::ostream *out_h, InterrogateModuleDef *def); virtual bool synthesize_this_parameter(); - static string get_builder_name(CPPType *struct_type); + static std::string get_builder_name(CPPType *struct_type); protected: - virtual string get_wrapper_prefix(); + virtual std::string get_wrapper_prefix(); private: - void write_class_wrapper(ostream &out, Object *object); - void write_prototype_for(ostream &out, Function *func); - void write_function_for(ostream &out, Function *func); - void write_function_instance(ostream &out, int indent_level, Function *func, - FunctionRemap *remap, string &expected_params); + void write_class_wrapper(std::ostream &out, Object *object); + void write_prototype_for(std::ostream &out, Function *func); + void write_function_for(std::ostream &out, Function *func); + void write_function_instance(std::ostream &out, int indent_level, Function *func, + FunctionRemap *remap, std::string &expected_params); - void pack_return_value(ostream &out, int indent_level, - FunctionRemap *remap, string return_expr); + void pack_return_value(std::ostream &out, int indent_level, + FunctionRemap *remap, std::string return_expr); FunctionWriterPtrFromPython *get_ptr_from_python(CPPType *type); FunctionWriterPtrToPython *get_ptr_to_python(CPPType *type); - typedef map PtrConverter; + typedef std::map PtrConverter; PtrConverter _from_python; PtrConverter _to_python; }; diff --git a/dtool/src/interrogate/interfaceMakerPythonSimple.h b/dtool/src/interrogate/interfaceMakerPythonSimple.h index 0b17df3688..18cfc4d590 100644 --- a/dtool/src/interrogate/interfaceMakerPythonSimple.h +++ b/dtool/src/interrogate/interfaceMakerPythonSimple.h @@ -35,29 +35,29 @@ public: InterfaceMakerPythonSimple(InterrogateModuleDef *def); virtual ~InterfaceMakerPythonSimple(); - virtual void write_prototypes(ostream &out,ostream *out_h); - virtual void write_functions(ostream &out); + virtual void write_prototypes(std::ostream &out,std::ostream *out_h); + virtual void write_functions(std::ostream &out); - virtual void write_module(ostream &out,ostream *out_h, InterrogateModuleDef *def); + virtual void write_module(std::ostream &out,std::ostream *out_h, InterrogateModuleDef *def); virtual bool synthesize_this_parameter(); protected: - virtual string get_wrapper_prefix(); - virtual string get_unique_prefix(); + virtual std::string get_wrapper_prefix(); + virtual std::string get_unique_prefix(); virtual void record_function_wrapper(InterrogateFunction &ifunc, FunctionWrapperIndex wrapper_index); private: - void write_prototype_for(ostream &out, Function *func); - void write_function_for(ostream &out, Function *func); - void write_function_instance(ostream &out, Function *func, + void write_prototype_for(std::ostream &out, Function *func); + void write_function_for(std::ostream &out, Function *func); + void write_function_instance(std::ostream &out, Function *func, FunctionRemap *remap); - void pack_return_value(ostream &out, int indent_level, - FunctionRemap *remap, string return_expr); + void pack_return_value(std::ostream &out, int indent_level, + FunctionRemap *remap, std::string return_expr); }; #endif diff --git a/dtool/src/interrogate/interrogate.h b/dtool/src/interrogate/interrogate.h index 80b55c4e8f..a40a1ed26e 100644 --- a/dtool/src/interrogate/interrogate.h +++ b/dtool/src/interrogate/interrogate.h @@ -25,7 +25,7 @@ extern CPPParser parser; // A few global variables that control the interrogate process. extern Filename output_code_filename; extern Filename output_data_filename; -extern string output_data_basename; +extern std::string output_data_basename; extern bool output_module_specific; extern bool output_function_pointers; extern bool output_function_names; @@ -44,7 +44,7 @@ extern bool generate_spam; extern bool left_inheritance_requires_upcast; extern bool mangle_names; extern CPPVisibility min_vis; -extern string library_name; -extern string module_name; +extern std::string library_name; +extern std::string module_name; #endif diff --git a/dtool/src/interrogate/interrogateBuilder.h b/dtool/src/interrogate/interrogateBuilder.h index 68bcb4b131..1b182d3f56 100644 --- a/dtool/src/interrogate/interrogateBuilder.h +++ b/dtool/src/interrogate/interrogateBuilder.h @@ -52,37 +52,37 @@ class InterfaceMaker; */ class InterrogateBuilder { public: - void add_source_file(const string &filename); - void read_command_file(istream &in); - void do_command(const string &command, const string ¶ms); + void add_source_file(const std::string &filename); + void read_command_file(std::istream &in); + void do_command(const std::string &command, const std::string ¶ms); void build(); - void write_code(ostream &out_code, ostream *out_include, InterrogateModuleDef *def); + void write_code(std::ostream &out_code, std::ostream *out_include, InterrogateModuleDef *def); InterrogateModuleDef *make_module_def(int file_identifier); - static string clean_identifier(const string &name); - static string descope(const string &name); + static std::string clean_identifier(const std::string &name); + static std::string descope(const std::string &name); FunctionIndex get_destructor_for(CPPType *type); - string get_preferred_name(CPPType *type); - static string hash_string(const string &name, int shift_offset); + std::string get_preferred_name(CPPType *type); + static std::string hash_string(const std::string &name, int shift_offset); TypeIndex get_type(CPPType *type, bool global); public: - typedef std::set Commands; - typedef std::map CommandParams; + typedef std::set Commands; + typedef std::map CommandParams; void insert_param_list(InterrogateBuilder::Commands &commands, - const string ¶ms); + const std::string ¶ms); - bool in_forcetype(const string &name) const; - string in_renametype(const string &name) const; - bool in_ignoretype(const string &name) const; - string in_defconstruct(const string &name) const; - bool in_ignoreinvolved(const string &name) const; + bool in_forcetype(const std::string &name) const; + std::string in_renametype(const std::string &name) const; + bool in_ignoretype(const std::string &name) const; + std::string in_defconstruct(const std::string &name) const; + bool in_ignoreinvolved(const std::string &name) const; bool in_ignoreinvolved(CPPType *type) const; - bool in_ignorefile(const string &name) const; - bool in_ignoremember(const string &name) const; - bool in_noinclude(const string &name) const; - bool should_include(const string &filename) const; + bool in_ignorefile(const std::string &name) const; + bool in_ignoremember(const std::string &name) const; + bool in_noinclude(const std::string &name) const; + bool should_include(const std::string &filename) const; bool is_inherited_published(CPPInstance *function, CPPStructType *struct_type); @@ -96,18 +96,18 @@ public: ElementIndex scan_element(CPPInstance *element, CPPStructType *struct_type, CPPScope *scope); - FunctionIndex get_getter(CPPType *expr_type, string expression, + FunctionIndex get_getter(CPPType *expr_type, std::string expression, CPPStructType *struct_type, CPPScope *scope, CPPInstance *element); - FunctionIndex get_setter(CPPType *expr_type, string expression, + FunctionIndex get_setter(CPPType *expr_type, std::string expression, CPPStructType *struct_type, CPPScope *scope, CPPInstance *element); FunctionIndex get_cast_function(CPPType *to_type, CPPType *from_type, - const string &prefix); + const std::string &prefix); FunctionIndex - get_function(CPPInstance *function, string description, + get_function(CPPInstance *function, std::string description, CPPStructType *struct_type, CPPScope *scope, - int flags, const string &expression = string()); + int flags, const std::string &expression = std::string()); ElementIndex get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CPPScope *scope); @@ -133,19 +133,19 @@ public: void define_extension_type(InterrogateType &itype, CPPExtensionType *cpptype); - static string trim_blanks(const string &str); + static std::string trim_blanks(const std::string &str); - typedef std::map TypesByName; - typedef std::map FunctionsByName; - typedef std::map MakeSeqsByName; - typedef std::map PropertiesByName; + typedef std::map TypesByName; + typedef std::map FunctionsByName; + typedef std::map MakeSeqsByName; + typedef std::map PropertiesByName; TypesByName _types_by_name; FunctionsByName _functions_by_name; MakeSeqsByName _make_seqs_by_name; PropertiesByName _properties_by_name; - typedef std::map IncludeFiles; + typedef std::map IncludeFiles; IncludeFiles _include_files; Commands _forcetype; @@ -157,7 +157,7 @@ public: Commands _ignoremember; Commands _noinclude; - string _library_hash_name; + std::string _library_hash_name; friend class FunctionRemap; }; diff --git a/dtool/src/interrogate/parameterRemap.h b/dtool/src/interrogate/parameterRemap.h index 1e34fd0a8f..9ae351e29c 100644 --- a/dtool/src/interrogate/parameterRemap.h +++ b/dtool/src/interrogate/parameterRemap.h @@ -47,11 +47,11 @@ public: INLINE CPPExpression *get_default_value() const; INLINE void set_default_value(CPPExpression *expr); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string prepare_return_expr(ostream &out, int indent_level, - const string &expression); - virtual string get_return_expr(const string &expression); - virtual string temporary_to_return(const string &temporary); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string prepare_return_expr(std::ostream &out, int indent_level, + const std::string &expression); + virtual std::string get_return_expr(const std::string &expression); + virtual std::string temporary_to_return(const std::string &temporary); virtual bool return_value_needs_management(); virtual FunctionIndex get_return_value_destructor(); virtual bool return_value_should_be_simple(); diff --git a/dtool/src/interrogate/parameterRemapBasicStringPtrToString.h b/dtool/src/interrogate/parameterRemapBasicStringPtrToString.h index e034d8ebad..c0c385af5e 100644 --- a/dtool/src/interrogate/parameterRemapBasicStringPtrToString.h +++ b/dtool/src/interrogate/parameterRemapBasicStringPtrToString.h @@ -25,8 +25,8 @@ class ParameterRemapBasicStringPtrToString : public ParameterRemapToString { public: ParameterRemapBasicStringPtrToString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; /** @@ -36,8 +36,8 @@ class ParameterRemapBasicWStringPtrToWString : public ParameterRemapToWString { public: ParameterRemapBasicWStringPtrToWString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; #endif diff --git a/dtool/src/interrogate/parameterRemapBasicStringRefToString.h b/dtool/src/interrogate/parameterRemapBasicStringRefToString.h index 65c6bc23fc..546e5aad97 100644 --- a/dtool/src/interrogate/parameterRemapBasicStringRefToString.h +++ b/dtool/src/interrogate/parameterRemapBasicStringRefToString.h @@ -25,8 +25,8 @@ class ParameterRemapBasicStringRefToString : public ParameterRemapToString { public: ParameterRemapBasicStringRefToString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; /** @@ -36,8 +36,8 @@ class ParameterRemapBasicWStringRefToWString : public ParameterRemapToWString { public: ParameterRemapBasicWStringRefToWString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; #endif diff --git a/dtool/src/interrogate/parameterRemapBasicStringToString.h b/dtool/src/interrogate/parameterRemapBasicStringToString.h index 57d1a5624e..d27da23796 100644 --- a/dtool/src/interrogate/parameterRemapBasicStringToString.h +++ b/dtool/src/interrogate/parameterRemapBasicStringToString.h @@ -25,10 +25,10 @@ class ParameterRemapBasicStringToString : public ParameterRemapToString { public: ParameterRemapBasicStringToString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string prepare_return_expr(ostream &out, int indent_level, - const string &expression); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string prepare_return_expr(std::ostream &out, int indent_level, + const std::string &expression); + virtual std::string get_return_expr(const std::string &expression); }; /** @@ -38,10 +38,10 @@ class ParameterRemapBasicWStringToWString : public ParameterRemapToWString { public: ParameterRemapBasicWStringToWString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string prepare_return_expr(ostream &out, int indent_level, - const string &expression); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string prepare_return_expr(std::ostream &out, int indent_level, + const std::string &expression); + virtual std::string get_return_expr(const std::string &expression); }; #endif diff --git a/dtool/src/interrogate/parameterRemapConcreteToPointer.h b/dtool/src/interrogate/parameterRemapConcreteToPointer.h index 50c9bbab2e..2e69597712 100644 --- a/dtool/src/interrogate/parameterRemapConcreteToPointer.h +++ b/dtool/src/interrogate/parameterRemapConcreteToPointer.h @@ -26,8 +26,8 @@ class ParameterRemapConcreteToPointer : public ParameterRemap { public: ParameterRemapConcreteToPointer(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); virtual bool return_value_needs_management(); virtual FunctionIndex get_return_value_destructor(); virtual bool return_value_should_be_simple(); diff --git a/dtool/src/interrogate/parameterRemapConstToNonConst.h b/dtool/src/interrogate/parameterRemapConstToNonConst.h index d952e26167..ee376764e1 100644 --- a/dtool/src/interrogate/parameterRemapConstToNonConst.h +++ b/dtool/src/interrogate/parameterRemapConstToNonConst.h @@ -27,8 +27,8 @@ class ParameterRemapConstToNonConst : public ParameterRemap { public: ParameterRemapConstToNonConst(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; #endif diff --git a/dtool/src/interrogate/parameterRemapEnumToInt.h b/dtool/src/interrogate/parameterRemapEnumToInt.h index f3a33bc631..a74951bcaa 100644 --- a/dtool/src/interrogate/parameterRemapEnumToInt.h +++ b/dtool/src/interrogate/parameterRemapEnumToInt.h @@ -26,8 +26,8 @@ class ParameterRemapEnumToInt : public ParameterRemap { public: ParameterRemapEnumToInt(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); private: CPPType *_enum_type; diff --git a/dtool/src/interrogate/parameterRemapHandleToInt.h b/dtool/src/interrogate/parameterRemapHandleToInt.h index 840a768180..32c2016300 100644 --- a/dtool/src/interrogate/parameterRemapHandleToInt.h +++ b/dtool/src/interrogate/parameterRemapHandleToInt.h @@ -30,8 +30,8 @@ class ParameterRemapHandleToInt : public ParameterRemap { public: ParameterRemapHandleToInt(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; #endif diff --git a/dtool/src/interrogate/parameterRemapPTToPointer.h b/dtool/src/interrogate/parameterRemapPTToPointer.h index e92bd5b5e8..5c59f075b9 100644 --- a/dtool/src/interrogate/parameterRemapPTToPointer.h +++ b/dtool/src/interrogate/parameterRemapPTToPointer.h @@ -29,9 +29,9 @@ class ParameterRemapPTToPointer : public ParameterRemap { public: ParameterRemapPTToPointer(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); - virtual string temporary_to_return(const string &temporary); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); + virtual std::string temporary_to_return(const std::string &temporary); private: CPPType *_pointer_type; diff --git a/dtool/src/interrogate/parameterRemapReferenceToConcrete.h b/dtool/src/interrogate/parameterRemapReferenceToConcrete.h index 47ac919a39..12c7ef27bd 100644 --- a/dtool/src/interrogate/parameterRemapReferenceToConcrete.h +++ b/dtool/src/interrogate/parameterRemapReferenceToConcrete.h @@ -27,8 +27,8 @@ class ParameterRemapReferenceToConcrete : public ParameterRemap { public: ParameterRemapReferenceToConcrete(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; #endif diff --git a/dtool/src/interrogate/parameterRemapReferenceToPointer.h b/dtool/src/interrogate/parameterRemapReferenceToPointer.h index 3e6d4bd87d..6ee71d86c5 100644 --- a/dtool/src/interrogate/parameterRemapReferenceToPointer.h +++ b/dtool/src/interrogate/parameterRemapReferenceToPointer.h @@ -26,8 +26,8 @@ class ParameterRemapReferenceToPointer : public ParameterRemap { public: ParameterRemapReferenceToPointer(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); }; #endif diff --git a/dtool/src/interrogate/parameterRemapThis.h b/dtool/src/interrogate/parameterRemapThis.h index 31204684b1..3d13b66717 100644 --- a/dtool/src/interrogate/parameterRemapThis.h +++ b/dtool/src/interrogate/parameterRemapThis.h @@ -27,8 +27,8 @@ class ParameterRemapThis : public ParameterRemap { public: ParameterRemapThis(CPPType *type, bool is_const); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); virtual bool is_this(); }; diff --git a/dtool/src/interrogate/parameterRemapToString.h b/dtool/src/interrogate/parameterRemapToString.h index b41369f9c0..5eed97d731 100644 --- a/dtool/src/interrogate/parameterRemapToString.h +++ b/dtool/src/interrogate/parameterRemapToString.h @@ -30,8 +30,8 @@ class ParameterRemapToString : public ParameterRemap { public: ParameterRemapToString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); virtual bool new_type_is_atomic_string(); }; @@ -48,8 +48,8 @@ class ParameterRemapToWString : public ParameterRemap { public: ParameterRemapToWString(CPPType *orig_type); - virtual void pass_parameter(ostream &out, const string &variable_name); - virtual string get_return_expr(const string &expression); + virtual void pass_parameter(std::ostream &out, const std::string &variable_name); + virtual std::string get_return_expr(const std::string &expression); virtual bool new_type_is_atomic_string(); }; diff --git a/dtool/src/interrogate/typeManager.h b/dtool/src/interrogate/typeManager.h index 6d259b01ff..d507e947ef 100644 --- a/dtool/src/interrogate/typeManager.h +++ b/dtool/src/interrogate/typeManager.h @@ -139,10 +139,10 @@ public: static CPPType *get_void_type(); static CPPType *get_int_type(); - static string get_function_signature(CPPInstance *function, + static std::string get_function_signature(CPPInstance *function, int num_default_parameters = 0); - static string get_function_name(CPPInstance *function); + static std::string get_function_name(CPPInstance *function); static bool has_protected_destructor(CPPType *type); diff --git a/dtool/src/interrogatedb/interrogateComponent.I b/dtool/src/interrogatedb/interrogateComponent.I index dc401c7945..dddbb421fb 100644 --- a/dtool/src/interrogatedb/interrogateComponent.I +++ b/dtool/src/interrogatedb/interrogateComponent.I @@ -98,7 +98,7 @@ has_name() const { /** * */ -INLINE const string &InterrogateComponent:: +INLINE const std::string &InterrogateComponent:: get_name() const { return _name; } @@ -114,7 +114,7 @@ get_num_alt_names() const { /** * */ -INLINE const string &InterrogateComponent:: +INLINE const std::string &InterrogateComponent:: get_alt_name(int n) const { if (n >= 0 && n < (int)_alt_names.size()) { return _alt_names[n]; diff --git a/dtool/src/interrogatedb/interrogateComponent.h b/dtool/src/interrogatedb/interrogateComponent.h index 0d8a39595d..2555769756 100644 --- a/dtool/src/interrogatedb/interrogateComponent.h +++ b/dtool/src/interrogatedb/interrogateComponent.h @@ -40,22 +40,22 @@ public: INLINE const char *get_module_name() const; INLINE bool has_name() const; - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE int get_num_alt_names() const; - INLINE const string &get_alt_name(int n) const; + INLINE const std::string &get_alt_name(int n) const; - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); protected: - static string _empty_string; + static std::string _empty_string; private: InterrogateModuleDef *_def; - string _name; + std::string _name; - typedef std::vector Strings; + typedef std::vector Strings; Strings _alt_names; friend class InterrogateBuilder; diff --git a/dtool/src/interrogatedb/interrogateDatabase.I b/dtool/src/interrogatedb/interrogateDatabase.I index 91493a1772..cf15d962bf 100644 --- a/dtool/src/interrogatedb/interrogateDatabase.I +++ b/dtool/src/interrogatedb/interrogateDatabase.I @@ -27,7 +27,7 @@ check_latest() { * name, or 0 if no type has this name. */ INLINE TypeIndex InterrogateDatabase:: -lookup_type_by_name(const string &name) { +lookup_type_by_name(const std::string &name) { check_latest(); return lookup(name, _types_by_name, LT_type_name, &InterrogateDatabase::freshen_types_by_name); @@ -38,7 +38,7 @@ lookup_type_by_name(const string &name) { * scoped name, or 0 if no type has this name. */ INLINE TypeIndex InterrogateDatabase:: -lookup_type_by_scoped_name(const string &name) { +lookup_type_by_scoped_name(const std::string &name) { check_latest(); return lookup(name, _types_by_scoped_name, LT_type_scoped_name, &InterrogateDatabase::freshen_types_by_scoped_name); @@ -49,7 +49,7 @@ lookup_type_by_scoped_name(const string &name) { * true name, or 0 if no type has this name. */ INLINE TypeIndex InterrogateDatabase:: -lookup_type_by_true_name(const string &name) { +lookup_type_by_true_name(const std::string &name) { check_latest(); return lookup(name, _types_by_true_name, LT_type_true_name, &InterrogateDatabase::freshen_types_by_true_name); @@ -60,7 +60,7 @@ lookup_type_by_true_name(const string &name) { * given name, or 0 if no manifest has this name. */ INLINE ManifestIndex InterrogateDatabase:: -lookup_manifest_by_name(const string &name) { +lookup_manifest_by_name(const std::string &name) { check_latest(); return lookup(name, _manifests_by_name, LT_manifest_name, &InterrogateDatabase::freshen_manifests_by_name); @@ -71,7 +71,7 @@ lookup_manifest_by_name(const string &name) { * given name, or 0 if no element has this name. */ INLINE ElementIndex InterrogateDatabase:: -lookup_element_by_name(const string &name) { +lookup_element_by_name(const std::string &name) { check_latest(); return lookup(name, _elements_by_name, LT_element_name, &InterrogateDatabase::freshen_elements_by_name); @@ -82,7 +82,7 @@ lookup_element_by_name(const string &name) { * given scoped name, or 0 if no element has this name. */ INLINE ElementIndex InterrogateDatabase:: -lookup_element_by_scoped_name(const string &name) { +lookup_element_by_scoped_name(const std::string &name) { check_latest(); return lookup(name, _elements_by_scoped_name, LT_element_scoped_name, &InterrogateDatabase::freshen_elements_by_scoped_name); diff --git a/dtool/src/interrogatedb/interrogateDatabase.h b/dtool/src/interrogatedb/interrogateDatabase.h index 182e35798f..9c60b0318e 100644 --- a/dtool/src/interrogatedb/interrogateDatabase.h +++ b/dtool/src/interrogatedb/interrogateDatabase.h @@ -65,18 +65,18 @@ public: const InterrogateElement &get_element(ElementIndex element); const InterrogateMakeSeq &get_make_seq(MakeSeqIndex element); - INLINE TypeIndex lookup_type_by_name(const string &name); - INLINE TypeIndex lookup_type_by_scoped_name(const string &name); - INLINE TypeIndex lookup_type_by_true_name(const string &name); - INLINE ManifestIndex lookup_manifest_by_name(const string &name); - INLINE ElementIndex lookup_element_by_name(const string &name); - INLINE ElementIndex lookup_element_by_scoped_name(const string &name); + INLINE TypeIndex lookup_type_by_name(const std::string &name); + INLINE TypeIndex lookup_type_by_scoped_name(const std::string &name); + INLINE TypeIndex lookup_type_by_true_name(const std::string &name); + INLINE ManifestIndex lookup_manifest_by_name(const std::string &name); + INLINE ElementIndex lookup_element_by_name(const std::string &name); + INLINE ElementIndex lookup_element_by_scoped_name(const std::string &name); void remove_type(TypeIndex type); void *get_fptr(FunctionWrapperIndex wrapper); - FunctionWrapperIndex get_wrapper_by_unique_name(const string &unique_name); + FunctionWrapperIndex get_wrapper_by_unique_name(const std::string &unique_name); static int get_file_major_version(); static int get_file_minor_version(); @@ -106,14 +106,14 @@ public: int remap_indices(int first_index); int remap_indices(int first_index, IndexRemapper &remap); - void write(ostream &out, InterrogateModuleDef *def) const; - bool read(istream &in, InterrogateModuleDef *def); + void write(std::ostream &out, InterrogateModuleDef *def) const; + bool read(std::istream &in, InterrogateModuleDef *def); private: INLINE void check_latest(); void load_latest(); - bool read_new(istream &in, InterrogateModuleDef *def); + bool read_new(std::istream &in, InterrogateModuleDef *def); void merge_from(const InterrogateDatabase &other); bool find_module(FunctionWrapperIndex wrapper, @@ -121,7 +121,7 @@ private: int binary_search_module(int begin, int end, FunctionIndex function); int binary_search_wrapper_hash(InterrogateUniqueNameDef *begin, InterrogateUniqueNameDef *end, - const string &wrapper_hash_name); + const std::string &wrapper_hash_name); // This data is loaded from the various database files. typedef std::map TypeMap; @@ -154,7 +154,7 @@ private: // with. typedef std::vector Modules; Modules _modules; - typedef std::map ModulesByHash; + typedef std::map ModulesByHash; ModulesByHash _modules_by_hash; // This records the set of database files that are still to be loaded. @@ -174,7 +174,7 @@ private: }; int _lookups_fresh; - typedef std::map Lookup; + typedef std::map Lookup; Lookup _types_by_name; Lookup _types_by_scoped_name; Lookup _types_by_true_name; @@ -189,7 +189,7 @@ private: void freshen_elements_by_name(); void freshen_elements_by_scoped_name(); - int lookup(const string &name, + int lookup(const std::string &name, Lookup &lookup, LookupType type, void (InterrogateDatabase::*freshen)()); diff --git a/dtool/src/interrogatedb/interrogateElement.I b/dtool/src/interrogatedb/interrogateElement.I index 914aba2327..93e6889b16 100644 --- a/dtool/src/interrogatedb/interrogateElement.I +++ b/dtool/src/interrogatedb/interrogateElement.I @@ -80,7 +80,7 @@ has_scoped_name() const { /** * */ -INLINE const string &InterrogateElement:: +INLINE const std::string &InterrogateElement:: get_scoped_name() const { return _scoped_name; } @@ -96,7 +96,7 @@ has_comment() const { /** * */ -INLINE const string &InterrogateElement:: +INLINE const std::string &InterrogateElement:: get_comment() const { return _comment; } @@ -246,14 +246,14 @@ is_mapping() const { } -INLINE ostream & -operator << (ostream &out, const InterrogateElement &element) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateElement &element) { element.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateElement &element) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateElement &element) { element.input(in); return in; } diff --git a/dtool/src/interrogatedb/interrogateElement.h b/dtool/src/interrogatedb/interrogateElement.h index b3ba755fac..e3d55569f0 100644 --- a/dtool/src/interrogatedb/interrogateElement.h +++ b/dtool/src/interrogatedb/interrogateElement.h @@ -34,10 +34,10 @@ public: INLINE bool is_global() const; INLINE bool has_scoped_name() const; - INLINE const string &get_scoped_name() const; + INLINE const std::string &get_scoped_name() const; INLINE bool has_comment() const; - INLINE const string &get_comment() const; + INLINE const std::string &get_comment() const; INLINE TypeIndex get_type() const; INLINE bool has_getter() const; @@ -58,8 +58,8 @@ public: INLINE FunctionIndex get_length_function() const; INLINE bool is_mapping() const; - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); void remap_indices(const IndexRemapper &remap); @@ -78,8 +78,8 @@ private: }; int _flags; - string _scoped_name; - string _comment; + std::string _scoped_name; + std::string _comment; TypeIndex _type; FunctionIndex _length_function; FunctionIndex _getter; @@ -95,8 +95,8 @@ private: friend class InterrogateBuilder; }; -INLINE ostream &operator << (ostream &out, const InterrogateElement &element); -INLINE istream &operator >> (istream &in, InterrogateElement &element); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateElement &element); +INLINE std::istream &operator >> (std::istream &in, InterrogateElement &element); #include "interrogateElement.I" diff --git a/dtool/src/interrogatedb/interrogateFunction.I b/dtool/src/interrogatedb/interrogateFunction.I index c394c8ac6f..3834e60782 100644 --- a/dtool/src/interrogatedb/interrogateFunction.I +++ b/dtool/src/interrogatedb/interrogateFunction.I @@ -73,7 +73,7 @@ has_scoped_name() const { /** * */ -INLINE const string &InterrogateFunction:: +INLINE const std::string &InterrogateFunction:: get_scoped_name() const { return _scoped_name; } @@ -89,7 +89,7 @@ has_comment() const { /** * */ -INLINE const string &InterrogateFunction:: +INLINE const std::string &InterrogateFunction:: get_comment() const { return _comment; } @@ -105,7 +105,7 @@ has_prototype() const { /** * */ -INLINE const string &InterrogateFunction:: +INLINE const std::string &InterrogateFunction:: get_prototype() const { return _prototype; } @@ -149,14 +149,14 @@ get_python_wrapper(int n) const { } -INLINE ostream & -operator << (ostream &out, const InterrogateFunction &function) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateFunction &function) { function.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateFunction &function) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateFunction &function) { function.input(in); return in; } diff --git a/dtool/src/interrogatedb/interrogateFunction.h b/dtool/src/interrogatedb/interrogateFunction.h index cf92aa15dc..1e3a251032 100644 --- a/dtool/src/interrogatedb/interrogateFunction.h +++ b/dtool/src/interrogatedb/interrogateFunction.h @@ -41,13 +41,13 @@ public: INLINE TypeIndex get_class() const; INLINE bool has_scoped_name() const; - INLINE const string &get_scoped_name() const; + INLINE const std::string &get_scoped_name() const; INLINE bool has_comment() const; - INLINE const string &get_comment() const; + INLINE const std::string &get_comment() const; INLINE bool has_prototype() const; - INLINE const string &get_prototype() const; + INLINE const std::string &get_prototype() const; INLINE int number_of_c_wrappers() const; INLINE FunctionWrapperIndex get_c_wrapper(int n) const; @@ -55,8 +55,8 @@ public: INLINE int number_of_python_wrappers() const; INLINE FunctionWrapperIndex get_python_wrapper(int n) const; - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); void remap_indices(const IndexRemapper &remap); @@ -73,9 +73,9 @@ private: }; int _flags; - string _scoped_name; - string _comment; - string _prototype; + std::string _scoped_name; + std::string _comment; + std::string _prototype; TypeIndex _class; typedef std::vector Wrappers; @@ -92,9 +92,9 @@ public: // This must be a pointer, rather than a concrete map, so we don't risk // trying to create a map in one DLL and access it in another. Silly // Windows. - typedef std::map Instances; + typedef std::map Instances; Instances *_instances; - string _expression; + std::string _expression; friend class InterrogateBuilder; friend class InterfaceMakerC; @@ -103,8 +103,8 @@ public: friend class FunctionRemap; }; -INLINE ostream &operator << (ostream &out, const InterrogateFunction &function); -INLINE istream &operator >> (istream &in, InterrogateFunction &function); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateFunction &function); +INLINE std::istream &operator >> (std::istream &in, InterrogateFunction &function); #include "interrogateFunction.I" diff --git a/dtool/src/interrogatedb/interrogateFunctionWrapper.I b/dtool/src/interrogatedb/interrogateFunctionWrapper.I index 955800e5c1..d636e32ebf 100644 --- a/dtool/src/interrogatedb/interrogateFunctionWrapper.I +++ b/dtool/src/interrogatedb/interrogateFunctionWrapper.I @@ -128,9 +128,9 @@ parameter_has_name(int n) const { /** * */ -INLINE const string &InterrogateFunctionWrapper:: +INLINE const std::string &InterrogateFunctionWrapper:: parameter_get_name(int n) const { - static string bogus_string; + static std::string bogus_string; if (n >= 0 && n < (int)_parameters.size()) { return _parameters[n]._name; } @@ -151,7 +151,7 @@ parameter_is_this(int n) const { /** * */ -INLINE const string &InterrogateFunctionWrapper:: +INLINE const std::string &InterrogateFunctionWrapper:: get_unique_name() const { return _unique_name; } @@ -167,31 +167,31 @@ has_comment() const { /** * */ -INLINE const string &InterrogateFunctionWrapper:: +INLINE const std::string &InterrogateFunctionWrapper:: get_comment() const { return _comment; } -INLINE ostream & -operator << (ostream &out, const InterrogateFunctionWrapper &wrapper) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateFunctionWrapper &wrapper) { wrapper.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateFunctionWrapper &wrapper) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateFunctionWrapper &wrapper) { wrapper.input(in); return in; } -INLINE ostream & -operator << (ostream &out, const InterrogateFunctionWrapper::Parameter &p) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateFunctionWrapper::Parameter &p) { p.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateFunctionWrapper::Parameter &p) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateFunctionWrapper::Parameter &p) { p.input(in); return in; } diff --git a/dtool/src/interrogatedb/interrogateFunctionWrapper.h b/dtool/src/interrogatedb/interrogateFunctionWrapper.h index ff80d930b9..43b01a9a79 100644 --- a/dtool/src/interrogatedb/interrogateFunctionWrapper.h +++ b/dtool/src/interrogatedb/interrogateFunctionWrapper.h @@ -43,16 +43,16 @@ public: INLINE int number_of_parameters() const; INLINE TypeIndex parameter_get_type(int n) const; INLINE bool parameter_has_name(int n) const; - INLINE const string ¶meter_get_name(int n) const; + INLINE const std::string ¶meter_get_name(int n) const; INLINE bool parameter_is_this(int n) const; - INLINE const string &get_unique_name() const; + INLINE const std::string &get_unique_name() const; INLINE bool has_comment() const; - INLINE const string &get_comment() const; + INLINE const std::string &get_comment() const; - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); void remap_indices(const IndexRemapper &remap); @@ -72,8 +72,8 @@ private: FunctionIndex _function; TypeIndex _return_type; FunctionIndex _return_value_destructor; - string _unique_name; - string _comment; + std::string _unique_name; + std::string _comment; public: // This nested class must be declared public just so we can declare the @@ -81,12 +81,12 @@ public: // Arguably a compiler bug, but what can you do. class Parameter { public: - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); int _parameter_flags; TypeIndex _type; - string _name; + std::string _name; }; private: @@ -97,11 +97,11 @@ private: friend class FunctionRemap; }; -INLINE ostream &operator << (ostream &out, const InterrogateFunctionWrapper &wrapper); -INLINE istream &operator >> (istream &in, InterrogateFunctionWrapper &wrapper); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateFunctionWrapper &wrapper); +INLINE std::istream &operator >> (std::istream &in, InterrogateFunctionWrapper &wrapper); -INLINE ostream &operator << (ostream &out, const InterrogateFunctionWrapper::Parameter &p); -INLINE istream &operator >> (istream &in, InterrogateFunctionWrapper::Parameter &p); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateFunctionWrapper::Parameter &p); +INLINE std::istream &operator >> (std::istream &in, InterrogateFunctionWrapper::Parameter &p); #include "interrogateFunctionWrapper.I" diff --git a/dtool/src/interrogatedb/interrogateMakeSeq.I b/dtool/src/interrogatedb/interrogateMakeSeq.I index dde5247912..82e01761ea 100644 --- a/dtool/src/interrogatedb/interrogateMakeSeq.I +++ b/dtool/src/interrogatedb/interrogateMakeSeq.I @@ -53,7 +53,7 @@ has_scoped_name() const { /** * */ -INLINE const string &InterrogateMakeSeq:: +INLINE const std::string &InterrogateMakeSeq:: get_scoped_name() const { return _scoped_name; } @@ -69,7 +69,7 @@ has_comment() const { /** * */ -INLINE const string &InterrogateMakeSeq:: +INLINE const std::string &InterrogateMakeSeq:: get_comment() const { return _comment; } @@ -90,14 +90,14 @@ get_element_getter() const { return _element_getter; } -INLINE ostream & -operator << (ostream &out, const InterrogateMakeSeq &make_seq) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateMakeSeq &make_seq) { make_seq.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateMakeSeq &make_seq) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateMakeSeq &make_seq) { make_seq.input(in); return in; } diff --git a/dtool/src/interrogatedb/interrogateMakeSeq.h b/dtool/src/interrogatedb/interrogateMakeSeq.h index b65a32b27e..5d6e1858b2 100644 --- a/dtool/src/interrogatedb/interrogateMakeSeq.h +++ b/dtool/src/interrogatedb/interrogateMakeSeq.h @@ -30,30 +30,30 @@ public: INLINE void operator = (const InterrogateMakeSeq ©); INLINE bool has_scoped_name() const; - INLINE const string &get_scoped_name() const; + INLINE const std::string &get_scoped_name() const; INLINE bool has_comment() const; - INLINE const string &get_comment() const; + INLINE const std::string &get_comment() const; INLINE FunctionIndex get_length_getter() const; INLINE FunctionIndex get_element_getter() const; - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); void remap_indices(const IndexRemapper &remap); private: - string _scoped_name; - string _comment; + std::string _scoped_name; + std::string _comment; FunctionIndex _length_getter; FunctionIndex _element_getter; friend class InterrogateBuilder; }; -INLINE ostream &operator << (ostream &out, const InterrogateMakeSeq &make_seq); -INLINE istream &operator >> (istream &in, InterrogateMakeSeq &make_seq); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateMakeSeq &make_seq); +INLINE std::istream &operator >> (std::istream &in, InterrogateMakeSeq &make_seq); #include "interrogateMakeSeq.I" diff --git a/dtool/src/interrogatedb/interrogateManifest.I b/dtool/src/interrogatedb/interrogateManifest.I index 877b28a98e..2aedf8a682 100644 --- a/dtool/src/interrogatedb/interrogateManifest.I +++ b/dtool/src/interrogatedb/interrogateManifest.I @@ -49,7 +49,7 @@ operator = (const InterrogateManifest ©) { /** * */ -INLINE const string &InterrogateManifest:: +INLINE const std::string &InterrogateManifest:: get_definition() const { return _definition; } @@ -103,14 +103,14 @@ get_int_value() const { } -INLINE ostream & -operator << (ostream &out, const InterrogateManifest &manifest) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateManifest &manifest) { manifest.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateManifest &manifest) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateManifest &manifest) { manifest.input(in); return in; } diff --git a/dtool/src/interrogatedb/interrogateManifest.h b/dtool/src/interrogatedb/interrogateManifest.h index 37ec3696b4..a038cc0ce1 100644 --- a/dtool/src/interrogatedb/interrogateManifest.h +++ b/dtool/src/interrogatedb/interrogateManifest.h @@ -29,7 +29,7 @@ public: INLINE InterrogateManifest(const InterrogateManifest ©); INLINE void operator = (const InterrogateManifest ©); - INLINE const string &get_definition() const; + INLINE const std::string &get_definition() const; INLINE bool has_type() const; INLINE TypeIndex get_type() const; INLINE bool has_getter() const; @@ -37,8 +37,8 @@ public: INLINE bool has_int_value() const; INLINE int get_int_value() const; - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); void remap_indices(const IndexRemapper &remap); @@ -50,7 +50,7 @@ private: }; int _flags; - string _definition; + std::string _definition; int _int_value; TypeIndex _type; FunctionIndex _getter; @@ -58,8 +58,8 @@ private: friend class InterrogateBuilder; }; -INLINE ostream &operator << (ostream &out, const InterrogateManifest &manifest); -INLINE istream &operator >> (istream &in, InterrogateManifest &manifest); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateManifest &manifest); +INLINE std::istream &operator >> (std::istream &in, InterrogateManifest &manifest); #include "interrogateManifest.I" diff --git a/dtool/src/interrogatedb/interrogateType.I b/dtool/src/interrogatedb/interrogateType.I index 840fdb18f3..c8a4d601b2 100644 --- a/dtool/src/interrogatedb/interrogateType.I +++ b/dtool/src/interrogatedb/interrogateType.I @@ -31,7 +31,7 @@ has_scoped_name() const { /** * */ -INLINE const string &InterrogateType:: +INLINE const std::string &InterrogateType:: get_scoped_name() const { return _scoped_name; } @@ -47,7 +47,7 @@ has_true_name() const { /** * */ -INLINE const string &InterrogateType:: +INLINE const std::string &InterrogateType:: get_true_name() const { return _true_name; } @@ -63,7 +63,7 @@ has_comment() const { /** * */ -INLINE const string &InterrogateType:: +INLINE const std::string &InterrogateType:: get_comment() const { return _comment; } @@ -224,7 +224,7 @@ number_of_enum_values() const { /** * */ -INLINE const string &InterrogateType:: +INLINE const std::string &InterrogateType:: get_enum_value_name(int n) const { if (n >= 0 && n < (int)_enum_values.size()) { return _enum_values[n]._name; @@ -235,7 +235,7 @@ get_enum_value_name(int n) const { /** * */ -INLINE const string &InterrogateType:: +INLINE const std::string &InterrogateType:: get_enum_value_scoped_name(int n) const { if (n >= 0 && n < (int)_enum_values.size()) { return _enum_values[n]._scoped_name; @@ -246,7 +246,7 @@ get_enum_value_scoped_name(int n) const { /** * */ -INLINE const string &InterrogateType:: +INLINE const std::string &InterrogateType:: get_enum_value_comment(int n) const { if (n >= 0 && n < (int)_enum_values.size()) { return _enum_values[n]._comment; @@ -547,38 +547,38 @@ get_nested_type(int n) const { } } -INLINE ostream & -operator << (ostream &out, const InterrogateType &type) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateType &type) { type.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateType &type) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateType &type) { type.input(in); return in; } -INLINE ostream & -operator << (ostream &out, const InterrogateType::Derivation &d) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateType::Derivation &d) { d.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateType::Derivation &d) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateType::Derivation &d) { d.input(in); return in; } -INLINE ostream & -operator << (ostream &out, const InterrogateType::EnumValue &ev) { +INLINE std::ostream & +operator << (std::ostream &out, const InterrogateType::EnumValue &ev) { ev.output(out); return out; } -INLINE istream & -operator >> (istream &in, InterrogateType::EnumValue &ev) { +INLINE std::istream & +operator >> (std::istream &in, InterrogateType::EnumValue &ev) { ev.input(in); return in; } diff --git a/dtool/src/interrogatedb/interrogateType.h b/dtool/src/interrogatedb/interrogateType.h index f5b3b49065..0e6ade73d4 100644 --- a/dtool/src/interrogatedb/interrogateType.h +++ b/dtool/src/interrogatedb/interrogateType.h @@ -36,13 +36,13 @@ public: INLINE bool is_global() const; INLINE bool has_scoped_name() const; - INLINE const string &get_scoped_name() const; + INLINE const std::string &get_scoped_name() const; INLINE bool has_true_name() const; - INLINE const string &get_true_name() const; + INLINE const std::string &get_true_name() const; INLINE bool has_comment() const; - INLINE const string &get_comment() const; + INLINE const std::string &get_comment() const; INLINE bool is_nested() const; INLINE TypeIndex get_outer_class() const; @@ -67,9 +67,9 @@ public: INLINE bool is_enum() const; INLINE bool is_scoped_enum() const; INLINE int number_of_enum_values() const; - INLINE const string &get_enum_value_name(int n) const; - INLINE const string &get_enum_value_scoped_name(int n) const; - INLINE const string &get_enum_value_comment(int n) const; + INLINE const std::string &get_enum_value_name(int n) const; + INLINE const std::string &get_enum_value_scoped_name(int n) const; + INLINE const std::string &get_enum_value_comment(int n) const; INLINE int get_enum_value(int n) const; INLINE bool is_struct() const; @@ -109,8 +109,8 @@ public: INLINE TypeIndex get_nested_type(int n) const; void merge_with(const InterrogateType &other); - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); void remap_indices(const IndexRemapper &remap); @@ -146,9 +146,9 @@ private: public: int _flags; - string _scoped_name; - string _true_name; - string _comment; + std::string _scoped_name; + std::string _true_name; + std::string _comment; TypeIndex _outer_class; AtomicToken _atomic_token; TypeIndex _wrapped_type; @@ -178,8 +178,8 @@ public: // Arguably a compiler bug, but what can you do. class Derivation { public: - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); int _flags; TypeIndex _base; @@ -195,12 +195,12 @@ public: // This nested class must also be public, for the same reason. class EnumValue { public: - void output(ostream &out) const; - void input(istream &in); + void output(std::ostream &out) const; + void input(std::istream &in); - string _name; - string _scoped_name; - string _comment; + std::string _name; + std::string _scoped_name; + std::string _comment; int _value; }; @@ -223,14 +223,14 @@ public: friend class InterrogateBuilder; }; -INLINE ostream &operator << (ostream &out, const InterrogateType &type); -INLINE istream &operator >> (istream &in, InterrogateType &type); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateType &type); +INLINE std::istream &operator >> (std::istream &in, InterrogateType &type); -INLINE ostream &operator << (ostream &out, const InterrogateType::Derivation &d); -INLINE istream &operator >> (istream &in, InterrogateType::Derivation &d); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateType::Derivation &d); +INLINE std::istream &operator >> (std::istream &in, InterrogateType::Derivation &d); -INLINE ostream &operator << (ostream &out, const InterrogateType::EnumValue &d); -INLINE istream &operator >> (istream &in, InterrogateType::EnumValue &d); +INLINE std::ostream &operator << (std::ostream &out, const InterrogateType::EnumValue &d); +INLINE std::istream &operator >> (std::istream &in, InterrogateType::EnumValue &d); #include "interrogateType.I" diff --git a/dtool/src/interrogatedb/interrogate_datafile.I b/dtool/src/interrogatedb/interrogate_datafile.I index ee8d3f38a3..cb020861e2 100644 --- a/dtool/src/interrogatedb/interrogate_datafile.I +++ b/dtool/src/interrogatedb/interrogate_datafile.I @@ -17,7 +17,7 @@ */ template void -idf_output_vector(ostream &out, const std::vector &vec) { +idf_output_vector(std::ostream &out, const std::vector &vec) { out << vec.size() << " "; typename std::vector::const_iterator vi; for (vi = vec.begin(); vi != vec.end(); ++vi) { @@ -33,7 +33,7 @@ idf_output_vector(ostream &out, const std::vector &vec) { */ template void -idf_input_vector(istream &in, std::vector &vec) { +idf_input_vector(std::istream &in, std::vector &vec) { int length; in >> length; if (in.fail()) { diff --git a/dtool/src/interrogatedb/interrogate_datafile.h b/dtool/src/interrogatedb/interrogate_datafile.h index 7442d8ce81..8432123fdf 100644 --- a/dtool/src/interrogatedb/interrogate_datafile.h +++ b/dtool/src/interrogatedb/interrogate_datafile.h @@ -20,17 +20,17 @@ #include "dtoolbase.h" #include -void idf_output_string(ostream &out, const string &str, char whitespace = ' '); -void idf_input_string(istream &in, string &str); +void idf_output_string(std::ostream &out, const std::string &str, char whitespace = ' '); +void idf_input_string(std::istream &in, std::string &str); -void idf_output_string(ostream &out, const char *str, char whitespace = ' '); -void idf_input_string(istream &in, const char *&str); +void idf_output_string(std::ostream &out, const char *str, char whitespace = ' '); +void idf_input_string(std::istream &in, const char *&str); template -void idf_output_vector(ostream &out, const std::vector &vec); +void idf_output_vector(std::ostream &out, const std::vector &vec); template -void idf_input_vector(istream &in, std::vector &vec); +void idf_input_vector(std::istream &in, std::vector &vec); #include "interrogate_datafile.I" diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index ffa6de94c8..ed6d063e03 100644 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -130,7 +130,7 @@ static void Dtool_FreeInstance_##CLASS_NAME(PyObject *self) {\ static void Dtool_FreeInstance_##CLASS_NAME(PyObject *self) {\ if (DtoolInstance_VOID_PTR(self) != nullptr) {\ if (((Dtool_PyInstDef *)self)->_memory_rules) {\ - cerr << "Detected leak for " << #CLASS_NAME \ + std::cerr << "Detected leak for " << #CLASS_NAME \ << " which interrogate cannot delete.\n"; \ }\ }\ @@ -180,10 +180,10 @@ static void Dtool_FreeInstance_##CLASS_NAME(PyObject *self) {\ // forward declared of typed object. We rely on the fact that typed objects // are uniquly defined by an integer. -EXPCL_INTERROGATEDB void RegisterNamedClass(const string &name, Dtool_PyTypedObject &otype); +EXPCL_INTERROGATEDB void RegisterNamedClass(const std::string &name, Dtool_PyTypedObject &otype); EXPCL_INTERROGATEDB void RegisterRuntimeTypedClass(Dtool_PyTypedObject &otype); -EXPCL_INTERROGATEDB Dtool_PyTypedObject *LookupNamedClass(const string &name); +EXPCL_INTERROGATEDB Dtool_PyTypedObject *LookupNamedClass(const std::string &name); EXPCL_INTERROGATEDB Dtool_PyTypedObject *LookupRuntimeTypedClass(TypeHandle handle); EXPCL_INTERROGATEDB Dtool_PyTypedObject *Dtool_RuntimeTypeDtoolType(int type); @@ -193,7 +193,7 @@ EXPCL_INTERROGATEDB Dtool_PyTypedObject *Dtool_RuntimeTypeDtoolType(int type); */ EXPCL_INTERROGATEDB void DTOOL_Call_ExtractThisPointerForType(PyObject *self, Dtool_PyTypedObject *classdef, void **answer); -EXPCL_INTERROGATEDB void *DTOOL_Call_GetPointerThisClass(PyObject *self, Dtool_PyTypedObject *classdef, int param, const string &function_name, bool const_ok, bool report_errors); +EXPCL_INTERROGATEDB void *DTOOL_Call_GetPointerThisClass(PyObject *self, Dtool_PyTypedObject *classdef, int param, const std::string &function_name, bool const_ok, bool report_errors); EXPCL_INTERROGATEDB void *DTOOL_Call_GetPointerThis(PyObject *self); diff --git a/dtool/src/parser-inc/stdcompare.h b/dtool/src/parser-inc/stdcompare.h index 09c0b7d388..bbcc1bf694 100644 --- a/dtool/src/parser-inc/stdcompare.h +++ b/dtool/src/parser-inc/stdcompare.h @@ -24,7 +24,7 @@ class less { public: }; -template > +template > class hash_compare { public: }; diff --git a/dtool/src/prc/androidLogStream.h b/dtool/src/prc/androidLogStream.h index a565a348a3..aa50c8d7af 100644 --- a/dtool/src/prc/androidLogStream.h +++ b/dtool/src/prc/androidLogStream.h @@ -25,9 +25,9 @@ /** * This is a type of ostream that writes each line to the Android log. */ -class AndroidLogStream : public ostream { +class AndroidLogStream : public std::ostream { private: - class AndroidLogStreamBuf : public streambuf { + class AndroidLogStreamBuf : public std::streambuf { public: AndroidLogStreamBuf(int priority); virtual ~AndroidLogStreamBuf(); @@ -40,15 +40,15 @@ private: void write_char(char c); int _priority; - string _tag; - string _data; + std::string _tag; + std::string _data; }; AndroidLogStream(int priority); public: virtual ~AndroidLogStream(); - static ostream &out(NotifySeverity severity); + static std::ostream &out(NotifySeverity severity); }; #endif // ANDROID diff --git a/dtool/src/prc/configDeclaration.I b/dtool/src/prc/configDeclaration.I index a93fbdab10..670f49e38a 100644 --- a/dtool/src/prc/configDeclaration.I +++ b/dtool/src/prc/configDeclaration.I @@ -49,7 +49,7 @@ get_variable() const { * text defined for the variable in the .prc file (or passed to * ConfigPage::make_declaration()). */ -INLINE const string &ConfigDeclaration:: +INLINE const std::string &ConfigDeclaration:: get_string_value() const { return _string_value; } @@ -58,7 +58,7 @@ get_string_value() const { * Changes the value assigned to this variable. */ INLINE void ConfigDeclaration:: -set_string_value(const string &string_value) { +set_string_value(const std::string &string_value) { _string_value = string_value; _got_words = false; invalidate_cache(); @@ -145,12 +145,12 @@ has_double_word(size_t n) const { * Returns the string value of the nth word of the declaration's value, or * empty string if there is no nth value. See also has_string_word(). */ -INLINE string ConfigDeclaration:: +INLINE std::string ConfigDeclaration:: get_string_word(size_t n) const { if (has_string_word(n)) { return _words[n]._str; } - return string(); + return std::string(); } /** @@ -225,8 +225,8 @@ get_decl_seq() const { return _decl_seq; } -INLINE ostream & -operator << (ostream &out, const ConfigDeclaration &decl) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigDeclaration &decl) { decl.output(out); return out; } diff --git a/dtool/src/prc/configDeclaration.h b/dtool/src/prc/configDeclaration.h index 1e6c50ee12..38129670d5 100644 --- a/dtool/src/prc/configDeclaration.h +++ b/dtool/src/prc/configDeclaration.h @@ -33,7 +33,7 @@ class ConfigVariableCore; class EXPCL_DTOOL_PRC ConfigDeclaration : public ConfigFlags { private: ConfigDeclaration(ConfigPage *page, ConfigVariableCore *variable, - const string &string_value, int decl_seq); + const std::string &string_value, int decl_seq); ~ConfigDeclaration(); public: @@ -45,8 +45,8 @@ PUBLISHED: MAKE_PROPERTY(page, get_page); MAKE_PROPERTY(variable, get_variable); - INLINE const string &get_string_value() const; - INLINE void set_string_value(const string &value); + INLINE const std::string &get_string_value() const; + INLINE void set_string_value(const std::string &value); INLINE size_t get_num_words() const; @@ -56,13 +56,13 @@ PUBLISHED: INLINE bool has_int64_word(size_t n) const; INLINE bool has_double_word(size_t n) const; - INLINE string get_string_word(size_t n) const; + INLINE std::string get_string_word(size_t n) const; INLINE bool get_bool_word(size_t n) const; INLINE int get_int_word(size_t n) const; INLINE int64_t get_int64_word(size_t n) const; INLINE double get_double_word(size_t n) const; - void set_string_word(size_t n, const string &value); + void set_string_word(size_t n, const std::string &value); void set_bool_word(size_t n, bool value); void set_int_word(size_t n, int value); void set_int64_word(size_t n, int64_t value); @@ -70,12 +70,12 @@ PUBLISHED: INLINE int get_decl_seq() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; public: - static size_t extract_words(const string &str, vector_string &words); - static string downcase(const string &s); + static size_t extract_words(const std::string &str, vector_string &words); + static std::string downcase(const std::string &s); private: void get_words(); @@ -87,7 +87,7 @@ private: private: ConfigPage *_page; ConfigVariableCore *_variable; - string _string_value; + std::string _string_value; int _decl_seq; enum WordFlags { @@ -103,7 +103,7 @@ private: class Word { public: - string _str; + std::string _str; bool _bool; int _int; int64_t _int_64; @@ -118,7 +118,7 @@ private: friend class ConfigPage; }; -INLINE ostream &operator << (ostream &out, const ConfigDeclaration &decl); +INLINE std::ostream &operator << (std::ostream &out, const ConfigDeclaration &decl); #include "configDeclaration.I" diff --git a/dtool/src/prc/configFlags.h b/dtool/src/prc/configFlags.h index 23dfd3fb30..f4b95757d6 100644 --- a/dtool/src/prc/configFlags.h +++ b/dtool/src/prc/configFlags.h @@ -67,7 +67,7 @@ private: static TVOLATILE AtomicAdjust::Integer _global_modified; }; -ostream &operator << (ostream &out, ConfigFlags::ValueType type); +std::ostream &operator << (std::ostream &out, ConfigFlags::ValueType type); #include "configFlags.I" diff --git a/dtool/src/prc/configPage.I b/dtool/src/prc/configPage.I index e4ed5ccf60..2624f6a60b 100644 --- a/dtool/src/prc/configPage.I +++ b/dtool/src/prc/configPage.I @@ -33,7 +33,7 @@ operator < (const ConfigPage &other) const { * Returns the name of the page. If the page was loaded from a .prc file, * this is usually the filename. */ -INLINE const string &ConfigPage:: +INLINE const std::string &ConfigPage:: get_name() const { return _name; } @@ -109,7 +109,7 @@ set_trust_level(int trust_level) { * Returns the raw binary signature that was found in the prc file, if any. * This method is probably not terribly useful for most applications. */ -INLINE const string &ConfigPage:: +INLINE const std::string &ConfigPage:: get_signature() const { return _signature; } @@ -124,8 +124,8 @@ make_dirty() { _trust_level = 0; } -INLINE ostream & -operator << (ostream &out, const ConfigPage &page) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigPage &page) { page.output(out); return out; } diff --git a/dtool/src/prc/configPage.h b/dtool/src/prc/configPage.h index e6cdb9ed0d..8dd0d822c1 100644 --- a/dtool/src/prc/configPage.h +++ b/dtool/src/prc/configPage.h @@ -29,7 +29,7 @@ class ConfigVariableCore; */ class EXPCL_DTOOL_PRC ConfigPage { private: - ConfigPage(const string &name, bool implicit_load, int page_seq); + ConfigPage(const std::string &name, bool implicit_load, int page_seq); ~ConfigPage(); public: @@ -39,7 +39,7 @@ PUBLISHED: static ConfigPage *get_default_page(); static ConfigPage *get_local_page(); - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; MAKE_PROPERTY(name, get_name); INLINE bool is_special() const; @@ -54,38 +54,38 @@ PUBLISHED: INLINE int get_page_seq() const; INLINE int get_trust_level() const; INLINE void set_trust_level(int trust_level); - INLINE const string &get_signature() const; + INLINE const std::string &get_signature() const; MAKE_PROPERTY(page_seq, get_page_seq); MAKE_PROPERTY(trust_level, get_trust_level, set_trust_level); MAKE_PROPERTY(signature, get_signature); void clear(); - bool read_prc(istream &in); - bool read_encrypted_prc(istream &in, const string &password); + bool read_prc(std::istream &in); + bool read_encrypted_prc(std::istream &in, const std::string &password); - ConfigDeclaration *make_declaration(const string &variable, const string &value); - ConfigDeclaration *make_declaration(ConfigVariableCore *variable, const string &value); + ConfigDeclaration *make_declaration(const std::string &variable, const std::string &value); + ConfigDeclaration *make_declaration(ConfigVariableCore *variable, const std::string &value); bool delete_declaration(ConfigDeclaration *decl); size_t get_num_declarations() const; const ConfigDeclaration *get_declaration(size_t n) const; ConfigDeclaration *modify_declaration(size_t n); - string get_variable_name(size_t n) const; - string get_string_value(size_t n) const; + std::string get_variable_name(size_t n) const; + std::string get_string_value(size_t n) const; bool is_variable_used(size_t n) const; MAKE_SEQ_PROPERTY(declarations, get_num_declarations, modify_declaration); - void output(ostream &out) const; - void output_brief_signature(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void output_brief_signature(std::ostream &out) const; + void write(std::ostream &out) const; private: INLINE void make_dirty(); - void read_prc_line(const string &line); + void read_prc_line(const std::string &line); static unsigned int hex_digit(unsigned char digit); - string _name; + std::string _name; bool _implicit_load; int _page_seq; int _sort; @@ -95,7 +95,7 @@ private: typedef std::vector Declarations; Declarations _declarations; - string _signature; + std::string _signature; #ifdef HAVE_OPENSSL // This maintains the hash of the prc file as we are scanning it, so we can @@ -109,7 +109,7 @@ private: friend class ConfigPageManager; }; -INLINE ostream &operator << (ostream &out, const ConfigPage &page); +INLINE std::ostream &operator << (std::ostream &out, const ConfigPage &page); #include "configPage.I" diff --git a/dtool/src/prc/configPageManager.I b/dtool/src/prc/configPageManager.I index cd95cce50f..30e6c64950 100644 --- a/dtool/src/prc/configPageManager.I +++ b/dtool/src/prc/configPageManager.I @@ -60,9 +60,9 @@ get_num_prc_patterns() const { * Returns the nth filename pattern that will be considered a match as a valid * config file. See get_num_prc_patterns(). */ -INLINE string ConfigPageManager:: +INLINE std::string ConfigPageManager:: get_prc_pattern(size_t n) const { - nassertr(n < _prc_patterns.size(), string()); + nassertr(n < _prc_patterns.size(), std::string()); return _prc_patterns[n].get_pattern(); } @@ -80,9 +80,9 @@ get_num_prc_encrypted_patterns() const { * Returns the nth filename pattern that will be considered a match as a valid * encrypted config file. See get_num_prc_encrypted_patterns(). */ -INLINE string ConfigPageManager:: +INLINE std::string ConfigPageManager:: get_prc_encrypted_pattern(size_t n) const { - nassertr(n < _prc_patterns.size(), string()); + nassertr(n < _prc_patterns.size(), std::string()); return _prc_encrypted_patterns[n].get_pattern(); } @@ -100,9 +100,9 @@ get_num_prc_executable_patterns() const { * Returns the nth filename pattern that will be considered a match as a valid * executable-style config file. See get_num_prc_executable_patterns(). */ -INLINE string ConfigPageManager:: +INLINE std::string ConfigPageManager:: get_prc_executable_pattern(size_t n) const { - nassertr(n < _prc_patterns.size(), string()); + nassertr(n < _prc_patterns.size(), std::string()); return _prc_executable_patterns[n].get_pattern(); } @@ -169,8 +169,8 @@ check_sort_pages() const { } } -INLINE ostream & -operator << (ostream &out, const ConfigPageManager &pageMgr) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigPageManager &pageMgr) { pageMgr.output(out); return out; } diff --git a/dtool/src/prc/configPageManager.h b/dtool/src/prc/configPageManager.h index dd6acc3f99..5afba59796 100644 --- a/dtool/src/prc/configPageManager.h +++ b/dtool/src/prc/configPageManager.h @@ -41,15 +41,15 @@ PUBLISHED: INLINE DSearchPath &get_search_path(); INLINE size_t get_num_prc_patterns() const; - INLINE string get_prc_pattern(size_t n) const; + INLINE std::string get_prc_pattern(size_t n) const; INLINE size_t get_num_prc_encrypted_patterns() const; - INLINE string get_prc_encrypted_pattern(size_t n) const; + INLINE std::string get_prc_encrypted_pattern(size_t n) const; INLINE size_t get_num_prc_executable_patterns() const; - INLINE string get_prc_executable_pattern(size_t n) const; + INLINE std::string get_prc_executable_pattern(size_t n) const; - ConfigPage *make_explicit_page(const string &name); + ConfigPage *make_explicit_page(const std::string &name); bool delete_explicit_page(ConfigPage *page); INLINE size_t get_num_implicit_pages() const; @@ -58,8 +58,8 @@ PUBLISHED: INLINE size_t get_num_explicit_pages() const; INLINE ConfigPage *get_explicit_page(size_t n) const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; static ConfigPageManager *get_global_ptr(); @@ -110,7 +110,7 @@ private: static ConfigPageManager *_global_ptr; }; -INLINE ostream &operator << (ostream &out, const ConfigPageManager &pageMgr); +INLINE std::ostream &operator << (std::ostream &out, const ConfigPageManager &pageMgr); #include "configPageManager.I" diff --git a/dtool/src/prc/configVariable.I b/dtool/src/prc/configVariable.I index 92842ab0dd..53d73ff4c8 100644 --- a/dtool/src/prc/configVariable.I +++ b/dtool/src/prc/configVariable.I @@ -16,7 +16,7 @@ * ConfigVariableFoo derived class. */ INLINE ConfigVariable:: -ConfigVariable(const string &name, ConfigVariable::ValueType value_type) : +ConfigVariable(const std::string &name, ConfigVariable::ValueType value_type) : ConfigVariableBase(name, value_type) { } @@ -26,8 +26,8 @@ ConfigVariable(const string &name, ConfigVariable::ValueType value_type) : * ConfigVariableFoo derived class. */ INLINE ConfigVariable:: -ConfigVariable(const string &name, ConfigVariable::ValueType value_type, - const string &description, int flags) : +ConfigVariable(const std::string &name, ConfigVariable::ValueType value_type, + const std::string &description, int flags) : ConfigVariableBase(name, value_type, description, flags) { } @@ -38,7 +38,7 @@ ConfigVariable(const string &name, ConfigVariable::ValueType value_type, * ConfigVariable of a specific type, without having to know what type it is. */ INLINE ConfigVariable:: -ConfigVariable(const string &name) : +ConfigVariable(const std::string &name) : ConfigVariableBase(name, VT_undefined) { _core->set_used(); @@ -64,9 +64,9 @@ get_default_value() const { /** * Returns the toplevel value of the variable, formatted as a string. */ -INLINE const string &ConfigVariable:: +INLINE const std::string &ConfigVariable:: get_string_value() const { - nassertr(is_constructed(), *new string()); + nassertr(is_constructed(), *new std::string()); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->get_string_value(); } @@ -77,7 +77,7 @@ get_string_value() const { * clear_local_value() is called. */ INLINE void ConfigVariable:: -set_string_value(const string &string_value) { +set_string_value(const std::string &string_value) { nassertv(is_constructed()); _core->make_local_value()->set_string_value(string_value); } @@ -163,9 +163,9 @@ has_double_word(size_t n) const { * Returns the string value of the nth word of the variable's value, or empty * string if there is no nth value. See also has_string_word(). */ -INLINE string ConfigVariable:: +INLINE std::string ConfigVariable:: get_string_word(size_t n) const { - nassertr(is_constructed(), string()); + nassertr(is_constructed(), std::string()); const ConfigDeclaration *decl = _core->get_declaration(0); return decl->get_string_word(n); } @@ -219,7 +219,7 @@ get_double_word(size_t n) const { * words. */ INLINE void ConfigVariable:: -set_string_word(size_t n, const string &value) { +set_string_word(size_t n, const std::string &value) { nassertv(is_constructed()); _core->make_local_value()->set_string_word(n, value); } diff --git a/dtool/src/prc/configVariable.h b/dtool/src/prc/configVariable.h index c4f6d20527..c07f12e453 100644 --- a/dtool/src/prc/configVariable.h +++ b/dtool/src/prc/configVariable.h @@ -30,16 +30,16 @@ */ class EXPCL_DTOOL_PRC ConfigVariable : public ConfigVariableBase { protected: - INLINE ConfigVariable(const string &name, ValueType type); - INLINE ConfigVariable(const string &name, ValueType type, - const string &description, int flags); + INLINE ConfigVariable(const std::string &name, ValueType type); + INLINE ConfigVariable(const std::string &name, ValueType type, + const std::string &description, int flags); PUBLISHED: - INLINE explicit ConfigVariable(const string &name); + INLINE explicit ConfigVariable(const std::string &name); INLINE ~ConfigVariable(); - INLINE const string &get_string_value() const; - INLINE void set_string_value(const string &value); + INLINE const std::string &get_string_value() const; + INLINE void set_string_value(const std::string &value); INLINE void clear_value(); INLINE size_t get_num_words() const; @@ -53,13 +53,13 @@ protected: INLINE bool has_int64_word(size_t n) const; INLINE bool has_double_word(size_t n) const; - INLINE string get_string_word(size_t n) const; + INLINE std::string get_string_word(size_t n) const; INLINE bool get_bool_word(size_t n) const; INLINE int get_int_word(size_t n) const; INLINE int64_t get_int64_word(size_t n) const; INLINE double get_double_word(size_t n) const; - INLINE void set_string_word(size_t n, const string &value); + INLINE void set_string_word(size_t n, const std::string &value); INLINE void set_bool_word(size_t n, bool value); INLINE void set_int_word(size_t n, int value); INLINE void set_int64_word(size_t n, int64_t value); diff --git a/dtool/src/prc/configVariableBase.I b/dtool/src/prc/configVariableBase.I index 29bf58f72a..e57bceeb21 100644 --- a/dtool/src/prc/configVariableBase.I +++ b/dtool/src/prc/configVariableBase.I @@ -16,7 +16,7 @@ * ConfigVariableFoo derived class. */ INLINE ConfigVariableBase:: -ConfigVariableBase(const string &name, +ConfigVariableBase(const std::string &name, ConfigVariableBase::ValueType value_type) : _core(ConfigVariableManager::get_global_ptr()->make_variable(name)) { @@ -35,9 +35,9 @@ INLINE ConfigVariableBase:: /** * Returns the name of the variable. */ -INLINE const string &ConfigVariableBase:: +INLINE const std::string &ConfigVariableBase:: get_name() const { - nassertr(_core != nullptr, *new string()); + nassertr(_core != nullptr, *new std::string()); return _core->get_name(); } @@ -54,9 +54,9 @@ get_value_type() const { /** * Returns the brief description of this variable, if it has been defined. */ -INLINE const string &ConfigVariableBase:: +INLINE const std::string &ConfigVariableBase:: get_description() const { - nassertr(_core != nullptr, *new string()); + nassertr(_core != nullptr, *new std::string()); return _core->get_description(); } @@ -151,7 +151,7 @@ has_value() const { * */ INLINE void ConfigVariableBase:: -output(ostream &out) const { +output(std::ostream &out) const { nassertv(_core != nullptr); _core->output(out); } @@ -160,13 +160,13 @@ output(ostream &out) const { * */ INLINE void ConfigVariableBase:: -write(ostream &out) const { +write(std::ostream &out) const { nassertv(_core != nullptr); _core->write(out); } -INLINE ostream & -operator << (ostream &out, const ConfigVariableBase &variable) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigVariableBase &variable) { variable.output(out); return out; } diff --git a/dtool/src/prc/configVariableBase.h b/dtool/src/prc/configVariableBase.h index 8bc51a7431..ac256f1e8d 100644 --- a/dtool/src/prc/configVariableBase.h +++ b/dtool/src/prc/configVariableBase.h @@ -44,16 +44,16 @@ */ class EXPCL_DTOOL_PRC ConfigVariableBase : public ConfigFlags { protected: - INLINE ConfigVariableBase(const string &name, ValueType type); - ConfigVariableBase(const string &name, ValueType type, - const string &description, int flags); + INLINE ConfigVariableBase(const std::string &name, ValueType type); + ConfigVariableBase(const std::string &name, ValueType type, + const std::string &description, int flags); INLINE ~ConfigVariableBase(); PUBLISHED: - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE ValueType get_value_type() const; - INLINE const string &get_description() const; + INLINE const std::string &get_description() const; INLINE int get_flags() const; INLINE bool is_closed() const; INLINE int get_trust_level() const; @@ -70,8 +70,8 @@ PUBLISHED: INLINE bool has_local_value() const; INLINE bool has_value() const; - INLINE void output(ostream &out) const; - INLINE void write(ostream &out) const; + INLINE void output(std::ostream &out) const; + INLINE void write(std::ostream &out) const; protected: void record_unconstructed() const; @@ -83,7 +83,7 @@ protected: static Unconstructed *_unconstructed; }; -INLINE ostream &operator << (ostream &out, const ConfigVariableBase &variable); +INLINE std::ostream &operator << (std::ostream &out, const ConfigVariableBase &variable); #include "configVariableBase.I" diff --git a/dtool/src/prc/configVariableBool.I b/dtool/src/prc/configVariableBool.I index 25c9e833f1..8551815e67 100644 --- a/dtool/src/prc/configVariableBool.I +++ b/dtool/src/prc/configVariableBool.I @@ -15,7 +15,7 @@ * */ INLINE ConfigVariableBool:: -ConfigVariableBool(const string &name) : +ConfigVariableBool(const std::string &name) : ConfigVariable(name, VT_bool), _local_modified(initial_invalid_cache()) { @@ -26,12 +26,12 @@ ConfigVariableBool(const string &name) : * */ INLINE ConfigVariableBool:: -ConfigVariableBool(const string &name, bool default_value, - const string &description, int flags) : +ConfigVariableBool(const std::string &name, bool default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, VT_bool, description, flags), #else - ConfigVariable(name, VT_bool, string(), flags), + ConfigVariable(name, VT_bool, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { @@ -43,12 +43,12 @@ ConfigVariableBool(const string &name, bool default_value, * */ INLINE ConfigVariableBool:: -ConfigVariableBool(const string &name, const string &default_value, - const string &description, int flags) : +ConfigVariableBool(const std::string &name, const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, VT_bool, description, flags), #else - ConfigVariable(name, VT_bool, string(), flags), + ConfigVariable(name, VT_bool, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { diff --git a/dtool/src/prc/configVariableBool.h b/dtool/src/prc/configVariableBool.h index c955b6b16f..c2c4da14c7 100644 --- a/dtool/src/prc/configVariableBool.h +++ b/dtool/src/prc/configVariableBool.h @@ -22,11 +22,11 @@ */ class EXPCL_DTOOL_PRC ConfigVariableBool : public ConfigVariable { PUBLISHED: - INLINE ConfigVariableBool(const string &name); - INLINE ConfigVariableBool(const string &name, bool default_value, - const string &description = string(), int flags = 0); - INLINE ConfigVariableBool(const string &name, const string &default_value, - const string &description = string(), int flags = 0); + INLINE ConfigVariableBool(const std::string &name); + INLINE ConfigVariableBool(const std::string &name, bool default_value, + const std::string &description = std::string(), int flags = 0); + INLINE ConfigVariableBool(const std::string &name, const std::string &default_value, + const std::string &description = std::string(), int flags = 0); INLINE void operator = (bool value); ALWAYS_INLINE operator bool () const; diff --git a/dtool/src/prc/configVariableCore.I b/dtool/src/prc/configVariableCore.I index 95f8829a2a..4cb0d05108 100644 --- a/dtool/src/prc/configVariableCore.I +++ b/dtool/src/prc/configVariableCore.I @@ -14,7 +14,7 @@ /** * Returns the name of the variable. */ -INLINE const string &ConfigVariableCore:: +INLINE const std::string &ConfigVariableCore:: get_name() const { return _name; } @@ -40,7 +40,7 @@ get_value_type() const { /** * Returns the brief description of this variable, if it has been defined. */ -INLINE const string &ConfigVariableCore:: +INLINE const std::string &ConfigVariableCore:: get_description() const { return _description; } @@ -208,8 +208,8 @@ check_sort_declarations() const { } } -INLINE ostream & -operator << (ostream &out, const ConfigVariableCore &variable) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigVariableCore &variable) { variable.output(out); return out; } diff --git a/dtool/src/prc/configVariableCore.h b/dtool/src/prc/configVariableCore.h index 6e8ce7ace9..8849cc401b 100644 --- a/dtool/src/prc/configVariableCore.h +++ b/dtool/src/prc/configVariableCore.h @@ -33,16 +33,16 @@ class ConfigDeclaration; */ class EXPCL_DTOOL_PRC ConfigVariableCore : public ConfigFlags { private: - ConfigVariableCore(const string &name); - ConfigVariableCore(const ConfigVariableCore &templ, const string &name); + ConfigVariableCore(const std::string &name); + ConfigVariableCore(const ConfigVariableCore &templ, const std::string &name); ~ConfigVariableCore(); PUBLISHED: - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE bool is_used() const; INLINE ValueType get_value_type() const; - INLINE const string &get_description() const; + INLINE const std::string &get_description() const; INLINE int get_flags() const; INLINE bool is_closed() const; INLINE int get_trust_level() const; @@ -51,8 +51,8 @@ PUBLISHED: void set_value_type(ValueType value_type); void set_flags(int flags); - void set_description(const string &description); - void set_default_value(const string &default_value); + void set_description(const std::string &description); + void set_default_value(const std::string &default_value); INLINE void set_used(); ConfigDeclaration *make_local_value(); @@ -77,8 +77,8 @@ PUBLISHED: MAKE_SEQ(get_unique_references, get_num_unique_references, get_unique_reference); MAKE_SEQ_PROPERTY(declarations, get_num_declarations, get_declaration); - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; MAKE_PROPERTY(name, get_name); MAKE_PROPERTY(used, is_used); @@ -102,10 +102,10 @@ private: void sort_declarations(); private: - string _name; + std::string _name; bool _is_used; ValueType _value_type; - string _description; + std::string _description; int _flags; ConfigDeclaration *_default_value; ConfigDeclaration *_local_value; @@ -122,7 +122,7 @@ private: friend class ConfigVariableManager; }; -INLINE ostream &operator << (ostream &out, const ConfigVariableCore &variable); +INLINE std::ostream &operator << (std::ostream &out, const ConfigVariableCore &variable); #include "configVariableCore.I" diff --git a/dtool/src/prc/configVariableDouble.I b/dtool/src/prc/configVariableDouble.I index e93f39830e..3075591c0f 100644 --- a/dtool/src/prc/configVariableDouble.I +++ b/dtool/src/prc/configVariableDouble.I @@ -15,7 +15,7 @@ * */ INLINE ConfigVariableDouble:: -ConfigVariableDouble(const string &name) : +ConfigVariableDouble(const std::string &name) : ConfigVariable(name, VT_double), _local_modified(initial_invalid_cache()) { @@ -26,12 +26,12 @@ ConfigVariableDouble(const string &name) : * */ INLINE ConfigVariableDouble:: -ConfigVariableDouble(const string &name, double default_value, - const string &description, int flags) : +ConfigVariableDouble(const std::string &name, double default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_double, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_double, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_double, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { @@ -43,12 +43,12 @@ ConfigVariableDouble(const string &name, double default_value, * */ INLINE ConfigVariableDouble:: -ConfigVariableDouble(const string &name, const string &default_value, - const string &description, int flags) : +ConfigVariableDouble(const std::string &name, const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_double, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_double, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_double, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { diff --git a/dtool/src/prc/configVariableDouble.h b/dtool/src/prc/configVariableDouble.h index 49e9585475..12332016ec 100644 --- a/dtool/src/prc/configVariableDouble.h +++ b/dtool/src/prc/configVariableDouble.h @@ -23,12 +23,12 @@ */ class EXPCL_DTOOL_PRC ConfigVariableDouble : public ConfigVariable { PUBLISHED: - INLINE ConfigVariableDouble(const string &name); - INLINE ConfigVariableDouble(const string &name, double default_value, - const string &description = string(), + INLINE ConfigVariableDouble(const std::string &name); + INLINE ConfigVariableDouble(const std::string &name, double default_value, + const std::string &description = std::string(), int flags = 0); - INLINE ConfigVariableDouble(const string &name, const string &default_value, - const string &description = string(), + INLINE ConfigVariableDouble(const std::string &name, const std::string &default_value, + const std::string &description = std::string(), int flags = 0); INLINE void operator = (double value); diff --git a/dtool/src/prc/configVariableEnum.I b/dtool/src/prc/configVariableEnum.I index 6ae9327119..a13076e794 100644 --- a/dtool/src/prc/configVariableEnum.I +++ b/dtool/src/prc/configVariableEnum.I @@ -16,12 +16,12 @@ */ template INLINE ConfigVariableEnum:: -ConfigVariableEnum(const string &name, EnumType default_value, - const string &description, int flags) : +ConfigVariableEnum(const std::string &name, EnumType default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_enum, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_enum, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_enum, std::string(), flags), #endif _got_default_value(true), _default_value(default_value), @@ -36,12 +36,12 @@ ConfigVariableEnum(const string &name, EnumType default_value, */ template INLINE ConfigVariableEnum:: -ConfigVariableEnum(const string &name, const string &default_value, - const string &description, int flags) : +ConfigVariableEnum(const std::string &name, const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_enum, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_enum, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_enum, std::string(), flags), #endif _got_default_value(true), _default_value(parse_string(default_value)), @@ -159,8 +159,8 @@ set_word(size_t n, EnumType value) { */ template INLINE EnumType ConfigVariableEnum:: -parse_string(const string &value) const { - istringstream strm(value); +parse_string(const std::string &value) const { + std::istringstream strm(value); EnumType result; strm >> result; return result; @@ -172,9 +172,9 @@ parse_string(const string &value) const { * operator. */ template -INLINE string ConfigVariableEnum:: +INLINE std::string ConfigVariableEnum:: format_enum(EnumType value) const { - ostringstream strm; + std::ostringstream strm; strm << value; return strm.str(); } diff --git a/dtool/src/prc/configVariableEnum.h b/dtool/src/prc/configVariableEnum.h index 81f5c91a09..80aaf23b65 100644 --- a/dtool/src/prc/configVariableEnum.h +++ b/dtool/src/prc/configVariableEnum.h @@ -30,11 +30,11 @@ template class ConfigVariableEnum : public ConfigVariable { public: - INLINE ConfigVariableEnum(const string &name, EnumType default_value, - const string &description = string(), + INLINE ConfigVariableEnum(const std::string &name, EnumType default_value, + const std::string &description = std::string(), int flags = 0); - INLINE ConfigVariableEnum(const string &name, const string &default_value, - const string &description = string(), + INLINE ConfigVariableEnum(const std::string &name, const std::string &default_value, + const std::string &description = std::string(), int flags = 0); INLINE ~ConfigVariableEnum(); @@ -54,8 +54,8 @@ public: INLINE void set_word(size_t n, EnumType value); private: - INLINE EnumType parse_string(const string &value) const; - INLINE string format_enum(EnumType value) const; + INLINE EnumType parse_string(const std::string &value) const; + INLINE std::string format_enum(EnumType value) const; private: bool _got_default_value; diff --git a/dtool/src/prc/configVariableFilename.I b/dtool/src/prc/configVariableFilename.I index 8e6ca228b3..51013ddfcf 100644 --- a/dtool/src/prc/configVariableFilename.I +++ b/dtool/src/prc/configVariableFilename.I @@ -15,7 +15,7 @@ * */ INLINE ConfigVariableFilename:: -ConfigVariableFilename(const string &name) : +ConfigVariableFilename(const std::string &name) : ConfigVariable(name, VT_filename), _local_modified(initial_invalid_cache()) { @@ -26,12 +26,12 @@ ConfigVariableFilename(const string &name) : * */ INLINE ConfigVariableFilename:: -ConfigVariableFilename(const string &name, const Filename &default_value, - const string &description, int flags) : +ConfigVariableFilename(const std::string &name, const Filename &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, VT_filename, description, flags), #else - ConfigVariable(name, VT_filename, string(), flags), + ConfigVariable(name, VT_filename, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { @@ -93,7 +93,7 @@ operator [] (size_t n) const { * same thing returned by the string typecast operator, so this function is a * little redundant. */ -INLINE string ConfigVariableFilename:: +INLINE std::string ConfigVariableFilename:: get_fullpath() const { return get_ref_value().get_fullpath(); } @@ -102,7 +102,7 @@ get_fullpath() const { * Returns the directory part of the filename. This is everything in the * filename up to, but not including the rightmost slash. */ -INLINE string ConfigVariableFilename:: +INLINE std::string ConfigVariableFilename:: get_dirname() const { return get_ref_value().get_dirname(); } @@ -111,7 +111,7 @@ get_dirname() const { * Returns the basename part of the filename. This is everything in the * filename after the rightmost slash, including any extensions. */ -INLINE string ConfigVariableFilename:: +INLINE std::string ConfigVariableFilename:: get_basename() const { return get_ref_value().get_basename(); } @@ -121,7 +121,7 @@ get_basename() const { * Returns the full filename--directory and basename parts--except for the * extension. */ -INLINE string ConfigVariableFilename:: +INLINE std::string ConfigVariableFilename:: get_fullpath_wo_extension() const { return get_ref_value().get_fullpath_wo_extension(); } @@ -130,7 +130,7 @@ get_fullpath_wo_extension() const { /** * Returns the basename part of the filename, without the file extension. */ -INLINE string ConfigVariableFilename:: +INLINE std::string ConfigVariableFilename:: get_basename_wo_extension() const { return get_ref_value().get_basename_wo_extension(); } @@ -140,7 +140,7 @@ get_basename_wo_extension() const { * Returns the file extension. This is everything after the rightmost dot, if * there is one, or the empty string if there is not. */ -INLINE string ConfigVariableFilename:: +INLINE std::string ConfigVariableFilename:: get_extension() const { return get_ref_value().get_extension(); } diff --git a/dtool/src/prc/configVariableFilename.h b/dtool/src/prc/configVariableFilename.h index 6feb82a24a..7537e22117 100644 --- a/dtool/src/prc/configVariableFilename.h +++ b/dtool/src/prc/configVariableFilename.h @@ -26,9 +26,9 @@ */ class EXPCL_DTOOL_PRC ConfigVariableFilename : public ConfigVariable { PUBLISHED: - INLINE ConfigVariableFilename(const string &name); - INLINE ConfigVariableFilename(const string &name, const Filename &default_value, - const string &description = string(), int flags = 0); + INLINE ConfigVariableFilename(const std::string &name); + INLINE ConfigVariableFilename(const std::string &name, const Filename &default_value, + const std::string &description = std::string(), int flags = 0); INLINE void operator = (const Filename &value); INLINE operator const Filename &() const; @@ -39,12 +39,12 @@ PUBLISHED: INLINE size_t length() const; INLINE char operator [] (size_t n) const; - INLINE string get_fullpath() const; - INLINE string get_dirname() const; - INLINE string get_basename() const; - INLINE string get_fullpath_wo_extension() const; - INLINE string get_basename_wo_extension() const; - INLINE string get_extension() const; + INLINE std::string get_fullpath() const; + INLINE std::string get_dirname() const; + INLINE std::string get_basename() const; + INLINE std::string get_fullpath_wo_extension() const; + INLINE std::string get_basename_wo_extension() const; + INLINE std::string get_extension() const; // Comparison operators are handy. INLINE bool operator == (const Filename &other) const; diff --git a/dtool/src/prc/configVariableInt.I b/dtool/src/prc/configVariableInt.I index bdafa4b817..f341070b77 100644 --- a/dtool/src/prc/configVariableInt.I +++ b/dtool/src/prc/configVariableInt.I @@ -15,7 +15,7 @@ * */ INLINE ConfigVariableInt:: -ConfigVariableInt(const string &name) : +ConfigVariableInt(const std::string &name) : ConfigVariable(name, VT_int), _local_modified(initial_invalid_cache()) { @@ -26,12 +26,12 @@ ConfigVariableInt(const string &name) : * */ INLINE ConfigVariableInt:: -ConfigVariableInt(const string &name, int default_value, - const string &description, int flags) : +ConfigVariableInt(const std::string &name, int default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_int, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_int, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_int, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { @@ -43,12 +43,12 @@ ConfigVariableInt(const string &name, int default_value, * */ INLINE ConfigVariableInt:: -ConfigVariableInt(const string &name, const string &default_value, - const string &description, int flags) : +ConfigVariableInt(const std::string &name, const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_int, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_int, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_int, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { diff --git a/dtool/src/prc/configVariableInt.h b/dtool/src/prc/configVariableInt.h index 0156bed21a..9d87fe3344 100644 --- a/dtool/src/prc/configVariableInt.h +++ b/dtool/src/prc/configVariableInt.h @@ -23,12 +23,12 @@ */ class EXPCL_DTOOL_PRC ConfigVariableInt : public ConfigVariable { PUBLISHED: - INLINE ConfigVariableInt(const string &name); - INLINE ConfigVariableInt(const string &name, int default_value, - const string &description = string(), + INLINE ConfigVariableInt(const std::string &name); + INLINE ConfigVariableInt(const std::string &name, int default_value, + const std::string &description = std::string(), int flags = 0); - INLINE ConfigVariableInt(const string &name, const string &default_value, - const string &description = string(), + INLINE ConfigVariableInt(const std::string &name, const std::string &default_value, + const std::string &description = std::string(), int flags = 0); INLINE void operator = (int value); diff --git a/dtool/src/prc/configVariableInt64.I b/dtool/src/prc/configVariableInt64.I index 534905b0e8..a86fcc296e 100644 --- a/dtool/src/prc/configVariableInt64.I +++ b/dtool/src/prc/configVariableInt64.I @@ -15,7 +15,7 @@ * */ INLINE ConfigVariableInt64:: -ConfigVariableInt64(const string &name) : +ConfigVariableInt64(const std::string &name) : ConfigVariable(name, VT_int64), _local_modified(initial_invalid_cache()) { @@ -26,12 +26,12 @@ ConfigVariableInt64(const string &name) : * */ INLINE ConfigVariableInt64:: -ConfigVariableInt64(const string &name, int64_t default_value, - const string &description, int flags) : +ConfigVariableInt64(const std::string &name, int64_t default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_int64, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_int64, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_int64, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { @@ -43,12 +43,12 @@ ConfigVariableInt64(const string &name, int64_t default_value, * */ INLINE ConfigVariableInt64:: -ConfigVariableInt64(const string &name, const string &default_value, - const string &description, int flags) : +ConfigVariableInt64(const std::string &name, const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_int64, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_int64, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_int64, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { diff --git a/dtool/src/prc/configVariableInt64.h b/dtool/src/prc/configVariableInt64.h index 14d02e2ee9..a88f2272d8 100644 --- a/dtool/src/prc/configVariableInt64.h +++ b/dtool/src/prc/configVariableInt64.h @@ -24,12 +24,12 @@ */ class EXPCL_DTOOL_PRC ConfigVariableInt64 : public ConfigVariable { PUBLISHED: - INLINE ConfigVariableInt64(const string &name); - INLINE ConfigVariableInt64(const string &name, int64_t default_value, - const string &description = string(), + INLINE ConfigVariableInt64(const std::string &name); + INLINE ConfigVariableInt64(const std::string &name, int64_t default_value, + const std::string &description = std::string(), int flags = 0); - INLINE ConfigVariableInt64(const string &name, const string &default_value, - const string &description = string(), + INLINE ConfigVariableInt64(const std::string &name, const std::string &default_value, + const std::string &description = std::string(), int flags = 0); INLINE void operator = (int64_t value); diff --git a/dtool/src/prc/configVariableList.I b/dtool/src/prc/configVariableList.I index a3e96c5a17..606d8d47fd 100644 --- a/dtool/src/prc/configVariableList.I +++ b/dtool/src/prc/configVariableList.I @@ -22,12 +22,12 @@ INLINE ConfigVariableList:: * */ INLINE ConfigVariableList:: -ConfigVariableList(const string &name, - const string &description, int flags) : +ConfigVariableList(const std::string &name, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariableBase(name, VT_list, description, flags) #else - ConfigVariableBase(name, VT_list, string(), flags) + ConfigVariableBase(name, VT_list, std::string(), flags) #endif { // A list variable implicitly defines a default value of the empty string. @@ -51,14 +51,14 @@ get_num_values() const { /** * Returns the nth value of the variable. */ -INLINE string ConfigVariableList:: +INLINE std::string ConfigVariableList:: get_string_value(size_t n) const { - nassertr(_core != nullptr, string()); + nassertr(_core != nullptr, std::string()); const ConfigDeclaration *decl = _core->get_trusted_reference(n); if (decl != nullptr) { return decl->get_string_value(); } - return string(); + return std::string(); } /** @@ -73,14 +73,14 @@ get_num_unique_values() const { /** * Returns the nth unique value of the variable. */ -INLINE string ConfigVariableList:: +INLINE std::string ConfigVariableList:: get_unique_value(size_t n) const { - nassertr(_core != nullptr, string()); + nassertr(_core != nullptr, std::string()); const ConfigDeclaration *decl = _core->get_unique_reference(n); if (decl != nullptr) { return decl->get_string_value(); } - return string(); + return std::string(); } /** @@ -96,13 +96,13 @@ size() const { * operator returns the list of unique values, and so the maximum range is * get_num_unique_values(). */ -INLINE string ConfigVariableList:: +INLINE std::string ConfigVariableList:: operator [] (size_t n) const { return get_unique_value(n); } -INLINE ostream & -operator << (ostream &out, const ConfigVariableList &variable) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigVariableList &variable) { variable.output(out); return out; } diff --git a/dtool/src/prc/configVariableList.h b/dtool/src/prc/configVariableList.h index ca639a94ae..188b33c5fb 100644 --- a/dtool/src/prc/configVariableList.h +++ b/dtool/src/prc/configVariableList.h @@ -30,25 +30,25 @@ */ class EXPCL_DTOOL_PRC ConfigVariableList : public ConfigVariableBase { PUBLISHED: - INLINE ConfigVariableList(const string &name, - const string &description = string(), + INLINE ConfigVariableList(const std::string &name, + const std::string &description = std::string(), int flags = 0); INLINE ~ConfigVariableList(); INLINE size_t get_num_values() const; - INLINE string get_string_value(size_t n) const; + INLINE std::string get_string_value(size_t n) const; INLINE size_t get_num_unique_values() const; - INLINE string get_unique_value(size_t n) const; + INLINE std::string get_unique_value(size_t n) const; INLINE size_t size() const; - INLINE string operator [] (size_t n) const; + INLINE std::string operator [] (size_t n) const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; }; -INLINE ostream &operator << (ostream &out, const ConfigVariableList &variable); +INLINE std::ostream &operator << (std::ostream &out, const ConfigVariableList &variable); #include "configVariableList.I" diff --git a/dtool/src/prc/configVariableManager.I b/dtool/src/prc/configVariableManager.I index 6c92874e9c..d0c1633c27 100644 --- a/dtool/src/prc/configVariableManager.I +++ b/dtool/src/prc/configVariableManager.I @@ -28,8 +28,8 @@ get_variable(size_t n) const { return _variables[n]; } -INLINE ostream & -operator << (ostream &out, const ConfigVariableManager &variableMgr) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigVariableManager &variableMgr) { variableMgr.output(out); return out; } diff --git a/dtool/src/prc/configVariableManager.h b/dtool/src/prc/configVariableManager.h index 818c5a8f3d..22c0c6e3f5 100644 --- a/dtool/src/prc/configVariableManager.h +++ b/dtool/src/prc/configVariableManager.h @@ -34,26 +34,26 @@ protected: ~ConfigVariableManager(); PUBLISHED: - ConfigVariableCore *make_variable(const string &name); - ConfigVariableCore *make_variable_template(const string &pattern, + ConfigVariableCore *make_variable(const std::string &name); + ConfigVariableCore *make_variable_template(const std::string &pattern, ConfigFlags::ValueType type, - const string &default_value, - const string &description = string(), + const std::string &default_value, + const std::string &description = std::string(), int flags = 0); INLINE size_t get_num_variables() const; INLINE ConfigVariableCore *get_variable(size_t n) const; MAKE_SEQ(get_variables, get_num_variables, get_variable); - string get_variable_name(size_t n) const; + std::string get_variable_name(size_t n) const; bool is_variable_used(size_t n) const; MAKE_SEQ_PROPERTY(variables, get_num_variables, get_variable); - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; - void write_prc_variables(ostream &out) const; + void write_prc_variables(std::ostream &out) const; void list_unused_variables() const; void list_variables() const; @@ -70,7 +70,7 @@ private: typedef std::vector Variables; Variables _variables; - typedef std::map VariablesByName; + typedef std::map VariablesByName; VariablesByName _variables_by_name; typedef std::map VariableTemplates; @@ -79,7 +79,7 @@ private: static ConfigVariableManager *_global_ptr; }; -INLINE ostream &operator << (ostream &out, const ConfigVariableManager &variableMgr); +INLINE std::ostream &operator << (std::ostream &out, const ConfigVariableManager &variableMgr); #include "configVariableManager.I" diff --git a/dtool/src/prc/configVariableSearchPath.I b/dtool/src/prc/configVariableSearchPath.I index c9294f119e..46e542e24c 100644 --- a/dtool/src/prc/configVariableSearchPath.I +++ b/dtool/src/prc/configVariableSearchPath.I @@ -15,12 +15,12 @@ * */ INLINE ConfigVariableSearchPath:: -ConfigVariableSearchPath(const string &name, - const string &description, int flags) : +ConfigVariableSearchPath(const std::string &name, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariableBase(name, VT_search_path, description, flags), #else - ConfigVariableBase(name, VT_search_path, string(), flags), + ConfigVariableBase(name, VT_search_path, std::string(), flags), #endif _default_value(Filename(".")), _local_modified(initial_invalid_cache()) @@ -38,13 +38,13 @@ ConfigVariableSearchPath(const string &name, * */ INLINE ConfigVariableSearchPath:: -ConfigVariableSearchPath(const string &name, +ConfigVariableSearchPath(const std::string &name, const DSearchPath &default_value, - const string &description, int flags) : + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariableBase(name, VT_search_path, description, flags), #else - ConfigVariableBase(name, VT_search_path, string(), flags), + ConfigVariableBase(name, VT_search_path, std::string(), flags), #endif _default_value(default_value), _local_modified(initial_invalid_cache()) @@ -62,13 +62,13 @@ ConfigVariableSearchPath(const string &name, * */ INLINE ConfigVariableSearchPath:: -ConfigVariableSearchPath(const string &name, - const string &default_value, - const string &description, int flags) : +ConfigVariableSearchPath(const std::string &name, + const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariableBase(name, VT_search_path, description, flags), #else - ConfigVariableBase(name, VT_search_path, string(), flags), + ConfigVariableBase(name, VT_search_path, std::string(), flags), #endif _default_value(Filename(default_value)), _local_modified(initial_invalid_cache()) @@ -169,7 +169,7 @@ prepend_directory(const Filename &directory) { * search list. */ INLINE void ConfigVariableSearchPath:: -append_path(const string &path, const string &separator) { +append_path(const std::string &path, const std::string &separator) { _postfix.append_path(path, separator); _local_modified = initial_invalid_cache(); } @@ -256,7 +256,7 @@ find_all_files(const Filename &filename) const { * */ INLINE void ConfigVariableSearchPath:: -output(ostream &out) const { +output(std::ostream &out) const { get_value().output(out); } @@ -264,12 +264,12 @@ output(ostream &out) const { * */ INLINE void ConfigVariableSearchPath:: -write(ostream &out) const { +write(std::ostream &out) const { get_value().write(out); } -INLINE ostream & -operator << (ostream &out, const ConfigVariableSearchPath &variable) { +INLINE std::ostream & +operator << (std::ostream &out, const ConfigVariableSearchPath &variable) { variable.output(out); return out; } diff --git a/dtool/src/prc/configVariableSearchPath.h b/dtool/src/prc/configVariableSearchPath.h index 4dfe1b0fcf..02a4fd65c3 100644 --- a/dtool/src/prc/configVariableSearchPath.h +++ b/dtool/src/prc/configVariableSearchPath.h @@ -35,16 +35,16 @@ */ class EXPCL_DTOOL_PRC ConfigVariableSearchPath : public ConfigVariableBase { PUBLISHED: - INLINE ConfigVariableSearchPath(const string &name, - const string &description = string(), + INLINE ConfigVariableSearchPath(const std::string &name, + const std::string &description = std::string(), int flags = 0); - INLINE ConfigVariableSearchPath(const string &name, + INLINE ConfigVariableSearchPath(const std::string &name, const DSearchPath &default_value, - const string &description, + const std::string &description, int flags = 0); - INLINE ConfigVariableSearchPath(const string &name, - const string &default_value, - const string &description, + INLINE ConfigVariableSearchPath(const std::string &name, + const std::string &default_value, + const std::string &description, int flags = 0); INLINE ~ConfigVariableSearchPath(); @@ -59,8 +59,8 @@ PUBLISHED: INLINE void clear(); INLINE void append_directory(const Filename &directory); INLINE void prepend_directory(const Filename &directory); - INLINE void append_path(const string &path, - const string &separator = string()); + INLINE void append_path(const std::string &path, + const std::string &separator = std::string()); INLINE void append_path(const DSearchPath &path); INLINE void prepend_path(const DSearchPath &path); @@ -75,8 +75,8 @@ PUBLISHED: DSearchPath::Results &results) const; INLINE DSearchPath::Results find_all_files(const Filename &filename) const; - INLINE void output(ostream &out) const; - INLINE void write(ostream &out) const; + INLINE void output(std::ostream &out) const; + INLINE void write(std::ostream &out) const; private: void reload_search_path(); @@ -88,7 +88,7 @@ private: DSearchPath _cache; }; -INLINE ostream &operator << (ostream &out, const ConfigVariableSearchPath &variable); +INLINE std::ostream &operator << (std::ostream &out, const ConfigVariableSearchPath &variable); #include "configVariableSearchPath.I" diff --git a/dtool/src/prc/configVariableString.I b/dtool/src/prc/configVariableString.I index fcdb301e2a..d72c48cb8c 100644 --- a/dtool/src/prc/configVariableString.I +++ b/dtool/src/prc/configVariableString.I @@ -15,7 +15,7 @@ * */ INLINE ConfigVariableString:: -ConfigVariableString(const string &name) : +ConfigVariableString(const std::string &name) : ConfigVariable(name, VT_string), _local_modified(initial_invalid_cache()) { @@ -26,12 +26,12 @@ ConfigVariableString(const string &name) : * */ INLINE ConfigVariableString:: -ConfigVariableString(const string &name, const string &default_value, - const string &description, int flags) : +ConfigVariableString(const std::string &name, const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, VT_string, description, flags), #else - ConfigVariable(name, VT_string, string(), flags), + ConfigVariable(name, VT_string, std::string(), flags), #endif _local_modified(initial_invalid_cache()) { @@ -43,7 +43,7 @@ ConfigVariableString(const string &name, const string &default_value, * Reassigns the variable's local value. */ INLINE void ConfigVariableString:: -operator = (const string &value) { +operator = (const std::string &value) { set_value(value); } @@ -51,7 +51,7 @@ operator = (const string &value) { * Returns the variable's value. */ INLINE ConfigVariableString:: -operator const string & () const { +operator const std::string & () const { return get_value(); } @@ -92,7 +92,7 @@ operator [] (size_t n) const { * */ INLINE bool ConfigVariableString:: -operator == (const string &other) const { +operator == (const std::string &other) const { return get_value() == other; } @@ -100,7 +100,7 @@ operator == (const string &other) const { * */ INLINE bool ConfigVariableString:: -operator != (const string &other) const { +operator != (const std::string &other) const { return get_value() != other; } @@ -108,7 +108,7 @@ operator != (const string &other) const { * */ INLINE bool ConfigVariableString:: -operator < (const string &other) const { +operator < (const std::string &other) const { return get_value() < other; } @@ -116,14 +116,14 @@ operator < (const string &other) const { * Reassigns the variable's local value. */ INLINE void ConfigVariableString:: -set_value(const string &value) { +set_value(const std::string &value) { set_string_value(value); } /** * Returns the variable's value. */ -INLINE const string &ConfigVariableString:: +INLINE const std::string &ConfigVariableString:: get_value() const { TAU_PROFILE("const string &ConfigVariableString::get_value() const", " ", TAU_USER); if (!is_cache_valid(_local_modified)) { @@ -135,19 +135,19 @@ get_value() const { /** * Returns the variable's default value. */ -INLINE string ConfigVariableString:: +INLINE std::string ConfigVariableString:: get_default_value() const { const ConfigDeclaration *decl = ConfigVariable::get_default_value(); if (decl != nullptr) { return decl->get_string_value(); } - return string(); + return std::string(); } /** * Returns the variable's nth value. */ -INLINE string ConfigVariableString:: +INLINE std::string ConfigVariableString:: get_word(size_t n) const { return get_string_word(n); } @@ -157,6 +157,6 @@ get_word(size_t n) const { * variable's overall value. */ INLINE void ConfigVariableString:: -set_word(size_t n, const string &value) { +set_word(size_t n, const std::string &value) { set_string_word(n, value); } diff --git a/dtool/src/prc/configVariableString.h b/dtool/src/prc/configVariableString.h index 0b6d615667..d2b5b38b78 100644 --- a/dtool/src/prc/configVariableString.h +++ b/dtool/src/prc/configVariableString.h @@ -22,12 +22,12 @@ */ class EXPCL_DTOOL_PRC ConfigVariableString : public ConfigVariable { PUBLISHED: - INLINE ConfigVariableString(const string &name); - INLINE ConfigVariableString(const string &name, const string &default_value, - const string &description = string(), int flags = 0); + INLINE ConfigVariableString(const std::string &name); + INLINE ConfigVariableString(const std::string &name, const std::string &default_value, + const std::string &description = std::string(), int flags = 0); - INLINE void operator = (const string &value); - INLINE operator const string & () const; + INLINE void operator = (const std::string &value); + INLINE operator const std::string & () const; // These methods help the ConfigVariableString act like a C++ string object. INLINE const char *c_str() const; @@ -36,25 +36,25 @@ PUBLISHED: INLINE char operator [] (size_t n) const; // Comparison operators are handy. - INLINE bool operator == (const string &other) const; - INLINE bool operator != (const string &other) const; - INLINE bool operator < (const string &other) const; + INLINE bool operator == (const std::string &other) const; + INLINE bool operator != (const std::string &other) const; + INLINE bool operator < (const std::string &other) const; - INLINE void set_value(const string &value); - INLINE const string &get_value() const; - INLINE string get_default_value() const; + INLINE void set_value(const std::string &value); + INLINE const std::string &get_value() const; + INLINE std::string get_default_value() const; MAKE_PROPERTY(value, get_value, set_value); MAKE_PROPERTY(default_value, get_default_value); - INLINE string get_word(size_t n) const; - INLINE void set_word(size_t n, const string &value); + INLINE std::string get_word(size_t n) const; + INLINE void set_word(size_t n, const std::string &value); private: void reload_cache(); private: AtomicAdjust::Integer _local_modified; - string _cache; + std::string _cache; }; #include "configVariableString.I" diff --git a/dtool/src/prc/encryptStream.I b/dtool/src/prc/encryptStream.I index bad15bd7e7..f93e6c01a3 100644 --- a/dtool/src/prc/encryptStream.I +++ b/dtool/src/prc/encryptStream.I @@ -15,15 +15,15 @@ * */ INLINE IDecryptStream:: -IDecryptStream() : istream(&_buf) { +IDecryptStream() : std::istream(&_buf) { } /** * */ INLINE IDecryptStream:: -IDecryptStream(istream *source, bool owns_source, - const string &password) : istream(&_buf) { +IDecryptStream(std::istream *source, bool owns_source, + const std::string &password) : std::istream(&_buf) { open(source, owns_source, password); } @@ -31,7 +31,7 @@ IDecryptStream(istream *source, bool owns_source, * */ INLINE IDecryptStream &IDecryptStream:: -open(istream *source, bool owns_source, const string &password) { +open(std::istream *source, bool owns_source, const std::string &password) { clear((ios_iostate)0); _buf.open_read(source, owns_source, password); return *this; @@ -50,7 +50,7 @@ close() { /** * Returns the encryption algorithm that was read from the stream. */ -INLINE const string &IDecryptStream:: +INLINE const std::string &IDecryptStream:: get_algorithm() const { return _buf.get_algorithm(); } @@ -76,15 +76,15 @@ get_iteration_count() const { * */ INLINE OEncryptStream:: -OEncryptStream() : ostream(&_buf) { +OEncryptStream() : std::ostream(&_buf) { } /** * */ INLINE OEncryptStream:: -OEncryptStream(ostream *dest, bool owns_dest, const string &password) : - ostream(&_buf) +OEncryptStream(std::ostream *dest, bool owns_dest, const std::string &password) : + std::ostream(&_buf) { open(dest, owns_dest, password); } @@ -93,7 +93,7 @@ OEncryptStream(ostream *dest, bool owns_dest, const string &password) : * */ INLINE OEncryptStream &OEncryptStream:: -open(ostream *dest, bool owns_dest, const string &password) { +open(std::ostream *dest, bool owns_dest, const std::string &password) { clear((ios_iostate)0); _buf.open_write(dest, owns_dest, password); return *this; @@ -112,7 +112,7 @@ close() { /** * Returns the encryption algorithm that was read from the stream. */ -INLINE const string &OEncryptStream:: +INLINE const std::string &OEncryptStream:: get_algorithm() const { return _buf.get_algorithm(); } @@ -143,7 +143,7 @@ get_iteration_count() const { * code, but open() will fail. */ INLINE void OEncryptStream:: -set_algorithm(const string &algorithm) { +set_algorithm(const std::string &algorithm) { _buf.set_algorithm(algorithm); } diff --git a/dtool/src/prc/encryptStream.h b/dtool/src/prc/encryptStream.h index 540d4b3209..94deaeb62e 100644 --- a/dtool/src/prc/encryptStream.h +++ b/dtool/src/prc/encryptStream.h @@ -31,21 +31,21 @@ * * Seeking is not supported. */ -class EXPCL_DTOOL_PRC IDecryptStream : public istream { +class EXPCL_DTOOL_PRC IDecryptStream : public std::istream { PUBLISHED: INLINE IDecryptStream(); - INLINE explicit IDecryptStream(istream *source, bool owns_source, - const string &password); + INLINE explicit IDecryptStream(std::istream *source, bool owns_source, + const std::string &password); #if _MSC_VER >= 1800 INLINE IDecryptStream(const IDecryptStream ©) = delete; #endif - INLINE IDecryptStream &open(istream *source, bool owns_source, - const string &password); + INLINE IDecryptStream &open(std::istream *source, bool owns_source, + const std::string &password); INLINE IDecryptStream &close(); - INLINE const string &get_algorithm() const; + INLINE const std::string &get_algorithm() const; INLINE int get_key_length() const; INLINE int get_iteration_count() const; @@ -66,27 +66,27 @@ private: * * Seeking is not supported. */ -class EXPCL_DTOOL_PRC OEncryptStream : public ostream { +class EXPCL_DTOOL_PRC OEncryptStream : public std::ostream { PUBLISHED: INLINE OEncryptStream(); - INLINE explicit OEncryptStream(ostream *dest, bool owns_dest, - const string &password); + INLINE explicit OEncryptStream(std::ostream *dest, bool owns_dest, + const std::string &password); #if _MSC_VER >= 1800 INLINE OEncryptStream(const OEncryptStream ©) = delete; #endif - INLINE OEncryptStream &open(ostream *dest, bool owns_dest, - const string &password); + INLINE OEncryptStream &open(std::ostream *dest, bool owns_dest, + const std::string &password); INLINE OEncryptStream &close(); public: - INLINE const string &get_algorithm() const; + INLINE const std::string &get_algorithm() const; INLINE int get_key_length() const; INLINE int get_iteration_count() const; PUBLISHED: - INLINE void set_algorithm(const string &algorithm); + INLINE void set_algorithm(const std::string &algorithm); INLINE void set_key_length(int key_length); INLINE void set_iteration_count(int iteration_count); diff --git a/dtool/src/prc/encryptStreamBuf.I b/dtool/src/prc/encryptStreamBuf.I index 88537ca09e..cbf9f59470 100644 --- a/dtool/src/prc/encryptStreamBuf.I +++ b/dtool/src/prc/encryptStreamBuf.I @@ -21,7 +21,7 @@ * code, but open_write() will fail. */ INLINE void EncryptStreamBuf:: -set_algorithm(const string &algorithm) { +set_algorithm(const std::string &algorithm) { _algorithm = algorithm; } @@ -29,7 +29,7 @@ set_algorithm(const string &algorithm) { * Returns the encryption algorithm that was specified by set_algorithm(), or * was read from the stream by the last successful open_read(). */ -INLINE const string &EncryptStreamBuf:: +INLINE const std::string &EncryptStreamBuf:: get_algorithm() const { return _algorithm; } diff --git a/dtool/src/prc/encryptStreamBuf.h b/dtool/src/prc/encryptStreamBuf.h index 8a812f1701..7bc4db5199 100644 --- a/dtool/src/prc/encryptStreamBuf.h +++ b/dtool/src/prc/encryptStreamBuf.h @@ -24,19 +24,19 @@ typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; /** * The streambuf object that implements IDecompressStream and OCompressStream. */ -class EXPCL_DTOOL_PRC EncryptStreamBuf : public streambuf { +class EXPCL_DTOOL_PRC EncryptStreamBuf : public std::streambuf { public: EncryptStreamBuf(); virtual ~EncryptStreamBuf(); - void open_read(istream *source, bool owns_source, const string &password); + void open_read(std::istream *source, bool owns_source, const std::string &password); void close_read(); - void open_write(ostream *dest, bool owns_dest, const string &password); + void open_write(std::ostream *dest, bool owns_dest, const std::string &password); void close_write(); - INLINE void set_algorithm(const string &algorithm); - INLINE const string &get_algorithm() const; + INLINE void set_algorithm(const std::string &algorithm); + INLINE const std::string &get_algorithm() const; INLINE void set_key_length(int key_length); INLINE int get_key_length() const; @@ -54,13 +54,13 @@ private: void write_chars(const char *start, size_t length); private: - istream *_source; + std::istream *_source; bool _owns_source; - ostream *_dest; + std::ostream *_dest; bool _owns_dest; - string _algorithm; + std::string _algorithm; int _key_length; int _iteration_count; diff --git a/dtool/src/prc/notifyCategory.I b/dtool/src/prc/notifyCategory.I index 62a332b388..5793917d91 100644 --- a/dtool/src/prc/notifyCategory.I +++ b/dtool/src/prc/notifyCategory.I @@ -14,7 +14,7 @@ /** * */ -INLINE string NotifyCategory:: +INLINE std::string NotifyCategory:: get_fullname() const { return _fullname; } @@ -22,7 +22,7 @@ get_fullname() const { /** * */ -INLINE string NotifyCategory:: +INLINE std::string NotifyCategory:: get_basename() const { return _basename; } @@ -49,7 +49,7 @@ set_severity(NotifySeverity severity) { _severity = severity; #else // enforce the no-debug, no-spam rule. - _severity = max(severity, NS_info); + _severity = std::max(severity, NS_info); #endif invalidate_cache(); } @@ -139,7 +139,7 @@ is_fatal() const { /** * A shorthand way to write out(NS_spam). */ -INLINE ostream &NotifyCategory:: +INLINE std::ostream &NotifyCategory:: spam(bool prefix) const { #if defined(NOTIFY_DEBUG) return out(NS_spam, prefix); @@ -151,7 +151,7 @@ spam(bool prefix) const { /** * A shorthand way to write out(NS_debug). */ -INLINE ostream &NotifyCategory:: +INLINE std::ostream &NotifyCategory:: debug(bool prefix) const { #if defined(NOTIFY_DEBUG) return out(NS_debug, prefix); @@ -163,7 +163,7 @@ debug(bool prefix) const { /** * A shorthand way to write out(NS_info). */ -INLINE ostream &NotifyCategory:: +INLINE std::ostream &NotifyCategory:: info(bool prefix) const { return out(NS_info, prefix); } @@ -171,7 +171,7 @@ info(bool prefix) const { /** * A shorthand way to write out(NS_warning). */ -INLINE ostream &NotifyCategory:: +INLINE std::ostream &NotifyCategory:: warning(bool prefix) const { return out(NS_warning, prefix); } @@ -179,7 +179,7 @@ warning(bool prefix) const { /** * A shorthand way to write out(NS_error). */ -INLINE ostream &NotifyCategory:: +INLINE std::ostream &NotifyCategory:: error(bool prefix) const { return out(NS_error, prefix); } @@ -187,12 +187,12 @@ error(bool prefix) const { /** * A shorthand way to write out(NS_fatal). */ -INLINE ostream &NotifyCategory:: +INLINE std::ostream &NotifyCategory:: fatal(bool prefix) const { return out(NS_fatal, prefix); } -INLINE ostream & -operator << (ostream &out, const NotifyCategory &cat) { +INLINE std::ostream & +operator << (std::ostream &out, const NotifyCategory &cat) { return out << cat.get_fullname(); } diff --git a/dtool/src/prc/notifyCategory.h b/dtool/src/prc/notifyCategory.h index 5ef3712208..f3e99b09ba 100644 --- a/dtool/src/prc/notifyCategory.h +++ b/dtool/src/prc/notifyCategory.h @@ -31,12 +31,12 @@ */ class EXPCL_DTOOL_PRC NotifyCategory : public MemoryBase, public ConfigFlags { private: - NotifyCategory(const string &fullname, const string &basename, + NotifyCategory(const std::string &fullname, const std::string &basename, NotifyCategory *parent); PUBLISHED: - INLINE string get_fullname() const; - INLINE string get_basename() const; + INLINE std::string get_fullname() const; + INLINE std::string get_basename() const; INLINE NotifySeverity get_severity() const; INLINE void set_severity(NotifySeverity severity); MAKE_PROPERTY(fullname, get_fullname); @@ -63,13 +63,13 @@ PUBLISHED: INLINE bool is_error() const; INLINE bool is_fatal() const; - ostream &out(NotifySeverity severity, bool prefix = true) const; - INLINE ostream &spam(bool prefix = true) const; - INLINE ostream &debug(bool prefix = true) const; - INLINE ostream &info(bool prefix = true) const; - INLINE ostream &warning(bool prefix = true) const; - INLINE ostream &error(bool prefix = true) const; - INLINE ostream &fatal(bool prefix = true) const; + std::ostream &out(NotifySeverity severity, bool prefix = true) const; + INLINE std::ostream &spam(bool prefix = true) const; + INLINE std::ostream &debug(bool prefix = true) const; + INLINE std::ostream &info(bool prefix = true) const; + INLINE std::ostream &warning(bool prefix = true) const; + INLINE std::ostream &error(bool prefix = true) const; + INLINE std::ostream &fatal(bool prefix = true) const; size_t get_num_children() const; NotifyCategory *get_child(size_t i) const; @@ -79,13 +79,13 @@ PUBLISHED: static void set_server_delta(long delta); private: - string get_config_name() const; + std::string get_config_name() const; void update_severity_cache(); static bool get_notify_timestamp(); static bool get_check_debug_notify_protect(); - string _fullname; - string _basename; + std::string _fullname; + std::string _basename; NotifyCategory *_parent; ConfigVariableEnum _severity; typedef std::vector Children; @@ -99,7 +99,7 @@ private: friend class Notify; }; -INLINE ostream &operator << (ostream &out, const NotifyCategory &cat); +INLINE std::ostream &operator << (std::ostream &out, const NotifyCategory &cat); #include "notifyCategory.I" diff --git a/dtool/src/prc/notifyCategoryProxy.I b/dtool/src/prc/notifyCategoryProxy.I index 501090a6d4..eaca9b6e33 100644 --- a/dtool/src/prc/notifyCategoryProxy.I +++ b/dtool/src/prc/notifyCategoryProxy.I @@ -138,7 +138,7 @@ is_fatal() { * */ template -INLINE ostream &NotifyCategoryProxy:: +INLINE std::ostream &NotifyCategoryProxy:: out(NotifySeverity severity, bool prefix) { return get_unsafe_ptr()->out(severity, prefix); } @@ -147,7 +147,7 @@ out(NotifySeverity severity, bool prefix) { * */ template -INLINE ostream &NotifyCategoryProxy:: +INLINE std::ostream &NotifyCategoryProxy:: spam(bool prefix) { return get_unsafe_ptr()->spam(prefix); } @@ -156,7 +156,7 @@ spam(bool prefix) { * */ template -INLINE ostream &NotifyCategoryProxy:: +INLINE std::ostream &NotifyCategoryProxy:: debug(bool prefix) { return get_unsafe_ptr()->debug(prefix); } @@ -165,7 +165,7 @@ debug(bool prefix) { * */ template -INLINE ostream &NotifyCategoryProxy:: +INLINE std::ostream &NotifyCategoryProxy:: info(bool prefix) { return get_unsafe_ptr()->info(prefix); } @@ -174,7 +174,7 @@ info(bool prefix) { * */ template -INLINE ostream &NotifyCategoryProxy:: +INLINE std::ostream &NotifyCategoryProxy:: warning(bool prefix) { return get_unsafe_ptr()->warning(prefix); } @@ -183,7 +183,7 @@ warning(bool prefix) { * */ template -INLINE ostream &NotifyCategoryProxy:: +INLINE std::ostream &NotifyCategoryProxy:: error(bool prefix) { return get_unsafe_ptr()->error(prefix); } @@ -192,7 +192,7 @@ error(bool prefix) { * */ template -INLINE ostream &NotifyCategoryProxy:: +INLINE std::ostream &NotifyCategoryProxy:: fatal(bool prefix) { return get_unsafe_ptr()->fatal(prefix); } diff --git a/dtool/src/prc/notifyCategoryProxy.h b/dtool/src/prc/notifyCategoryProxy.h index eaa83a8282..06f38ec804 100644 --- a/dtool/src/prc/notifyCategoryProxy.h +++ b/dtool/src/prc/notifyCategoryProxy.h @@ -83,13 +83,13 @@ public: INLINE bool is_error(); INLINE bool is_fatal(); - INLINE ostream &out(NotifySeverity severity, bool prefix = true); - INLINE ostream &spam(bool prefix = true); - INLINE ostream &debug(bool prefix = true); - INLINE ostream &info(bool prefix = true); - INLINE ostream &warning(bool prefix = true); - INLINE ostream &error(bool prefix = true); - INLINE ostream &fatal(bool prefix = true); + INLINE std::ostream &out(NotifySeverity severity, bool prefix = true); + INLINE std::ostream &spam(bool prefix = true); + INLINE std::ostream &debug(bool prefix = true); + INLINE std::ostream &info(bool prefix = true); + INLINE std::ostream &warning(bool prefix = true); + INLINE std::ostream &error(bool prefix = true); + INLINE std::ostream &fatal(bool prefix = true); // The same functions as above, when accessed using proxy->function() // syntax, call get_safe_ptr(). These can be used safely either in static- @@ -103,7 +103,7 @@ private: }; template -INLINE ostream &operator << (ostream &out, NotifyCategoryProxy &proxy) { +INLINE std::ostream &operator << (std::ostream &out, NotifyCategoryProxy &proxy) { return out << proxy->get_fullname(); } @@ -159,7 +159,7 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy &pro } \ NotifyCategory *NotifyCategoryGetCategory_ ## basename:: \ get_category() { \ - return Notify::ptr()->get_category(string(actual_name), parent_category); \ + return Notify::ptr()->get_category(std::string(actual_name), parent_category); \ } #define NotifyCategoryDef(basename, parent_category) \ NotifyCategoryDefName(basename, #basename, parent_category); diff --git a/dtool/src/prc/notifySeverity.h b/dtool/src/prc/notifySeverity.h index d16cdb89d8..f44e79ba55 100644 --- a/dtool/src/prc/notifySeverity.h +++ b/dtool/src/prc/notifySeverity.h @@ -28,8 +28,8 @@ enum NotifySeverity { }; END_PUBLISH -EXPCL_DTOOL_PRC ostream &operator << (ostream &out, NotifySeverity severity); -EXPCL_DTOOL_PRC istream &operator >> (istream &in, NotifySeverity &severity); +EXPCL_DTOOL_PRC std::ostream &operator << (std::ostream &out, NotifySeverity severity); +EXPCL_DTOOL_PRC std::istream &operator >> (std::istream &in, NotifySeverity &severity); #endif diff --git a/dtool/src/prc/pnotify.I b/dtool/src/prc/pnotify.I index 1cdea86f2d..4a1730acf5 100644 --- a/dtool/src/prc/pnotify.I +++ b/dtool/src/prc/pnotify.I @@ -34,7 +34,7 @@ has_assert_failed() const { * Returns the error message that corresponds to the assertion that most * recently failed. */ -INLINE const string &Notify:: +INLINE const std::string &Notify:: get_assert_error_message() const { return _assert_error_message; } diff --git a/dtool/src/prc/pnotify.h b/dtool/src/prc/pnotify.h index 90cdb24a5d..6fe488862e 100644 --- a/dtool/src/prc/pnotify.h +++ b/dtool/src/prc/pnotify.h @@ -35,8 +35,8 @@ PUBLISHED: Notify(); ~Notify(); - void set_ostream_ptr(ostream *ostream_ptr, bool delete_later); - ostream *get_ostream_ptr() const; + void set_ostream_ptr(std::ostream *ostream_ptr, bool delete_later); + std::ostream *get_ostream_ptr() const; typedef bool AssertHandler(const char *expression, int line, const char *source_file); @@ -47,45 +47,45 @@ PUBLISHED: AssertHandler *get_assert_handler() const; INLINE bool has_assert_failed() const; - INLINE const string &get_assert_error_message() const; + INLINE const std::string &get_assert_error_message() const; INLINE void clear_assert_failed(); NotifyCategory *get_top_category(); - NotifyCategory *get_category(const string &basename, + NotifyCategory *get_category(const std::string &basename, NotifyCategory *parent_category); - NotifyCategory *get_category(const string &basename, - const string &parent_fullname); - NotifyCategory *get_category(const string &fullname); + NotifyCategory *get_category(const std::string &basename, + const std::string &parent_fullname); + NotifyCategory *get_category(const std::string &fullname); - static ostream &out(); - static ostream &null(); - static void write_string(const string &str); + static std::ostream &out(); + static std::ostream &null(); + static void write_string(const std::string &str); static Notify *ptr(); public: static ios_fmtflags get_literal_flag(); - bool assert_failure(const string &expression, int line, + bool assert_failure(const std::string &expression, int line, const char *source_file); bool assert_failure(const char *expression, int line, const char *source_file); - static NotifySeverity string_severity(const string &string); + static NotifySeverity string_severity(const std::string &string); void config_initialized(); private: - ostream *_ostream_ptr; + std::ostream *_ostream_ptr; bool _owns_ostream_ptr; - ostream *_null_ostream_ptr; + std::ostream *_null_ostream_ptr; AssertHandler *_assert_handler; bool _assert_failed; - string _assert_error_message; + std::string _assert_error_message; // This shouldn't be a pmap, since it might be invoked before we initialize // the global malloc pointers. - typedef std::map Categories; + typedef std::map Categories; Categories _categories; static Notify *_global_ptr; diff --git a/dtool/src/prc/streamReader.I b/dtool/src/prc/streamReader.I index 8f96aa85f4..e15953aeba 100644 --- a/dtool/src/prc/streamReader.I +++ b/dtool/src/prc/streamReader.I @@ -15,7 +15,7 @@ * */ INLINE StreamReader:: -StreamReader(istream &in) : +StreamReader(std::istream &in) : _in(&in), _owns_stream(false) { @@ -26,7 +26,7 @@ StreamReader(istream &in) : * StreamReader destructs. */ INLINE StreamReader:: -StreamReader(istream *in, bool owns_stream) : +StreamReader(std::istream *in, bool owns_stream) : _in(in), _owns_stream(owns_stream) { @@ -67,7 +67,7 @@ INLINE StreamReader:: /** * Returns the stream in use. */ -INLINE istream *StreamReader:: +INLINE std::istream *StreamReader:: get_istream() const { return _in; } diff --git a/dtool/src/prc/streamReader.h b/dtool/src/prc/streamReader.h index 1643dd4a9c..a317f0a783 100644 --- a/dtool/src/prc/streamReader.h +++ b/dtool/src/prc/streamReader.h @@ -27,15 +27,15 @@ */ class EXPCL_DTOOL_PRC StreamReader { public: - INLINE StreamReader(istream &in); + INLINE StreamReader(std::istream &in); PUBLISHED: - INLINE explicit StreamReader(istream *in, bool owns_stream); + INLINE explicit StreamReader(std::istream *in, bool owns_stream); INLINE StreamReader(const StreamReader ©); INLINE void operator = (const StreamReader ©); INLINE ~StreamReader(); - INLINE istream *get_istream() const; - MAKE_PROPERTY(istream, get_istream); + INLINE std::istream *get_istream() const; + MAKE_PROPERTY(std::istream, get_istream); BLOCKING INLINE bool get_bool(); BLOCKING INLINE int8_t get_int8(); @@ -59,10 +59,10 @@ PUBLISHED: BLOCKING INLINE float get_be_float32(); BLOCKING INLINE PN_float64 get_be_float64(); - BLOCKING string get_string(); - BLOCKING string get_string32(); - BLOCKING string get_z_string(); - BLOCKING string get_fixed_string(size_t size); + BLOCKING std::string get_string(); + BLOCKING std::string get_string32(); + BLOCKING std::string get_z_string(); + BLOCKING std::string get_fixed_string(size_t size); BLOCKING void skip_bytes(size_t size); BLOCKING size_t extract_bytes(unsigned char *into, size_t size); @@ -73,10 +73,10 @@ PUBLISHED: public: BLOCKING vector_uchar extract_bytes(size_t size); - BLOCKING string readline(); + BLOCKING std::string readline(); private: - istream *_in; + std::istream *_in; bool _owns_stream; }; diff --git a/dtool/src/prc/streamWrapper.I b/dtool/src/prc/streamWrapper.I index a6438e318e..0f9d65d414 100644 --- a/dtool/src/prc/streamWrapper.I +++ b/dtool/src/prc/streamWrapper.I @@ -62,7 +62,7 @@ release() { * */ INLINE IStreamWrapper:: -IStreamWrapper(istream *stream, bool owns_pointer) : +IStreamWrapper(std::istream *stream, bool owns_pointer) : _istream(stream), _owns_pointer(owns_pointer) { @@ -72,7 +72,7 @@ IStreamWrapper(istream *stream, bool owns_pointer) : * */ INLINE IStreamWrapper:: -IStreamWrapper(istream &stream) : +IStreamWrapper(std::istream &stream) : _istream(&stream), _owns_pointer(false) { @@ -81,7 +81,7 @@ IStreamWrapper(istream &stream) : /** * Returns the istream this object is wrapping. */ -INLINE istream *IStreamWrapper:: +INLINE std::istream *IStreamWrapper:: get_istream() const { return _istream; } @@ -103,7 +103,7 @@ get() { * */ INLINE OStreamWrapper:: -OStreamWrapper(ostream *stream, bool owns_pointer, bool stringstream_hack) : +OStreamWrapper(std::ostream *stream, bool owns_pointer, bool stringstream_hack) : _ostream(stream), _owns_pointer(owns_pointer) #ifdef WIN32_VC @@ -116,7 +116,7 @@ OStreamWrapper(ostream *stream, bool owns_pointer, bool stringstream_hack) : * */ INLINE OStreamWrapper:: -OStreamWrapper(ostream &stream) : +OStreamWrapper(std::ostream &stream) : _ostream(&stream), _owns_pointer(false) #ifdef WIN32_VC @@ -128,7 +128,7 @@ OStreamWrapper(ostream &stream) : /** * Returns the ostream this object is wrapping. */ -INLINE ostream *OStreamWrapper:: +INLINE std::ostream *OStreamWrapper:: get_ostream() const { return _ostream; } @@ -151,7 +151,7 @@ put(char c) { * */ INLINE StreamWrapper:: -StreamWrapper(iostream *stream, bool owns_pointer, bool stringstream_hack) : +StreamWrapper(std::iostream *stream, bool owns_pointer, bool stringstream_hack) : IStreamWrapper(stream, false), OStreamWrapper(stream, false, stringstream_hack), _iostream(stream), @@ -163,7 +163,7 @@ StreamWrapper(iostream *stream, bool owns_pointer, bool stringstream_hack) : * */ INLINE StreamWrapper:: -StreamWrapper(iostream &stream) : +StreamWrapper(std::iostream &stream) : IStreamWrapper(&stream, false), OStreamWrapper(&stream, false), _iostream(&stream), @@ -174,7 +174,7 @@ StreamWrapper(iostream &stream) : /** * Returns the iostream this object is wrapping. */ -INLINE iostream *StreamWrapper:: +INLINE std::iostream *StreamWrapper:: get_iostream() const { return _iostream; } diff --git a/dtool/src/prc/streamWrapper.h b/dtool/src/prc/streamWrapper.h index 62e57fa9e1..b5a4d5bf72 100644 --- a/dtool/src/prc/streamWrapper.h +++ b/dtool/src/prc/streamWrapper.h @@ -48,24 +48,24 @@ private: */ class EXPCL_DTOOL_PRC IStreamWrapper : virtual public StreamWrapperBase { public: - INLINE IStreamWrapper(istream *stream, bool owns_pointer); + INLINE IStreamWrapper(std::istream *stream, bool owns_pointer); PUBLISHED: - INLINE explicit IStreamWrapper(istream &stream); + INLINE explicit IStreamWrapper(std::istream &stream); ~IStreamWrapper(); - INLINE istream *get_istream() const; - MAKE_PROPERTY(istream, get_istream); + INLINE std::istream *get_istream() const; + MAKE_PROPERTY(std::istream, get_istream); public: - void read(char *buffer, streamsize num_bytes); - void read(char *buffer, streamsize num_bytes, streamsize &read_bytes); - void read(char *buffer, streamsize num_bytes, streamsize &read_bytes, bool &eof); - void seek_read(streamsize pos, char *buffer, streamsize num_bytes, streamsize &read_bytes, bool &eof); + void read(char *buffer, std::streamsize num_bytes); + void read(char *buffer, std::streamsize num_bytes, std::streamsize &read_bytes); + void read(char *buffer, std::streamsize num_bytes, std::streamsize &read_bytes, bool &eof); + void seek_read(std::streamsize pos, char *buffer, std::streamsize num_bytes, std::streamsize &read_bytes, bool &eof); INLINE int get(); - streamsize seek_gpos_eof(); + std::streamsize seek_gpos_eof(); private: - istream *_istream; + std::istream *_istream; bool _owns_pointer; }; @@ -75,24 +75,24 @@ private: */ class EXPCL_DTOOL_PRC OStreamWrapper : virtual public StreamWrapperBase { public: - INLINE OStreamWrapper(ostream *stream, bool owns_pointer, bool stringstream_hack = false); + INLINE OStreamWrapper(std::ostream *stream, bool owns_pointer, bool stringstream_hack = false); PUBLISHED: - INLINE explicit OStreamWrapper(ostream &stream); + INLINE explicit OStreamWrapper(std::ostream &stream); ~OStreamWrapper(); - INLINE ostream *get_ostream() const; - MAKE_PROPERTY(ostream, get_ostream); + INLINE std::ostream *get_ostream() const; + MAKE_PROPERTY(std::ostream, get_ostream); public: - void write(const char *buffer, streamsize num_bytes); - void write(const char *buffer, streamsize num_bytes, bool &fail); - void seek_write(streamsize pos, const char *buffer, streamsize num_bytes, bool &fail); - void seek_eof_write(const char *buffer, streamsize num_bytes, bool &fail); + void write(const char *buffer, std::streamsize num_bytes); + void write(const char *buffer, std::streamsize num_bytes, bool &fail); + void seek_write(std::streamsize pos, const char *buffer, std::streamsize num_bytes, bool &fail); + void seek_eof_write(const char *buffer, std::streamsize num_bytes, bool &fail); INLINE bool put(char c); - streamsize seek_ppos_eof(); + std::streamsize seek_ppos_eof(); private: - ostream *_ostream; + std::ostream *_ostream; bool _owns_pointer; // This flag is necessary to work around a weird quirk in the MSVS C++ @@ -111,16 +111,16 @@ private: */ class EXPCL_DTOOL_PRC StreamWrapper : public IStreamWrapper, public OStreamWrapper { public: - INLINE StreamWrapper(iostream *stream, bool owns_pointer, bool stringstream_hack = false); + INLINE StreamWrapper(std::iostream *stream, bool owns_pointer, bool stringstream_hack = false); PUBLISHED: - INLINE explicit StreamWrapper(iostream &stream); + INLINE explicit StreamWrapper(std::iostream &stream); ~StreamWrapper(); - INLINE iostream *get_iostream() const; - MAKE_PROPERTY(iostream, get_iostream); + INLINE std::iostream *get_iostream() const; + MAKE_PROPERTY(std::iostream, get_iostream); private: - iostream *_iostream; + std::iostream *_iostream; bool _owns_pointer; }; diff --git a/dtool/src/prc/streamWriter.I b/dtool/src/prc/streamWriter.I index 8bbe23af62..b2485d3fc7 100644 --- a/dtool/src/prc/streamWriter.I +++ b/dtool/src/prc/streamWriter.I @@ -15,7 +15,7 @@ * */ INLINE StreamWriter:: -StreamWriter(ostream &out) : +StreamWriter(std::ostream &out) : #ifdef HAVE_PYTHON softspace(0), #endif @@ -28,7 +28,7 @@ StreamWriter(ostream &out) : * */ INLINE StreamWriter:: -StreamWriter(ostream *out, bool owns_stream) : +StreamWriter(std::ostream *out, bool owns_stream) : #ifdef HAVE_PYTHON softspace(0), #endif @@ -75,7 +75,7 @@ INLINE StreamWriter:: /** * Returns the stream in use. */ -INLINE ostream *StreamWriter:: +INLINE std::ostream *StreamWriter:: get_ostream() const { return _out; } @@ -265,7 +265,7 @@ add_be_float64(PN_float64 value) { * followed by n bytes. */ INLINE void StreamWriter:: -add_string(const string &str) { +add_string(const std::string &str) { // The max sendable length for a string is 2^16. nassertv(str.length() <= (uint16_t)0xffff); @@ -280,7 +280,7 @@ add_string(const string &str) { * Adds a variable-length string to the stream, using a 32-bit length field. */ INLINE void StreamWriter:: -add_string32(const string &str) { +add_string32(const std::string &str) { // Strings always are preceded by their length add_uint32((uint32_t)str.length()); @@ -292,7 +292,7 @@ add_string32(const string &str) { * Adds a variable-length string to the stream, as a NULL-terminated string. */ INLINE void StreamWriter:: -add_z_string(string str) { +add_z_string(std::string str) { // We must not have any nested null characters in the string. size_t null_pos = str.find('\0'); // Add the string (sans the null character). @@ -308,7 +308,7 @@ add_z_string(string str) { * greater than the requested size, this will silently truncate the string. */ INLINE void StreamWriter:: -add_fixed_string(const string &str, size_t size) { +add_fixed_string(const std::string &str, size_t size) { if (str.length() < size) { append_data(str); pad_bytes(size - str.length()); @@ -330,7 +330,7 @@ append_data(const void *data, size_t size) { * Appends some more raw data to the end of the streamWriter. */ INLINE void StreamWriter:: -append_data(const string &data) { +append_data(const std::string &data) { append_data(data.data(), data.length()); } @@ -347,6 +347,6 @@ flush() { * to sys.stderr and/or sys.stdout in Python. */ INLINE void StreamWriter:: -write(const string &data) { +write(const std::string &data) { append_data(data.data(), data.length()); } diff --git a/dtool/src/prc/streamWriter.h b/dtool/src/prc/streamWriter.h index b39db968c0..cc00ef9ce3 100644 --- a/dtool/src/prc/streamWriter.h +++ b/dtool/src/prc/streamWriter.h @@ -28,15 +28,15 @@ */ class EXPCL_DTOOL_PRC StreamWriter { public: - INLINE StreamWriter(ostream &out); + INLINE StreamWriter(std::ostream &out); PUBLISHED: - INLINE explicit StreamWriter(ostream *out, bool owns_stream); + INLINE explicit StreamWriter(std::ostream *out, bool owns_stream); INLINE StreamWriter(const StreamWriter ©); INLINE void operator = (const StreamWriter ©); INLINE ~StreamWriter(); - INLINE ostream *get_ostream() const; - MAKE_PROPERTY(ostream, get_ostream); + INLINE std::ostream *get_ostream() const; + MAKE_PROPERTY(std::ostream, get_ostream); BLOCKING INLINE void add_bool(bool value); BLOCKING INLINE void add_int8(int8_t value); @@ -62,24 +62,24 @@ PUBLISHED: BLOCKING INLINE void add_be_float32(float value); BLOCKING INLINE void add_be_float64(PN_float64 value); - BLOCKING INLINE void add_string(const string &str); - BLOCKING INLINE void add_string32(const string &str); - BLOCKING INLINE void add_z_string(string str); - BLOCKING INLINE void add_fixed_string(const string &str, size_t size); + BLOCKING INLINE void add_string(const std::string &str); + BLOCKING INLINE void add_string32(const std::string &str); + BLOCKING INLINE void add_z_string(std::string str); + BLOCKING INLINE void add_fixed_string(const std::string &str, size_t size); BLOCKING void pad_bytes(size_t size); EXTENSION(void append_data(PyObject *data)); BLOCKING INLINE void flush(); - BLOCKING INLINE void write(const string &str); + BLOCKING INLINE void write(const std::string &str); public: BLOCKING INLINE void append_data(const void *data, size_t size); - BLOCKING INLINE void append_data(const string &data); + BLOCKING INLINE void append_data(const std::string &data); private: - ostream *_out; + std::ostream *_out; bool _owns_stream; #ifdef HAVE_PYTHON diff --git a/panda/src/android/config_android.h b/panda/src/android/config_android.h index 2224dbd065..4935db0718 100644 --- a/panda/src/android/config_android.h +++ b/panda/src/android/config_android.h @@ -39,6 +39,6 @@ extern jclass jni_BitmapFactory_Options; extern jfieldID jni_BitmapFactory_Options_outWidth; extern jfieldID jni_BitmapFactory_Options_outHeight; -EXPORT_CLASS void android_show_toast(ANativeActivity *activity, const string &message, int duration); +EXPORT_CLASS void android_show_toast(ANativeActivity *activity, const std::string &message, int duration); #endif diff --git a/panda/src/android/pnmFileTypeAndroid.h b/panda/src/android/pnmFileTypeAndroid.h index d872c58578..3501f31239 100644 --- a/panda/src/android/pnmFileTypeAndroid.h +++ b/panda/src/android/pnmFileTypeAndroid.h @@ -38,21 +38,21 @@ public: PNMFileTypeAndroid(CompressFormat format); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; + virtual std::string get_extension(int n) const; virtual bool has_magic_number() const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual ~Reader(); virtual void prepare_read(); @@ -69,7 +69,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file, + Writer(PNMFileType *type, std::ostream *file, bool owns_file, CompressFormat format); virtual int write_data(xel *array, xelval *alpha); diff --git a/panda/src/androiddisplay/androidGraphicsPipe.h b/panda/src/androiddisplay/androidGraphicsPipe.h index cead149963..8767f1ee23 100644 --- a/panda/src/androiddisplay/androidGraphicsPipe.h +++ b/panda/src/androiddisplay/androidGraphicsPipe.h @@ -42,14 +42,14 @@ public: AndroidGraphicsPipe(); virtual ~AndroidGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); public: virtual PreferredWindowThread get_preferred_window_thread() const; protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/androiddisplay/androidGraphicsWindow.h b/panda/src/androiddisplay/androidGraphicsWindow.h index 3d1ca79946..0842b18f2b 100644 --- a/panda/src/androiddisplay/androidGraphicsWindow.h +++ b/panda/src/androiddisplay/androidGraphicsWindow.h @@ -33,7 +33,7 @@ struct android_app; class AndroidGraphicsWindow : public GraphicsWindow { public: AndroidGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/androiddisplay/config_androiddisplay.h b/panda/src/androiddisplay/config_androiddisplay.h index 29c5c3417c..78c42211c0 100644 --- a/panda/src/androiddisplay/config_androiddisplay.h +++ b/panda/src/androiddisplay/config_androiddisplay.h @@ -31,12 +31,12 @@ NotifyCategoryDecl(androiddisplay, EXPCL_PANDAGLES2, EXPTP_PANDAGLES2); extern EXPCL_PANDAGLES2 void init_libandroiddisplay(); - extern EXPCL_PANDAGLES2 const string get_egl_error_string(int error); + extern EXPCL_PANDAGLES2 const std::string get_egl_error_string(int error); #else NotifyCategoryDecl(androiddisplay, EXPCL_PANDAGLES, EXPTP_PANDAGLES); extern EXPCL_PANDAGLES void init_libandroiddisplay(); - extern EXPCL_PANDAGLES const string get_egl_error_string(int error); + extern EXPCL_PANDAGLES const std::string get_egl_error_string(int error); #endif #endif diff --git a/panda/src/audio/audioLoadRequest.I b/panda/src/audio/audioLoadRequest.I index 647692315d..019501aa77 100644 --- a/panda/src/audio/audioLoadRequest.I +++ b/panda/src/audio/audioLoadRequest.I @@ -16,7 +16,7 @@ * to begin an asynchronous load. */ INLINE AudioLoadRequest:: -AudioLoadRequest(AudioManager *audio_manager, const string &filename, +AudioLoadRequest(AudioManager *audio_manager, const std::string &filename, bool positional) : _audio_manager(audio_manager), _filename(filename), @@ -36,7 +36,7 @@ get_audio_manager() const { /** * Returns the filename associated with this asynchronous AudioLoadRequest. */ -INLINE const string &AudioLoadRequest:: +INLINE const std::string &AudioLoadRequest:: get_filename() const { return _filename; } diff --git a/panda/src/audio/audioLoadRequest.h b/panda/src/audio/audioLoadRequest.h index 6d0e59bf4c..1c07098b91 100644 --- a/panda/src/audio/audioLoadRequest.h +++ b/panda/src/audio/audioLoadRequest.h @@ -33,11 +33,11 @@ public: PUBLISHED: INLINE explicit AudioLoadRequest(AudioManager *audio_manager, - const string &filename, + const std::string &filename, bool positional); INLINE AudioManager *get_audio_manager() const; - INLINE const string &get_filename() const; + INLINE const std::string &get_filename() const; INLINE bool get_positional() const; INLINE bool is_ready() const; @@ -48,7 +48,7 @@ protected: private: PT(AudioManager) _audio_manager; - string _filename; + std::string _filename; bool _positional; public: diff --git a/panda/src/audio/audioManager.h b/panda/src/audio/audioManager.h index 3d69b26519..2ee14f10cb 100644 --- a/panda/src/audio/audioManager.h +++ b/panda/src/audio/audioManager.h @@ -86,7 +86,7 @@ PUBLISHED: virtual bool is_valid() = 0; // Get a sound: - virtual PT(AudioSound) get_sound(const string& file_name, bool positional = false, int mode=SM_heuristic) = 0; + virtual PT(AudioSound) get_sound(const std::string& file_name, bool positional = false, int mode=SM_heuristic) = 0; virtual PT(AudioSound) get_sound(MovieAudio *source, bool positional = false, int mode=SM_heuristic) = 0; PT(AudioSound) get_null_sound(); @@ -95,7 +95,7 @@ PUBLISHED: // doesn't break any connection between AudioSounds that have already given // by get_sound() from this manager. It's only affecting whether the // AudioManager keeps a copy of the sound in its poolcache. - virtual void uncache_sound(const string& file_name) = 0; + virtual void uncache_sound(const std::string& file_name) = 0; virtual void clear_cache() = 0; virtual void set_cache_limit(unsigned int count) = 0; virtual unsigned int get_cache_limit() const = 0; @@ -175,8 +175,8 @@ PUBLISHED: static Filename get_dls_pathname(); MAKE_PROPERTY(dls_pathname, get_dls_pathname); - virtual void output(ostream &out) const; - virtual void write(ostream &out) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out) const; // set_speaker_configuration is a Miles only method. virtual void set_speaker_configuration(LVecBase3 *speaker1, LVecBase3 *speaker2=nullptr, LVecBase3 *speaker3=nullptr, LVecBase3 *speaker4=nullptr, LVecBase3 *speaker5=nullptr, LVecBase3 *speaker6=nullptr, LVecBase3 *speaker7=nullptr, LVecBase3 *speaker8=nullptr, LVecBase3 *speaker9=nullptr); @@ -214,8 +214,8 @@ private: static TypeHandle _type_handle; }; -inline ostream & -operator << (ostream &out, const AudioManager &mgr) { +inline std::ostream & +operator << (std::ostream &out, const AudioManager &mgr) { mgr.output(out); return out; } diff --git a/panda/src/audio/audioSound.h b/panda/src/audio/audioSound.h index 357df8ad11..e348ad4daf 100644 --- a/panda/src/audio/audioSound.h +++ b/panda/src/audio/audioSound.h @@ -74,11 +74,11 @@ PUBLISHED: // Set (or clear) the event that will be thrown when the sound finishes // playing. To clear the event, pass an empty string. - virtual void set_finished_event(const string& event) = 0; - virtual const string& get_finished_event() const = 0; + virtual void set_finished_event(const std::string& event) = 0; + virtual const std::string& get_finished_event() const = 0; // There is no set_name(), this is intentional. - virtual const string& get_name() const = 0; + virtual const std::string& get_name() const = 0; // return: playing time in seconds. virtual PN_stdfloat length() const = 0; @@ -123,8 +123,8 @@ PUBLISHED: enum SoundStatus { BAD, READY, PLAYING }; virtual SoundStatus status() const = 0; - virtual void output(ostream &out) const; - virtual void write(ostream &out) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out) const; protected: AudioSound(); @@ -149,15 +149,15 @@ private: static TypeHandle _type_handle; }; -inline ostream & -operator << (ostream &out, const AudioSound &sound) { +inline std::ostream & +operator << (std::ostream &out, const AudioSound &sound) { sound.output(out); return out; } #include "audioSound.I" -EXPCL_PANDA_AUDIO ostream & -operator << (ostream &out, AudioSound::SoundStatus status); +EXPCL_PANDA_AUDIO std::ostream & +operator << (std::ostream &out, AudioSound::SoundStatus status); #endif /* __AUDIOSOUND_H__ */ diff --git a/panda/src/audio/config_audio.h b/panda/src/audio/config_audio.h index bb84a9bf2d..47853ac143 100644 --- a/panda/src/audio/config_audio.h +++ b/panda/src/audio/config_audio.h @@ -52,8 +52,8 @@ enum FmodSpeakerMode { FSM_unspecified }; -EXPCL_PANDA_AUDIO ostream &operator << (ostream &out, FmodSpeakerMode sm); -EXPCL_PANDA_AUDIO istream &operator >> (istream &in, FmodSpeakerMode &sm); +EXPCL_PANDA_AUDIO std::ostream &operator << (std::ostream &out, FmodSpeakerMode sm); +EXPCL_PANDA_AUDIO std::istream &operator >> (std::istream &in, FmodSpeakerMode &sm); extern EXPCL_PANDA_AUDIO ConfigVariableInt fmod_number_of_sound_channels; extern EXPCL_PANDA_AUDIO ConfigVariableBool fmod_use_surround_sound; @@ -84,7 +84,7 @@ extern EXPCL_PANDA_AUDIO ConfigVariableInt audio_output_channels; // Non-release build: #define audio_debug(msg) \ if (audio_cat.is_debug()) { \ - audio_cat->debug() << msg << endl; \ + audio_cat->debug() << msg << std::endl; \ } else {} #else //][ // Release build: @@ -92,12 +92,12 @@ extern EXPCL_PANDA_AUDIO ConfigVariableInt audio_output_channels; #endif //] #define audio_info(msg) \ - audio_cat->info() << msg << endl + audio_cat->info() << msg << std::endl #define audio_warning(msg) \ - audio_cat->warning() << msg << endl + audio_cat->warning() << msg << std::endl #define audio_error(msg) \ - audio_cat->error() << msg << endl + audio_cat->error() << msg << std::endl #endif /* __CONFIG_AUDIO_H__ */ diff --git a/panda/src/audio/nullAudioManager.h b/panda/src/audio/nullAudioManager.h index cebf6ab08a..9a8ff921e4 100644 --- a/panda/src/audio/nullAudioManager.h +++ b/panda/src/audio/nullAudioManager.h @@ -29,9 +29,9 @@ public: virtual bool is_valid(); - virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic); + virtual PT(AudioSound) get_sound(const std::string&, bool positional = false, int mode=SM_heuristic); virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic); - virtual void uncache_sound(const string&); + virtual void uncache_sound(const std::string&); virtual void clear_cache(); virtual void set_cache_limit(unsigned int); virtual unsigned int get_cache_limit() const; diff --git a/panda/src/audio/nullAudioSound.h b/panda/src/audio/nullAudioSound.h index 87ef0c9b95..d388493132 100644 --- a/panda/src/audio/nullAudioSound.h +++ b/panda/src/audio/nullAudioSound.h @@ -52,10 +52,10 @@ public: void set_active(bool); bool get_active() const; - void set_finished_event(const string& event); - const string& get_finished_event() const; + void set_finished_event(const std::string& event); + const std::string& get_finished_event() const; - const string& get_name() const; + const std::string& get_name() const; PN_stdfloat length() const; diff --git a/panda/src/audiotraits/fmodAudioManager.h b/panda/src/audiotraits/fmodAudioManager.h index 751385e5a7..6af6448079 100644 --- a/panda/src/audiotraits/fmodAudioManager.h +++ b/panda/src/audiotraits/fmodAudioManager.h @@ -88,7 +88,7 @@ public: virtual bool is_valid(); - virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic); + virtual PT(AudioSound) get_sound(const std::string&, bool positional = false, int mode=SM_heuristic); virtual PT(AudioSound) get_sound(MovieAudio *, bool positional = false, int mode=SM_heuristic); virtual int get_speaker_setup(); @@ -146,7 +146,7 @@ public: virtual void set_concurrent_sound_limit(unsigned int limit = 0); virtual unsigned int get_concurrent_sound_limit() const; virtual void reduce_sounds_playing_to(unsigned int count); - virtual void uncache_sound(const string&); + virtual void uncache_sound(const std::string&); virtual void clear_cache(); virtual void set_cache_limit(unsigned int count); virtual unsigned int get_cache_limit() const; @@ -177,7 +177,7 @@ private: FMOD_VECTOR _up; // DLS info for MIDI files - string _dlsname; + std::string _dlsname; FMOD_CREATESOUNDEXINFO _midi_info; bool _is_valid; diff --git a/panda/src/audiotraits/fmodAudioSound.h b/panda/src/audiotraits/fmodAudioSound.h index c77664ab61..8d0ad4408c 100644 --- a/panda/src/audiotraits/fmodAudioSound.h +++ b/panda/src/audiotraits/fmodAudioSound.h @@ -106,7 +106,7 @@ class EXPCL_FMOD_AUDIO FmodAudioSound : public AudioSound { void set_play_rate(PN_stdfloat play_rate=1.0f); PN_stdfloat get_play_rate() const; - const string &get_name() const; + const std::string &get_name() const; // return: playing time in seconds. PN_stdfloat length() const; @@ -132,8 +132,8 @@ class EXPCL_FMOD_AUDIO FmodAudioSound : public AudioSound { bool get_active() const; void finished(); - void set_finished_event(const string& event); - const string& get_finished_event() const; + void set_finished_event(const std::string& event); + const std::string& get_finished_event() const; private: PT(FmodAudioManager) _manager; @@ -175,7 +175,7 @@ class EXPCL_FMOD_AUDIO FmodAudioSound : public AudioSound { bool _paused; PN_stdfloat _start_time; - string _finished_event; + std::string _finished_event; // This reference-counting pointer is set to this while the sound is // playing, and cleared when we get an indication that the sound has diff --git a/panda/src/audiotraits/milesAudioManager.h b/panda/src/audiotraits/milesAudioManager.h index 51fb16b527..e203609fb7 100644 --- a/panda/src/audiotraits/milesAudioManager.h +++ b/panda/src/audiotraits/milesAudioManager.h @@ -42,9 +42,9 @@ public: virtual bool is_valid(); - virtual PT(AudioSound) get_sound(const string &file_name, bool positional = false, int mode=SM_heuristic); + virtual PT(AudioSound) get_sound(const std::string &file_name, bool positional = false, int mode=SM_heuristic); virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic); - virtual void uncache_sound(const string &file_name); + virtual void uncache_sound(const std::string &file_name); virtual void clear_cache(); virtual void set_cache_limit(unsigned int count); virtual unsigned int get_cache_limit() const; @@ -83,8 +83,8 @@ public: virtual PN_stdfloat audio_3d_get_drop_off_factor() const; virtual void set_speaker_configuration(LVecBase3 *speaker1, LVecBase3 *speaker2=nullptr, LVecBase3 *speaker3=nullptr, LVecBase3 *speaker4=nullptr, LVecBase3 *speaker5=nullptr, LVecBase3 *speaker6=nullptr, LVecBase3 *speaker7=nullptr, LVecBase3 *speaker8=nullptr, LVecBase3 *speaker9=nullptr); - virtual void output(ostream &out) const; - virtual void write(ostream &out) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out) const; private: bool do_is_valid(); @@ -94,7 +94,7 @@ private: void start_service_stream(HSTREAM stream); void stop_service_stream(HSTREAM stream); - void most_recently_used(const string &path); + void most_recently_used(const std::string &path); void uncache_a_sound(); void starting_sound(MilesAudioSound *audio); @@ -130,7 +130,7 @@ private: bool _has_length; PN_stdfloat _length; // in seconds. }; - typedef pmap SoundMap; + typedef pmap SoundMap; SoundMap _sounds; typedef pset AudioSet; @@ -142,7 +142,7 @@ private: SoundsPlaying _sounds_playing; // The Least Recently Used mechanism: - typedef pdeque LRU; + typedef pdeque LRU; LRU _lru; // State: PN_stdfloat _volume; diff --git a/panda/src/audiotraits/milesAudioSample.h b/panda/src/audiotraits/milesAudioSample.h index 6e976fa212..22f5e5d457 100644 --- a/panda/src/audiotraits/milesAudioSample.h +++ b/panda/src/audiotraits/milesAudioSample.h @@ -30,7 +30,7 @@ class EXPCL_MILES_AUDIO MilesAudioSample : public MilesAudioSound { private: MilesAudioSample(MilesAudioManager *manager, MilesAudioManager::SoundData *sd, - const string &file_name); + const std::string &file_name); public: virtual ~MilesAudioSample(); @@ -49,7 +49,7 @@ public: virtual AudioSound::SoundStatus status() const; virtual void cleanup(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; // 3D spatialized sound support. Spatialized sound was originally added for // FMOD, so there are parts of the interface in the Miles implementation diff --git a/panda/src/audiotraits/milesAudioSequence.h b/panda/src/audiotraits/milesAudioSequence.h index 8f01a037fd..2386c6d17b 100644 --- a/panda/src/audiotraits/milesAudioSequence.h +++ b/panda/src/audiotraits/milesAudioSequence.h @@ -29,7 +29,7 @@ class EXPCL_MILES_AUDIO MilesAudioSequence : public MilesAudioSound { private: MilesAudioSequence(MilesAudioManager *manager, MilesAudioManager::SoundData *sd, - const string &file_name); + const std::string &file_name); public: virtual ~MilesAudioSequence(); diff --git a/panda/src/audiotraits/milesAudioSound.h b/panda/src/audiotraits/milesAudioSound.h index 46c6aa74c3..c44584d69a 100644 --- a/panda/src/audiotraits/milesAudioSound.h +++ b/panda/src/audiotraits/milesAudioSound.h @@ -26,7 +26,7 @@ */ class EXPCL_MILES_AUDIO MilesAudioSound : public AudioSound { protected: - MilesAudioSound(MilesAudioManager *manager, const string &file_name); + MilesAudioSound(MilesAudioManager *manager, const std::string &file_name); public: virtual void set_loop(bool loop=true); @@ -44,16 +44,16 @@ public: virtual void set_active(bool active=true); virtual bool get_active() const; - virtual void set_finished_event(const string &event); - virtual const string &get_finished_event() const; + virtual void set_finished_event(const std::string &event); + virtual const std::string &get_finished_event() const; - virtual const string &get_name() const; + virtual const std::string &get_name() const; virtual void cleanup(); protected: PT(MilesAudioManager) _manager; - string _file_name; + std::string _file_name; PN_stdfloat _volume; // 0..1.0 PN_stdfloat _balance; // -1..1 @@ -72,7 +72,7 @@ protected: // This is the string that throw_event() will throw when the sound finishes // playing. It is not triggered when the sound is stopped with stop(). // Note: no longer implemented. - string _finished_event; + std::string _finished_event; // This is set whenever we call set_time(). Calling play() will respect // this if it is set, and then reset it. diff --git a/panda/src/audiotraits/milesAudioStream.h b/panda/src/audiotraits/milesAudioStream.h index 8050f513cf..42bda6b6ab 100644 --- a/panda/src/audiotraits/milesAudioStream.h +++ b/panda/src/audiotraits/milesAudioStream.h @@ -28,7 +28,7 @@ */ class EXPCL_MILES_AUDIO MilesAudioStream : public MilesAudioSound { private: - MilesAudioStream(MilesAudioManager *manager, const string &file_name, + MilesAudioStream(MilesAudioManager *manager, const std::string &file_name, const Filename &path); public: diff --git a/panda/src/audiotraits/openalAudioManager.h b/panda/src/audiotraits/openalAudioManager.h index 1e16e4000b..8fe8a8f3f3 100644 --- a/panda/src/audiotraits/openalAudioManager.h +++ b/panda/src/audiotraits/openalAudioManager.h @@ -51,10 +51,10 @@ class EXPCL_OPENAL_AUDIO OpenALAudioManager : public AudioManager { virtual bool is_valid(); - virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic); + virtual PT(AudioSound) get_sound(const std::string&, bool positional = false, int mode=SM_heuristic); virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic); - virtual void uncache_sound(const string&); + virtual void uncache_sound(const std::string&); virtual void clear_cache(); virtual void set_cache_limit(unsigned int count); virtual unsigned int get_cache_limit() const; @@ -114,7 +114,7 @@ class EXPCL_OPENAL_AUDIO OpenALAudioManager : public AudioManager { virtual void update(); private: - string select_audio_device(); + std::string select_audio_device(); void make_current() const; @@ -175,7 +175,7 @@ private: }; - typedef phash_map SampleCache; + typedef phash_map SampleCache; SampleCache _sample_cache; typedef phash_set SoundsPlaying; diff --git a/panda/src/audiotraits/openalAudioSound.h b/panda/src/audiotraits/openalAudioSound.h index e10f4f179a..3c1feda08a 100644 --- a/panda/src/audiotraits/openalAudioSound.h +++ b/panda/src/audiotraits/openalAudioSound.h @@ -72,10 +72,10 @@ public: // This is the string that throw_event() will throw when the sound finishes // playing. It is not triggered when the sound is stopped with stop(). - void set_finished_event(const string& event); - const string& get_finished_event() const; + void set_finished_event(const std::string& event); + const std::string& get_finished_event() const; - const string &get_name() const; + const std::string &get_name() const; // return: playing time in seconds. PN_stdfloat length() const; @@ -177,7 +177,7 @@ private: // This is the string that throw_event() will throw when the sound finishes // playing. It is not triggered when the sound is stopped with stop(). - string _finished_event; + std::string _finished_event; Filename _basename; diff --git a/panda/src/awesomium/AwMouseAndKeyboard.h b/panda/src/awesomium/AwMouseAndKeyboard.h index 2a70904523..e338939001 100644 --- a/panda/src/awesomium/AwMouseAndKeyboard.h +++ b/panda/src/awesomium/AwMouseAndKeyboard.h @@ -32,7 +32,7 @@ protected: int _button_events_output; PUBLISHED: - AwMouseAndKeyboard(const string &name); + AwMouseAndKeyboard(const std::string &name); protected: // Inherited from DataNode diff --git a/panda/src/awesomium/WebBrowserTexture.h b/panda/src/awesomium/WebBrowserTexture.h index 112f8399da..3c9e6aaa08 100644 --- a/panda/src/awesomium/WebBrowserTexture.h +++ b/panda/src/awesomium/WebBrowserTexture.h @@ -37,7 +37,7 @@ protected: private: WebBrowserTexture(const WebBrowserTexture ©); PUBLISHED: - WebBrowserTexture(const string &name, AwWebView* aw_web_view = nullptr); + WebBrowserTexture(const std::string &name, AwWebView* aw_web_view = nullptr); virtual ~WebBrowserTexture(); diff --git a/panda/src/awesomium/awWebView.h b/panda/src/awesomium/awWebView.h index 5a5550c4ee..ad5c9d223c 100644 --- a/panda/src/awesomium/awWebView.h +++ b/panda/src/awesomium/awWebView.h @@ -63,7 +63,7 @@ PUBLISHED: // VC7 linker doesn't like wstring from VS2008, hence using the all regular // string version - void loadURL2(const string& url, const string& frameName ="", const string& username="" , const string& password=""); + void loadURL2(const std::string& url, const std::string& frameName ="", const std::string& username="" , const std::string& password=""); // VC7 linker doesn't like wstring from VS2008, hence using the all regular // string version diff --git a/panda/src/bullet/bulletBodyNode.h b/panda/src/bullet/bulletBodyNode.h index 55f8583938..90578eb62b 100644 --- a/panda/src/bullet/bulletBodyNode.h +++ b/panda/src/bullet/bulletBodyNode.h @@ -150,8 +150,8 @@ public: virtual bool safe_to_combine_children() const; virtual bool safe_to_flatten_below() const; - virtual void output(ostream &out) const; - virtual void do_output(ostream &out) const; + virtual void output(std::ostream &out) const; + virtual void do_output(std::ostream &out) const; protected: void set_collision_flag(int flag, bool value); diff --git a/panda/src/bullet/bulletContactCallbacks.h b/panda/src/bullet/bulletContactCallbacks.h index e368e6ee0c..e9891fda8a 100644 --- a/panda/src/bullet/bulletContactCallbacks.h +++ b/panda/src/bullet/bulletContactCallbacks.h @@ -61,7 +61,7 @@ contact_added_callback(btManifoldPoint &cp, PT(PandaNode) node1 = (PandaNode *)obj1->getUserPointer(); #endif - bullet_cat.debug() << "contact added: " << cp.m_userPersistentData << endl; + bullet_cat.debug() << "contact added: " << cp.m_userPersistentData << std::endl; // Gather persistent data UserPersistentData *data = new UserPersistentData(); @@ -124,7 +124,7 @@ contact_processed_callback(btManifoldPoint &cp, static bool contact_destroyed_callback(void *userPersistentData) { - bullet_cat.debug() << "contact removed: " << userPersistentData << endl; + bullet_cat.debug() << "contact removed: " << userPersistentData << std::endl; UserPersistentData *data = (UserPersistentData *)userPersistentData; diff --git a/panda/src/bullet/bulletRigidBodyNode.h b/panda/src/bullet/bulletRigidBodyNode.h index 641fdc9fd9..d0e11da6cf 100644 --- a/panda/src/bullet/bulletRigidBodyNode.h +++ b/panda/src/bullet/bulletRigidBodyNode.h @@ -106,7 +106,7 @@ PUBLISHED: public: virtual btCollisionObject *get_object() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; void do_sync_p2b(); void do_sync_b2p(); diff --git a/panda/src/bullet/bulletTriangleMesh.I b/panda/src/bullet/bulletTriangleMesh.I index 33b9b9bf47..acce8e7cfc 100644 --- a/panda/src/bullet/bulletTriangleMesh.I +++ b/panda/src/bullet/bulletTriangleMesh.I @@ -22,8 +22,8 @@ ptr() const { /** * */ -INLINE ostream & -operator << (ostream &out, const BulletTriangleMesh &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const BulletTriangleMesh &obj) { obj.output(out); return out; } diff --git a/panda/src/bullet/bulletTriangleMesh.h b/panda/src/bullet/bulletTriangleMesh.h index 27c0598b13..e3ce0805ad 100644 --- a/panda/src/bullet/bulletTriangleMesh.h +++ b/panda/src/bullet/bulletTriangleMesh.h @@ -51,8 +51,8 @@ PUBLISHED: size_t get_num_triangles() const; PN_stdfloat get_welding_distance() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; public: size_t get_num_vertices() const; @@ -112,7 +112,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const BulletTriangleMesh &obj); +INLINE std::ostream &operator << (std::ostream &out, const BulletTriangleMesh &obj); #include "bulletTriangleMesh.I" diff --git a/panda/src/bullet/bulletWorld.h b/panda/src/bullet/bulletWorld.h index 35a2c8c634..9c709c1e91 100644 --- a/panda/src/bullet/bulletWorld.h +++ b/panda/src/bullet/bulletWorld.h @@ -305,15 +305,15 @@ private: static TypeHandle _type_handle; }; -EXPCL_PANDABULLET ostream & -operator << (ostream &out, BulletWorld::BroadphaseAlgorithm algorithm); -EXPCL_PANDABULLET istream & -operator >> (istream &in, BulletWorld::BroadphaseAlgorithm &algorithm); +EXPCL_PANDABULLET std::ostream & +operator << (std::ostream &out, BulletWorld::BroadphaseAlgorithm algorithm); +EXPCL_PANDABULLET std::istream & +operator >> (std::istream &in, BulletWorld::BroadphaseAlgorithm &algorithm); -EXPCL_PANDABULLET ostream & -operator << (ostream &out, BulletWorld::FilterAlgorithm algorithm); -EXPCL_PANDABULLET istream & -operator >> (istream &in, BulletWorld::FilterAlgorithm &algorithm); +EXPCL_PANDABULLET std::ostream & +operator << (std::ostream &out, BulletWorld::FilterAlgorithm algorithm); +EXPCL_PANDABULLET std::istream & +operator >> (std::istream &in, BulletWorld::FilterAlgorithm &algorithm); #include "bulletWorld.I" diff --git a/panda/src/chan/animBundle.I b/panda/src/chan/animBundle.I index 2859273786..c52608f852 100644 --- a/panda/src/chan/animBundle.I +++ b/panda/src/chan/animBundle.I @@ -15,7 +15,7 @@ * */ INLINE AnimBundle:: -AnimBundle(const string &name, PN_stdfloat fps, int num_frames) : AnimGroup(name) { +AnimBundle(const std::string &name, PN_stdfloat fps, int num_frames) : AnimGroup(name) { _fps = fps; _num_frames = num_frames; _root = this; diff --git a/panda/src/chan/animBundle.h b/panda/src/chan/animBundle.h index 799d262ab8..659f15e58c 100644 --- a/panda/src/chan/animBundle.h +++ b/panda/src/chan/animBundle.h @@ -31,14 +31,14 @@ protected: AnimBundle(AnimGroup *parent, const AnimBundle ©); PUBLISHED: - INLINE explicit AnimBundle(const string &name, PN_stdfloat fps, int num_frames); + INLINE explicit AnimBundle(const std::string &name, PN_stdfloat fps, int num_frames); PT(AnimBundle) copy_bundle() const; INLINE double get_base_frame_rate() const; INLINE int get_num_frames() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: INLINE AnimBundle(); @@ -77,7 +77,7 @@ private: static TypeHandle _type_handle; }; -inline ostream &operator <<(ostream &out, const AnimBundle &bundle) { +inline std::ostream &operator <<(std::ostream &out, const AnimBundle &bundle) { bundle.output(out); return out; } diff --git a/panda/src/chan/animBundleNode.I b/panda/src/chan/animBundleNode.I index b7ac18c818..ced5541dbe 100644 --- a/panda/src/chan/animBundleNode.I +++ b/panda/src/chan/animBundleNode.I @@ -17,7 +17,7 @@ * the appropriate type, and pass it up to this constructor. */ INLINE AnimBundleNode:: -AnimBundleNode(const string &name, AnimBundle *bundle) : +AnimBundleNode(const std::string &name, AnimBundle *bundle) : PandaNode(name), _bundle(bundle) { diff --git a/panda/src/chan/animBundleNode.h b/panda/src/chan/animBundleNode.h index 38df110191..fbf9dcbbe2 100644 --- a/panda/src/chan/animBundleNode.h +++ b/panda/src/chan/animBundleNode.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_CHAN AnimBundleNode : public PandaNode { PUBLISHED: - INLINE explicit AnimBundleNode(const string &name, AnimBundle *bundle); + INLINE explicit AnimBundleNode(const std::string &name, AnimBundle *bundle); protected: INLINE AnimBundleNode(); diff --git a/panda/src/chan/animChannel.I b/panda/src/chan/animChannel.I index d776b938e5..412f21c684 100644 --- a/panda/src/chan/animChannel.I +++ b/panda/src/chan/animChannel.I @@ -26,7 +26,7 @@ TypeHandle AnimChannel::_type_handle; */ template INLINE AnimChannel:: -AnimChannel(const string &name) +AnimChannel(const std::string &name) : AnimChannelBase(name) { } @@ -48,7 +48,7 @@ AnimChannel(AnimGroup *parent, const AnimChannel ©) : */ template INLINE AnimChannel:: -AnimChannel(AnimGroup *parent, const string &name) +AnimChannel(AnimGroup *parent, const std::string &name) : AnimChannelBase(parent, name) { } diff --git a/panda/src/chan/animChannel.h b/panda/src/chan/animChannel.h index 531511660e..eb024ea31e 100644 --- a/panda/src/chan/animChannel.h +++ b/panda/src/chan/animChannel.h @@ -30,12 +30,12 @@ protected: // The default constructor is protected: don't try to create an AnimChannel // without a parent. To create an AnimChannel hierarchy, you must first // create an AnimBundle, and use that to create any subsequent children. - INLINE AnimChannel(const string &name = ""); + INLINE AnimChannel(const std::string &name = ""); INLINE AnimChannel(AnimGroup *parent, const AnimChannel ©); public: typedef typename SwitchType::ValueType ValueType; - INLINE AnimChannel(AnimGroup *parent, const string &name); + INLINE AnimChannel(AnimGroup *parent, const std::string &name); INLINE ~AnimChannel(); PUBLISHED: @@ -81,7 +81,7 @@ public: static const char *get_channel_type_name() { return "AnimChannelMatrix"; } static const char *get_fixed_channel_type_name() { return "AnimChannelFixed"; } static const char *get_part_type_name() { return "MovingPart"; } - static void output_value(ostream &out, const ValueType &value); + static void output_value(std::ostream &out, const ValueType &value); static void write_datagram(Datagram &dest, ValueType& me) { @@ -103,7 +103,7 @@ public: static const char *get_channel_type_name() { return "AnimChannelScalar"; } static const char *get_fixed_channel_type_name() { return "AnimChannelScalarFixed"; } static const char *get_part_type_name() { return "MovingPart"; } - static void output_value(ostream &out, ValueType value) { + static void output_value(std::ostream &out, ValueType value) { out << value; } static void write_datagram(Datagram &dest, ValueType& me) diff --git a/panda/src/chan/animChannelBase.I b/panda/src/chan/animChannelBase.I index dbe24dcc9d..0e86c51027 100644 --- a/panda/src/chan/animChannelBase.I +++ b/panda/src/chan/animChannelBase.I @@ -17,7 +17,7 @@ * created as part of a hierarchy. */ INLINE AnimChannelBase:: -AnimChannelBase(const string &name) +AnimChannelBase(const std::string &name) : AnimGroup(name) { _last_frame = -1; @@ -40,7 +40,7 @@ AnimChannelBase(AnimGroup *parent, const AnimChannelBase ©) : * in the previously-created hierarchy. */ INLINE AnimChannelBase:: -AnimChannelBase(AnimGroup *parent, const string &name) +AnimChannelBase(AnimGroup *parent, const std::string &name) : AnimGroup(parent, name) { _last_frame = -1; diff --git a/panda/src/chan/animChannelBase.h b/panda/src/chan/animChannelBase.h index c3512db282..71493de31d 100644 --- a/panda/src/chan/animChannelBase.h +++ b/panda/src/chan/animChannelBase.h @@ -32,11 +32,11 @@ protected: // The default constructor is protected: don't try to create an AnimChannel // without a parent. To create an AnimChannel hierarchy, you must first // create an AnimBundle, and use that to create any subsequent children. - INLINE AnimChannelBase(const string &name = ""); + INLINE AnimChannelBase(const std::string &name = ""); INLINE AnimChannelBase(AnimGroup *parent, const AnimChannelBase ©); public: - INLINE AnimChannelBase(AnimGroup *parent, const string &name); + INLINE AnimChannelBase(AnimGroup *parent, const std::string &name); virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac); diff --git a/panda/src/chan/animChannelFixed.I b/panda/src/chan/animChannelFixed.I index 9c71438b86..c430366945 100644 --- a/panda/src/chan/animChannelFixed.I +++ b/panda/src/chan/animChannelFixed.I @@ -32,7 +32,7 @@ AnimChannelFixed(AnimGroup *parent, const AnimChannelFixed ©) : */ template INLINE AnimChannelFixed:: -AnimChannelFixed(const string &name, const ValueType &value) +AnimChannelFixed(const std::string &name, const ValueType &value) : AnimChannel(name), _value(value) { } @@ -63,7 +63,7 @@ get_value(int, ValueType &value) { */ template void AnimChannelFixed:: -output(ostream &out) const { +output(std::ostream &out) const { AnimChannel::output(out); out << " = " << _value; } diff --git a/panda/src/chan/animChannelFixed.h b/panda/src/chan/animChannelFixed.h index 0ad0ff5696..a2317d257b 100644 --- a/panda/src/chan/animChannelFixed.h +++ b/panda/src/chan/animChannelFixed.h @@ -34,13 +34,13 @@ protected: INLINE AnimChannelFixed(AnimGroup *parent, const AnimChannelFixed ©); public: - INLINE AnimChannelFixed(const string &name, const ValueType &value); + INLINE AnimChannelFixed(const std::string &name, const ValueType &value); virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac); virtual void get_value(int frame, ValueType &value); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; ValueType _value; diff --git a/panda/src/chan/animChannelMatrixDynamic.h b/panda/src/chan/animChannelMatrixDynamic.h index 8cd9d38904..589b2e7a10 100644 --- a/panda/src/chan/animChannelMatrixDynamic.h +++ b/panda/src/chan/animChannelMatrixDynamic.h @@ -36,7 +36,7 @@ protected: AnimChannelMatrixDynamic(AnimGroup *parent, const AnimChannelMatrixDynamic ©); public: - AnimChannelMatrixDynamic(const string &name); + AnimChannelMatrixDynamic(const std::string &name); virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac); diff --git a/panda/src/chan/animChannelMatrixFixed.h b/panda/src/chan/animChannelMatrixFixed.h index eb34c78321..8b6e06c8ab 100644 --- a/panda/src/chan/animChannelMatrixFixed.h +++ b/panda/src/chan/animChannelMatrixFixed.h @@ -28,7 +28,7 @@ protected: AnimChannelMatrixFixed(AnimGroup *parent, const AnimChannelMatrixFixed ©); public: - AnimChannelMatrixFixed(const string &name, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale); + AnimChannelMatrixFixed(const std::string &name, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale); virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac); @@ -40,7 +40,7 @@ public: virtual void get_pos(int frame, LVecBase3 &pos); virtual void get_shear(int frame, LVecBase3 &shear); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: LVecBase3 _pos, _hpr, _scale; diff --git a/panda/src/chan/animChannelMatrixXfmTable.h b/panda/src/chan/animChannelMatrixXfmTable.h index e3a81a7b2a..a5923e59c0 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.h +++ b/panda/src/chan/animChannelMatrixXfmTable.h @@ -34,7 +34,7 @@ protected: AnimChannelMatrixXfmTable(AnimGroup *parent, const AnimChannelMatrixXfmTable ©); PUBLISHED: - explicit AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name); + explicit AnimChannelMatrixXfmTable(AnimGroup *parent, const std::string &name); virtual ~AnimChannelMatrixXfmTable(); public: @@ -60,7 +60,7 @@ PUBLISHED: INLINE void clear_table(char table_id); public: - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; protected: virtual AnimGroup *make_copy(AnimGroup *parent) const; diff --git a/panda/src/chan/animChannelScalarDynamic.h b/panda/src/chan/animChannelScalarDynamic.h index 72828d968d..ab009a4f1f 100644 --- a/panda/src/chan/animChannelScalarDynamic.h +++ b/panda/src/chan/animChannelScalarDynamic.h @@ -36,7 +36,7 @@ protected: AnimChannelScalarDynamic(AnimGroup *parent, const AnimChannelScalarDynamic ©); public: - AnimChannelScalarDynamic(const string &name); + AnimChannelScalarDynamic(const std::string &name); virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac); diff --git a/panda/src/chan/animChannelScalarTable.h b/panda/src/chan/animChannelScalarTable.h index 2d706b9e7c..e150d8d82e 100644 --- a/panda/src/chan/animChannelScalarTable.h +++ b/panda/src/chan/animChannelScalarTable.h @@ -31,7 +31,7 @@ protected: AnimChannelScalarTable(AnimGroup *parent, const AnimChannelScalarTable ©); public: - AnimChannelScalarTable(AnimGroup *parent, const string &name); + AnimChannelScalarTable(AnimGroup *parent, const std::string &name); virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac); @@ -45,7 +45,7 @@ PUBLISHED: INLINE void clear_table(); public: - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; protected: virtual AnimGroup *make_copy(AnimGroup *parent) const; diff --git a/panda/src/chan/animControl.I b/panda/src/chan/animControl.I index 4c493dd943..dd85c9cdea 100644 --- a/panda/src/chan/animControl.I +++ b/panda/src/chan/animControl.I @@ -88,8 +88,8 @@ get_anim_model() const { return _anim_model; } -INLINE ostream & -operator << (ostream &out, const AnimControl &control) { +INLINE std::ostream & +operator << (std::ostream &out, const AnimControl &control) { control.output(out); return out; } diff --git a/panda/src/chan/animControl.h b/panda/src/chan/animControl.h index 09b5e203a1..bee9f7223b 100644 --- a/panda/src/chan/animControl.h +++ b/panda/src/chan/animControl.h @@ -37,7 +37,7 @@ class AnimChannelBase; */ class EXPCL_PANDA_CHAN AnimControl : public TypedReferenceCount, public AnimInterface, public Namable { public: - AnimControl(const string &name, PartBundle *part, + AnimControl(const std::string &name, PartBundle *part, double frame_rate, int num_frames); void setup_anim(PartBundle *part, AnimBundle *anim, int channel_index, const BitArray &bound_joints); @@ -50,8 +50,8 @@ PUBLISHED: INLINE bool is_pending() const; void wait_pending(); INLINE bool has_anim() const; - void set_pending_done_event(const string &done_event); - string get_pending_done_event() const; + void set_pending_done_event(const std::string &done_event); + std::string get_pending_done_event() const; PartBundle *get_part() const; INLINE AnimBundle *get_anim() const; @@ -61,7 +61,7 @@ PUBLISHED: INLINE void set_anim_model(PandaNode *model); INLINE PandaNode *get_anim_model() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; public: // The following functions aren't really part of the public interface; @@ -75,7 +75,7 @@ protected: private: bool _pending; - string _pending_done_event; + std::string _pending_done_event; Mutex _pending_lock; // protects the above two. ConditionVarFull _pending_cvar; // signals when _pending goes true. @@ -118,7 +118,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const AnimControl &control); +INLINE std::ostream &operator << (std::ostream &out, const AnimControl &control); #include "animControl.I" diff --git a/panda/src/chan/animControlCollection.I b/panda/src/chan/animControlCollection.I index 2492c3ad03..d103140992 100644 --- a/panda/src/chan/animControlCollection.I +++ b/panda/src/chan/animControlCollection.I @@ -15,7 +15,7 @@ * Starts the named animation playing. */ INLINE bool AnimControlCollection:: -play(const string &anim_name) { +play(const std::string &anim_name) { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return false; @@ -29,7 +29,7 @@ play(const string &anim_name) { * Starts the named animation playing. */ INLINE bool AnimControlCollection:: -play(const string &anim_name, double from, double to) { +play(const std::string &anim_name, double from, double to) { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return false; @@ -43,7 +43,7 @@ play(const string &anim_name, double from, double to) { * Starts the named animation looping. */ INLINE bool AnimControlCollection:: -loop(const string &anim_name, bool restart) { +loop(const std::string &anim_name, bool restart) { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return false; @@ -57,7 +57,7 @@ loop(const string &anim_name, bool restart) { * Starts the named animation looping. */ INLINE bool AnimControlCollection:: -loop(const string &anim_name, bool restart, double from, double to) { +loop(const std::string &anim_name, bool restart, double from, double to) { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return false; @@ -71,7 +71,7 @@ loop(const string &anim_name, bool restart, double from, double to) { * Stops the named animation. */ INLINE bool AnimControlCollection:: -stop(const string &anim_name) { +stop(const std::string &anim_name) { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return false; @@ -85,7 +85,7 @@ stop(const string &anim_name) { * Sets to a particular frame in the named animation. */ INLINE bool AnimControlCollection:: -pose(const string &anim_name, double frame) { +pose(const std::string &anim_name, double frame) { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return false; @@ -100,7 +100,7 @@ pose(const string &anim_name, double frame) { * not found. */ INLINE int AnimControlCollection:: -get_frame(const string &anim_name) const { +get_frame(const std::string &anim_name) const { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return 0; @@ -123,7 +123,7 @@ get_frame() const { * Returns true if the named animation is currently playing, false otherwise. */ INLINE bool AnimControlCollection:: -is_playing(const string &anim_name) const { +is_playing(const std::string &anim_name) const { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return false; @@ -148,7 +148,7 @@ is_playing() const { * animation is not found. */ INLINE int AnimControlCollection:: -get_num_frames(const string &anim_name) const { +get_num_frames(const std::string &anim_name) const { AnimControl *control = find_anim(anim_name); if (control == nullptr) { return 0; @@ -167,8 +167,8 @@ get_num_frames() const { return _last_started_control->get_num_frames(); } -INLINE ostream & -operator << (ostream &out, const AnimControlCollection &collection) { +INLINE std::ostream & +operator << (std::ostream &out, const AnimControlCollection &collection) { collection.output(out); return out; } diff --git a/panda/src/chan/animControlCollection.h b/panda/src/chan/animControlCollection.h index 74db2fea86..4467520e54 100644 --- a/panda/src/chan/animControlCollection.h +++ b/panda/src/chan/animControlCollection.h @@ -35,13 +35,13 @@ PUBLISHED: AnimControlCollection(); ~AnimControlCollection(); - void store_anim(AnimControl *control, const string &name); - AnimControl *find_anim(const string &name) const; - bool unbind_anim(const string &name); + void store_anim(AnimControl *control, const std::string &name); + AnimControl *find_anim(const std::string &name) const; + bool unbind_anim(const std::string &name); int get_num_anims() const; AnimControl *get_anim(int n) const; - string get_anim_name(int n) const; + std::string get_anim_name(int n) const; MAKE_SEQ(get_anims, get_num_anims, get_anim); MAKE_SEQ(get_anim_names, get_num_anims, get_anim_name); @@ -50,12 +50,12 @@ PUBLISHED: // The following functions are convenience functions that vector directly // into the AnimControl's functionality by anim name. - INLINE bool play(const string &anim_name); - INLINE bool play(const string &anim_name, double from, double to); - INLINE bool loop(const string &anim_name, bool restart); - INLINE bool loop(const string &anim_name, bool restart, double from, double to); - INLINE bool stop(const string &anim_name); - INLINE bool pose(const string &anim_name, double frame); + INLINE bool play(const std::string &anim_name); + INLINE bool play(const std::string &anim_name, double from, double to); + INLINE bool loop(const std::string &anim_name, bool restart); + INLINE bool loop(const std::string &anim_name, bool restart, double from, double to); + INLINE bool stop(const std::string &anim_name); + INLINE bool pose(const std::string &anim_name, double frame); // These functions operate on all anims at once. void play_all(); @@ -65,36 +65,36 @@ PUBLISHED: bool stop_all(); void pose_all(double frame); - INLINE int get_frame(const string &anim_name) const; + INLINE int get_frame(const std::string &anim_name) const; INLINE int get_frame() const; - INLINE int get_num_frames(const string &anim_name) const; + INLINE int get_num_frames(const std::string &anim_name) const; INLINE int get_num_frames() const; - INLINE bool is_playing(const string &anim_name) const; + INLINE bool is_playing(const std::string &anim_name) const; INLINE bool is_playing() const; - string which_anim_playing() const; + std::string which_anim_playing() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; private: class ControlDef { public: - string _name; + std::string _name; PT(AnimControl) _control; }; typedef pvector Controls; Controls _controls; - typedef pmap ControlsByName; + typedef pmap ControlsByName; ControlsByName _controls_by_name; AnimControl *_last_started_control; }; -INLINE ostream &operator << (ostream &out, const AnimControlCollection &collection); +INLINE std::ostream &operator << (std::ostream &out, const AnimControlCollection &collection); #include "animControlCollection.I" diff --git a/panda/src/chan/animGroup.h b/panda/src/chan/animGroup.h index 50067213d8..cc3fdb3394 100644 --- a/panda/src/chan/animGroup.h +++ b/panda/src/chan/animGroup.h @@ -32,20 +32,20 @@ class FactoryParams; */ class EXPCL_PANDA_CHAN AnimGroup : public TypedWritableReferenceCount, public Namable { protected: - AnimGroup(const string &name = ""); + AnimGroup(const std::string &name = ""); AnimGroup(AnimGroup *parent, const AnimGroup ©); PUBLISHED: // This is the normal AnimGroup constructor. - explicit AnimGroup(AnimGroup *parent, const string &name); + explicit AnimGroup(AnimGroup *parent, const std::string &name); virtual ~AnimGroup(); int get_num_children() const; AnimGroup *get_child(int n) const; MAKE_SEQ(get_children, get_num_children, get_child); - AnimGroup *get_child_named(const string &name) const; - AnimGroup *find_child(const string &name) const; + AnimGroup *get_child_named(const std::string &name) const; + AnimGroup *find_child(const std::string &name) const; void sort_descendants(); MAKE_SEQ_PROPERTY(children, get_num_children, get_child); @@ -54,11 +54,11 @@ public: virtual TypeHandle get_value_type() const; PUBLISHED: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; protected: - void write_descendants(ostream &out, int indent_level) const; + void write_descendants(std::ostream &out, int indent_level) const; virtual AnimGroup *make_copy(AnimGroup *parent) const; PT(AnimGroup) copy_subtree(AnimGroup *parent) const; @@ -80,7 +80,7 @@ protected: void fillin(DatagramIterator& scan, BamReader* manager); private: - typedef pvector< string > frozenJoints; + typedef pvector< std::string > frozenJoints; int _num_children; public: @@ -102,7 +102,7 @@ private: static TypeHandle _type_handle; }; -inline ostream &operator << (ostream &out, const AnimGroup &anim) { +inline std::ostream &operator << (std::ostream &out, const AnimGroup &anim) { anim.output(out); return out; } diff --git a/panda/src/chan/animPreloadTable.I b/panda/src/chan/animPreloadTable.I index a2555c5a9d..fc996c2859 100644 --- a/panda/src/chan/animPreloadTable.I +++ b/panda/src/chan/animPreloadTable.I @@ -29,9 +29,9 @@ operator < (const AnimRecord &other) const { /** * Returns the basename stored for the nth animation record. See find_anim(). */ -INLINE string AnimPreloadTable:: +INLINE std::string AnimPreloadTable:: get_basename(int n) const { - nassertr(n >= 0 && n < (int)_anims.size(), string()); + nassertr(n >= 0 && n < (int)_anims.size(), std::string()); consider_sort(); return _anims[n]._basename; } diff --git a/panda/src/chan/animPreloadTable.h b/panda/src/chan/animPreloadTable.h index 123cd00eb4..e4fd64915b 100644 --- a/panda/src/chan/animPreloadTable.h +++ b/panda/src/chan/animPreloadTable.h @@ -39,7 +39,7 @@ public: INLINE AnimRecord(); INLINE bool operator < (const AnimRecord &other) const; - string _basename; + std::string _basename; PN_stdfloat _base_frame_rate; int _num_frames; }; @@ -52,19 +52,19 @@ PUBLISHED: virtual ~AnimPreloadTable(); int get_num_anims() const; - int find_anim(const string &basename) const; + int find_anim(const std::string &basename) const; - INLINE string get_basename(int n) const; + INLINE std::string get_basename(int n) const; INLINE PN_stdfloat get_base_frame_rate(int n) const; INLINE int get_num_frames(int n) const; void clear_anims(); void remove_anim(int n); - void add_anim(const string &basename, PN_stdfloat base_frame_rate, int num_frames); + void add_anim(const std::string &basename, PN_stdfloat base_frame_rate, int num_frames); void add_anims_from(const AnimPreloadTable *other); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; private: INLINE void consider_sort() const; @@ -101,7 +101,7 @@ private: static TypeHandle _type_handle; }; -inline ostream &operator << (ostream &out, const AnimPreloadTable &anim) { +inline std::ostream &operator << (std::ostream &out, const AnimPreloadTable &anim) { anim.output(out); return out; } diff --git a/panda/src/chan/bindAnimRequest.h b/panda/src/chan/bindAnimRequest.h index 1c555de10a..f3d0314b6a 100644 --- a/panda/src/chan/bindAnimRequest.h +++ b/panda/src/chan/bindAnimRequest.h @@ -30,7 +30,7 @@ public: ALLOC_DELETED_CHAIN(BindAnimRequest); PUBLISHED: - explicit BindAnimRequest(const string &name, + explicit BindAnimRequest(const std::string &name, const Filename &filename, const LoaderOptions &options, Loader *loader, diff --git a/panda/src/chan/movingPart.I b/panda/src/chan/movingPart.I index 8b988d9422..9b0d35e9c8 100644 --- a/panda/src/chan/movingPart.I +++ b/panda/src/chan/movingPart.I @@ -43,7 +43,7 @@ MovingPart(const MovingPart ©) : */ template INLINE MovingPart:: -MovingPart(PartGroup *parent, const string &name, +MovingPart(PartGroup *parent, const std::string &name, const ValueType &default_value) : MovingPartBase(parent, name), _value(default_value), @@ -87,7 +87,7 @@ make_default_channel() const { */ template void MovingPart:: -output_value(ostream &out) const { +output_value(std::ostream &out) const { SwitchType::output_value(out, _value); } diff --git a/panda/src/chan/movingPart.h b/panda/src/chan/movingPart.h index dd6dc7540b..8673a271d6 100644 --- a/panda/src/chan/movingPart.h +++ b/panda/src/chan/movingPart.h @@ -33,12 +33,12 @@ protected: INLINE MovingPart(const MovingPart ©); public: - INLINE MovingPart(PartGroup *parent, const string &name, + INLINE MovingPart(PartGroup *parent, const std::string &name, const ValueType &default_value); virtual TypeHandle get_value_type() const; virtual AnimChannelBase *make_default_channel() const; - virtual void output_value(ostream &out) const; + virtual void output_value(std::ostream &out) const; ValueType _value; ValueType _default_value; diff --git a/panda/src/chan/movingPartBase.h b/panda/src/chan/movingPartBase.h index 3618cbfd19..c7b09c8acf 100644 --- a/panda/src/chan/movingPartBase.h +++ b/panda/src/chan/movingPartBase.h @@ -33,7 +33,7 @@ protected: INLINE MovingPartBase(const MovingPartBase ©); public: - MovingPartBase(PartGroup *parent, const string &name); + MovingPartBase(PartGroup *parent, const std::string &name); PUBLISHED: INLINE int get_max_bound() const; @@ -47,9 +47,9 @@ PUBLISHED: virtual bool clear_forced_channel(); virtual AnimChannelBase *get_forced_channel() const; - virtual void write(ostream &out, int indent_level) const; - virtual void write_with_value(ostream &out, int indent_level) const; - virtual void output_value(ostream &out) const=0; + virtual void write(std::ostream &out, int indent_level) const; + virtual void write_with_value(std::ostream &out, int indent_level) const; + virtual void output_value(std::ostream &out) const=0; public: virtual bool do_update(PartBundle *root, const CycleData *root_cdata, diff --git a/panda/src/chan/movingPartMatrix.I b/panda/src/chan/movingPartMatrix.I index a545f9f9fa..f9432b312e 100644 --- a/panda/src/chan/movingPartMatrix.I +++ b/panda/src/chan/movingPartMatrix.I @@ -24,7 +24,7 @@ MovingPartMatrix(const MovingPartMatrix ©) : * */ INLINE MovingPartMatrix:: -MovingPartMatrix(PartGroup *parent, const string &name, +MovingPartMatrix(PartGroup *parent, const std::string &name, const LMatrix4 &default_value) : MovingPart(parent, name, default_value) { } diff --git a/panda/src/chan/movingPartMatrix.h b/panda/src/chan/movingPartMatrix.h index 3c232e63d0..364686555a 100644 --- a/panda/src/chan/movingPartMatrix.h +++ b/panda/src/chan/movingPartMatrix.h @@ -31,7 +31,7 @@ protected: INLINE MovingPartMatrix(const MovingPartMatrix ©); public: - INLINE MovingPartMatrix(PartGroup *parent, const string &name, + INLINE MovingPartMatrix(PartGroup *parent, const std::string &name, const LMatrix4 &default_value); virtual ~MovingPartMatrix(); diff --git a/panda/src/chan/movingPartScalar.I b/panda/src/chan/movingPartScalar.I index e49a542575..1b585746e4 100644 --- a/panda/src/chan/movingPartScalar.I +++ b/panda/src/chan/movingPartScalar.I @@ -24,7 +24,7 @@ MovingPartScalar(const MovingPartScalar ©) : * */ INLINE MovingPartScalar:: -MovingPartScalar(PartGroup *parent, const string &name, +MovingPartScalar(PartGroup *parent, const std::string &name, const PN_stdfloat &default_value) : MovingPart(parent, name, default_value) { } diff --git a/panda/src/chan/movingPartScalar.h b/panda/src/chan/movingPartScalar.h index 90bd049ee5..d05e58f4e7 100644 --- a/panda/src/chan/movingPartScalar.h +++ b/panda/src/chan/movingPartScalar.h @@ -30,7 +30,7 @@ protected: INLINE MovingPartScalar(const MovingPartScalar ©); public: - INLINE MovingPartScalar(PartGroup *parent, const string &name, + INLINE MovingPartScalar(PartGroup *parent, const std::string &name, const PN_stdfloat &default_value = 0); virtual ~MovingPartScalar(); diff --git a/panda/src/chan/partBundle.h b/panda/src/chan/partBundle.h index 80ddb4122d..7a611a80de 100644 --- a/panda/src/chan/partBundle.h +++ b/panda/src/chan/partBundle.h @@ -55,7 +55,7 @@ protected: PartBundle(const PartBundle ©); PUBLISHED: - explicit PartBundle(const string &name = ""); + explicit PartBundle(const std::string &name = ""); virtual PartGroup *make_copy() const; INLINE CPT(AnimPreloadTable) get_anim_preload() const; @@ -123,8 +123,8 @@ PUBLISHED: INLINE void set_control_effect(AnimControl *control, PN_stdfloat effect); INLINE PN_stdfloat get_control_effect(AnimControl *control) const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; PT(AnimControl) bind_anim(AnimBundle *anim, int hierarchy_match_flags = 0, @@ -136,11 +136,11 @@ PUBLISHED: bool allow_async); void wait_pending(); - bool freeze_joint(const string &joint_name, const TransformState *transform); - bool freeze_joint(const string &joint_name, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale); - bool freeze_joint(const string &joint_name, PN_stdfloat value); - bool control_joint(const string &joint_name, PandaNode *node); - bool release_joint(const string &joint_name); + bool freeze_joint(const std::string &joint_name, const TransformState *transform); + bool freeze_joint(const std::string &joint_name, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale); + bool freeze_joint(const std::string &joint_name, PN_stdfloat value); + bool control_joint(const std::string &joint_name, PandaNode *node); + bool release_joint(const std::string &joint_name); bool update(); bool force_update(); @@ -243,13 +243,13 @@ private: friend class MovingPartScalar; }; -inline ostream &operator <<(ostream &out, const PartBundle &bundle) { +inline std::ostream &operator <<(std::ostream &out, const PartBundle &bundle) { bundle.output(out); return out; } -ostream &operator <<(ostream &out, PartBundle::BlendType blend_type); -istream &operator >>(istream &in, PartBundle::BlendType &blend_type); +std::ostream &operator <<(std::ostream &out, PartBundle::BlendType blend_type); +std::istream &operator >>(std::istream &in, PartBundle::BlendType &blend_type); #include "partBundle.I" diff --git a/panda/src/chan/partBundleNode.I b/panda/src/chan/partBundleNode.I index 721e930bd9..e9da42359c 100644 --- a/panda/src/chan/partBundleNode.I +++ b/panda/src/chan/partBundleNode.I @@ -17,7 +17,7 @@ * the appropriate type, and pass it up to this constructor. */ INLINE PartBundleNode:: -PartBundleNode(const string &name, PartBundle *bundle) : +PartBundleNode(const std::string &name, PartBundle *bundle) : PandaNode(name) { add_bundle(bundle); diff --git a/panda/src/chan/partBundleNode.h b/panda/src/chan/partBundleNode.h index 231c1175ee..6cb98638d1 100644 --- a/panda/src/chan/partBundleNode.h +++ b/panda/src/chan/partBundleNode.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_CHAN PartBundleNode : public PandaNode { PUBLISHED: - INLINE explicit PartBundleNode(const string &name, PartBundle *bundle); + INLINE explicit PartBundleNode(const std::string &name, PartBundle *bundle); protected: INLINE PartBundleNode(); diff --git a/panda/src/chan/partGroup.I b/panda/src/chan/partGroup.I index 4b1c166bad..250cd195eb 100644 --- a/panda/src/chan/partGroup.I +++ b/panda/src/chan/partGroup.I @@ -16,7 +16,7 @@ * You should normally use the non-default constructor, below. */ INLINE PartGroup:: -PartGroup(const string &name) : +PartGroup(const std::string &name) : Namable(name), _children(get_class_type()) { diff --git a/panda/src/chan/partGroup.h b/panda/src/chan/partGroup.h index ae5f919b7c..0dd9f8c7dd 100644 --- a/panda/src/chan/partGroup.h +++ b/panda/src/chan/partGroup.h @@ -55,12 +55,12 @@ protected: // The default constructor is protected: don't try to create a PartGroup // without a parent. To create a PartGroup hierarchy, you must first create // a PartBundle, and use that as the parent of any subsequent children. - INLINE PartGroup(const string &name = ""); + INLINE PartGroup(const std::string &name = ""); INLINE PartGroup(const PartGroup ©); PUBLISHED: // This is the normal PartGroup constructor. - explicit PartGroup(PartGroup *parent, const string &name); + explicit PartGroup(PartGroup *parent, const std::string &name); virtual ~PartGroup(); virtual bool is_character_joint() const; @@ -71,8 +71,8 @@ PUBLISHED: PartGroup *get_child(int n) const; MAKE_SEQ(get_children, get_num_children, get_child); - PartGroup *get_child_named(const string &name) const; - PartGroup *find_child(const string &name) const; + PartGroup *get_child_named(const std::string &name) const; + PartGroup *find_child(const std::string &name) const; void sort_descendants(); MAKE_SEQ_PROPERTY(children, get_num_children, get_child); @@ -84,8 +84,8 @@ PUBLISHED: virtual bool clear_forced_channel(); virtual AnimChannelBase *get_forced_channel() const; - virtual void write(ostream &out, int indent_level) const; - virtual void write_with_value(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; + virtual void write_with_value(std::ostream &out, int indent_level) const; public: virtual TypeHandle get_value_type() const; @@ -101,8 +101,8 @@ public: virtual void determine_effective_channels(const CycleData *root_cdata); protected: - void write_descendants(ostream &out, int indent_level) const; - void write_descendants_with_value(ostream &out, int indent_level) const; + void write_descendants(std::ostream &out, int indent_level) const; + void write_descendants_with_value(std::ostream &out, int indent_level) const; virtual void pick_channel_index(plist &holes, int &next) const; virtual void bind_hierarchy(AnimGroup *anim, int channel_index, diff --git a/panda/src/chan/partSubset.h b/panda/src/chan/partSubset.h index 93e7bda47f..853849c5ea 100644 --- a/panda/src/chan/partSubset.h +++ b/panda/src/chan/partSubset.h @@ -33,11 +33,11 @@ PUBLISHED: void append(const PartSubset &other); - void output(ostream &out) const; + void output(std::ostream &out) const; bool is_include_empty() const; - bool matches_include(const string &joint_name) const; - bool matches_exclude(const string &joint_name) const; + bool matches_include(const std::string &joint_name) const; + bool matches_exclude(const std::string &joint_name) const; private: typedef pvector Joints; @@ -45,7 +45,7 @@ private: Joints _exclude_joints; }; -INLINE ostream &operator << (ostream &out, const PartSubset &subset) { +INLINE std::ostream &operator << (std::ostream &out, const PartSubset &subset) { subset.output(out); return out; } diff --git a/panda/src/char/character.h b/panda/src/char/character.h index 80492df93c..a7c6c79f13 100644 --- a/panda/src/char/character.h +++ b/panda/src/char/character.h @@ -40,7 +40,7 @@ protected: Character(const Character ©, bool copy_bundles); PUBLISHED: - explicit Character(const string &name); + explicit Character(const std::string &name); virtual ~Character(); public: @@ -68,11 +68,11 @@ PUBLISHED: PN_stdfloat delay_factor); void clear_lod_animation(); - CharacterJoint *find_joint(const string &name) const; - CharacterSlider *find_slider(const string &name) const; + CharacterJoint *find_joint(const std::string &name) const; + CharacterSlider *find_slider(const std::string &name) const; - void write_parts(ostream &out) const; - void write_part_values(ostream &out) const; + void write_parts(std::ostream &out) const; + void write_part_values(std::ostream &out) const; void update_to_now(); void update(); diff --git a/panda/src/char/characterJoint.h b/panda/src/char/characterJoint.h index 5da83def66..83d155f184 100644 --- a/panda/src/char/characterJoint.h +++ b/panda/src/char/characterJoint.h @@ -36,7 +36,7 @@ protected: PUBLISHED: explicit CharacterJoint(Character *character, PartBundle *root, - PartGroup *parent, const string &name, + PartGroup *parent, const std::string &name, const LMatrix4 &default_value); virtual ~CharacterJoint(); diff --git a/panda/src/char/characterJointBundle.h b/panda/src/char/characterJointBundle.h index 4c68fb9b3d..e1c93e1842 100644 --- a/panda/src/char/characterJointBundle.h +++ b/panda/src/char/characterJointBundle.h @@ -30,7 +30,7 @@ protected: INLINE CharacterJointBundle(const CharacterJointBundle ©); PUBLISHED: - explicit CharacterJointBundle(const string &name = ""); + explicit CharacterJointBundle(const std::string &name = ""); virtual ~CharacterJointBundle(); PUBLISHED: diff --git a/panda/src/char/characterJointEffect.h b/panda/src/char/characterJointEffect.h index 372013df54..8b6e11e923 100644 --- a/panda/src/char/characterJointEffect.h +++ b/panda/src/char/characterJointEffect.h @@ -45,7 +45,7 @@ public: virtual bool safe_to_transform() const; virtual bool safe_to_combine() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool has_cull_callback() const; virtual void cull_callback(CullTraverser *trav, CullTraverserData &data, diff --git a/panda/src/char/characterSlider.h b/panda/src/char/characterSlider.h index fe7e38945e..3c347af12b 100644 --- a/panda/src/char/characterSlider.h +++ b/panda/src/char/characterSlider.h @@ -31,7 +31,7 @@ protected: CharacterSlider(const CharacterSlider ©); PUBLISHED: - explicit CharacterSlider(PartGroup *parent, const string &name); + explicit CharacterSlider(PartGroup *parent, const std::string &name); virtual ~CharacterSlider(); virtual PartGroup *make_copy() const; diff --git a/panda/src/char/jointVertexTransform.h b/panda/src/char/jointVertexTransform.h index 1be097eba6..ee8b3aafa6 100644 --- a/panda/src/char/jointVertexTransform.h +++ b/panda/src/char/jointVertexTransform.h @@ -44,7 +44,7 @@ PUBLISHED: virtual void mult_matrix(LMatrix4 &result, const LMatrix4 &previous) const; virtual void accumulate_matrix(LMatrix4 &accum, PN_stdfloat weight) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: PT(CharacterJoint) _joint; diff --git a/panda/src/cocoadisplay/cocoaGraphicsBuffer.h b/panda/src/cocoadisplay/cocoaGraphicsBuffer.h index ab666b6f75..3167d2c02f 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsBuffer.h +++ b/panda/src/cocoadisplay/cocoaGraphicsBuffer.h @@ -24,7 +24,7 @@ class CocoaGraphicsBuffer : public GLGraphicsBuffer { public: CocoaGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/cocoadisplay/cocoaGraphicsPipe.h b/panda/src/cocoadisplay/cocoaGraphicsPipe.h index 6f2f863e9c..cc8c8142d5 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsPipe.h +++ b/panda/src/cocoadisplay/cocoaGraphicsPipe.h @@ -40,14 +40,14 @@ public: INLINE CGDirectDisplayID get_display_id() const; - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); public: virtual PreferredWindowThread get_preferred_window_thread() const; protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/cocoadisplay/cocoaGraphicsWindow.h b/panda/src/cocoadisplay/cocoaGraphicsWindow.h index de2bd8d61c..353212f056 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsWindow.h +++ b/panda/src/cocoadisplay/cocoaGraphicsWindow.h @@ -30,7 +30,7 @@ class CocoaGraphicsWindow : public GraphicsWindow { public: CocoaGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/collada/colladaBindMaterial.h b/panda/src/collada/colladaBindMaterial.h index 18cf5b80a8..2c56f77c78 100644 --- a/panda/src/collada/colladaBindMaterial.h +++ b/panda/src/collada/colladaBindMaterial.h @@ -29,13 +29,13 @@ class domInstance_material; class ColladaBindMaterial { public: CPT(RenderState) get_material(const ColladaPrimitive *prim) const; - CPT(RenderState) get_material(const string &symbol) const; + CPT(RenderState) get_material(const std::string &symbol) const; void load_bind_material(domBind_material &bind_mat); void load_instance_material(domInstance_material &inst); private: - pmap _states; + pmap _states; }; #endif diff --git a/panda/src/collada/colladaInput.h b/panda/src/collada/colladaInput.h index 53629ecf8d..7df605c73c 100644 --- a/panda/src/collada/colladaInput.h +++ b/panda/src/collada/colladaInput.h @@ -52,8 +52,8 @@ public: INLINE unsigned int get_offset() const; private: - ColladaInput(const string &semantic); - ColladaInput(const string &semantic, unsigned int set); + ColladaInput(const std::string &semantic); + ColladaInput(const std::string &semantic, unsigned int set); bool read_data(domSource &source); void write_data(GeomVertexData *vdata, int start_row, domP &p, unsigned int stride, unsigned int offset) const; @@ -67,7 +67,7 @@ private: unsigned int _num_bound_params; unsigned int _offset; - string _semantic; + std::string _semantic; bool _have_set; unsigned int _set; }; diff --git a/panda/src/collada/colladaPrimitive.I b/panda/src/collada/colladaPrimitive.I index 697e028f39..e97263f280 100644 --- a/panda/src/collada/colladaPrimitive.I +++ b/panda/src/collada/colladaPrimitive.I @@ -34,7 +34,7 @@ get_geom() const { * Returns the name of this primitive's material, or the empty string if none * was assigned. */ -INLINE const string &ColladaPrimitive:: +INLINE const std::string &ColladaPrimitive:: get_material() const { return _material; } diff --git a/panda/src/collada/colladaPrimitive.h b/panda/src/collada/colladaPrimitive.h index 740329e020..075bce7f73 100644 --- a/panda/src/collada/colladaPrimitive.h +++ b/panda/src/collada/colladaPrimitive.h @@ -48,7 +48,7 @@ public: unsigned int write_data(GeomVertexData *vdata, int start_row, domP &p); INLINE PT(Geom) get_geom() const; - INLINE const string &get_material() const; + INLINE const std::string &get_material() const; private: ColladaPrimitive(GeomPrimitive *prim, daeTArray > &inputs); @@ -63,7 +63,7 @@ private: PT(Geom) _geom; PT(GeomVertexData) _vdata; PT(GeomPrimitive) _gprim; - string _material; + std::string _material; }; #include "colladaPrimitive.I" diff --git a/panda/src/collada/loaderFileTypeDae.h b/panda/src/collada/loaderFileTypeDae.h index 4cb79a81f9..e762564b86 100644 --- a/panda/src/collada/loaderFileTypeDae.h +++ b/panda/src/collada/loaderFileTypeDae.h @@ -25,9 +25,9 @@ class EXPCL_COLLADA LoaderFileTypeDae : public LoaderFileType { public: LoaderFileTypeDae(); - virtual string get_name() const; - virtual string get_extension() const; - virtual string get_additional_extensions() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; + virtual std::string get_additional_extensions() const; virtual bool supports_compressed() const; virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options, diff --git a/panda/src/collide/collisionBox.h b/panda/src/collide/collisionBox.h index c5bb22be88..0888d7e4da 100644 --- a/panda/src/collide/collisionBox.h +++ b/panda/src/collide/collisionBox.h @@ -46,7 +46,7 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE static void flush_level(); void setup_box(); diff --git a/panda/src/collide/collisionEntry.I b/panda/src/collide/collisionEntry.I index 8187ca7a9c..41a591c90e 100644 --- a/panda/src/collide/collisionEntry.I +++ b/panda/src/collide/collisionEntry.I @@ -360,8 +360,8 @@ test_intersection(CollisionHandler *record, } } -INLINE ostream & -operator << (ostream &out, const CollisionEntry &entry) { +INLINE std::ostream & +operator << (std::ostream &out, const CollisionEntry &entry) { entry.output(out); return out; } diff --git a/panda/src/collide/collisionEntry.h b/panda/src/collide/collisionEntry.h index 558a6afa70..03d39c03d5 100644 --- a/panda/src/collide/collisionEntry.h +++ b/panda/src/collide/collisionEntry.h @@ -90,8 +90,8 @@ PUBLISHED: LPoint3 &contact_pos, LVector3 &contact_normal) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; PUBLISHED: MAKE_PROPERTY(from_solid, get_from); @@ -170,7 +170,7 @@ private: friend class CollisionHandlerFluidPusher; }; -INLINE ostream &operator << (ostream &out, const CollisionEntry &entry); +INLINE std::ostream &operator << (std::ostream &out, const CollisionEntry &entry); #include "collisionEntry.I" diff --git a/panda/src/collide/collisionFloorMesh.h b/panda/src/collide/collisionFloorMesh.h index 44e9d18e32..9304b79e11 100644 --- a/panda/src/collide/collisionFloorMesh.h +++ b/panda/src/collide/collisionFloorMesh.h @@ -69,8 +69,8 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; INLINE static void flush_level(); diff --git a/panda/src/collide/collisionGeom.h b/panda/src/collide/collisionGeom.h index 20e736dba4..ba63263f26 100644 --- a/panda/src/collide/collisionGeom.h +++ b/panda/src/collide/collisionGeom.h @@ -38,7 +38,7 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: static PStatCollector _volume_pcollector; diff --git a/panda/src/collide/collisionHandlerEvent.I b/panda/src/collide/collisionHandlerEvent.I index 28efe50dcc..d5b6327c69 100644 --- a/panda/src/collide/collisionHandlerEvent.I +++ b/panda/src/collide/collisionHandlerEvent.I @@ -73,7 +73,7 @@ clear_in_patterns() { * longer detected, the out_pattern event is thrown. */ INLINE void CollisionHandlerEvent:: -add_in_pattern(const string &in_pattern) { +add_in_pattern(const std::string &in_pattern) { _in_patterns.push_back(in_pattern); } @@ -82,7 +82,7 @@ add_in_pattern(const string &in_pattern) { * have previously been set with the indicated pattern. */ INLINE void CollisionHandlerEvent:: -set_in_pattern(const string &in_pattern) { +set_in_pattern(const std::string &in_pattern) { clear_in_patterns(); add_in_pattern(in_pattern); } @@ -99,9 +99,9 @@ get_num_in_patterns() const { * Returns the nth pattern string that indicates how the event names are * generated for each collision detected. See add_in_pattern(). */ -INLINE string CollisionHandlerEvent:: +INLINE std::string CollisionHandlerEvent:: get_in_pattern(int n) const { - nassertr(n >= 0 && n < (int)_in_patterns.size(), string()); + nassertr(n >= 0 && n < (int)_in_patterns.size(), std::string()); return _in_patterns[n]; } @@ -126,7 +126,7 @@ clear_again_patterns() { * longer detected, the out_pattern event is thrown. */ INLINE void CollisionHandlerEvent:: -add_again_pattern(const string &again_pattern) { +add_again_pattern(const std::string &again_pattern) { _again_patterns.push_back(again_pattern); } @@ -135,7 +135,7 @@ add_again_pattern(const string &again_pattern) { * have previously been set with the indicated pattern. */ INLINE void CollisionHandlerEvent:: -set_again_pattern(const string &again_pattern) { +set_again_pattern(const std::string &again_pattern) { clear_again_patterns(); add_again_pattern(again_pattern); } @@ -152,9 +152,9 @@ get_num_again_patterns() const { * Returns the nth pattern string that indicates how the event names are * generated for each collision detected. See add_again_pattern(). */ -INLINE string CollisionHandlerEvent:: +INLINE std::string CollisionHandlerEvent:: get_again_pattern(int n) const { - nassertr(n >= 0 && n < (int)_again_patterns.size(), string()); + nassertr(n >= 0 && n < (int)_again_patterns.size(), std::string()); return _again_patterns[n]; } @@ -177,7 +177,7 @@ clear_out_patterns() { * longer detected, the out_pattern event is thrown. */ INLINE void CollisionHandlerEvent:: -add_out_pattern(const string &out_pattern) { +add_out_pattern(const std::string &out_pattern) { _out_patterns.push_back(out_pattern); } @@ -186,7 +186,7 @@ add_out_pattern(const string &out_pattern) { * have previously been set with the indicated pattern. */ INLINE void CollisionHandlerEvent:: -set_out_pattern(const string &out_pattern) { +set_out_pattern(const std::string &out_pattern) { clear_out_patterns(); add_out_pattern(out_pattern); } @@ -203,8 +203,8 @@ get_num_out_patterns() const { * Returns the nth pattern string that indicates how the event names are * generated for each collision detected. See add_out_pattern(). */ -INLINE string CollisionHandlerEvent:: +INLINE std::string CollisionHandlerEvent:: get_out_pattern(int n) const { - nassertr(n >= 0 && n < (int)_out_patterns.size(), string()); + nassertr(n >= 0 && n < (int)_out_patterns.size(), std::string()); return _out_patterns[n]; } diff --git a/panda/src/collide/collisionHandlerEvent.h b/panda/src/collide/collisionHandlerEvent.h index a1240882d6..808ee888c5 100644 --- a/panda/src/collide/collisionHandlerEvent.h +++ b/panda/src/collide/collisionHandlerEvent.h @@ -40,24 +40,24 @@ public: PUBLISHED: INLINE void clear_in_patterns(); - INLINE void add_in_pattern(const string &in_pattern); - INLINE void set_in_pattern(const string &in_pattern); + INLINE void add_in_pattern(const std::string &in_pattern); + INLINE void set_in_pattern(const std::string &in_pattern); INLINE int get_num_in_patterns() const; - INLINE string get_in_pattern(int n) const; + INLINE std::string get_in_pattern(int n) const; MAKE_SEQ(get_in_patterns, get_num_in_patterns, get_in_pattern); INLINE void clear_again_patterns(); - INLINE void add_again_pattern(const string &again_pattern); - INLINE void set_again_pattern(const string &again_pattern); + INLINE void add_again_pattern(const std::string &again_pattern); + INLINE void set_again_pattern(const std::string &again_pattern); INLINE int get_num_again_patterns() const; - INLINE string get_again_pattern(int n) const; + INLINE std::string get_again_pattern(int n) const; MAKE_SEQ(get_again_patterns, get_num_again_patterns, get_again_pattern); INLINE void clear_out_patterns(); - INLINE void add_out_pattern(const string &out_pattern); - INLINE void set_out_pattern(const string &out_pattern); + INLINE void add_out_pattern(const std::string &out_pattern); + INLINE void set_out_pattern(const std::string &out_pattern); INLINE int get_num_out_patterns() const; - INLINE string get_out_pattern(int n) const; + INLINE std::string get_out_pattern(int n) const; MAKE_SEQ(get_out_patterns, get_num_out_patterns, get_out_pattern); MAKE_SEQ_PROPERTY(in_patterns, get_num_in_patterns, get_in_pattern); @@ -69,7 +69,7 @@ PUBLISHED: protected: void throw_event_for(const vector_string &patterns, CollisionEntry *entry); - void throw_event_pattern(const string &pattern, CollisionEntry *entry); + void throw_event_pattern(const std::string &pattern, CollisionEntry *entry); vector_string _in_patterns; vector_string _again_patterns; diff --git a/panda/src/collide/collisionHandlerQueue.h b/panda/src/collide/collisionHandlerQueue.h index 0651b545c7..cfef93c540 100644 --- a/panda/src/collide/collisionHandlerQueue.h +++ b/panda/src/collide/collisionHandlerQueue.h @@ -42,8 +42,8 @@ PUBLISHED: MAKE_SEQ(get_entries, get_num_entries, get_entry); MAKE_SEQ_PROPERTY(entries, get_num_entries, get_entry); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef pvector< PT(CollisionEntry) > Entries; @@ -67,7 +67,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const CollisionHandlerQueue &chq) { +INLINE std::ostream &operator << (std::ostream &out, const CollisionHandlerQueue &chq) { chq.output(out); return out; } diff --git a/panda/src/collide/collisionInvSphere.h b/panda/src/collide/collisionInvSphere.h index ffc9628a5b..fe8b43b10d 100644 --- a/panda/src/collide/collisionInvSphere.h +++ b/panda/src/collide/collisionInvSphere.h @@ -42,7 +42,7 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual PT(BoundingVolume) compute_internal_bounds() const; diff --git a/panda/src/collide/collisionLine.h b/panda/src/collide/collisionLine.h index 71904192de..d2a0236046 100644 --- a/panda/src/collide/collisionLine.h +++ b/panda/src/collide/collisionLine.h @@ -36,7 +36,7 @@ public: virtual PT(CollisionEntry) test_intersection(const CollisionEntry &entry) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual void fill_viz_geom(); diff --git a/panda/src/collide/collisionNode.h b/panda/src/collide/collisionNode.h index e9a61b404d..8dd46f6a28 100644 --- a/panda/src/collide/collisionNode.h +++ b/panda/src/collide/collisionNode.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDA_COLLIDE CollisionNode : public PandaNode { PUBLISHED: - explicit CollisionNode(const string &name); + explicit CollisionNode(const std::string &name); protected: CollisionNode(const CollisionNode ©); @@ -46,7 +46,7 @@ public: virtual bool is_renderable() const; virtual bool is_collision_node() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE void set_collide_mask(CollideMask mask); diff --git a/panda/src/collide/collisionParabola.h b/panda/src/collide/collisionParabola.h index 2f72518ac4..c09a932938 100644 --- a/panda/src/collide/collisionParabola.h +++ b/panda/src/collide/collisionParabola.h @@ -48,7 +48,7 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE void set_parabola(const LParabola ¶bola); diff --git a/panda/src/collide/collisionPlane.h b/panda/src/collide/collisionPlane.h index 4130cf2151..bc7602ba8b 100644 --- a/panda/src/collide/collisionPlane.h +++ b/panda/src/collide/collisionPlane.h @@ -42,7 +42,7 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE static void flush_level(); diff --git a/panda/src/collide/collisionPolygon.h b/panda/src/collide/collisionPolygon.h index 464c0e73b6..1ef095fd92 100644 --- a/panda/src/collide/collisionPolygon.h +++ b/panda/src/collide/collisionPolygon.h @@ -74,8 +74,8 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; INLINE static void flush_level(); diff --git a/panda/src/collide/collisionRay.h b/panda/src/collide/collisionRay.h index d317761906..99b7446ced 100644 --- a/panda/src/collide/collisionRay.h +++ b/panda/src/collide/collisionRay.h @@ -42,7 +42,7 @@ public: virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE void set_origin(const LPoint3 &origin); diff --git a/panda/src/collide/collisionRecorder.h b/panda/src/collide/collisionRecorder.h index a9ceefa250..08a254122c 100644 --- a/panda/src/collide/collisionRecorder.h +++ b/panda/src/collide/collisionRecorder.h @@ -35,7 +35,7 @@ public: virtual ~CollisionRecorder(); PUBLISHED: - void output(ostream &out) const; + void output(std::ostream &out) const; public: virtual void begin_traversal(); diff --git a/panda/src/collide/collisionSegment.h b/panda/src/collide/collisionSegment.h index 429eff426d..705855b791 100644 --- a/panda/src/collide/collisionSegment.h +++ b/panda/src/collide/collisionSegment.h @@ -46,7 +46,7 @@ public: virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE void set_point_a(const LPoint3 &a); diff --git a/panda/src/collide/collisionSolid.h b/panda/src/collide/collisionSolid.h index 4f80cb922a..6b2914e954 100644 --- a/panda/src/collide/collisionSolid.h +++ b/panda/src/collide/collisionSolid.h @@ -89,8 +89,8 @@ public: virtual PStatCollector &get_test_pcollector(); PUBLISHED: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: INLINE bool do_is_tangible() const; @@ -183,7 +183,7 @@ private: friend class CollisionBox; }; -INLINE ostream &operator << (ostream &out, const CollisionSolid &cs) { +INLINE std::ostream &operator << (std::ostream &out, const CollisionSolid &cs) { cs.output(out); return out; } diff --git a/panda/src/collide/collisionSphere.h b/panda/src/collide/collisionSphere.h index 04fa9c4e83..8337644b42 100644 --- a/panda/src/collide/collisionSphere.h +++ b/panda/src/collide/collisionSphere.h @@ -44,7 +44,7 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE static void flush_level(); diff --git a/panda/src/collide/collisionTraverser.h b/panda/src/collide/collisionTraverser.h index 5f5ebe0b13..8a6c912aaf 100644 --- a/panda/src/collide/collisionTraverser.h +++ b/panda/src/collide/collisionTraverser.h @@ -44,7 +44,7 @@ class CollisionEntry; */ class EXPCL_PANDA_COLLIDE CollisionTraverser : public Namable { PUBLISHED: - explicit CollisionTraverser(const string &name = "ctrav"); + explicit CollisionTraverser(const std::string &name = "ctrav"); ~CollisionTraverser(); INLINE void set_respect_prev_transform(bool flag); @@ -76,8 +76,8 @@ PUBLISHED: void hide_collisions(); #endif // DO_COLLISION_RECORDING - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; private: typedef pvector LevelStatesSingle; @@ -163,7 +163,7 @@ private: friend class SortByColliderSort; }; -INLINE ostream &operator << (ostream &out, const CollisionTraverser &trav) { +INLINE std::ostream &operator << (std::ostream &out, const CollisionTraverser &trav) { trav.output(out); return out; } diff --git a/panda/src/collide/collisionTube.h b/panda/src/collide/collisionTube.h index 52701193eb..1742e24927 100644 --- a/panda/src/collide/collisionTube.h +++ b/panda/src/collide/collisionTube.h @@ -48,7 +48,7 @@ public: virtual PStatCollector &get_volume_pcollector(); virtual PStatCollector &get_test_pcollector(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE static void flush_level(); diff --git a/panda/src/collide/collisionVisualizer.h b/panda/src/collide/collisionVisualizer.h index 88491c4e26..2fb2cb40b2 100644 --- a/panda/src/collide/collisionVisualizer.h +++ b/panda/src/collide/collisionVisualizer.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_COLLIDE CollisionVisualizer : public PandaNode, public CollisionRecorder { PUBLISHED: - explicit CollisionVisualizer(const string &name); + explicit CollisionVisualizer(const std::string &name); CollisionVisualizer(const CollisionVisualizer ©); virtual ~CollisionVisualizer(); @@ -55,7 +55,7 @@ public: virtual PandaNode *make_copy() const; virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data); virtual bool is_renderable() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; // from parent class CollisionRecorder. virtual void begin_traversal(); diff --git a/panda/src/cull/cullBinBackToFront.I b/panda/src/cull/cullBinBackToFront.I index 4e77012ac5..fd66f8437b 100644 --- a/panda/src/cull/cullBinBackToFront.I +++ b/panda/src/cull/cullBinBackToFront.I @@ -15,7 +15,7 @@ * */ INLINE CullBinBackToFront:: -CullBinBackToFront(const string &name, GraphicsStateGuardianBase *gsg, +CullBinBackToFront(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector) : CullBin(name, BT_back_to_front, gsg, draw_region_pcollector) { diff --git a/panda/src/cull/cullBinBackToFront.h b/panda/src/cull/cullBinBackToFront.h index 515fafc1a5..cfef2f4267 100644 --- a/panda/src/cull/cullBinBackToFront.h +++ b/panda/src/cull/cullBinBackToFront.h @@ -30,12 +30,12 @@ */ class EXPCL_PANDA_CULL CullBinBackToFront : public CullBin { public: - INLINE CullBinBackToFront(const string &name, + INLINE CullBinBackToFront(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); virtual ~CullBinBackToFront(); - static CullBin *make_bin(const string &name, + static CullBin *make_bin(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); diff --git a/panda/src/cull/cullBinFixed.I b/panda/src/cull/cullBinFixed.I index 117512283d..4d35e242a3 100644 --- a/panda/src/cull/cullBinFixed.I +++ b/panda/src/cull/cullBinFixed.I @@ -15,7 +15,7 @@ * */ INLINE CullBinFixed:: -CullBinFixed(const string &name, GraphicsStateGuardianBase *gsg, +CullBinFixed(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector) : CullBin(name, BT_fixed, gsg, draw_region_pcollector) { diff --git a/panda/src/cull/cullBinFixed.h b/panda/src/cull/cullBinFixed.h index f2d1c8fd07..337283e2b3 100644 --- a/panda/src/cull/cullBinFixed.h +++ b/panda/src/cull/cullBinFixed.h @@ -32,12 +32,12 @@ */ class EXPCL_PANDA_CULL CullBinFixed : public CullBin { public: - INLINE CullBinFixed(const string &name, + INLINE CullBinFixed(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); virtual ~CullBinFixed(); - static CullBin *make_bin(const string &name, + static CullBin *make_bin(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); diff --git a/panda/src/cull/cullBinFrontToBack.I b/panda/src/cull/cullBinFrontToBack.I index 4605e5e6ef..83c0ab4651 100644 --- a/panda/src/cull/cullBinFrontToBack.I +++ b/panda/src/cull/cullBinFrontToBack.I @@ -15,7 +15,7 @@ * */ INLINE CullBinFrontToBack:: -CullBinFrontToBack(const string &name, GraphicsStateGuardianBase *gsg, +CullBinFrontToBack(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector) : CullBin(name, BT_front_to_back, gsg, draw_region_pcollector) { diff --git a/panda/src/cull/cullBinFrontToBack.h b/panda/src/cull/cullBinFrontToBack.h index 6ee0d4424a..b9ba66c043 100644 --- a/panda/src/cull/cullBinFrontToBack.h +++ b/panda/src/cull/cullBinFrontToBack.h @@ -31,12 +31,12 @@ */ class EXPCL_PANDA_CULL CullBinFrontToBack : public CullBin { public: - INLINE CullBinFrontToBack(const string &name, + INLINE CullBinFrontToBack(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); virtual ~CullBinFrontToBack(); - static CullBin *make_bin(const string &name, + static CullBin *make_bin(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); diff --git a/panda/src/cull/cullBinStateSorted.I b/panda/src/cull/cullBinStateSorted.I index 1bdb99112f..1a1637bdf4 100644 --- a/panda/src/cull/cullBinStateSorted.I +++ b/panda/src/cull/cullBinStateSorted.I @@ -15,7 +15,7 @@ * */ INLINE CullBinStateSorted:: -CullBinStateSorted(const string &name, GraphicsStateGuardianBase *gsg, +CullBinStateSorted(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector) : CullBin(name, BT_state_sorted, gsg, draw_region_pcollector), _objects(get_class_type()) diff --git a/panda/src/cull/cullBinStateSorted.h b/panda/src/cull/cullBinStateSorted.h index 6f20882135..f97e41fa48 100644 --- a/panda/src/cull/cullBinStateSorted.h +++ b/panda/src/cull/cullBinStateSorted.h @@ -34,12 +34,12 @@ */ class EXPCL_PANDA_CULL CullBinStateSorted : public CullBin { public: - INLINE CullBinStateSorted(const string &name, + INLINE CullBinStateSorted(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); virtual ~CullBinStateSorted(); - static CullBin *make_bin(const string &name, + static CullBin *make_bin(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); diff --git a/panda/src/cull/cullBinUnsorted.I b/panda/src/cull/cullBinUnsorted.I index f9a8d37dc0..2e000b72f0 100644 --- a/panda/src/cull/cullBinUnsorted.I +++ b/panda/src/cull/cullBinUnsorted.I @@ -15,7 +15,7 @@ * */ INLINE CullBinUnsorted:: -CullBinUnsorted(const string &name, GraphicsStateGuardianBase *gsg, +CullBinUnsorted(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector) : CullBin(name, BT_unsorted, gsg, draw_region_pcollector) { diff --git a/panda/src/cull/cullBinUnsorted.h b/panda/src/cull/cullBinUnsorted.h index 0c682155d8..2dcf60a85f 100644 --- a/panda/src/cull/cullBinUnsorted.h +++ b/panda/src/cull/cullBinUnsorted.h @@ -26,12 +26,12 @@ */ class EXPCL_PANDA_CULL CullBinUnsorted : public CullBin { public: - INLINE CullBinUnsorted(const string &name, + INLINE CullBinUnsorted(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); ~CullBinUnsorted(); - static CullBin *make_bin(const string &name, + static CullBin *make_bin(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); diff --git a/panda/src/device/analogNode.h b/panda/src/device/analogNode.h index d62eaa0d3b..11626e0ae8 100644 --- a/panda/src/device/analogNode.h +++ b/panda/src/device/analogNode.h @@ -38,7 +38,7 @@ */ class EXPCL_PANDA_DEVICE AnalogNode : public DataNode { PUBLISHED: - explicit AnalogNode(ClientBase *client, const string &device_name); + explicit AnalogNode(ClientBase *client, const std::string &device_name); virtual ~AnalogNode(); INLINE bool is_valid() const; @@ -54,7 +54,7 @@ PUBLISHED: INLINE bool is_output_flipped(int channel) const; public: - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: class OutputData { diff --git a/panda/src/device/buttonNode.h b/panda/src/device/buttonNode.h index 6fce65a9e0..02b141fbbf 100644 --- a/panda/src/device/buttonNode.h +++ b/panda/src/device/buttonNode.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_DEVICE ButtonNode : public DataNode { PUBLISHED: - explicit ButtonNode(ClientBase *client, const string &device_name); + explicit ButtonNode(ClientBase *client, const std::string &device_name); virtual ~ButtonNode(); INLINE bool is_valid() const; @@ -48,8 +48,8 @@ PUBLISHED: INLINE bool is_button_known(int index) const; public: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: PT(ClientButtonDevice) _button; diff --git a/panda/src/device/clientAnalogDevice.I b/panda/src/device/clientAnalogDevice.I index aad2deafd4..d392d46aba 100644 --- a/panda/src/device/clientAnalogDevice.I +++ b/panda/src/device/clientAnalogDevice.I @@ -25,7 +25,7 @@ AnalogState() : * */ INLINE ClientAnalogDevice:: -ClientAnalogDevice(ClientBase *client, const string &device_name): +ClientAnalogDevice(ClientBase *client, const std::string &device_name): ClientDevice(client, get_class_type(), device_name) { } diff --git a/panda/src/device/clientAnalogDevice.h b/panda/src/device/clientAnalogDevice.h index 95040f49a4..436b399240 100644 --- a/panda/src/device/clientAnalogDevice.h +++ b/panda/src/device/clientAnalogDevice.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_DEVICE ClientAnalogDevice : public ClientDevice { protected: - INLINE ClientAnalogDevice(ClientBase *client, const string &device_name); + INLINE ClientAnalogDevice(ClientBase *client, const std::string &device_name); public: INLINE int get_num_controls() const; @@ -37,8 +37,8 @@ public: INLINE double get_control_state(int index) const; INLINE bool is_control_known(int index) const; - virtual void write(ostream &out, int indent_level = 0) const; - void write_controls(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level = 0) const; + void write_controls(std::ostream &out, int indent_level) const; private: void ensure_control_index(int index); diff --git a/panda/src/device/clientBase.h b/panda/src/device/clientBase.h index d7ee1cf605..f32b526172 100644 --- a/panda/src/device/clientBase.h +++ b/panda/src/device/clientBase.h @@ -57,20 +57,20 @@ PUBLISHED: public: PT(ClientDevice) get_device(TypeHandle device_type, - const string &device_name); + const std::string &device_name); protected: virtual PT(ClientDevice) make_device(TypeHandle device_type, - const string &device_name)=0; + const std::string &device_name)=0; virtual bool disconnect_device(TypeHandle device_type, - const string &device_name, + const std::string &device_name, ClientDevice *device); virtual void do_poll(); private: - typedef pmap DevicesByName; + typedef pmap DevicesByName; typedef pmap Devices; Devices _devices; diff --git a/panda/src/device/clientButtonDevice.h b/panda/src/device/clientButtonDevice.h index 3c7a285e36..3b089b707b 100644 --- a/panda/src/device/clientButtonDevice.h +++ b/panda/src/device/clientButtonDevice.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_DEVICE ClientButtonDevice : public ClientDevice { protected: - ClientButtonDevice(ClientBase *client, const string &device_name); + ClientButtonDevice(ClientBase *client, const std::string &device_name); public: INLINE int get_num_buttons() const; @@ -45,11 +45,11 @@ public: INLINE ButtonEventList *get_button_events() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; - void output_buttons(ostream &out) const; - void write_buttons(ostream &out, int indent_level) const; + void output_buttons(std::ostream &out) const; + void write_buttons(std::ostream &out, int indent_level) const; private: void ensure_button_index(int index); diff --git a/panda/src/device/clientDevice.I b/panda/src/device/clientDevice.I index c4e1e5a7b7..84edaf594f 100644 --- a/panda/src/device/clientDevice.I +++ b/panda/src/device/clientDevice.I @@ -44,7 +44,7 @@ get_device_type() const { * Returns the device name reported to the ClientBase. This has some * implementation-defined meaning to identify particular devices. */ -INLINE const string &ClientDevice:: +INLINE const std::string &ClientDevice:: get_device_name() const { return _device_name; } diff --git a/panda/src/device/clientDevice.h b/panda/src/device/clientDevice.h index d8424e9a1f..0e2ad03778 100644 --- a/panda/src/device/clientDevice.h +++ b/panda/src/device/clientDevice.h @@ -32,14 +32,14 @@ class ClientBase; class EXPCL_PANDA_DEVICE ClientDevice : public TypedReferenceCount { protected: ClientDevice(ClientBase *client, TypeHandle device_type, - const string &device_name); + const std::string &device_name); public: virtual ~ClientDevice(); INLINE ClientBase *get_client() const; INLINE TypeHandle get_device_type() const; - INLINE const string &get_device_name() const; + INLINE const std::string &get_device_name() const; INLINE bool is_connected() const; void disconnect(); @@ -48,13 +48,13 @@ public: INLINE void acquire(); INLINE void unlock(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: ClientBase *_client; TypeHandle _device_type; - string _device_name; + std::string _device_name; bool _is_connected; #ifdef OLD_HAVE_IPC @@ -81,7 +81,7 @@ private: friend class ClientBase; }; -INLINE ostream &operator <<(ostream &out, const ClientDevice &device) { +INLINE std::ostream &operator <<(std::ostream &out, const ClientDevice &device) { device.output(out); return out; } diff --git a/panda/src/device/clientDialDevice.I b/panda/src/device/clientDialDevice.I index bf7fc3bca7..b0360ec63b 100644 --- a/panda/src/device/clientDialDevice.I +++ b/panda/src/device/clientDialDevice.I @@ -25,7 +25,7 @@ DialState() : * */ INLINE ClientDialDevice:: -ClientDialDevice(ClientBase *client, const string &device_name): +ClientDialDevice(ClientBase *client, const std::string &device_name): ClientDevice(client, get_class_type(), device_name) { } diff --git a/panda/src/device/clientDialDevice.h b/panda/src/device/clientDialDevice.h index 0da5604583..ec1c929abf 100644 --- a/panda/src/device/clientDialDevice.h +++ b/panda/src/device/clientDialDevice.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDA_DEVICE ClientDialDevice : public ClientDevice { protected: - INLINE ClientDialDevice(ClientBase *client, const string &device_name); + INLINE ClientDialDevice(ClientBase *client, const std::string &device_name); public: INLINE int get_num_dials() const; diff --git a/panda/src/device/clientTrackerDevice.I b/panda/src/device/clientTrackerDevice.I index 030c4eea47..f4be74fc4d 100644 --- a/panda/src/device/clientTrackerDevice.I +++ b/panda/src/device/clientTrackerDevice.I @@ -15,7 +15,7 @@ * */ INLINE ClientTrackerDevice:: -ClientTrackerDevice(ClientBase *client, const string &device_name): +ClientTrackerDevice(ClientBase *client, const std::string &device_name): ClientDevice(client, get_class_type(), device_name) { } diff --git a/panda/src/device/clientTrackerDevice.h b/panda/src/device/clientTrackerDevice.h index 468ed342f5..bd134a5e4c 100644 --- a/panda/src/device/clientTrackerDevice.h +++ b/panda/src/device/clientTrackerDevice.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_DEVICE ClientTrackerDevice : public ClientDevice { protected: - INLINE ClientTrackerDevice(ClientBase *client, const string &device_name); + INLINE ClientTrackerDevice(ClientBase *client, const std::string &device_name); public: INLINE const TrackerData &get_data() const; diff --git a/panda/src/device/dialNode.h b/panda/src/device/dialNode.h index 13e2083efc..6fb65e7763 100644 --- a/panda/src/device/dialNode.h +++ b/panda/src/device/dialNode.h @@ -33,7 +33,7 @@ */ class EXPCL_PANDA_DEVICE DialNode : public DataNode { PUBLISHED: - explicit DialNode(ClientBase *client, const string &device_name); + explicit DialNode(ClientBase *client, const std::string &device_name); virtual ~DialNode(); INLINE bool is_valid() const; diff --git a/panda/src/device/mouseAndKeyboard.h b/panda/src/device/mouseAndKeyboard.h index 24a6efe07a..15f7544fb8 100644 --- a/panda/src/device/mouseAndKeyboard.h +++ b/panda/src/device/mouseAndKeyboard.h @@ -40,7 +40,7 @@ */ class EXPCL_PANDA_DEVICE MouseAndKeyboard : public DataNode { PUBLISHED: - explicit MouseAndKeyboard(GraphicsWindow *window, int device, const string &name); + explicit MouseAndKeyboard(GraphicsWindow *window, int device, const std::string &name); void set_source(GraphicsWindow *window, int device); PT(GraphicsWindow) get_source_window() const; diff --git a/panda/src/device/trackerNode.h b/panda/src/device/trackerNode.h index 628422324b..29e88047bb 100644 --- a/panda/src/device/trackerNode.h +++ b/panda/src/device/trackerNode.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_DEVICE TrackerNode : public DataNode { PUBLISHED: - explicit TrackerNode(ClientBase *client, const string &device_name); + explicit TrackerNode(ClientBase *client, const std::string &device_name); explicit TrackerNode(ClientTrackerDevice *device); virtual ~TrackerNode(); diff --git a/panda/src/device/virtualMouse.h b/panda/src/device/virtualMouse.h index 037180305d..2afa1b8d72 100644 --- a/panda/src/device/virtualMouse.h +++ b/panda/src/device/virtualMouse.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_DEVICE VirtualMouse : public DataNode { PUBLISHED: - explicit VirtualMouse(const string &name); + explicit VirtualMouse(const std::string &name); void set_mouse_pos(int x, int y); void set_window_size(int width, int height); diff --git a/panda/src/dgraph/dataNode.I b/panda/src/dgraph/dataNode.I index b9bcbb2fa1..a466de9d24 100644 --- a/panda/src/dgraph/dataNode.I +++ b/panda/src/dgraph/dataNode.I @@ -15,7 +15,7 @@ * */ INLINE DataNode:: -DataNode(const string &name) : +DataNode(const std::string &name) : PandaNode(name) { } diff --git a/panda/src/dgraph/dataNode.h b/panda/src/dgraph/dataNode.h index 0f5e52b0fc..7386b52b9a 100644 --- a/panda/src/dgraph/dataNode.h +++ b/panda/src/dgraph/dataNode.h @@ -51,7 +51,7 @@ class DataNodeTransmit; */ class EXPCL_PANDA_DGRAPH DataNode : public PandaNode { PUBLISHED: - INLINE explicit DataNode(const string &name); + INLINE explicit DataNode(const std::string &name); protected: INLINE DataNode(const DataNode ©); @@ -66,13 +66,13 @@ public: INLINE int get_num_outputs() const; PUBLISHED: - void write_inputs(ostream &out) const; - void write_outputs(ostream &out) const; - void write_connections(ostream &out) const; + void write_inputs(std::ostream &out) const; + void write_outputs(std::ostream &out) const; + void write_connections(std::ostream &out) const; protected: - int define_input(const string &name, TypeHandle data_type); - int define_output(const string &name, TypeHandle data_type); + int define_input(const std::string &name, TypeHandle data_type); + int define_output(const std::string &name, TypeHandle data_type); protected: // Inherited from PandaNode @@ -92,7 +92,7 @@ private: int _index; }; - typedef pmap Wires; + typedef pmap Wires; Wires _input_wires; Wires _output_wires; diff --git a/panda/src/display/callbackGraphicsWindow.h b/panda/src/display/callbackGraphicsWindow.h index a676dff9f4..fc7d8310f5 100644 --- a/panda/src/display/callbackGraphicsWindow.h +++ b/panda/src/display/callbackGraphicsWindow.h @@ -27,7 +27,7 @@ class EXPCL_PANDA_DISPLAY CallbackGraphicsWindow : public GraphicsWindow { protected: CallbackGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, @@ -179,7 +179,7 @@ PUBLISHED: INLINE CallbackObject *get_render_callback() const; GraphicsWindowInputDevice &get_input_device(int device); - int create_input_device(const string &name); + int create_input_device(const std::string &name); public: virtual bool begin_frame(FrameMode mode, Thread *current_thread); diff --git a/panda/src/display/displayInformation.h b/panda/src/display/displayInformation.h index 919e400741..2869c8320a 100644 --- a/panda/src/display/displayInformation.h +++ b/panda/src/display/displayInformation.h @@ -27,7 +27,7 @@ PUBLISHED: bool operator == (const DisplayMode &other) const; bool operator != (const DisplayMode &other) const; - void output(ostream &out) const; + void output(std::ostream &out) const; }; /** @@ -94,8 +94,8 @@ PUBLISHED: int get_driver_date_day(); int get_driver_date_year(); - const string &get_cpu_vendor_string() const; - const string &get_cpu_brand_string() const; + const std::string &get_cpu_vendor_string() const; + const std::string &get_cpu_brand_string() const; unsigned int get_cpu_version_information(); unsigned int get_cpu_brand_index(); @@ -155,8 +155,8 @@ public: int _driver_date_year; - string _cpu_vendor_string; - string _cpu_brand_string; + std::string _cpu_vendor_string; + std::string _cpu_brand_string; unsigned int _cpu_version_information; unsigned int _cpu_brand_index; diff --git a/panda/src/display/displayRegion.I b/panda/src/display/displayRegion.I index fa1c698c0a..96f2383bf9 100644 --- a/panda/src/display/displayRegion.I +++ b/panda/src/display/displayRegion.I @@ -479,8 +479,8 @@ INLINE void DisplayRegion:: set_cull_result(PT(CullResult) cull_result, PT(SceneSetup) scene_setup, Thread *current_thread) { CDCullWriter cdata(_cycler_cull, true, current_thread); - cdata->_cull_result = move(cull_result); - cdata->_scene_setup = move(scene_setup); + cdata->_cull_result = std::move(cull_result); + cdata->_scene_setup = std::move(scene_setup); } /** @@ -863,8 +863,8 @@ get_pixel_height(int i) const { return _cdata->_regions[i]._pixels[3] - _cdata->_regions[i]._pixels[2]; } -INLINE ostream & -operator << (ostream &out, const DisplayRegion &dr) { +INLINE std::ostream & +operator << (std::ostream &out, const DisplayRegion &dr) { dr.output(out); return out; } diff --git a/panda/src/display/displayRegion.h b/panda/src/display/displayRegion.h index 7599f17c9d..e97829be2c 100644 --- a/panda/src/display/displayRegion.h +++ b/panda/src/display/displayRegion.h @@ -150,13 +150,13 @@ PUBLISHED: INLINE LVecBase2i get_pixel_size(int i = 0) const; MAKE_PROPERTY(pixel_size, get_pixel_size); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; static Filename make_screenshot_filename( - const string &prefix = "screenshot"); - Filename save_screenshot_default(const string &prefix = "screenshot"); + const std::string &prefix = "screenshot"); + Filename save_screenshot_default(const std::string &prefix = "screenshot"); bool save_screenshot( - const Filename &filename, const string &image_comment = ""); + const Filename &filename, const std::string &image_comment = ""); bool get_screenshot(PNMImage &image); PT(Texture) get_screenshot(); @@ -371,7 +371,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const DisplayRegion &dr); +INLINE std::ostream &operator << (std::ostream &out, const DisplayRegion &dr); #include "displayRegion.I" diff --git a/panda/src/display/displayRegionCullCallbackData.h b/panda/src/display/displayRegionCullCallbackData.h index bb78dbc9c9..c8830a52c9 100644 --- a/panda/src/display/displayRegionCullCallbackData.h +++ b/panda/src/display/displayRegionCullCallbackData.h @@ -29,7 +29,7 @@ public: DisplayRegionCullCallbackData(CullHandler *cull_handler, SceneSetup *scene_setup); PUBLISHED: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE CullHandler *get_cull_handler() const; INLINE SceneSetup *get_scene_setup() const; diff --git a/panda/src/display/displayRegionDrawCallbackData.h b/panda/src/display/displayRegionDrawCallbackData.h index bbdfdc99b3..feea6034b6 100644 --- a/panda/src/display/displayRegionDrawCallbackData.h +++ b/panda/src/display/displayRegionDrawCallbackData.h @@ -29,7 +29,7 @@ public: DisplayRegionDrawCallbackData(CullResult *cull_result, SceneSetup *scene_setup); PUBLISHED: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE CullResult *get_cull_result() const; INLINE SceneSetup *get_scene_setup() const; diff --git a/panda/src/display/drawableRegion.I b/panda/src/display/drawableRegion.I index 677a345683..71fc1658cc 100644 --- a/panda/src/display/drawableRegion.I +++ b/panda/src/display/drawableRegion.I @@ -242,7 +242,7 @@ INLINE void DrawableRegion:: update_pixel_factor() { PN_stdfloat new_pixel_factor; if (supports_pixel_zoom()) { - new_pixel_factor = (PN_stdfloat)1 / sqrt(max(_pixel_zoom, (PN_stdfloat)1.0)); + new_pixel_factor = (PN_stdfloat)1 / sqrt(std::max(_pixel_zoom, (PN_stdfloat)1.0)); } else { new_pixel_factor = 1; } diff --git a/panda/src/display/frameBufferProperties.I b/panda/src/display/frameBufferProperties.I index 70c809c64b..5b6453af24 100644 --- a/panda/src/display/frameBufferProperties.I +++ b/panda/src/display/frameBufferProperties.I @@ -38,8 +38,8 @@ is_stereo() const { /** * */ -INLINE ostream & -operator << (ostream &out, const FrameBufferProperties &properties) { +INLINE std::ostream & +operator << (std::ostream &out, const FrameBufferProperties &properties) { properties.output(out); return out; } @@ -57,7 +57,7 @@ get_depth_bits() const { */ INLINE int FrameBufferProperties:: get_color_bits() const { - return max(_property[FBP_color_bits], + return std::max(_property[FBP_color_bits], _property[FBP_red_bits] + _property[FBP_green_bits] + _property[FBP_blue_bits]); diff --git a/panda/src/display/frameBufferProperties.h b/panda/src/display/frameBufferProperties.h index 67e0c50d1e..152f2dccc7 100644 --- a/panda/src/display/frameBufferProperties.h +++ b/panda/src/display/frameBufferProperties.h @@ -155,7 +155,7 @@ PUBLISHED: void set_all_specified(); bool subsumes(const FrameBufferProperties &other) const; void add_properties(const FrameBufferProperties &other); - void output(ostream &out) const; + void output(std::ostream &out) const; void set_one_bit_per_channel(); INLINE bool is_stereo() const; @@ -165,13 +165,13 @@ PUBLISHED: bool is_basic() const; int get_aux_mask() const; int get_buffer_mask() const; - bool verify_hardware_software(const FrameBufferProperties &props, const string &renderer) const; + bool verify_hardware_software(const FrameBufferProperties &props, const std::string &renderer) const; bool setup_color_texture(Texture *tex) const; bool setup_depth_texture(Texture *tex) const; }; -INLINE ostream &operator << (ostream &out, const FrameBufferProperties &properties); +INLINE std::ostream &operator << (std::ostream &out, const FrameBufferProperties &properties); #include "frameBufferProperties.I" diff --git a/panda/src/display/graphicsBuffer.h b/panda/src/display/graphicsBuffer.h index caff1d9284..5c7e833f57 100644 --- a/panda/src/display/graphicsBuffer.h +++ b/panda/src/display/graphicsBuffer.h @@ -28,7 +28,7 @@ class EXPCL_PANDA_DISPLAY GraphicsBuffer : public GraphicsOutput { protected: GraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/display/graphicsEngine.I b/panda/src/display/graphicsEngine.I index 326d073a0c..d0a4769a21 100644 --- a/panda/src/display/graphicsEngine.I +++ b/panda/src/display/graphicsEngine.I @@ -104,7 +104,7 @@ close_gsg(GraphicsPipe *pipe, GraphicsStateGuardian *gsg) { * sharing of resources. */ INLINE GraphicsOutput *GraphicsEngine:: -make_buffer(GraphicsOutput *host, const string &name, +make_buffer(GraphicsOutput *host, const std::string &name, int sort, int x_size, int y_size) { GraphicsOutput *result = make_output(host->get_pipe(), name, sort, FrameBufferProperties(), @@ -130,7 +130,7 @@ make_buffer(GraphicsOutput *host, const string &name, * the first parameter. */ INLINE GraphicsOutput *GraphicsEngine:: -make_buffer(GraphicsStateGuardian *gsg, const string &name, +make_buffer(GraphicsStateGuardian *gsg, const std::string &name, int sort, int x_size, int y_size) { FrameBufferProperties fb_props = FrameBufferProperties::get_default(); fb_props.set_back_buffers(0); @@ -152,7 +152,7 @@ make_buffer(GraphicsStateGuardian *gsg, const string &name, * Syntactic shorthand for make_buffer. */ INLINE GraphicsOutput *GraphicsEngine:: -make_parasite(GraphicsOutput *host, const string &name, +make_parasite(GraphicsOutput *host, const std::string &name, int sort, int x_size, int y_size) { GraphicsOutput *result = make_output(host->get_pipe(), name, sort, FrameBufferProperties(), diff --git a/panda/src/display/graphicsEngine.h b/panda/src/display/graphicsEngine.h index 867afdfb40..667490b3d3 100644 --- a/panda/src/display/graphicsEngine.h +++ b/panda/src/display/graphicsEngine.h @@ -75,7 +75,7 @@ PUBLISHED: MAKE_PROPERTY(default_loader, get_default_loader, set_default_loader); GraphicsOutput *make_output(GraphicsPipe *pipe, - const string &name, int sort, + const std::string &name, int sort, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, GraphicsStateGuardian *gsg = nullptr, @@ -83,13 +83,13 @@ PUBLISHED: // Syntactic shorthand versions of make_output INLINE GraphicsOutput *make_buffer(GraphicsOutput *host, - const string &name, int sort, + const std::string &name, int sort, int x_size, int y_size); INLINE GraphicsOutput *make_buffer(GraphicsStateGuardian *gsg, - const string &name, int sort, + const std::string &name, int sort, int x_size, int y_size); INLINE GraphicsOutput *make_parasite(GraphicsOutput *host, - const string &name, int sort, + const std::string &name, int sort, int x_size, int y_size); bool add_window(GraphicsOutput *window, int sort); @@ -176,7 +176,7 @@ private: void auto_adjust_capabilities(GraphicsStateGuardian *gsg); #ifdef DO_PSTATS - typedef map CyclerTypeCounters; + typedef std::map CyclerTypeCounters; CyclerTypeCounters _all_cycler_types; CyclerTypeCounters _dirty_cycler_types; static void pstats_count_cycler_type(TypeHandle type, int count, void *data); @@ -262,7 +262,7 @@ private: class WindowRenderer { public: - WindowRenderer(const string &name); + WindowRenderer(const std::string &name); void add_gsg(GraphicsStateGuardian *gsg); void add_window(Windows &wlist, GraphicsOutput *window); @@ -293,7 +293,7 @@ private: class RenderThread : public Thread, public WindowRenderer { public: - RenderThread(const string &name, GraphicsEngine *engine); + RenderThread(const std::string &name, GraphicsEngine *engine); virtual void thread_main(); GraphicsEngine *_engine; @@ -310,7 +310,7 @@ private: bool _result; }; - WindowRenderer *get_window_renderer(const string &name, int pipeline_stage); + WindowRenderer *get_window_renderer(const std::string &name, int pipeline_stage); Pipeline *_pipeline; Windows _windows; @@ -322,7 +322,7 @@ private: pvector _new_windows; WindowRenderer _app; - typedef pmap Threads; + typedef pmap Threads; Threads _threads; GraphicsThreadingModel _threading_model; bool _auto_flip; diff --git a/panda/src/display/graphicsOutput.I b/panda/src/display/graphicsOutput.I index bc0e866f7d..c94c83f54c 100644 --- a/panda/src/display/graphicsOutput.I +++ b/panda/src/display/graphicsOutput.I @@ -48,7 +48,7 @@ get_engine() const { /** * Returns the name that was passed to the GraphicsOutput constructor. */ -INLINE const string &GraphicsOutput:: +INLINE const std::string &GraphicsOutput:: get_name() const { return _name; } @@ -167,8 +167,8 @@ get_y_size() const { */ INLINE LVecBase2i GraphicsOutput:: get_fb_size() const { - return LVecBase2i(max(int(_size.get_x() * get_pixel_factor()), 1), - max(int(_size.get_y() * get_pixel_factor()), 1)); + return LVecBase2i(std::max(int(_size.get_x() * get_pixel_factor()), 1), + std::max(int(_size.get_y() * get_pixel_factor()), 1)); } /** @@ -178,7 +178,7 @@ get_fb_size() const { */ INLINE int GraphicsOutput:: get_fb_x_size() const { - return max(int(_size.get_x() * get_pixel_factor()), 1); + return std::max(int(_size.get_x() * get_pixel_factor()), 1); } /** @@ -188,7 +188,7 @@ get_fb_x_size() const { */ INLINE int GraphicsOutput:: get_fb_y_size() const { - return max(int(_size.get_y() * get_pixel_factor()), 1); + return std::max(int(_size.get_y() * get_pixel_factor()), 1); } /** @@ -200,8 +200,8 @@ INLINE LVecBase2i GraphicsOutput:: get_sbs_left_size() const { PN_stdfloat left_w = _sbs_left_dimensions[1] - _sbs_left_dimensions[0]; PN_stdfloat left_h = _sbs_left_dimensions[3] - _sbs_left_dimensions[2]; - return LVecBase2i(max(int(_size.get_x() * left_w), 1), - max(int(_size.get_y() * left_h), 1)); + return LVecBase2i(std::max(int(_size.get_x() * left_w), 1), + std::max(int(_size.get_y() * left_h), 1)); } /** @@ -212,7 +212,7 @@ get_sbs_left_size() const { INLINE int GraphicsOutput:: get_sbs_left_x_size() const { PN_stdfloat left_w = _sbs_left_dimensions[1] - _sbs_left_dimensions[0]; - return max(int(_size.get_x() * left_w), 1); + return std::max(int(_size.get_x() * left_w), 1); } /** @@ -223,7 +223,7 @@ get_sbs_left_x_size() const { INLINE int GraphicsOutput:: get_sbs_left_y_size() const { PN_stdfloat left_h = _sbs_left_dimensions[3] - _sbs_left_dimensions[2]; - return max(int(_size.get_y() * left_h), 1); + return std::max(int(_size.get_y() * left_h), 1); } /** @@ -235,8 +235,8 @@ INLINE LVecBase2i GraphicsOutput:: get_sbs_right_size() const { PN_stdfloat right_w = _sbs_right_dimensions[1] - _sbs_right_dimensions[0]; PN_stdfloat right_h = _sbs_right_dimensions[3] - _sbs_right_dimensions[2]; - return LVecBase2i(max(int(_size.get_x() * right_w), 1), - max(int(_size.get_y() * right_h), 1)); + return LVecBase2i(std::max(int(_size.get_x() * right_w), 1), + std::max(int(_size.get_y() * right_h), 1)); } /** @@ -247,7 +247,7 @@ get_sbs_right_size() const { INLINE int GraphicsOutput:: get_sbs_right_x_size() const { PN_stdfloat right_w = _sbs_right_dimensions[1] - _sbs_right_dimensions[0]; - return max(int(_size.get_x() * right_w), 1); + return std::max(int(_size.get_x() * right_w), 1); } /** @@ -258,7 +258,7 @@ get_sbs_right_x_size() const { INLINE int GraphicsOutput:: get_sbs_right_y_size() const { PN_stdfloat right_h = _sbs_right_dimensions[3] - _sbs_right_dimensions[2]; - return max(int(_size.get_y() * right_h), 1); + return std::max(int(_size.get_y() * right_h), 1); } /** @@ -602,7 +602,7 @@ get_overlay_display_region() const { * screenshot-extension All other % strings in strftime(). */ INLINE Filename GraphicsOutput:: -make_screenshot_filename(const string &prefix) { +make_screenshot_filename(const std::string &prefix) { return DisplayRegion::make_screenshot_filename(prefix); } @@ -612,7 +612,7 @@ make_screenshot_filename(const string &prefix) { * generated by make_screenshot_filename(). */ INLINE Filename GraphicsOutput:: -save_screenshot_default(const string &prefix) { +save_screenshot_default(const std::string &prefix) { return _overlay_display_region->save_screenshot_default(prefix); } @@ -623,7 +623,7 @@ save_screenshot_default(const string &prefix) { * jpg allows comments). Returns true on success, false on failure. */ INLINE bool GraphicsOutput:: -save_screenshot(const Filename &filename, const string &image_comment) { +save_screenshot(const Filename &filename, const std::string &image_comment) { return _overlay_display_region->save_screenshot(filename, image_comment); } diff --git a/panda/src/display/graphicsOutput.h b/panda/src/display/graphicsOutput.h index c5ddb10ff0..acd41e8289 100644 --- a/panda/src/display/graphicsOutput.h +++ b/panda/src/display/graphicsOutput.h @@ -64,7 +64,7 @@ class EXPCL_PANDA_DISPLAY GraphicsOutput : public GraphicsOutputBase, public Dra protected: GraphicsOutput(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, GraphicsStateGuardian *gsg, @@ -113,7 +113,7 @@ PUBLISHED: INLINE GraphicsStateGuardian *get_gsg() const; INLINE GraphicsPipe *get_pipe() const; INLINE GraphicsEngine *get_engine() const; - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; MAKE_PROPERTY(gsg, get_gsg); MAKE_PROPERTY(pipe, get_pipe); MAKE_PROPERTY(engine, get_engine); @@ -224,19 +224,19 @@ PUBLISHED: MAKE_SEQ_PROPERTY(active_display_regions, get_num_active_display_regions, get_active_display_region); GraphicsOutput *make_texture_buffer( - const string &name, int x_size, int y_size, + const std::string &name, int x_size, int y_size, Texture *tex = nullptr, bool to_ram = false, FrameBufferProperties *fbp = nullptr); - GraphicsOutput *make_cube_map(const string &name, int size, + GraphicsOutput *make_cube_map(const std::string &name, int size, NodePath &camera_rig, DrawMask camera_mask = PandaNode::get_all_camera_mask(), bool to_ram = false, FrameBufferProperties *fbp = nullptr); INLINE static Filename make_screenshot_filename( - const string &prefix = "screenshot"); + const std::string &prefix = "screenshot"); INLINE Filename save_screenshot_default( - const string &prefix = "screenshot"); + const std::string &prefix = "screenshot"); INLINE bool save_screenshot( - const Filename &filename, const string &image_comment = ""); + const Filename &filename, const std::string &image_comment = ""); INLINE bool get_screenshot(PNMImage &image); INLINE PT(Texture) get_screenshot(); @@ -314,7 +314,7 @@ private: INLINE void determine_display_regions() const; void do_determine_display_regions(CData *cdata); - static unsigned int parse_color_mask(const string &word); + static unsigned int parse_color_mask(const std::string &word); protected: PT(GraphicsStateGuardian) _gsg; @@ -323,7 +323,7 @@ protected: PT(GraphicsOutput) _host; FrameBufferProperties _fb_properties; bool _stereo; - string _name; + std::string _name; bool _flip_ready; int _target_tex_page; int _target_tex_view; @@ -431,7 +431,7 @@ private: friend class DisplayRegion; }; -EXPCL_PANDA_DISPLAY ostream &operator << (ostream &out, GraphicsOutput::FrameMode mode); +EXPCL_PANDA_DISPLAY std::ostream &operator << (std::ostream &out, GraphicsOutput::FrameMode mode); #include "graphicsOutput.I" diff --git a/panda/src/display/graphicsPipe.h b/panda/src/display/graphicsPipe.h index 032da4b1cd..ef3a3b8496 100644 --- a/panda/src/display/graphicsPipe.h +++ b/panda/src/display/graphicsPipe.h @@ -99,7 +99,7 @@ PUBLISHED: virtual void lookup_cpu_data(); - virtual string get_interface_name() const=0; + virtual std::string get_interface_name() const=0; MAKE_PROPERTY(interface_name, get_interface_name); public: @@ -117,7 +117,7 @@ public: protected: virtual void close_gsg(GraphicsStateGuardian *gsg); - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/display/graphicsPipeSelection.h b/panda/src/display/graphicsPipeSelection.h index d1dc5b641e..c3b61317e9 100644 --- a/panda/src/display/graphicsPipeSelection.h +++ b/panda/src/display/graphicsPipeSelection.h @@ -42,10 +42,10 @@ PUBLISHED: MAKE_SEQ_PROPERTY(pipe_types, get_num_pipe_types, get_pipe_type); void print_pipe_types() const; - PT(GraphicsPipe) make_pipe(const string &type_name, - const string &module_name = string()); + PT(GraphicsPipe) make_pipe(const std::string &type_name, + const std::string &module_name = std::string()); PT(GraphicsPipe) make_pipe(TypeHandle type); - PT(GraphicsPipe) make_module_pipe(const string &module_name); + PT(GraphicsPipe) make_module_pipe(const std::string &module_name); PT(GraphicsPipe) make_default_pipe(); INLINE int get_num_aux_modules() const; @@ -60,15 +60,15 @@ public: private: INLINE void load_default_module() const; void do_load_default_module(); - TypeHandle load_named_module(const string &name); + TypeHandle load_named_module(const std::string &name); class LoadedModule { public: - string _module_name; + std::string _module_name; void *_module_handle; TypeHandle _default_pipe_type; }; - typedef pmap LoadedModules; + typedef pmap LoadedModules; LoadedModules _loaded_modules; LightMutex _loaded_modules_lock; @@ -84,8 +84,8 @@ private: typedef vector_string DisplayModules; DisplayModules _display_modules; - string _default_display_module; - string _default_pipe_name; + std::string _default_display_module; + std::string _default_pipe_name; bool _default_module_loaded; static GraphicsPipeSelection *_global_ptr; diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index 9f36616a95..f14a0fb087 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -258,7 +258,7 @@ get_max_vertices_per_primitive() const { INLINE int GraphicsStateGuardian:: get_max_texture_stages() const { if (max_texture_stages > 0) { - return min(_max_texture_stages, (int)max_texture_stages); + return std::min(_max_texture_stages, (int)max_texture_stages); } return _max_texture_stages; } @@ -695,7 +695,7 @@ get_timer_queries_active() const { INLINE int GraphicsStateGuardian:: get_max_color_targets() const { if (max_color_targets > 0) { - return min(_max_color_targets, (int)max_color_targets); + return std::min(_max_color_targets, (int)max_color_targets); } return _max_color_targets; } diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 8e0e8d8489..c64bbe692a 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -228,7 +228,7 @@ PUBLISHED: MAKE_PROPERTY(shader_model, get_shader_model, set_shader_model); virtual int get_supported_geom_rendering() const; - virtual bool get_supports_cg_profile(const string &name) const; + virtual bool get_supports_cg_profile(const std::string &name) const; INLINE bool get_color_scale_via_lighting() const; INLINE bool get_alpha_scale_via_texture() const; @@ -267,11 +267,11 @@ PUBLISHED: #endif PUBLISHED: - virtual bool has_extension(const string &extension) const; + virtual bool has_extension(const std::string &extension) const; - virtual string get_driver_vendor(); - virtual string get_driver_renderer(); - virtual string get_driver_version(); + virtual std::string get_driver_vendor(); + virtual std::string get_driver_renderer(); + virtual std::string get_driver_version(); virtual int get_driver_version_major(); virtual int get_driver_version_minor(); virtual int get_driver_shader_version_major(); @@ -760,7 +760,7 @@ private: friend class GraphicsEngine; }; -EXPCL_PANDA_DISPLAY ostream &operator << (ostream &out, GraphicsStateGuardian::ShaderModel sm); +EXPCL_PANDA_DISPLAY std::ostream &operator << (std::ostream &out, GraphicsStateGuardian::ShaderModel sm); #include "graphicsStateGuardian.I" diff --git a/panda/src/display/graphicsThreadingModel.I b/panda/src/display/graphicsThreadingModel.I index bfd0161518..98707b16cb 100644 --- a/panda/src/display/graphicsThreadingModel.I +++ b/panda/src/display/graphicsThreadingModel.I @@ -39,7 +39,7 @@ operator = (const GraphicsThreadingModel ©) { /** * Returns the name of the thread that will handle culling in this model. */ -INLINE const string &GraphicsThreadingModel:: +INLINE const std::string &GraphicsThreadingModel:: get_cull_name() const { return _cull_name; } @@ -50,7 +50,7 @@ get_cull_name() const { * this only has an effect on newly-opened windows. */ INLINE void GraphicsThreadingModel:: -set_cull_name(const string &cull_name) { +set_cull_name(const std::string &cull_name) { _cull_name = cull_name; update_stages(); } @@ -69,7 +69,7 @@ get_cull_stage() const { * Returns the name of the thread that will handle sending the actual graphics * primitives to the graphics API in this model. */ -INLINE const string &GraphicsThreadingModel:: +INLINE const std::string &GraphicsThreadingModel:: get_draw_name() const { return _draw_name; } @@ -80,7 +80,7 @@ get_draw_name() const { * this only has an effect on newly-opened windows. */ INLINE void GraphicsThreadingModel:: -set_draw_name(const string &draw_name) { +set_draw_name(const std::string &draw_name) { _draw_name = draw_name; update_stages(); } @@ -140,12 +140,12 @@ is_default() const { * */ INLINE void GraphicsThreadingModel:: -output(ostream &out) const { +output(std::ostream &out) const { out << get_model(); } -INLINE ostream & -operator << (ostream &out, const GraphicsThreadingModel &threading_model) { +INLINE std::ostream & +operator << (std::ostream &out, const GraphicsThreadingModel &threading_model) { threading_model.output(out); return out; } diff --git a/panda/src/display/graphicsThreadingModel.h b/panda/src/display/graphicsThreadingModel.h index 7d189250df..7f0cf519af 100644 --- a/panda/src/display/graphicsThreadingModel.h +++ b/panda/src/display/graphicsThreadingModel.h @@ -22,17 +22,17 @@ */ class EXPCL_PANDA_DISPLAY GraphicsThreadingModel { PUBLISHED: - GraphicsThreadingModel(const string &model = string()); + GraphicsThreadingModel(const std::string &model = std::string()); INLINE GraphicsThreadingModel(const GraphicsThreadingModel ©); INLINE void operator = (const GraphicsThreadingModel ©); - string get_model() const; - INLINE const string &get_cull_name() const; - INLINE void set_cull_name(const string &cull_name); + std::string get_model() const; + INLINE const std::string &get_cull_name() const; + INLINE void set_cull_name(const std::string &cull_name); INLINE int get_cull_stage() const; - INLINE const string &get_draw_name() const; - INLINE void set_draw_name(const string &cull_name); + INLINE const std::string &get_draw_name() const; + INLINE void set_draw_name(const std::string &cull_name); INLINE int get_draw_stage() const; INLINE bool get_cull_sorting() const; @@ -40,20 +40,20 @@ PUBLISHED: INLINE bool is_single_threaded() const; INLINE bool is_default() const; - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; private: void update_stages(); private: - string _cull_name; + std::string _cull_name; int _cull_stage; - string _draw_name; + std::string _draw_name; int _draw_stage; bool _cull_sorting; }; -INLINE ostream &operator << (ostream &out, const GraphicsThreadingModel &threading_model); +INLINE std::ostream &operator << (std::ostream &out, const GraphicsThreadingModel &threading_model); #include "graphicsThreadingModel.I" diff --git a/panda/src/display/graphicsWindow.h b/panda/src/display/graphicsWindow.h index 86986f52c4..e41dad65ba 100644 --- a/panda/src/display/graphicsWindow.h +++ b/panda/src/display/graphicsWindow.h @@ -41,7 +41,7 @@ class EXPCL_PANDA_DISPLAY GraphicsWindow : public GraphicsOutput { protected: GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, @@ -65,12 +65,12 @@ PUBLISHED: MAKE_PROPERTY(rejected_properties, get_rejected_properties); MAKE_PROPERTY(closed, is_closed); - void set_window_event(const string &window_event); - string get_window_event() const; + void set_window_event(const std::string &window_event); + std::string get_window_event() const; MAKE_PROPERTY(window_event, get_window_event, set_window_event); - void set_close_request_event(const string &close_request_event); - string get_close_request_event() const; + void set_close_request_event(const std::string &close_request_event); + std::string get_close_request_event() const; MAKE_PROPERTY(close_request_event, get_close_request_event, set_close_request_event); INLINE void set_unexposed_draw(bool unexposed_draw); @@ -82,7 +82,7 @@ PUBLISHED: // Mouse and keyboard routines int get_num_input_devices() const; - string get_input_device_name(int device) const; + std::string get_input_device_name(int device) const; MAKE_SEQ(get_input_device_names, get_num_input_devices, get_input_device_name); bool has_pointer(int device) const; bool has_keyboard(int device) const; @@ -161,8 +161,8 @@ private: WindowProperties _requested_properties; WindowProperties _rejected_properties; - string _window_event; - string _close_request_event; + std::string _window_event; + std::string _close_request_event; bool _unexposed_draw; #ifdef HAVE_PYTHON diff --git a/panda/src/display/graphicsWindowInputDevice.I b/panda/src/display/graphicsWindowInputDevice.I index 2d69d042d9..446dca6ab6 100644 --- a/panda/src/display/graphicsWindowInputDevice.I +++ b/panda/src/display/graphicsWindowInputDevice.I @@ -23,7 +23,7 @@ GraphicsWindowInputDevice() { /** * */ -INLINE string GraphicsWindowInputDevice:: +INLINE std::string GraphicsWindowInputDevice:: get_name() const { LightMutexHolder holder(_lock); return _name; diff --git a/panda/src/display/graphicsWindowInputDevice.h b/panda/src/display/graphicsWindowInputDevice.h index 5cdff54f29..b570b5f384 100644 --- a/panda/src/display/graphicsWindowInputDevice.h +++ b/panda/src/display/graphicsWindowInputDevice.h @@ -38,19 +38,19 @@ class GraphicsWindow; */ class EXPCL_PANDA_DISPLAY GraphicsWindowInputDevice { private: - GraphicsWindowInputDevice(GraphicsWindow *host, const string &name, int flags); + GraphicsWindowInputDevice(GraphicsWindow *host, const std::string &name, int flags); public: - static GraphicsWindowInputDevice pointer_only(GraphicsWindow *host, const string &name); - static GraphicsWindowInputDevice keyboard_only(GraphicsWindow *host, const string &name); - static GraphicsWindowInputDevice pointer_and_keyboard(GraphicsWindow *host, const string &name); + static GraphicsWindowInputDevice pointer_only(GraphicsWindow *host, const std::string &name); + static GraphicsWindowInputDevice keyboard_only(GraphicsWindow *host, const std::string &name); + static GraphicsWindowInputDevice pointer_and_keyboard(GraphicsWindow *host, const std::string &name); INLINE GraphicsWindowInputDevice(); GraphicsWindowInputDevice(const GraphicsWindowInputDevice ©); void operator = (const GraphicsWindowInputDevice ©); ~GraphicsWindowInputDevice(); - INLINE string get_name() const; + INLINE std::string get_name() const; INLINE bool has_pointer() const; INLINE bool has_keyboard() const; @@ -87,7 +87,7 @@ PUBLISHED: void button_resume_down(ButtonHandle button, double time); void button_up(ButtonHandle button, double time); void keystroke(int keycode, double time); - void candidate(const wstring &candidate_string, size_t highlight_start, + void candidate(const std::wstring &candidate_string, size_t highlight_start, size_t highlight_end, size_t cursor_pos); void focus_lost(double time); void raw_button_down(ButtonHandle button, double time); @@ -115,7 +115,7 @@ private: GraphicsWindow *_host; - string _name; + std::string _name; int _flags; int _device_index; int _event_sequence; diff --git a/panda/src/display/graphicsWindowProcCallbackData.h b/panda/src/display/graphicsWindowProcCallbackData.h index d417a3595e..23ae66d9c7 100644 --- a/panda/src/display/graphicsWindowProcCallbackData.h +++ b/panda/src/display/graphicsWindowProcCallbackData.h @@ -39,7 +39,7 @@ public: #endif PUBLISHED: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; #ifdef WIN32 INLINE uintptr_t get_hwnd() const; diff --git a/panda/src/display/nativeWindowHandle.h b/panda/src/display/nativeWindowHandle.h index da6096533a..1ee6fec43a 100644 --- a/panda/src/display/nativeWindowHandle.h +++ b/panda/src/display/nativeWindowHandle.h @@ -56,7 +56,7 @@ public: public: INLINE IntHandle(size_t handle); virtual size_t get_int_handle() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE size_t get_handle() const; @@ -84,7 +84,7 @@ public: class EXPCL_PANDA_DISPLAY SubprocessHandle : public OSHandle { public: INLINE SubprocessHandle(const Filename &filename); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE const Filename &get_filename() const; @@ -114,7 +114,7 @@ public: public: INLINE X11Handle(X11_Window handle); virtual size_t get_int_handle() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE X11_Window get_handle() const; @@ -146,7 +146,7 @@ public: public: INLINE WinHandle(HWND handle); virtual size_t get_int_handle() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE HWND get_handle() const; diff --git a/panda/src/display/parasiteBuffer.h b/panda/src/display/parasiteBuffer.h index 421b932584..3c197c068e 100644 --- a/panda/src/display/parasiteBuffer.h +++ b/panda/src/display/parasiteBuffer.h @@ -42,7 +42,7 @@ */ class EXPCL_PANDA_DISPLAY ParasiteBuffer : public GraphicsOutput { public: - ParasiteBuffer(GraphicsOutput *host, const string &name, + ParasiteBuffer(GraphicsOutput *host, const std::string &name, int x_size, int y_size, int flags); PUBLISHED: diff --git a/panda/src/display/stereoDisplayRegion.h b/panda/src/display/stereoDisplayRegion.h index b1d27bd361..940d793f4b 100644 --- a/panda/src/display/stereoDisplayRegion.h +++ b/panda/src/display/stereoDisplayRegion.h @@ -58,7 +58,7 @@ PUBLISHED: virtual void set_cull_traverser(CullTraverser *trav); virtual void set_target_tex_page(int page); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual PT(PandaNode) make_cull_result_graph(); INLINE DisplayRegion *get_left_eye(); diff --git a/panda/src/display/subprocessWindow.h b/panda/src/display/subprocessWindow.h index 8065721f42..1339b8f90d 100644 --- a/panda/src/display/subprocessWindow.h +++ b/panda/src/display/subprocessWindow.h @@ -45,7 +45,7 @@ class SubprocessWindow : public GraphicsWindow { public: SubprocessWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/display/subprocessWindowBuffer.h b/panda/src/display/subprocessWindowBuffer.h index e0d52a7f4a..2cadcee8f5 100644 --- a/panda/src/display/subprocessWindowBuffer.h +++ b/panda/src/display/subprocessWindowBuffer.h @@ -41,16 +41,16 @@ private: public: static SubprocessWindowBuffer *new_buffer(int &fd, size_t &mmap_size, - string &filename, + std::string &filename, int x_size, int y_size); static void destroy_buffer(int fd, size_t mmap_size, - const string &filename, + const std::string &filename, SubprocessWindowBuffer *buffer); static SubprocessWindowBuffer *open_buffer(int &fd, size_t &mmap_size, - const string &filename); + const std::string &filename); static void close_buffer(int fd, size_t mmap_size, - const string &filename, + const std::string &filename, SubprocessWindowBuffer *buffer); bool verify_magic_number() const; diff --git a/panda/src/display/windowHandle.h b/panda/src/display/windowHandle.h index 1679e3d95f..7089aa8e28 100644 --- a/panda/src/display/windowHandle.h +++ b/panda/src/display/windowHandle.h @@ -47,7 +47,7 @@ PUBLISHED: size_t get_int_handle() const; - void output(ostream &out) const; + void output(std::ostream &out) const; public: // Callbacks for communication with the parent window. @@ -67,7 +67,7 @@ PUBLISHED: PUBLISHED: virtual ~OSHandle(); virtual size_t get_int_handle() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; public: static TypeHandle get_class_type() { @@ -112,12 +112,12 @@ private: #include "windowHandle.I" -INLINE ostream &operator << (ostream &out, const WindowHandle &handle) { +INLINE std::ostream &operator << (std::ostream &out, const WindowHandle &handle) { handle.output(out); return out; } -INLINE ostream &operator << (ostream &out, const WindowHandle::OSHandle &handle) { +INLINE std::ostream &operator << (std::ostream &out, const WindowHandle::OSHandle &handle) { handle.output(out); return out; } diff --git a/panda/src/display/windowProperties.I b/panda/src/display/windowProperties.I index f9af047b54..d134ea2be5 100644 --- a/panda/src/display/windowProperties.I +++ b/panda/src/display/windowProperties.I @@ -182,7 +182,7 @@ clear_size() { * Specifies the title that should be assigned to the window. */ INLINE void WindowProperties:: -set_title(const string &title) { +set_title(const std::string &title) { _title = title; _specified |= S_title; } @@ -190,7 +190,7 @@ set_title(const string &title) { /** * Returns the window's title. */ -INLINE const string &WindowProperties:: +INLINE const std::string &WindowProperties:: get_title() const { nassertr(has_title(), _title); return _title; @@ -210,7 +210,7 @@ has_title() const { INLINE void WindowProperties:: clear_title() { _specified &= ~S_title; - _title = string(); + _title = std::string(); } /** @@ -730,8 +730,8 @@ clear_parent_window() { } -INLINE ostream & -operator << (ostream &out, const WindowProperties &properties) { +INLINE std::ostream & +operator << (std::ostream &out, const WindowProperties &properties) { properties.output(out); return out; } diff --git a/panda/src/display/windowProperties.h b/panda/src/display/windowProperties.h index dd6ba5185c..68ba4e7f1d 100644 --- a/panda/src/display/windowProperties.h +++ b/panda/src/display/windowProperties.h @@ -86,8 +86,8 @@ PUBLISHED: MAKE_PROPERTY2(mouse_mode, has_mouse_mode, get_mouse_mode, set_mouse_mode, clear_mouse_mode); - INLINE void set_title(const string &title); - INLINE const string &get_title() const; + INLINE void set_title(const std::string &title); + INLINE const std::string &get_title() const; INLINE bool has_title() const; INLINE void clear_title(); MAKE_PROPERTY2(title, has_title, get_title, set_title, clear_title); @@ -175,7 +175,7 @@ PUBLISHED: void add_properties(const WindowProperties &other); - void output(ostream &out) const; + void output(std::ostream &out) const; private: // This bitmask indicates which of the parameters in the properties @@ -216,7 +216,7 @@ private: LPoint2i _origin; LVector2i _size; MouseMode _mouse_mode; - string _title; + std::string _title; Filename _cursor_filename; Filename _icon_filename; ZOrder _z_order; @@ -226,18 +226,18 @@ private: static WindowProperties *_default_properties; }; -EXPCL_PANDA_DISPLAY ostream & -operator << (ostream &out, WindowProperties::ZOrder z_order); -EXPCL_PANDA_DISPLAY istream & -operator >> (istream &in, WindowProperties::ZOrder &z_order); +EXPCL_PANDA_DISPLAY std::ostream & +operator << (std::ostream &out, WindowProperties::ZOrder z_order); +EXPCL_PANDA_DISPLAY std::istream & +operator >> (std::istream &in, WindowProperties::ZOrder &z_order); -EXPCL_PANDA_DISPLAY ostream & -operator << (ostream &out, WindowProperties::MouseMode mode); -EXPCL_PANDA_DISPLAY istream & -operator >> (istream &in, WindowProperties::MouseMode &mode); +EXPCL_PANDA_DISPLAY std::ostream & +operator << (std::ostream &out, WindowProperties::MouseMode mode); +EXPCL_PANDA_DISPLAY std::istream & +operator >> (std::istream &in, WindowProperties::MouseMode &mode); -INLINE ostream &operator << (ostream &out, const WindowProperties &properties); +INLINE std::ostream &operator << (std::ostream &out, const WindowProperties &properties); #include "windowProperties.I" diff --git a/panda/src/distort/nonlinearImager.h b/panda/src/distort/nonlinearImager.h index 621ad0d139..aa07854df7 100644 --- a/panda/src/distort/nonlinearImager.h +++ b/panda/src/distort/nonlinearImager.h @@ -84,7 +84,7 @@ PUBLISHED: ~NonlinearImager(); int add_screen(ProjectionScreen *screen); - int add_screen(const NodePath &screen, const string &name); + int add_screen(const NodePath &screen, const std::string &name); int find_screen(const NodePath &screen) const; void remove_screen(int index); void remove_all_screens(); @@ -146,7 +146,7 @@ private: public: NodePath _screen; PT(ProjectionScreen) _screen_node; - string _name; + std::string _name; PT(GraphicsOutput) _buffer; NodePath _source_camera; int _tex_width, _tex_height; diff --git a/panda/src/distort/projectionScreen.I b/panda/src/distort/projectionScreen.I index b1fa41f7f5..2ff54cfeb5 100644 --- a/panda/src/distort/projectionScreen.I +++ b/panda/src/distort/projectionScreen.I @@ -67,7 +67,7 @@ get_undist_lut() const { * stages of the multitexture pipeline. */ INLINE void ProjectionScreen:: -set_texcoord_name(const string &texcoord_name) { +set_texcoord_name(const std::string &texcoord_name) { _texcoord_name = InternalName::get_texcoord_name(texcoord_name); _stale = true; } @@ -76,7 +76,7 @@ set_texcoord_name(const string &texcoord_name) { * Returns the name of the texture coordinates that will be generated by this * particular ProjectionScreen, as set by set_texcoord_name(). */ -INLINE string ProjectionScreen:: +INLINE std::string ProjectionScreen:: get_texcoord_name() const { return _texcoord_name->get_name(); } diff --git a/panda/src/distort/projectionScreen.h b/panda/src/distort/projectionScreen.h index 86f9484379..ef90ebb070 100644 --- a/panda/src/distort/projectionScreen.h +++ b/panda/src/distort/projectionScreen.h @@ -47,7 +47,7 @@ class WorkingNodePath; */ class EXPCL_PANDAFX ProjectionScreen : public PandaNode { PUBLISHED: - explicit ProjectionScreen(const string &name = ""); + explicit ProjectionScreen(const std::string &name = ""); virtual ~ProjectionScreen(); protected: @@ -67,16 +67,16 @@ PUBLISHED: INLINE const PfmFile &get_undist_lut() const; PT(GeomNode) generate_screen(const NodePath &projector, - const string &screen_name, + const std::string &screen_name, int num_x_verts, int num_y_verts, PN_stdfloat distance, PN_stdfloat fill_ratio); - void regenerate_screen(const NodePath &projector, const string &screen_name, + void regenerate_screen(const NodePath &projector, const std::string &screen_name, int num_x_verts, int num_y_verts, PN_stdfloat distance, PN_stdfloat fill_ratio); PT(PandaNode) make_flat_mesh(const NodePath &this_np, const NodePath &camera); - INLINE void set_texcoord_name(const string &texcoord_name); - INLINE string get_texcoord_name() const; + INLINE void set_texcoord_name(const std::string &texcoord_name); + INLINE std::string get_texcoord_name() const; INLINE void set_invert_uvs(bool invert_uvs); INLINE bool get_invert_uvs() const; diff --git a/panda/src/downloader/bioPtr.I b/panda/src/downloader/bioPtr.I index a1e1f13e1d..7d1e2b04dc 100644 --- a/panda/src/downloader/bioPtr.I +++ b/panda/src/downloader/bioPtr.I @@ -61,7 +61,7 @@ get_bio() const { /** * Returns the name of the server we are (or should be) connected to. */ -INLINE const string &BioPtr:: +INLINE const std::string &BioPtr:: get_server_name() const { return _server_name; } diff --git a/panda/src/downloader/bioPtr.h b/panda/src/downloader/bioPtr.h index 090ae20608..d0c2e88b9d 100644 --- a/panda/src/downloader/bioPtr.h +++ b/panda/src/downloader/bioPtr.h @@ -57,12 +57,12 @@ public: INLINE void set_bio(BIO *bio); INLINE BIO *get_bio() const; - INLINE const string &get_server_name() const; + INLINE const std::string &get_server_name() const; INLINE int get_port() const; private: BIO *_bio; - string _server_name; + std::string _server_name; int _port; struct sockaddr_storage _addr; socklen_t _addrlen; diff --git a/panda/src/downloader/bioStreamBuf.h b/panda/src/downloader/bioStreamBuf.h index 0378d9db65..b588105e69 100644 --- a/panda/src/downloader/bioStreamBuf.h +++ b/panda/src/downloader/bioStreamBuf.h @@ -25,7 +25,7 @@ /** * The streambuf object that implements IBioStream. */ -class EXPCL_PANDAEXPRESS BioStreamBuf : public streambuf { +class EXPCL_PANDAEXPRESS BioStreamBuf : public std::streambuf { public: BioStreamBuf(); virtual ~BioStreamBuf(); diff --git a/panda/src/downloader/chunkedStreamBuf.h b/panda/src/downloader/chunkedStreamBuf.h index 675914772c..fbcde6797d 100644 --- a/panda/src/downloader/chunkedStreamBuf.h +++ b/panda/src/downloader/chunkedStreamBuf.h @@ -26,7 +26,7 @@ /** * The streambuf object that implements IChunkedStream. */ -class ChunkedStreamBuf : public streambuf { +class ChunkedStreamBuf : public std::streambuf { // No need to export from DLL. public: ChunkedStreamBuf(); @@ -43,13 +43,13 @@ protected: private: size_t read_chars(char *start, size_t length); - bool http_getline(string &str); + bool http_getline(std::string &str); PT(BioStreamPtr) _source; size_t _chunk_remaining; bool _done; bool _wanted_nonblocking; - string _working_getline; + std::string _working_getline; ISocketStream::ReadState _read_state; PT(HTTPChannel) _doc; diff --git a/panda/src/downloader/decompressor.h b/panda/src/downloader/decompressor.h index fe15352355..414dca6687 100644 --- a/panda/src/downloader/decompressor.h +++ b/panda/src/downloader/decompressor.h @@ -48,9 +48,9 @@ private: Filename _source_filename; - istream *_source; - istream *_decompress; - ostream *_dest; + std::istream *_source; + std::istream *_decompress; + std::ostream *_dest; size_t _source_length; }; diff --git a/panda/src/downloader/documentSpec.I b/panda/src/downloader/documentSpec.I index aeb962671d..3077ac2848 100644 --- a/panda/src/downloader/documentSpec.I +++ b/panda/src/downloader/documentSpec.I @@ -25,7 +25,7 @@ DocumentSpec() { * */ INLINE DocumentSpec:: -DocumentSpec(const string &url) : +DocumentSpec(const std::string &url) : _url(url) { _request_mode = RM_any; @@ -262,16 +262,16 @@ get_cache_control() const { return _cache_control; } -INLINE istream & -operator >> (istream &in, DocumentSpec &doc) { +INLINE std::istream & +operator >> (std::istream &in, DocumentSpec &doc) { if (!doc.input(in)) { - in.clear(ios::failbit | in.rdstate()); + in.clear(std::ios::failbit | in.rdstate()); } return in; } -INLINE ostream & -operator << (ostream &out, const DocumentSpec &doc) { +INLINE std::ostream & +operator << (std::ostream &out, const DocumentSpec &doc) { doc.output(out); return out; } diff --git a/panda/src/downloader/documentSpec.h b/panda/src/downloader/documentSpec.h index 8fd205ef9b..c9328f56a6 100644 --- a/panda/src/downloader/documentSpec.h +++ b/panda/src/downloader/documentSpec.h @@ -30,7 +30,7 @@ class EXPCL_PANDAEXPRESS DocumentSpec { PUBLISHED: INLINE DocumentSpec(); - INLINE DocumentSpec(const string &url); + INLINE DocumentSpec(const std::string &url); INLINE DocumentSpec(const URLSpec &url); INLINE DocumentSpec(const DocumentSpec ©); INLINE void operator = (const DocumentSpec ©); @@ -72,9 +72,9 @@ PUBLISHED: INLINE void set_cache_control(CacheControl cache_control); INLINE CacheControl get_cache_control() const; - bool input(istream &in); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + bool input(std::istream &in); + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; PUBLISHED: MAKE_PROPERTY(url, get_url, set_url); @@ -98,8 +98,8 @@ private: int _flags; }; -INLINE istream &operator >> (istream &in, DocumentSpec &doc); -INLINE ostream &operator << (ostream &out, const DocumentSpec &doc); +INLINE std::istream &operator >> (std::istream &in, DocumentSpec &doc); +INLINE std::ostream &operator << (std::ostream &out, const DocumentSpec &doc); #include "documentSpec.I" diff --git a/panda/src/downloader/downloadDb.I b/panda/src/downloader/downloadDb.I index a97e1d7595..f2312be537 100644 --- a/panda/src/downloader/downloadDb.I +++ b/panda/src/downloader/downloadDb.I @@ -30,7 +30,7 @@ get_server_num_multifiles() const { /** * */ -INLINE string DownloadDb:: +INLINE std::string DownloadDb:: get_client_multifile_name(int index) const { return _client_db.get_multifile_name(index); } @@ -38,7 +38,7 @@ get_client_multifile_name(int index) const { /** * */ -INLINE string DownloadDb:: +INLINE std::string DownloadDb:: get_server_multifile_name(int index) const { return _server_db.get_multifile_name(index); } @@ -48,7 +48,7 @@ get_server_multifile_name(int index) const { * */ INLINE Phase DownloadDb:: -get_client_multifile_phase(string mfname) const { +get_client_multifile_phase(std::string mfname) const { return (_client_db.get_multifile_record_named(mfname))->_phase; } @@ -56,7 +56,7 @@ get_client_multifile_phase(string mfname) const { * */ INLINE Phase DownloadDb:: -get_server_multifile_phase(string mfname) const { +get_server_multifile_phase(std::string mfname) const { return (_server_db.get_multifile_record_named(mfname))->_phase; } @@ -66,7 +66,7 @@ get_server_multifile_phase(string mfname) const { * */ INLINE int DownloadDb:: -get_client_multifile_size(string mfname) const { +get_client_multifile_size(std::string mfname) const { return (_client_db.get_multifile_record_named(mfname))->_size; } @@ -74,7 +74,7 @@ get_client_multifile_size(string mfname) const { * */ INLINE void DownloadDb:: -set_client_multifile_size(string mfname, int size) { +set_client_multifile_size(std::string mfname, int size) { (_client_db.get_multifile_record_named(mfname))->_size = size; write_client_db(_client_db._filename); } @@ -84,7 +84,7 @@ set_client_multifile_size(string mfname, int size) { * */ INLINE int DownloadDb:: -set_client_multifile_delta_size(string mfname, int size) { +set_client_multifile_delta_size(std::string mfname, int size) { (_client_db.get_multifile_record_named(mfname))->_size += size; write_client_db(_client_db._filename); // Return the new total @@ -97,7 +97,7 @@ set_client_multifile_delta_size(string mfname, int size) { * */ INLINE int DownloadDb:: -get_server_multifile_size(string mfname) const { +get_server_multifile_size(std::string mfname) const { return (_server_db.get_multifile_record_named(mfname))->_size; } @@ -106,7 +106,7 @@ get_server_multifile_size(string mfname) const { * */ INLINE void DownloadDb:: -set_server_multifile_size(string mfname, int size) { +set_server_multifile_size(std::string mfname, int size) { (_server_db.get_multifile_record_named(mfname))->_size = size; } @@ -115,7 +115,7 @@ set_server_multifile_size(string mfname, int size) { * */ INLINE void DownloadDb:: -set_client_multifile_incomplete(string mfname) { +set_client_multifile_incomplete(std::string mfname) { (_client_db.get_multifile_record_named(mfname))->_status = Status_incomplete; write_client_db(_client_db._filename); } @@ -124,7 +124,7 @@ set_client_multifile_incomplete(string mfname) { * */ INLINE void DownloadDb:: -set_client_multifile_complete(string mfname) { +set_client_multifile_complete(std::string mfname) { (_client_db.get_multifile_record_named(mfname))->_status = Status_complete; write_client_db(_client_db._filename); } @@ -133,7 +133,7 @@ set_client_multifile_complete(string mfname) { * */ INLINE void DownloadDb:: -set_client_multifile_decompressed(string mfname) { +set_client_multifile_decompressed(std::string mfname) { (_client_db.get_multifile_record_named(mfname))->_status = Status_decompressed; write_client_db(_client_db._filename); } @@ -142,7 +142,7 @@ set_client_multifile_decompressed(string mfname) { * */ INLINE void DownloadDb:: -set_client_multifile_extracted(string mfname) { +set_client_multifile_extracted(std::string mfname) { (_client_db.get_multifile_record_named(mfname))->_status = Status_extracted; write_client_db(_client_db._filename); } @@ -151,14 +151,14 @@ set_client_multifile_extracted(string mfname) { * */ INLINE int DownloadDb:: -get_server_num_files(string mfname) const { +get_server_num_files(std::string mfname) const { return (_server_db.get_multifile_record_named(mfname))->get_num_files(); } /** * */ -INLINE string DownloadDb:: -get_server_file_name(string mfname, int index) const { +INLINE std::string DownloadDb:: +get_server_file_name(std::string mfname, int index) const { return (_server_db.get_multifile_record_named(mfname))->get_file_name(index); } diff --git a/panda/src/downloader/downloadDb.h b/panda/src/downloader/downloadDb.h index b7f206c3b6..f879098811 100644 --- a/panda/src/downloader/downloadDb.h +++ b/panda/src/downloader/downloadDb.h @@ -76,9 +76,9 @@ PUBLISHED: explicit DownloadDb(Filename &server_file, Filename &client_file); ~DownloadDb(); - void output(ostream &out) const; - void write(ostream &out) const; - void write_version_map(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; + void write_version_map(std::ostream &out) const; // Write a database file bool write_client_db(Filename &file); @@ -87,56 +87,56 @@ PUBLISHED: INLINE int get_client_num_multifiles() const; INLINE int get_server_num_multifiles() const; - INLINE string get_client_multifile_name(int index) const; - INLINE string get_server_multifile_name(int index) const; + INLINE std::string get_client_multifile_name(int index) const; + INLINE std::string get_server_multifile_name(int index) const; - INLINE int get_client_multifile_size(string mfname) const; - INLINE void set_client_multifile_size(string mfname, int size); - INLINE int set_client_multifile_delta_size(string mfname, int size); - INLINE int get_server_multifile_size(string mfname) const; - INLINE void set_server_multifile_size(string mfname, int size); + INLINE int get_client_multifile_size(std::string mfname) const; + INLINE void set_client_multifile_size(std::string mfname, int size); + INLINE int set_client_multifile_delta_size(std::string mfname, int size); + INLINE int get_server_multifile_size(std::string mfname) const; + INLINE void set_server_multifile_size(std::string mfname, int size); - INLINE Phase get_client_multifile_phase(string mfname) const; - INLINE Phase get_server_multifile_phase(string mfname) const; + INLINE Phase get_client_multifile_phase(std::string mfname) const; + INLINE Phase get_server_multifile_phase(std::string mfname) const; - INLINE void set_client_multifile_incomplete(string mfname); - INLINE void set_client_multifile_complete(string mfname); - INLINE void set_client_multifile_decompressed(string mfname); - INLINE void set_client_multifile_extracted(string mfname); + INLINE void set_client_multifile_incomplete(std::string mfname); + INLINE void set_client_multifile_complete(std::string mfname); + INLINE void set_client_multifile_decompressed(std::string mfname); + INLINE void set_client_multifile_extracted(std::string mfname); - INLINE int get_server_num_files(string mfname) const; - INLINE string get_server_file_name(string mfname, int index) const; + INLINE int get_server_num_files(std::string mfname) const; + INLINE std::string get_server_file_name(std::string mfname, int index) const; // Queries from the Launcher - bool client_multifile_exists(string mfname) const; - bool client_multifile_complete(string mfname) const; - bool client_multifile_decompressed(string mfname) const; - bool client_multifile_extracted(string mfname) const; + bool client_multifile_exists(std::string mfname) const; + bool client_multifile_complete(std::string mfname) const; + bool client_multifile_decompressed(std::string mfname) const; + bool client_multifile_extracted(std::string mfname) const; // Ask what version (told with the hash) this multifile is - HashVal get_client_multifile_hash(string mfname) const; - void set_client_multifile_hash(string mfname, HashVal val); - HashVal get_server_multifile_hash(string mfname) const; - void set_server_multifile_hash(string mfname, HashVal val); + HashVal get_client_multifile_hash(std::string mfname) const; + void set_client_multifile_hash(std::string mfname, HashVal val); + HashVal get_server_multifile_hash(std::string mfname) const; + void set_server_multifile_hash(std::string mfname, HashVal val); // Operations on multifiles - void delete_client_multifile(string mfname); - void add_client_multifile(string server_mfname); - void expand_client_multifile(string mfname); + void delete_client_multifile(std::string mfname); + void add_client_multifile(std::string server_mfname); + void expand_client_multifile(std::string mfname); // Server side operations to create multifile records void create_new_server_db(); - void server_add_multifile(string mfname, Phase phase, int size, int status); - void server_add_file(string mfname, string fname); + void server_add_multifile(std::string mfname, Phase phase, int size, int status); + void server_add_file(std::string mfname, std::string fname); public: class EXPCL_PANDAEXPRESS FileRecord : public ReferenceCount { public: FileRecord(); - FileRecord(string name); - void write(ostream &out) const; - string _name; + FileRecord(std::string name); + void write(std::ostream &out) const; + std::string _name; }; typedef pvector< PT(FileRecord) > FileRecords; @@ -144,14 +144,14 @@ public: class EXPCL_PANDAEXPRESS MultifileRecord : public ReferenceCount { public: MultifileRecord(); - MultifileRecord(string name, Phase phase, int size, int status); - void write(ostream &out) const; + MultifileRecord(std::string name, Phase phase, int size, int status); + void write(std::ostream &out) const; int get_num_files() const; - string get_file_name(int index) const; - bool file_exists(string fname) const; - PT(FileRecord) get_file_record_named(string fname) const; + std::string get_file_name(int index) const; + bool file_exists(std::string fname) const; + PT(FileRecord) get_file_record_named(std::string fname) const; void add_file_record(PT(FileRecord) fr); - string _name; + std::string _name; Phase _phase; int _size; int _status; @@ -165,11 +165,11 @@ public: class EXPCL_PANDAEXPRESS Db { public: Db(); - void write(ostream &out) const; + void write(std::ostream &out) const; int get_num_multifiles() const; - string get_multifile_name(int index) const; - bool multifile_exists(string mfname) const; - PT(MultifileRecord) get_multifile_record_named(string mfname) const; + std::string get_multifile_name(int index) const; + bool multifile_exists(std::string mfname) const; + PT(MultifileRecord) get_multifile_record_named(std::string mfname) const; void add_multifile_record(PT(MultifileRecord) mfr); int parse_header(Datagram dg); int parse_record_header(Datagram dg); @@ -179,7 +179,7 @@ public: bool write(StreamWriter &sw, bool want_server_info); Filename _filename; MultifileRecords _mfile_records; - bool write_header(ostream &write_stream); + bool write_header(std::ostream &write_stream); bool write_bogus_header(StreamWriter &sw); private: int32_t _header_length; @@ -218,7 +218,7 @@ protected: VersionMap _versions; }; -INLINE ostream &operator << (ostream &out, const DownloadDb &dldb) { +INLINE std::ostream &operator << (std::ostream &out, const DownloadDb &dldb) { dldb.output(out); return out; } diff --git a/panda/src/downloader/extractor.h b/panda/src/downloader/extractor.h index 0747eed350..b69b11c0f2 100644 --- a/panda/src/downloader/extractor.h +++ b/panda/src/downloader/extractor.h @@ -71,7 +71,7 @@ private: size_t _subfile_pos; size_t _subfile_length; size_t _total_bytes_extracted; - istream *_read; + std::istream *_read; pofstream _write; Filename _subfile_filename; }; diff --git a/panda/src/downloader/httpAuthorization.I b/panda/src/downloader/httpAuthorization.I index bc105214df..5c00fa3724 100644 --- a/panda/src/downloader/httpAuthorization.I +++ b/panda/src/downloader/httpAuthorization.I @@ -16,7 +16,7 @@ * supplied string that may have meaning to the user, and describes the * general collection of things protected by this password. */ -const string &HTTPAuthorization:: +const std::string &HTTPAuthorization:: get_realm() const { return _realm; } diff --git a/panda/src/downloader/httpAuthorization.h b/panda/src/downloader/httpAuthorization.h index 4ac0457242..fcc08103e3 100644 --- a/panda/src/downloader/httpAuthorization.h +++ b/panda/src/downloader/httpAuthorization.h @@ -35,8 +35,8 @@ class URLSpec; */ class EXPCL_PANDAEXPRESS HTTPAuthorization : public ReferenceCount { public: - typedef pmap Tokens; - typedef pmap AuthenticationSchemes; + typedef pmap Tokens; + typedef pmap AuthenticationSchemes; protected: HTTPAuthorization(const Tokens &tokens, const URLSpec &url, @@ -44,28 +44,28 @@ protected: public: virtual ~HTTPAuthorization(); - virtual const string &get_mechanism() const=0; + virtual const std::string &get_mechanism() const=0; virtual bool is_valid(); - INLINE const string &get_realm() const; + INLINE const std::string &get_realm() const; INLINE const vector_string &get_domain() const; - virtual string generate(HTTPEnum::Method method, const string &request_path, - const string &username, const string &body)=0; + virtual std::string generate(HTTPEnum::Method method, const std::string &request_path, + const std::string &username, const std::string &body)=0; static void parse_authentication_schemes(AuthenticationSchemes &schemes, - const string &field_value); + const std::string &field_value); static URLSpec get_canonical_url(const URLSpec &url); - static string base64_encode(const string &s); - static string base64_decode(const string &s); + static std::string base64_encode(const std::string &s); + static std::string base64_decode(const std::string &s); protected: - static size_t scan_quoted_or_unquoted_string(string &result, - const string &source, + static size_t scan_quoted_or_unquoted_string(std::string &result, + const std::string &source, size_t start); protected: - string _realm; + std::string _realm; vector_string _domain; }; diff --git a/panda/src/downloader/httpBasicAuthorization.h b/panda/src/downloader/httpBasicAuthorization.h index 2d18a29a25..92e85bb3ab 100644 --- a/panda/src/downloader/httpBasicAuthorization.h +++ b/panda/src/downloader/httpBasicAuthorization.h @@ -36,12 +36,12 @@ public: bool is_proxy); virtual ~HTTPBasicAuthorization(); - virtual const string &get_mechanism() const; - virtual string generate(HTTPEnum::Method method, const string &request_path, - const string &username, const string &body); + virtual const std::string &get_mechanism() const; + virtual std::string generate(HTTPEnum::Method method, const std::string &request_path, + const std::string &username, const std::string &body); private: - static const string _mechanism; + static const std::string _mechanism; }; #include "httpBasicAuthorization.I" diff --git a/panda/src/downloader/httpChannel.I b/panda/src/downloader/httpChannel.I index 1a254e478a..1fdd7e32f2 100644 --- a/panda/src/downloader/httpChannel.I +++ b/panda/src/downloader/httpChannel.I @@ -76,7 +76,7 @@ get_http_version() const { * Returns the HTTP version number returned by the server, formatted as a * string, e.g. "HTTP/1.1". */ -INLINE const string &HTTPChannel:: +INLINE const std::string &HTTPChannel:: get_http_version_string() const { return _http_version_string; } @@ -103,7 +103,7 @@ get_status_code() const { * presented to the user to request an associated username and password (which * then should be stored in HTTPClient::set_username()). */ -INLINE const string &HTTPChannel:: +INLINE const std::string &HTTPChannel:: get_www_realm() const { return _www_realm; } @@ -114,7 +114,7 @@ get_www_realm() const { * string may be presented to the user to request an associated username and * password (which then should be stored in HTTPClient::set_username()). */ -INLINE const string &HTTPChannel:: +INLINE const std::string &HTTPChannel:: get_proxy_realm() const { return _proxy_realm; } @@ -431,14 +431,14 @@ get_max_updates_per_second() const { * different types of content, such as JSON. */ INLINE void HTTPChannel:: -set_content_type(string content_type) { +set_content_type(std::string content_type) { _content_type = content_type; } /** * Returns the value of the Content-Type header. */ -INLINE string HTTPChannel:: +INLINE std::string HTTPChannel:: get_content_type() const { return _content_type; } @@ -555,7 +555,7 @@ preserve_status() { */ INLINE void HTTPChannel:: clear_extra_headers() { - _send_extra_headers = string(); + _send_extra_headers = std::string(); } /** @@ -568,7 +568,7 @@ clear_extra_headers() { * request. */ INLINE void HTTPChannel:: -send_extra_header(const string &key, const string &value) { +send_extra_header(const std::string &key, const std::string &value) { _send_extra_headers += key; _send_extra_headers += ": "; _send_extra_headers += value; @@ -581,7 +581,7 @@ send_extra_header(const string &key, const string &value) { */ INLINE bool HTTPChannel:: get_document(const DocumentSpec &url) { - begin_request(HTTPEnum::M_get, url, string(), false, 0, 0); + begin_request(HTTPEnum::M_get, url, std::string(), false, 0, 0); while (run()) { } return is_valid(); @@ -596,7 +596,7 @@ get_document(const DocumentSpec &url) { */ INLINE bool HTTPChannel:: get_subdocument(const DocumentSpec &url, size_t first_byte, size_t last_byte) { - begin_request(HTTPEnum::M_get, url, string(), false, first_byte, last_byte); + begin_request(HTTPEnum::M_get, url, std::string(), false, first_byte, last_byte); while (run()) { } return is_valid(); @@ -610,7 +610,7 @@ get_subdocument(const DocumentSpec &url, size_t first_byte, size_t last_byte) { */ INLINE bool HTTPChannel:: get_header(const DocumentSpec &url) { - begin_request(HTTPEnum::M_head, url, string(), false, 0, 0); + begin_request(HTTPEnum::M_head, url, std::string(), false, 0, 0); while (run()) { } return is_valid(); @@ -620,7 +620,7 @@ get_header(const DocumentSpec &url) { * Posts form data to a particular URL and retrieves the response. */ INLINE bool HTTPChannel:: -post_form(const DocumentSpec &url, const string &body) { +post_form(const DocumentSpec &url, const std::string &body) { begin_request(HTTPEnum::M_post, url, body, false, 0, 0); while (run()) { } @@ -632,7 +632,7 @@ post_form(const DocumentSpec &url, const string &body) { * the server allows this. */ INLINE bool HTTPChannel:: -put_document(const DocumentSpec &url, const string &body) { +put_document(const DocumentSpec &url, const std::string &body) { begin_request(HTTPEnum::M_put, url, body, false, 0, 0); while (run()) { } @@ -644,7 +644,7 @@ put_document(const DocumentSpec &url, const string &body) { */ INLINE bool HTTPChannel:: delete_document(const DocumentSpec &url) { - begin_request(HTTPEnum::M_delete, url, string(), false, 0, 0); + begin_request(HTTPEnum::M_delete, url, std::string(), false, 0, 0); while (run()) { } return is_valid(); @@ -656,7 +656,7 @@ delete_document(const DocumentSpec &url) { */ INLINE bool HTTPChannel:: get_trace(const DocumentSpec &url) { - begin_request(HTTPEnum::M_trace, url, string(), false, 0, 0); + begin_request(HTTPEnum::M_trace, url, std::string(), false, 0, 0); while (run()) { } return is_valid(); @@ -671,7 +671,7 @@ get_trace(const DocumentSpec &url) { */ INLINE bool HTTPChannel:: connect_to(const DocumentSpec &url) { - begin_request(HTTPEnum::M_connect, url, string(), false, 0, 0); + begin_request(HTTPEnum::M_connect, url, std::string(), false, 0, 0); while (run()) { } return is_connection_ready(); @@ -683,7 +683,7 @@ connect_to(const DocumentSpec &url) { */ INLINE bool HTTPChannel:: get_options(const DocumentSpec &url) { - begin_request(HTTPEnum::M_options, url, string(), false, 0, 0); + begin_request(HTTPEnum::M_options, url, std::string(), false, 0, 0); while (run()) { } return is_valid(); @@ -700,7 +700,7 @@ get_options(const DocumentSpec &url) { */ INLINE void HTTPChannel:: begin_get_document(const DocumentSpec &url) { - begin_request(HTTPEnum::M_get, url, string(), true, 0, 0); + begin_request(HTTPEnum::M_get, url, std::string(), true, 0, 0); } /** @@ -713,7 +713,7 @@ begin_get_document(const DocumentSpec &url) { INLINE void HTTPChannel:: begin_get_subdocument(const DocumentSpec &url, size_t first_byte, size_t last_byte) { - begin_request(HTTPEnum::M_get, url, string(), true, first_byte, last_byte); + begin_request(HTTPEnum::M_get, url, std::string(), true, first_byte, last_byte); } /** @@ -722,7 +722,7 @@ begin_get_subdocument(const DocumentSpec &url, size_t first_byte, */ INLINE void HTTPChannel:: begin_get_header(const DocumentSpec &url) { - begin_request(HTTPEnum::M_head, url, string(), true, 0, 0); + begin_request(HTTPEnum::M_head, url, std::string(), true, 0, 0); } /** @@ -735,7 +735,7 @@ begin_get_header(const DocumentSpec &url) { * interim, or your form data may not get posted. */ INLINE void HTTPChannel:: -begin_post_form(const DocumentSpec &url, const string &body) { +begin_post_form(const DocumentSpec &url, const std::string &body) { begin_request(HTTPEnum::M_post, url, body, true, 0, 0); } @@ -753,7 +753,7 @@ begin_post_form(const DocumentSpec &url, const string &body) { */ INLINE void HTTPChannel:: begin_connect_to(const DocumentSpec &url) { - begin_request(HTTPEnum::M_connect, url, string(), true, 0, 0); + begin_request(HTTPEnum::M_connect, url, std::string(), true, 0, 0); } /** diff --git a/panda/src/downloader/httpChannel.h b/panda/src/downloader/httpChannel.h index 7de0e17e83..758fc95394 100644 --- a/panda/src/downloader/httpChannel.h +++ b/panda/src/downloader/httpChannel.h @@ -100,13 +100,13 @@ PUBLISHED: INLINE const URLSpec &get_url() const; INLINE const DocumentSpec &get_document_spec() const; INLINE HTTPEnum::HTTPVersion get_http_version() const; - INLINE const string &get_http_version_string() const; + INLINE const std::string &get_http_version_string() const; INLINE int get_status_code() const; - string get_status_string() const; - INLINE const string &get_www_realm() const; - INLINE const string &get_proxy_realm() const; + std::string get_status_string() const; + INLINE const std::string &get_www_realm() const; + INLINE const std::string &get_proxy_realm() const; INLINE const URLSpec &get_redirect() const; - string get_header_value(const string &key) const; + std::string get_header_value(const std::string &key) const; INLINE int get_num_redirect_steps() const; INLINE const URLSpec &get_redirect_step(int n) const; @@ -143,11 +143,11 @@ PUBLISHED: INLINE void set_max_updates_per_second(double max_updates_per_second); INLINE double get_max_updates_per_second() const; - INLINE void set_content_type(string content_type); - INLINE string get_content_type() const; + INLINE void set_content_type(std::string content_type); + INLINE std::string get_content_type() const; INLINE void set_expected_file_size(size_t file_size); - streamsize get_file_size() const; + std::streamsize get_file_size() const; INLINE bool is_file_size_known() const; INLINE size_t get_first_byte_requested() const; @@ -155,20 +155,20 @@ PUBLISHED: INLINE size_t get_first_byte_delivered() const; INLINE size_t get_last_byte_delivered() const; - void write_headers(ostream &out) const; + void write_headers(std::ostream &out) const; INLINE void reset(); INLINE void preserve_status(); INLINE void clear_extra_headers(); - INLINE void send_extra_header(const string &key, const string &value); + INLINE void send_extra_header(const std::string &key, const std::string &value); BLOCKING INLINE bool get_document(const DocumentSpec &url); BLOCKING INLINE bool get_subdocument(const DocumentSpec &url, size_t first_byte, size_t last_byte); BLOCKING INLINE bool get_header(const DocumentSpec &url); - BLOCKING INLINE bool post_form(const DocumentSpec &url, const string &body); - BLOCKING INLINE bool put_document(const DocumentSpec &url, const string &body); + BLOCKING INLINE bool post_form(const DocumentSpec &url, const std::string &body); + BLOCKING INLINE bool put_document(const DocumentSpec &url, const std::string &body); BLOCKING INLINE bool delete_document(const DocumentSpec &url); BLOCKING INLINE bool get_trace(const DocumentSpec &url); BLOCKING INLINE bool connect_to(const DocumentSpec &url); @@ -178,16 +178,16 @@ PUBLISHED: INLINE void begin_get_subdocument(const DocumentSpec &url, size_t first_byte, size_t last_byte); INLINE void begin_get_header(const DocumentSpec &url); - INLINE void begin_post_form(const DocumentSpec &url, const string &body); + INLINE void begin_post_form(const DocumentSpec &url, const std::string &body); bool run(); INLINE void begin_connect_to(const DocumentSpec &url); ISocketStream *open_read_body(); - void close_read_body(istream *stream) const; + void close_read_body(std::istream *stream) const; BLOCKING bool download_to_file(const Filename &filename, bool subdocument_resumes = true); BLOCKING bool download_to_ram(Ramfile *ramfile, bool subdocument_resumes = true); - BLOCKING bool download_to_stream(ostream *strm, bool subdocument_resumes = true); + BLOCKING bool download_to_stream(std::ostream *strm, bool subdocument_resumes = true); SocketStream *get_connection(); INLINE size_t get_bytes_downloaded() const; @@ -195,7 +195,7 @@ PUBLISHED: INLINE bool is_download_complete() const; public: - static string downcase(const string &s); + static std::string downcase(const std::string &s); void body_stream_destructs(ISocketStream *stream); private: @@ -227,7 +227,7 @@ private: bool run_download_to_stream(); void begin_request(HTTPEnum::Method method, const DocumentSpec &url, - const string &body, bool nonblocking, + const std::string &body, bool nonblocking, size_t first_byte, size_t last_byte); void reconsider_proxy(); void reset_for_new_request(); @@ -235,32 +235,32 @@ private: void finished_body(bool has_trailer); bool open_download_file(); - bool server_getline(string &str); - bool server_getline_failsafe(string &str); - bool server_get(string &str, size_t num_bytes); - bool server_get_failsafe(string &str, size_t num_bytes); - bool server_send(const string &str, bool secret); - bool parse_http_response(const string &line); + bool server_getline(std::string &str); + bool server_getline_failsafe(std::string &str); + bool server_get(std::string &str, size_t num_bytes); + bool server_get_failsafe(std::string &str, size_t num_bytes); + bool server_send(const std::string &str, bool secret); + bool parse_http_response(const std::string &line); bool parse_http_header(); - bool parse_content_range(const string &content_range); + bool parse_content_range(const std::string &content_range); void check_socket(); void check_preapproved_server_certificate(X509 *cert, bool &cert_preapproved, bool &cert_name_preapproved) const; bool validate_server_name(X509 *cert); - static bool match_cert_name(const string &cert_name, const string &hostname); - static string get_x509_name_component(X509_NAME *name, int nid); + static bool match_cert_name(const std::string &cert_name, const std::string &hostname); + static std::string get_x509_name_component(X509_NAME *name, int nid); void make_header(); void make_proxy_request_text(); void make_request_text(); void reset_url(const URLSpec &old_url, const URLSpec &new_url); - void store_header_field(const string &field_name, const string &field_value); + void store_header_field(const std::string &field_name, const std::string &field_value); #ifndef NDEBUG - static void show_send(const string &message); + static void show_send(const std::string &message); #endif void reset_download_to(); @@ -304,7 +304,7 @@ private: public: INLINE StatusEntry(); int _status_code; - string _status_string; + std::string _status_string; }; typedef pvector Proxies; typedef pvector StatusList; @@ -331,15 +331,15 @@ private: int _bytes_per_update; bool _nonblocking; bool _wanted_nonblocking; - string _send_extra_headers; + std::string _send_extra_headers; DocumentSpec _document_spec; DocumentSpec _request; HTTPEnum::Method _method; - string request_path; - string _header; - string _body; - string _content_type; + std::string request_path; + std::string _header; + std::string _body; + std::string _content_type; bool _want_ssl; bool _proxy_serves_document; bool _proxy_tunnel_now; @@ -360,21 +360,21 @@ private: bool _subdocument_resumes; Filename _download_to_filename; Ramfile *_download_to_ramfile; - ostream *_download_to_stream; + std::ostream *_download_to_stream; int _read_index; HTTPEnum::HTTPVersion _http_version; - string _http_version_string; + std::string _http_version_string; StatusEntry _status_entry; URLSpec _redirect; - string _proxy_realm; - string _proxy_username; + std::string _proxy_realm; + std::string _proxy_username; PT(HTTPAuthorization) _proxy_auth; - string _www_realm; - string _www_username; + std::string _www_realm; + std::string _www_username; PT(HTTPAuthorization) _www_auth; // What type of response do we get to our HTTP request? @@ -388,7 +388,7 @@ private: ResponseType _response_type; // Not a phash_map, to maintain sorted order. - typedef pmap Headers; + typedef pmap Headers; Headers _headers; size_t _expected_file_size; @@ -410,17 +410,17 @@ private: double _started_connecting_time; double _sent_request_time; bool _started_download; - string _proxy_header; - string _proxy_request_text; - string _request_text; - string _working_get; + std::string _proxy_header; + std::string _proxy_request_text; + std::string _request_text; + std::string _working_get; size_t _sent_so_far; - string _current_field_name; - string _current_field_value; + std::string _current_field_name; + std::string _current_field_value; ISocketStream *_body_stream; bool _owns_body_stream; BIO *_sbio; - string _cipher_list; + std::string _cipher_list; pvector _redirect_trail; int _last_status_code; double _last_run_time; @@ -450,7 +450,7 @@ private: friend class HTTPClient; }; -ostream &operator << (ostream &out, HTTPChannel::State state); +std::ostream &operator << (std::ostream &out, HTTPChannel::State state); #include "httpChannel.I" diff --git a/panda/src/downloader/httpClient.I b/panda/src/downloader/httpClient.I index 15047431c2..33b9432f3d 100644 --- a/panda/src/downloader/httpClient.I +++ b/panda/src/downloader/httpClient.I @@ -40,7 +40,7 @@ get_try_all_direct() const { INLINE void HTTPClient:: set_client_certificate_filename(const Filename &filename) { _client_certificate_filename = filename; - _client_certificate_pem = string(); + _client_certificate_pem = std::string(); unload_client_certificate(); } @@ -51,7 +51,7 @@ set_client_certificate_filename(const Filename &filename) { * client certificate. */ INLINE void HTTPClient:: -set_client_certificate_pem(const string &pem) { +set_client_certificate_pem(const std::string &pem) { _client_certificate_pem = pem; _client_certificate_filename = Filename(); unload_client_certificate(); @@ -62,7 +62,7 @@ set_client_certificate_pem(const string &pem) { * named by set_client_certificate_filename() or set_client_certificate_pem(). */ INLINE void HTTPClient:: -set_client_certificate_passphrase(const string &passphrase) { +set_client_certificate_passphrase(const std::string &passphrase) { _client_certificate_passphrase = passphrase; unload_client_certificate(); } @@ -116,7 +116,7 @@ get_verify_ssl() const { * to use the built-in OpenSSL default value. */ INLINE void HTTPClient:: -set_cipher_list(const string &cipher_list) { +set_cipher_list(const std::string &cipher_list) { _cipher_list = cipher_list; } @@ -124,7 +124,7 @@ set_cipher_list(const string &cipher_list) { * Returns the set of ciphers as set by set_cipher_list(). See * set_cipher_list(). */ -INLINE const string &HTTPClient:: +INLINE const std::string &HTTPClient:: get_cipher_list() const { return _cipher_list; } @@ -134,8 +134,8 @@ get_cipher_list() const { * as a convenient place to publish it for access by the scripting language; * C++ code should probably use HTTPAuthorization directly. */ -INLINE string HTTPClient:: -base64_encode(const string &s) { +INLINE std::string HTTPClient:: +base64_encode(const std::string &s) { return HTTPAuthorization::base64_encode(s); } @@ -144,7 +144,7 @@ base64_encode(const string &s) { * as a convenient place to publish it for access by the scripting language; * C++ code should probably use HTTPAuthorization directly. */ -INLINE string HTTPClient:: -base64_decode(const string &s) { +INLINE std::string HTTPClient:: +base64_decode(const std::string &s) { return HTTPAuthorization::base64_decode(s); } diff --git a/panda/src/downloader/httpClient.h b/panda/src/downloader/httpClient.h index 1efab58460..d8f78d57b4 100644 --- a/panda/src/downloader/httpClient.h +++ b/panda/src/downloader/httpClient.h @@ -62,24 +62,24 @@ PUBLISHED: static void init_random_seed(); - void set_proxy_spec(const string &proxy_spec); - string get_proxy_spec() const; + void set_proxy_spec(const std::string &proxy_spec); + std::string get_proxy_spec() const; - void set_direct_host_spec(const string &direct_host_spec); - string get_direct_host_spec() const; + void set_direct_host_spec(const std::string &direct_host_spec); + std::string get_direct_host_spec() const; INLINE void set_try_all_direct(bool try_all_direct); INLINE bool get_try_all_direct() const; void clear_proxy(); - void add_proxy(const string &scheme, const URLSpec &proxy); + void add_proxy(const std::string &scheme, const URLSpec &proxy); void clear_direct_host(); - void add_direct_host(const string &hostname); + void add_direct_host(const std::string &hostname); - string get_proxies_for_url(const URLSpec &url) const; + std::string get_proxies_for_url(const URLSpec &url) const; - void set_username(const string &server, const string &realm, const string &username); - string get_username(const string &server, const string &realm) const; + void set_username(const std::string &server, const std::string &realm, const std::string &username); + std::string get_username(const std::string &server, const std::string &realm) const; void set_cookie(const HTTPCookie &cookie); bool clear_cookie(const HTTPCookie &cookie); @@ -88,24 +88,24 @@ PUBLISHED: HTTPCookie get_cookie(const HTTPCookie &cookie) const; void copy_cookies_from(const HTTPClient &other); - void write_cookies(ostream &out) const; - void send_cookies(ostream &out, const URLSpec &url); + void write_cookies(std::ostream &out) const; + void send_cookies(std::ostream &out, const URLSpec &url); INLINE void set_client_certificate_filename(const Filename &filename); - INLINE void set_client_certificate_pem(const string &pem); - INLINE void set_client_certificate_passphrase(const string &passphrase); + INLINE void set_client_certificate_pem(const std::string &pem); + INLINE void set_client_certificate_passphrase(const std::string &passphrase); bool load_client_certificate(); bool add_preapproved_server_certificate_filename(const URLSpec &url, const Filename &filename); - bool add_preapproved_server_certificate_pem(const URLSpec &url, const string &pem); - bool add_preapproved_server_certificate_name(const URLSpec &url, const string &name); + bool add_preapproved_server_certificate_pem(const URLSpec &url, const std::string &pem); + bool add_preapproved_server_certificate_name(const URLSpec &url, const std::string &name); void clear_preapproved_server_certificates(const URLSpec &url); void clear_all_preapproved_server_certificates(); INLINE void set_http_version(HTTPEnum::HTTPVersion version); INLINE HTTPEnum::HTTPVersion get_http_version() const; - string get_http_version_string() const; - static HTTPEnum::HTTPVersion parse_http_version_string(const string &version); + std::string get_http_version_string() const; + static HTTPEnum::HTTPVersion parse_http_version_string(const std::string &version); bool load_certificates(const Filename &filename); @@ -118,16 +118,16 @@ PUBLISHED: INLINE void set_verify_ssl(VerifySSL verify_ssl); INLINE VerifySSL get_verify_ssl() const; - INLINE void set_cipher_list(const string &cipher_list); - INLINE const string &get_cipher_list() const; + INLINE void set_cipher_list(const std::string &cipher_list); + INLINE const std::string &get_cipher_list() const; PT(HTTPChannel) make_channel(bool persistent_connection); - BLOCKING PT(HTTPChannel) post_form(const URLSpec &url, const string &body); + BLOCKING PT(HTTPChannel) post_form(const URLSpec &url, const std::string &body); BLOCKING PT(HTTPChannel) get_document(const URLSpec &url); BLOCKING PT(HTTPChannel) get_header(const URLSpec &url); - INLINE static string base64_encode(const string &s); - INLINE static string base64_decode(const string &s); + INLINE static std::string base64_encode(const std::string &s); + INLINE static std::string base64_decode(const std::string &s); static HTTPClient *get_global_ptr(); @@ -140,27 +140,27 @@ private: void check_preapproved_server_certificate(const URLSpec &url, X509 *cert, bool &cert_preapproved, bool &cert_name_preapproved) const; - bool get_proxies_for_scheme(const string &scheme, + bool get_proxies_for_scheme(const std::string &scheme, pvector &proxies) const; - void add_http_username(const string &http_username); - string select_username(const URLSpec &url, bool is_proxy, - const string &realm) const; + void add_http_username(const std::string &http_username); + std::string select_username(const URLSpec &url, bool is_proxy, + const std::string &realm) const; HTTPAuthorization *select_auth(const URLSpec &url, bool is_proxy, - const string &last_realm); + const std::string &last_realm); PT(HTTPAuthorization) generate_auth(const URLSpec &url, bool is_proxy, - const string &challenge); + const std::string &challenge); void unload_client_certificate(); - static X509_NAME *parse_x509_name(const string &source); + static X509_NAME *parse_x509_name(const std::string &source); static bool x509_name_subset(X509_NAME *name_a, X509_NAME *name_b); - static void split_whitespace(string &a, string &b, const string &c); + static void split_whitespace(std::string &a, std::string &b, const std::string &c); typedef pvector Proxies; - typedef pmap ProxiesByScheme; + typedef pmap ProxiesByScheme; ProxiesByScheme _proxies_by_scheme; typedef pvector DirectHosts; DirectHosts _direct_hosts; @@ -168,17 +168,17 @@ private: HTTPEnum::HTTPVersion _http_version; VerifySSL _verify_ssl; - string _cipher_list; + std::string _cipher_list; - typedef pmap Usernames; + typedef pmap Usernames; Usernames _usernames; - typedef pmap Realms; + typedef pmap Realms; class Domain { public: Realms _realms; }; - typedef pmap Domains; + typedef pmap Domains; Domains _proxy_domains, _www_domains; // Not a phash_set, since we want this to be maintained in order. @@ -186,8 +186,8 @@ private: Cookies _cookies; Filename _client_certificate_filename; - string _client_certificate_pem; - string _client_certificate_passphrase; + std::string _client_certificate_pem; + std::string _client_certificate_passphrase; SSL_CTX *_ssl_ctx; bool _client_certificate_loaded; @@ -204,7 +204,7 @@ private: ServerCertNames _cert_names; }; - typedef pmap PreapprovedServerCerts; + typedef pmap PreapprovedServerCerts; PreapprovedServerCerts _preapproved_server_certs; static PT(HTTPClient) _global_ptr; diff --git a/panda/src/downloader/httpCookie.I b/panda/src/downloader/httpCookie.I index 163e34652d..6116f6722c 100644 --- a/panda/src/downloader/httpCookie.I +++ b/panda/src/downloader/httpCookie.I @@ -26,7 +26,7 @@ HTTPCookie() : * the string with this constructor. */ INLINE HTTPCookie:: -HTTPCookie(const string &format, const URLSpec &url) { +HTTPCookie(const std::string &format, const URLSpec &url) { parse_set_cookie(format, url); } @@ -36,7 +36,7 @@ HTTPCookie(const string &format, const URLSpec &url) { * the HTTPClient. */ INLINE HTTPCookie:: -HTTPCookie(const string &name, const string &path, const string &domain) : +HTTPCookie(const std::string &name, const std::string &path, const std::string &domain) : _name(name), _path(path), _domain(domain), @@ -55,7 +55,7 @@ INLINE HTTPCookie:: * */ INLINE void HTTPCookie:: -set_name(const string &name) { +set_name(const std::string &name) { _name = name; } @@ -63,7 +63,7 @@ set_name(const string &name) { * Returns the name of the cookie. This is the key value specified by the * server. */ -INLINE const string &HTTPCookie:: +INLINE const std::string &HTTPCookie:: get_name() const { return _name; } @@ -72,7 +72,7 @@ get_name() const { * */ INLINE void HTTPCookie:: -set_value(const string &value) { +set_value(const std::string &value) { _value = value; } @@ -80,7 +80,7 @@ set_value(const string &value) { * Returns the value of the cookie. This is the arbitrary string associated * with the cookie's name, as specified by the server. */ -INLINE const string &HTTPCookie:: +INLINE const std::string &HTTPCookie:: get_value() const { return _value; } @@ -89,14 +89,14 @@ get_value() const { * */ INLINE void HTTPCookie:: -set_domain(const string &domain) { +set_domain(const std::string &domain) { _domain = domain; } /** * */ -INLINE const string &HTTPCookie:: +INLINE const std::string &HTTPCookie:: get_domain() const { return _domain; } @@ -105,7 +105,7 @@ get_domain() const { * */ INLINE void HTTPCookie:: -set_path(const string &path) { +set_path(const std::string &path) { _path = path; } @@ -113,7 +113,7 @@ set_path(const string &path) { * Returns the prefix of the URL paths on the server for which this cookie * will be sent. */ -INLINE const string &HTTPCookie:: +INLINE const std::string &HTTPCookie:: get_path() const { return _path; } @@ -177,7 +177,7 @@ is_expired(const HTTPDate &now) const { return _expires.is_valid() && _expires < now; } -INLINE ostream &operator << (ostream &out, const HTTPCookie &cookie) { +INLINE std::ostream &operator << (std::ostream &out, const HTTPCookie &cookie) { cookie.output(out); return out; } diff --git a/panda/src/downloader/httpCookie.h b/panda/src/downloader/httpCookie.h index af460ec3c2..5a8e49eda8 100644 --- a/panda/src/downloader/httpCookie.h +++ b/panda/src/downloader/httpCookie.h @@ -32,22 +32,22 @@ class EXPCL_PANDAEXPRESS HTTPCookie { PUBLISHED: INLINE HTTPCookie(); - INLINE explicit HTTPCookie(const string &format, const URLSpec &url); - INLINE explicit HTTPCookie(const string &name, const string &path, - const string &domain); + INLINE explicit HTTPCookie(const std::string &format, const URLSpec &url); + INLINE explicit HTTPCookie(const std::string &name, const std::string &path, + const std::string &domain); INLINE ~HTTPCookie(); - INLINE void set_name(const string &name); - INLINE const string &get_name() const; + INLINE void set_name(const std::string &name); + INLINE const std::string &get_name() const; - INLINE void set_value(const string &value); - INLINE const string &get_value() const; + INLINE void set_value(const std::string &value); + INLINE const std::string &get_value() const; - INLINE void set_domain(const string &domain); - INLINE const string &get_domain() const; + INLINE void set_domain(const std::string &domain); + INLINE const std::string &get_domain() const; - INLINE void set_path(const string &path); - INLINE const string &get_path() const; + INLINE void set_path(const std::string &path); + INLINE const std::string &get_path() const; INLINE void set_expires(const HTTPDate &expires); INLINE void clear_expires(); @@ -60,24 +60,24 @@ PUBLISHED: bool operator < (const HTTPCookie &other) const; void update_from(const HTTPCookie &other); - bool parse_set_cookie(const string &format, const URLSpec &url); + bool parse_set_cookie(const std::string &format, const URLSpec &url); INLINE bool is_expired(const HTTPDate &now = HTTPDate::now()) const; bool matches_url(const URLSpec &url) const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: - bool parse_cookie_param(const string ¶m, bool first_param); + bool parse_cookie_param(const std::string ¶m, bool first_param); - string _name; - string _value; - string _path; - string _domain; + std::string _name; + std::string _value; + std::string _path; + std::string _domain; HTTPDate _expires; bool _secure; }; -INLINE ostream &operator << (ostream &out, const HTTPCookie &cookie); +INLINE std::ostream &operator << (std::ostream &out, const HTTPCookie &cookie); #include "httpCookie.I" diff --git a/panda/src/downloader/httpDate.I b/panda/src/downloader/httpDate.I index 67aefbccb3..defbb73c4c 100644 --- a/panda/src/downloader/httpDate.I +++ b/panda/src/downloader/httpDate.I @@ -147,16 +147,16 @@ operator - (const HTTPDate &other) const { } -INLINE istream & -operator >> (istream &in, HTTPDate &date) { +INLINE std::istream & +operator >> (std::istream &in, HTTPDate &date) { if (!date.input(in)) { - in.clear(ios::failbit | in.rdstate()); + in.clear(std::ios::failbit | in.rdstate()); } return in; } -INLINE ostream & -operator << (ostream &out, const HTTPDate &date) { +INLINE std::ostream & +operator << (std::ostream &out, const HTTPDate &date) { date.output(out); return out; } diff --git a/panda/src/downloader/httpDate.h b/panda/src/downloader/httpDate.h index 9d6011336a..15950a854b 100644 --- a/panda/src/downloader/httpDate.h +++ b/panda/src/downloader/httpDate.h @@ -28,14 +28,14 @@ class EXPCL_PANDAEXPRESS HTTPDate { PUBLISHED: INLINE HTTPDate(); INLINE HTTPDate(time_t time); - HTTPDate(const string &format); + HTTPDate(const std::string &format); INLINE HTTPDate(const HTTPDate ©); INLINE void operator = (const HTTPDate ©); INLINE static HTTPDate now(); INLINE bool is_valid() const; - string get_string() const; + std::string get_string() const; INLINE time_t get_time() const; INLINE bool operator == (const HTTPDate &other) const; @@ -51,17 +51,17 @@ PUBLISHED: INLINE HTTPDate operator - (int seconds) const; INLINE int operator - (const HTTPDate &other) const; - bool input(istream &in); - void output(ostream &out) const; + bool input(std::istream &in); + void output(std::ostream &out) const; private: - static string get_token(const string &str, size_t &pos); + static std::string get_token(const std::string &str, size_t &pos); time_t _time; }; -INLINE istream &operator >> (istream &in, HTTPDate &date); -INLINE ostream &operator << (ostream &out, const HTTPDate &date); +INLINE std::istream &operator >> (std::istream &in, HTTPDate &date); +INLINE std::ostream &operator << (std::ostream &out, const HTTPDate &date); #include "httpDate.I" diff --git a/panda/src/downloader/httpDigestAuthorization.h b/panda/src/downloader/httpDigestAuthorization.h index a3b8c7147a..ecd2ab3024 100644 --- a/panda/src/downloader/httpDigestAuthorization.h +++ b/panda/src/downloader/httpDigestAuthorization.h @@ -35,11 +35,11 @@ public: bool is_proxy); virtual ~HTTPDigestAuthorization(); - virtual const string &get_mechanism() const; + virtual const std::string &get_mechanism() const; virtual bool is_valid(); - virtual string generate(HTTPEnum::Method method, const string &request_path, - const string &username, const string &body); + virtual std::string generate(HTTPEnum::Method method, const std::string &request_path, + const std::string &username, const std::string &body); public: enum Algorithm { @@ -55,37 +55,37 @@ public: }; private: - static int match_qop_token(const string &token); + static int match_qop_token(const std::string &token); - string calc_request_digest(const string &username, const string &password, + std::string calc_request_digest(const std::string &username, const std::string &password, HTTPEnum::Method method, - const string &request_path, const string &body); - string calc_h(const string &data) const; - string calc_kd(const string &secret, const string &data) const; - string get_a1(const string &username, const string &password); - string get_a2(HTTPEnum::Method method, const string &request_path, - const string &body); - string get_hex_nonce_count() const; + const std::string &request_path, const std::string &body); + std::string calc_h(const std::string &data) const; + std::string calc_kd(const std::string &secret, const std::string &data) const; + std::string get_a1(const std::string &username, const std::string &password); + std::string get_a2(HTTPEnum::Method method, const std::string &request_path, + const std::string &body); + std::string get_hex_nonce_count() const; - static string calc_md5(const string &source); + static std::string calc_md5(const std::string &source); INLINE static char hexdigit(int value); - string _cnonce; - string _nonce; + std::string _cnonce; + std::string _nonce; int _nonce_count; - string _opaque; + std::string _opaque; Algorithm _algorithm; - string _a1; + std::string _a1; int _qop; Qop _chosen_qop; - static const string _mechanism; + static const std::string _mechanism; }; -ostream &operator << (ostream &out, HTTPDigestAuthorization::Algorithm algorithm); -ostream &operator << (ostream &out, HTTPDigestAuthorization::Qop qop); +std::ostream &operator << (std::ostream &out, HTTPDigestAuthorization::Algorithm algorithm); +std::ostream &operator << (std::ostream &out, HTTPDigestAuthorization::Qop qop); #include "httpDigestAuthorization.I" diff --git a/panda/src/downloader/httpEntityTag.I b/panda/src/downloader/httpEntityTag.I index d713302da2..3cdee7d4f3 100644 --- a/panda/src/downloader/httpEntityTag.I +++ b/panda/src/downloader/httpEntityTag.I @@ -24,7 +24,7 @@ HTTPEntityTag() { * tag string. */ INLINE HTTPEntityTag:: -HTTPEntityTag(bool weak, const string &tag) : +HTTPEntityTag(bool weak, const std::string &tag) : _weak(weak), _tag(tag) { @@ -63,7 +63,7 @@ is_weak() const { /** * Returns the tag as a literal string. */ -INLINE const string &HTTPEntityTag:: +INLINE const std::string &HTTPEntityTag:: get_tag() const { return _tag; } @@ -131,13 +131,13 @@ compare_to(const HTTPEntityTag &other) const { * */ INLINE void HTTPEntityTag:: -output(ostream &out) const { +output(std::ostream &out) const { out << get_string(); } -INLINE ostream & -operator << (ostream &out, const HTTPEntityTag &entityTag) { +INLINE std::ostream & +operator << (std::ostream &out, const HTTPEntityTag &entityTag) { entityTag.output(out); return out; } diff --git a/panda/src/downloader/httpEntityTag.h b/panda/src/downloader/httpEntityTag.h index 280ce9d0c9..bf1a144946 100644 --- a/panda/src/downloader/httpEntityTag.h +++ b/panda/src/downloader/httpEntityTag.h @@ -24,14 +24,14 @@ class EXPCL_PANDAEXPRESS HTTPEntityTag { PUBLISHED: INLINE HTTPEntityTag(); - HTTPEntityTag(const string &text); - INLINE HTTPEntityTag(bool weak, const string &tag); + HTTPEntityTag(const std::string &text); + INLINE HTTPEntityTag(bool weak, const std::string &tag); INLINE HTTPEntityTag(const HTTPEntityTag ©); INLINE void operator = (const HTTPEntityTag ©); INLINE bool is_weak() const; - INLINE const string &get_tag() const; - string get_string() const; + INLINE const std::string &get_tag() const; + std::string get_string() const; INLINE bool strong_equiv(const HTTPEntityTag &other) const; INLINE bool weak_equiv(const HTTPEntityTag &other) const; @@ -41,14 +41,14 @@ PUBLISHED: INLINE bool operator < (const HTTPEntityTag &other) const; INLINE int compare_to(const HTTPEntityTag &other) const; - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; private: bool _weak; - string _tag; + std::string _tag; }; -INLINE ostream &operator << (ostream &out, const HTTPEntityTag &url); +INLINE std::ostream &operator << (std::ostream &out, const HTTPEntityTag &url); #include "httpEntityTag.I" diff --git a/panda/src/downloader/httpEnum.h b/panda/src/downloader/httpEnum.h index 587c5b8b28..81ec9f0243 100644 --- a/panda/src/downloader/httpEnum.h +++ b/panda/src/downloader/httpEnum.h @@ -47,7 +47,7 @@ PUBLISHED: }; }; -ostream &operator << (ostream &out, HTTPEnum::Method method); +std::ostream &operator << (std::ostream &out, HTTPEnum::Method method); #endif // HAVE_OPENSSL diff --git a/panda/src/downloader/identityStreamBuf.h b/panda/src/downloader/identityStreamBuf.h index f9d00a6626..548e946999 100644 --- a/panda/src/downloader/identityStreamBuf.h +++ b/panda/src/downloader/identityStreamBuf.h @@ -28,7 +28,7 @@ class HTTPChannel; /** * The streambuf object that implements IIdentityStream. */ -class EXPCL_PANDAEXPRESS IdentityStreamBuf : public streambuf { +class EXPCL_PANDAEXPRESS IdentityStreamBuf : public std::streambuf { public: IdentityStreamBuf(); virtual ~IdentityStreamBuf(); diff --git a/panda/src/downloader/multiplexStream.I b/panda/src/downloader/multiplexStream.I index 2a99a110d3..aff3d4a064 100644 --- a/panda/src/downloader/multiplexStream.I +++ b/panda/src/downloader/multiplexStream.I @@ -15,8 +15,8 @@ * */ INLINE MultiplexStream:: -MultiplexStream() : ostream(&_msb) { - setf(ios::unitbuf); +MultiplexStream() : std::ostream(&_msb) { + setf(std::ios::unitbuf); } /** @@ -24,7 +24,7 @@ MultiplexStream() : ostream(&_msb) { * will receive whatever data is sent to the pipe. */ INLINE void MultiplexStream:: -add_ostream(ostream *out, bool delete_later) { +add_ostream(std::ostream *out, bool delete_later) { _msb.add_output(MultiplexStreamBuf::BT_none, MultiplexStreamBuf::OT_ostream, out, nullptr, delete_later); @@ -49,7 +49,7 @@ INLINE void MultiplexStream:: add_standard_output() { _msb.add_output(MultiplexStreamBuf::BT_none, MultiplexStreamBuf::OT_ostream, - &cout, nullptr, false); + &std::cout, nullptr, false); } /** @@ -64,7 +64,7 @@ add_file(Filename file) { delete out; return false; } - out->setf(ios::unitbuf); + out->setf(std::ios::unitbuf); _msb.add_output(MultiplexStreamBuf::BT_line, MultiplexStreamBuf::OT_ostream, diff --git a/panda/src/downloader/multiplexStream.h b/panda/src/downloader/multiplexStream.h index cf421860cf..d47c2cf118 100644 --- a/panda/src/downloader/multiplexStream.h +++ b/panda/src/downloader/multiplexStream.h @@ -28,7 +28,7 @@ * a disk file or to system logging utilities. It's a very handy thing to set * Notify to refer to when running in batch mode. */ -class EXPCL_PANDAEXPRESS MultiplexStream : public ostream { +class EXPCL_PANDAEXPRESS MultiplexStream : public std::ostream { PUBLISHED: INLINE MultiplexStream(); @@ -36,7 +36,7 @@ PUBLISHED: INLINE MultiplexStream(const MultiplexStream ©) = delete; #endif - INLINE void add_ostream(ostream *out, bool delete_later = false); + INLINE void add_ostream(std::ostream *out, bool delete_later = false); INLINE bool add_stdio_file(FILE *file, bool close_when_done); INLINE void add_standard_output(); INLINE bool add_file(Filename file); diff --git a/panda/src/downloader/multiplexStreamBuf.h b/panda/src/downloader/multiplexStreamBuf.h index 0e440f6ab1..24ec97cfb6 100644 --- a/panda/src/downloader/multiplexStreamBuf.h +++ b/panda/src/downloader/multiplexStreamBuf.h @@ -24,7 +24,7 @@ * Used by MultiplexStream to implement an ostream that sends what is written * to it to any number of additional sources, like other ostreams. */ -class EXPCL_PANDAEXPRESS MultiplexStreamBuf : public streambuf { +class EXPCL_PANDAEXPRESS MultiplexStreamBuf : public std::streambuf { public: MultiplexStreamBuf(); virtual ~MultiplexStreamBuf(); @@ -41,7 +41,7 @@ public: }; void add_output(BufferType buffer_type, OutputType output_type, - ostream *out = nullptr, + std::ostream *out = nullptr, FILE *fout = nullptr, bool owns_obj = false); @@ -58,11 +58,11 @@ private: class Output { public: void close(); - void write_string(const string &str); + void write_string(const std::string &str); BufferType _buffer_type; OutputType _output_type; - ostream *_out; + std::ostream *_out; FILE *_fout; bool _owns_obj; }; @@ -71,7 +71,7 @@ private: Outputs _outputs; MutexImpl _lock; - string _line_buffer; + std::string _line_buffer; }; #include "multiplexStreamBuf.I" diff --git a/panda/src/downloader/socketStream.I b/panda/src/downloader/socketStream.I index 8ac4914567..800ed89499 100644 --- a/panda/src/downloader/socketStream.I +++ b/panda/src/downloader/socketStream.I @@ -161,7 +161,7 @@ flush() { * */ INLINE ISocketStream:: -ISocketStream(streambuf *buf) : istream(buf), SSReader(this) { +ISocketStream(std::streambuf *buf) : std::istream(buf), SSReader(this) { _channel = nullptr; } @@ -169,7 +169,7 @@ ISocketStream(streambuf *buf) : istream(buf), SSReader(this) { * */ INLINE OSocketStream:: -OSocketStream(streambuf *buf) : ostream(buf), SSWriter(this) { +OSocketStream(std::streambuf *buf) : std::ostream(buf), SSWriter(this) { } /** @@ -185,7 +185,7 @@ flush() { * */ INLINE SocketStream:: -SocketStream(streambuf *buf) : iostream(buf), SSReader(this), SSWriter(this) { +SocketStream(std::streambuf *buf) : std::iostream(buf), SSReader(this), SSWriter(this) { } /** diff --git a/panda/src/downloader/socketStream.h b/panda/src/downloader/socketStream.h index 84ce907a5e..b98e76927f 100644 --- a/panda/src/downloader/socketStream.h +++ b/panda/src/downloader/socketStream.h @@ -38,7 +38,7 @@ class HTTPChannel; */ class EXPCL_PANDAEXPRESS SSReader { public: - SSReader(istream *stream); + SSReader(std::istream *stream); virtual ~SSReader(); PUBLISHED: @@ -53,7 +53,7 @@ PUBLISHED: private: bool do_receive_datagram(Datagram &dg); - istream *_istream; + std::istream *_istream; size_t _data_expected; vector_uchar _data_so_far; int _tcp_header_size; @@ -88,7 +88,7 @@ private: */ class EXPCL_PANDAEXPRESS SSWriter { public: - SSWriter(ostream *stream); + SSWriter(std::ostream *stream); virtual ~SSWriter(); PUBLISHED: @@ -109,7 +109,7 @@ PUBLISHED: INLINE bool flush(); private: - ostream *_ostream; + std::ostream *_ostream; bool _collect_tcp; double _collect_tcp_interval; double _queued_data_start; @@ -122,9 +122,9 @@ private: * after an eof condition to check whether the socket has been closed, or * whether more data may be available later. */ -class EXPCL_PANDAEXPRESS ISocketStream : public istream, public SSReader { +class EXPCL_PANDAEXPRESS ISocketStream : public std::istream, public SSReader { public: - INLINE ISocketStream(streambuf *buf); + INLINE ISocketStream(std::streambuf *buf); virtual ~ISocketStream(); #if _MSC_VER >= 1800 @@ -156,9 +156,9 @@ private: * check whether the socket has been closed, or whether more data may be sent * later. */ -class EXPCL_PANDAEXPRESS OSocketStream : public ostream, public SSWriter { +class EXPCL_PANDAEXPRESS OSocketStream : public std::ostream, public SSWriter { public: - INLINE OSocketStream(streambuf *buf); + INLINE OSocketStream(std::streambuf *buf); #if _MSC_VER >= 1800 INLINE OSocketStream(const OSocketStream ©) = delete; @@ -175,9 +175,9 @@ PUBLISHED: * A base class for iostreams that read and write to a (possibly non-blocking) * socket. */ -class EXPCL_PANDAEXPRESS SocketStream : public iostream, public SSReader, public SSWriter { +class EXPCL_PANDAEXPRESS SocketStream : public std::iostream, public SSReader, public SSWriter { public: - INLINE SocketStream(streambuf *buf); + INLINE SocketStream(std::streambuf *buf); #if _MSC_VER >= 1800 INLINE SocketStream(const SocketStream ©) = delete; diff --git a/panda/src/downloader/stringStream.I b/panda/src/downloader/stringStream.I index 6e1b173c40..7d1e59fc8f 100644 --- a/panda/src/downloader/stringStream.I +++ b/panda/src/downloader/stringStream.I @@ -15,7 +15,7 @@ * */ INLINE StringStream:: -StringStream() : iostream(&_buf) { +StringStream() : std::iostream(&_buf) { } /** @@ -23,7 +23,7 @@ StringStream() : iostream(&_buf) { * data. */ INLINE StringStream:: -StringStream(const string &source) : iostream(&_buf) { +StringStream(const std::string &source) : std::iostream(&_buf) { set_data(source); } @@ -47,21 +47,21 @@ get_data_size() { /** * Returns the contents of the data stream as a string. */ -INLINE string StringStream:: +INLINE std::string StringStream:: get_data() { flush(); const vector_uchar &data = _buf.get_data(); if (!data.empty()) { - return string((char *)&data[0], data.size()); + return std::string((char *)&data[0], data.size()); } - return string(); + return std::string(); } /** * Replaces the contents of the data stream. This implicitly reseeks to 0. */ INLINE void StringStream:: -set_data(const string &data) { +set_data(const std::string &data) { _buf.clear(); if (!data.empty()) { set_data((const unsigned char *)data.data(), data.size()); diff --git a/panda/src/downloader/stringStream.h b/panda/src/downloader/stringStream.h index 2075f817fd..b5b835ed17 100644 --- a/panda/src/downloader/stringStream.h +++ b/panda/src/downloader/stringStream.h @@ -24,9 +24,9 @@ * buffer, which can be retrieved and/or set as a string in Python 2 or a * bytes object in Python 3. */ -class EXPCL_PANDAEXPRESS StringStream : public iostream { +class EXPCL_PANDAEXPRESS StringStream : public std::iostream { public: - INLINE StringStream(const string &source); + INLINE StringStream(const std::string &source); PUBLISHED: EXTENSION(StringStream(PyObject *source)); @@ -46,8 +46,8 @@ PUBLISHED: public: #ifndef CPPPARSER - INLINE string get_data(); - INLINE void set_data(const string &data); + INLINE std::string get_data(); + INLINE void set_data(const std::string &data); void set_data(const unsigned char *data, size_t size); #endif diff --git a/panda/src/downloader/stringStreamBuf.h b/panda/src/downloader/stringStreamBuf.h index 9ddff66ae7..64df6ba99b 100644 --- a/panda/src/downloader/stringStreamBuf.h +++ b/panda/src/downloader/stringStreamBuf.h @@ -22,7 +22,7 @@ * to a memory buffer, whose contents can be appended to or extracted at any * time by application code. */ -class EXPCL_PANDAEXPRESS StringStreamBuf : public streambuf { +class EXPCL_PANDAEXPRESS StringStreamBuf : public std::streambuf { public: StringStreamBuf(); virtual ~StringStreamBuf(); @@ -36,8 +36,8 @@ public: void write_chars(const char *start, size_t length); protected: - virtual streampos seekoff(streamoff off, ios_seekdir dir, ios_openmode which); - virtual streampos seekpos(streampos pos, ios_openmode which); + virtual std::streampos seekoff(std::streamoff off, ios_seekdir dir, ios_openmode which); + virtual std::streampos seekpos(std::streampos pos, ios_openmode which); virtual int overflow(int c); virtual int sync(); diff --git a/panda/src/downloader/urlSpec.I b/panda/src/downloader/urlSpec.I index 7af6f4339b..083b2ca9f5 100644 --- a/panda/src/downloader/urlSpec.I +++ b/panda/src/downloader/urlSpec.I @@ -15,7 +15,7 @@ * */ INLINE URLSpec:: -URLSpec(const string &url, bool server_name_expected) { +URLSpec(const std::string &url, bool server_name_expected) { set_url(url, server_name_expected); } @@ -23,7 +23,7 @@ URLSpec(const string &url, bool server_name_expected) { * */ INLINE void URLSpec:: -operator = (const string &url) { +operator = (const std::string &url) { set_url(url); } @@ -115,7 +115,7 @@ has_query() const { * Returns the authority specified by the URL (this includes username, server, * and/or port), or empty string if no authority is specified. */ -INLINE string URLSpec:: +INLINE std::string URLSpec:: get_authority() const { return _url.substr(_username_start, _port_end - _username_start); } @@ -125,7 +125,7 @@ get_authority() const { * a password, e.g. "username:password", although putting a password on the * URL is probably a bad idea. */ -INLINE string URLSpec:: +INLINE std::string URLSpec:: get_username() const { return _url.substr(_username_start, _username_end - _username_start); } @@ -134,7 +134,7 @@ get_username() const { * Returns the server name specified by the URL, if any. In case of an IPv6 * address, does not include the enclosing brackets. */ -INLINE string URLSpec:: +INLINE std::string URLSpec:: get_server() const { return _url.substr(_server_start, _server_end - _server_start); } @@ -144,7 +144,7 @@ get_server() const { * no port is specified. Compare this with get_port(), which returns a * default port number if no port is specified. */ -INLINE string URLSpec:: +INLINE std::string URLSpec:: get_port_str() const { return _url.substr(_port_start, _port_end - _port_start); } @@ -153,7 +153,7 @@ get_port_str() const { * Returns the query specified by the URL, or empty string if no query is * specified. */ -INLINE string URLSpec:: +INLINE std::string URLSpec:: get_query() const { return _url.substr(_query_start); } @@ -180,7 +180,7 @@ is_ssl() const { /** * Returns the complete URL specification. */ -INLINE const string &URLSpec:: +INLINE const std::string &URLSpec:: get_url() const { return _url; } @@ -189,7 +189,7 @@ get_url() const { * */ INLINE URLSpec:: -operator const string & () const { +operator const std::string & () const { return _url; } @@ -244,16 +244,16 @@ operator [] (size_t n) const { return _url[n]; } -INLINE istream & -operator >> (istream &in, URLSpec &url) { +INLINE std::istream & +operator >> (std::istream &in, URLSpec &url) { if (!url.input(in)) { - in.clear(ios::failbit | in.rdstate()); + in.clear(std::ios::failbit | in.rdstate()); } return in; } -INLINE ostream & -operator << (ostream &out, const URLSpec &url) { +INLINE std::ostream & +operator << (std::ostream &out, const URLSpec &url) { url.output(out); return out; } diff --git a/panda/src/downloader/urlSpec.h b/panda/src/downloader/urlSpec.h index 592fe22087..7477f4d6cd 100644 --- a/panda/src/downloader/urlSpec.h +++ b/panda/src/downloader/urlSpec.h @@ -28,9 +28,9 @@ class Filename; class EXPCL_PANDAEXPRESS URLSpec { PUBLISHED: URLSpec(); - INLINE URLSpec(const string &url, bool server_name_expected = false); + INLINE URLSpec(const std::string &url, bool server_name_expected = false); URLSpec(const URLSpec &url, const Filename &path); - INLINE void operator = (const string &url); + INLINE void operator = (const std::string &url); INLINE bool operator == (const URLSpec &other) const; INLINE bool operator != (const URLSpec &other) const; @@ -46,35 +46,35 @@ PUBLISHED: INLINE bool has_path() const; INLINE bool has_query() const; - string get_scheme() const; - INLINE string get_authority() const; - INLINE string get_username() const; - INLINE string get_server() const; - INLINE string get_port_str() const; + std::string get_scheme() const; + INLINE std::string get_authority() const; + INLINE std::string get_username() const; + INLINE std::string get_server() const; + INLINE std::string get_port_str() const; uint16_t get_port() const; - string get_server_and_port() const; + std::string get_server_and_port() const; bool is_default_port() const; - static int get_default_port_for_scheme(const string &scheme); - string get_path() const; - INLINE string get_query() const; - string get_path_and_query() const; + static int get_default_port_for_scheme(const std::string &scheme); + std::string get_path() const; + INLINE std::string get_query() const; + std::string get_path_and_query() const; INLINE bool is_ssl() const; - INLINE const string &get_url() const; + INLINE const std::string &get_url() const; - void set_scheme(const string &scheme); - void set_authority(const string &authority); - void set_username(const string &username); - void set_server(const string &server); - void set_port(const string &port); + void set_scheme(const std::string &scheme); + void set_authority(const std::string &authority); + void set_username(const std::string &username); + void set_server(const std::string &server); + void set_port(const std::string &port); void set_port(uint16_t port); - void set_server_and_port(const string &server_and_port); - void set_path(const string &path); - void set_query(const string &query); + void set_server_and_port(const std::string &server_and_port); + void set_path(const std::string &path); + void set_query(const std::string &query); - void set_url(const string &url, bool server_name_expected = false); + void set_url(const std::string &url, bool server_name_expected = false); - INLINE operator const string & () const; + INLINE operator const std::string & () const; INLINE const char *c_str() const; INLINE bool empty() const; INLINE operator bool() const; @@ -82,13 +82,13 @@ PUBLISHED: INLINE size_t size() const; INLINE char operator [] (size_t n) const; - bool input(istream &in); - void output(ostream &out) const; + bool input(std::istream &in); + void output(std::ostream &out) const; - static string quote(const string &source, const string &safe = "/"); - static string quote_plus(const string &source, const string &safe = "/"); - static string unquote(const string &source); - static string unquote_plus(const string &source); + static std::string quote(const std::string &source, const std::string &safe = "/"); + static std::string quote_plus(const std::string &source, const std::string &safe = "/"); + static std::string unquote(const std::string &source); + static std::string unquote_plus(const std::string &source); MAKE_PROPERTY(scheme, get_scheme, set_scheme); MAKE_PROPERTY(authority, get_authority, set_authority); @@ -113,7 +113,7 @@ private: F_has_query = 0x0040, }; - string _url; + std::string _url; uint16_t _port; int _flags; @@ -129,8 +129,8 @@ private: size_t _query_start; }; -INLINE istream &operator >> (istream &in, URLSpec &url); -INLINE ostream &operator << (ostream &out, const URLSpec &url); +INLINE std::istream &operator >> (std::istream &in, URLSpec &url); +INLINE std::ostream &operator << (std::ostream &out, const URLSpec &url); #include "urlSpec.I" diff --git a/panda/src/downloader/virtualFileHTTP.h b/panda/src/downloader/virtualFileHTTP.h index 7b5426566c..a440bf7452 100644 --- a/panda/src/downloader/virtualFileHTTP.h +++ b/panda/src/downloader/virtualFileHTTP.h @@ -45,15 +45,15 @@ public: virtual bool is_regular_file() const; INLINE bool is_implicit_pz_file() const; - virtual istream *open_read_file(bool auto_unwrap) const; + virtual std::istream *open_read_file(bool auto_unwrap) const; virtual bool was_read_successful() const; - virtual streamsize get_file_size(istream *stream) const; - virtual streamsize get_file_size() const; + virtual std::streamsize get_file_size(std::istream *stream) const; + virtual std::streamsize get_file_size() const; virtual time_t get_timestamp() const; private: - bool fetch_file(ostream *buffer_stream) const; - istream *return_file(istream *buffer_stream, bool auto_unwrap) const; + bool fetch_file(std::ostream *buffer_stream) const; + std::istream *return_file(std::istream *buffer_stream, bool auto_unwrap) const; VirtualFileMountHTTP *_mount; Filename _local_filename; diff --git a/panda/src/downloader/virtualFileMountHTTP.h b/panda/src/downloader/virtualFileMountHTTP.h index 996905a913..4724ad5175 100644 --- a/panda/src/downloader/virtualFileMountHTTP.h +++ b/panda/src/downloader/virtualFileMountHTTP.h @@ -48,15 +48,15 @@ public: virtual bool is_directory(const Filename &file) const; virtual bool is_regular_file(const Filename &file) const; - virtual istream *open_read_file(const Filename &file) const; - virtual streamsize get_file_size(const Filename &file, istream *stream) const; - virtual streamsize get_file_size(const Filename &file) const; + virtual std::istream *open_read_file(const Filename &file) const; + virtual std::streamsize get_file_size(const Filename &file, std::istream *stream) const; + virtual std::streamsize get_file_size(const Filename &file) const; virtual time_t get_timestamp(const Filename &file) const; virtual bool scan_directory(vector_string &contents, const Filename &dir) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PT(HTTPChannel) get_channel(); void recycle_channel(HTTPChannel *channel); diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.I b/panda/src/dxgsg9/dxGraphicsStateGuardian9.I index 51846fd33c..7e08862b2d 100644 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.I +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.I @@ -86,7 +86,7 @@ get_texture_wrap_mode(SamplerState::WrapMode wm) { case SamplerState::WM_border_color: return D3DTADDRESS_BORDER; } - dxgsg9_cat.error() << "Invalid Texture::Mode value" << endl; + dxgsg9_cat.error() << "Invalid Texture::Mode value" << std::endl; return D3DTADDRESS_WRAP; } @@ -103,7 +103,7 @@ get_fog_mode_type(Fog::Mode m) { case Fog::M_exponential_squared: return D3DFOG_EXP2; } - dxgsg9_cat.error() << "Invalid Fog::Mode value" << endl; + dxgsg9_cat.error() << "Invalid Fog::Mode value" << std::endl; return D3DFOG_EXP; } diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.h b/panda/src/dxgsg9/dxGraphicsStateGuardian9.h index 5a5c3b3359..66b2fb82d5 100644 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.h +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.h @@ -166,7 +166,7 @@ public: static void atexit_function(void); static void set_cg_device(LPDIRECT3DDEVICE9 cg_device); - virtual bool get_supports_cg_profile(const string &name) const; + virtual bool get_supports_cg_profile(const std::string &name) const; protected: @@ -366,7 +366,7 @@ protected: bool _supports_stream_offset; - list _graphics_buffer_list; + std::list _graphics_buffer_list; int _supports_gamma_calibration; diff --git a/panda/src/dxgsg9/dxInput9.h b/panda/src/dxgsg9/dxInput9.h index 77f3f31a37..9614a2627d 100644 --- a/panda/src/dxgsg9/dxInput9.h +++ b/panda/src/dxgsg9/dxInput9.h @@ -16,8 +16,8 @@ #define DIRECTINPUT_VERSION 0x900 #include -typedef vector DI_DeviceInfos; -typedef vector DI_DeviceObjInfos; +typedef std::vector DI_DeviceInfos; +typedef std::vector DI_DeviceObjInfos; class DInput9Info { public: @@ -33,8 +33,8 @@ public: DI_DeviceInfos _DevInfos; // arrays for all created devices. Should probably put these together in a // struct, along with the data fmt info - vector _DeviceList; - vector _DevCaps; + std::vector _DeviceList; + std::vector _DevCaps; }; #endif diff --git a/panda/src/dxgsg9/dxShaderContext9.h b/panda/src/dxgsg9/dxShaderContext9.h index 8f0a543e50..b637cb0a81 100644 --- a/panda/src/dxgsg9/dxShaderContext9.h +++ b/panda/src/dxgsg9/dxShaderContext9.h @@ -79,7 +79,7 @@ public: int _num_bound_streams; // FOR DEBUGGING - string _name; + std::string _name; private: #ifdef HAVE_CG diff --git a/panda/src/dxgsg9/dxgsg9base.h b/panda/src/dxgsg9/dxgsg9base.h index 359b9fa2a1..b0e2b9dfef 100644 --- a/panda/src/dxgsg9/dxgsg9base.h +++ b/panda/src/dxgsg9/dxgsg9base.h @@ -56,9 +56,9 @@ #ifndef D3DERRORSTRING #ifdef NDEBUG -#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DX_GET_ERROR_STRING_FUNC(HRESULT) << endl // leave out descriptions to shrink release build +#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DX_GET_ERROR_STRING_FUNC(HRESULT) << std::endl // leave out descriptions to shrink release build #else -#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DX_GET_ERROR_STRING_FUNC(HRESULT) << ": " << DX_GET_ERROR_DESCRIPTION_FUNC(HRESULT) << endl +#define D3DERRORSTRING(HRESULT) " at (" << __FILE__ << ":" << __LINE__ << "), hr=" << DX_GET_ERROR_STRING_FUNC(HRESULT) << ": " << DX_GET_ERROR_DESCRIPTION_FUNC(HRESULT) << std::endl #endif #endif @@ -103,7 +103,7 @@ typedef DWORD DXShaderHandle; ULONG refcnt; \ if(IS_VALID_PTR(OBJECT)) { \ refcnt = (OBJECT)->Release(); \ - MODULE##_cat.debug() << DBGSTR << " released, refcnt = " << refcnt << " at " << __FILE__ << ":" << __LINE__ << endl; \ + MODULE##_cat.debug() << DBGSTR << " released, refcnt = " << refcnt << " at " << __FILE__ << ":" << __LINE__ << std::endl; \ if((bDoDownToZero) && (refcnt>0)) { \ MODULE##_cat.warning() << DBGSTR << " released but still has a non-zero refcnt(" << refcnt << "), multi-releasing it down to zero!\n"; \ do { \ @@ -112,11 +112,11 @@ typedef DWORD DXShaderHandle; } \ (OBJECT) = nullptr; \ } else { \ - MODULE##_cat.debug() << DBGSTR << " not released, ptr == NULL" << endl; \ + MODULE##_cat.debug() << DBGSTR << " not released, ptr == NULL" << std::endl; \ }} #define PRINT_REFCNT(MODULE,p) { ULONG refcnt; (p)->AddRef(); refcnt=(p)->Release(); \ - MODULE##_cat.debug() << #p << " has refcnt = " << refcnt << " at " << __FILE__ << ":" << __LINE__ << endl; } + MODULE##_cat.debug() << #p << " has refcnt = " << refcnt << " at " << __FILE__ << ":" << __LINE__ << std::endl; } #else #define RELEASE(OBJECT,MODULE,DBGSTR,bDoDownToZero) { \ diff --git a/panda/src/dxgsg9/wdxGraphicsBuffer9.h b/panda/src/dxgsg9/wdxGraphicsBuffer9.h index d603a73bf6..747307642b 100644 --- a/panda/src/dxgsg9/wdxGraphicsBuffer9.h +++ b/panda/src/dxgsg9/wdxGraphicsBuffer9.h @@ -29,7 +29,7 @@ class EXPCL_PANDADX wdxGraphicsBuffer9 : public GraphicsBuffer { public: wdxGraphicsBuffer9(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, @@ -74,7 +74,7 @@ private: int _backing_sizey; wdxGraphicsBuffer9 *_shared_depth_buffer; - list _shared_depth_buffer_list; + std::list _shared_depth_buffer_list; wdxGraphicsBuffer9 **_this; diff --git a/panda/src/dxgsg9/wdxGraphicsPipe9.h b/panda/src/dxgsg9/wdxGraphicsPipe9.h index 9c06d1476e..2d9eea18b0 100644 --- a/panda/src/dxgsg9/wdxGraphicsPipe9.h +++ b/panda/src/dxgsg9/wdxGraphicsPipe9.h @@ -29,7 +29,7 @@ public: wdxGraphicsPipe9(); virtual ~wdxGraphicsPipe9(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); virtual PT(GraphicsDevice) make_device(void *scrn); @@ -50,7 +50,7 @@ public: bool special_check_fullscreen_resolution(DXScreenData &scrn, UINT x_size,UINT y_size); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/dxgsg9/wdxGraphicsWindow9.h b/panda/src/dxgsg9/wdxGraphicsWindow9.h index 9bbe8b5eed..391fb9d7e9 100644 --- a/panda/src/dxgsg9/wdxGraphicsWindow9.h +++ b/panda/src/dxgsg9/wdxGraphicsWindow9.h @@ -28,7 +28,7 @@ class wdxGraphicsPipe9; class EXPCL_PANDADX wdxGraphicsWindow9 : public WinGraphicsWindow { public: wdxGraphicsWindow9(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/dxml/config_dxml.h b/panda/src/dxml/config_dxml.h index ca2113f678..7129db67de 100644 --- a/panda/src/dxml/config_dxml.h +++ b/panda/src/dxml/config_dxml.h @@ -35,8 +35,8 @@ extern EXPCL_PANDA_DXML void init_libdxml(); class TiXmlDocument; class TiXmlNode; BEGIN_PUBLISH -EXPCL_PANDA_DXML TiXmlDocument *read_xml_stream(istream &in); -EXPCL_PANDA_DXML void write_xml_stream(ostream &out, TiXmlDocument *doc); +EXPCL_PANDA_DXML TiXmlDocument *read_xml_stream(std::istream &in); +EXPCL_PANDA_DXML void write_xml_stream(std::ostream &out, TiXmlDocument *doc); EXPCL_PANDA_DXML void print_xml(TiXmlNode *xnode); EXPCL_PANDA_DXML void print_xml_to_file(const Filename &filename, TiXmlNode *xnode); END_PUBLISH diff --git a/panda/src/egg/eggAnimData.I b/panda/src/egg/eggAnimData.I index aec67eb1a3..20b6c6d62c 100644 --- a/panda/src/egg/eggAnimData.I +++ b/panda/src/egg/eggAnimData.I @@ -17,7 +17,7 @@ * */ INLINE EggAnimData:: -EggAnimData(const string &name) : EggNode(name) { +EggAnimData(const std::string &name) : EggNode(name) { _has_fps = false; } diff --git a/panda/src/egg/eggAnimData.h b/panda/src/egg/eggAnimData.h index 1548f3f0b7..05bdc3669a 100644 --- a/panda/src/egg/eggAnimData.h +++ b/panda/src/egg/eggAnimData.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDAEGG EggAnimData : public EggNode { PUBLISHED: - INLINE explicit EggAnimData(const string &name = ""); + INLINE explicit EggAnimData(const std::string &name = ""); INLINE EggAnimData(const EggAnimData ©); INLINE EggAnimData &operator = (const EggAnimData ©); diff --git a/panda/src/egg/eggAnimPreload.I b/panda/src/egg/eggAnimPreload.I index 7cfb879347..a13a42ba3d 100644 --- a/panda/src/egg/eggAnimPreload.I +++ b/panda/src/egg/eggAnimPreload.I @@ -15,7 +15,7 @@ * */ INLINE EggAnimPreload:: -EggAnimPreload(const string &name) : EggNode(name) { +EggAnimPreload(const std::string &name) : EggNode(name) { _has_fps = false; _has_num_frames = false; } diff --git a/panda/src/egg/eggAnimPreload.h b/panda/src/egg/eggAnimPreload.h index 9dc2352e5f..577901cac5 100644 --- a/panda/src/egg/eggAnimPreload.h +++ b/panda/src/egg/eggAnimPreload.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggAnimPreload : public EggNode { PUBLISHED: - INLINE explicit EggAnimPreload(const string &name = ""); + INLINE explicit EggAnimPreload(const std::string &name = ""); INLINE EggAnimPreload(const EggAnimPreload ©); INLINE EggAnimPreload &operator = (const EggAnimPreload ©); @@ -37,7 +37,7 @@ PUBLISHED: INLINE bool has_num_frames() const; INLINE int get_num_frames() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; private: double _fps; diff --git a/panda/src/egg/eggAttributes.h b/panda/src/egg/eggAttributes.h index 02e9c112ac..1ff0833d7e 100644 --- a/panda/src/egg/eggAttributes.h +++ b/panda/src/egg/eggAttributes.h @@ -51,7 +51,7 @@ PUBLISHED: INLINE bool matches_color(const EggAttributes &other) const; INLINE void copy_color(const EggAttributes &other); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; INLINE bool sorts_less_than(const EggAttributes &other) const; int compare_to(const EggAttributes &other) const; diff --git a/panda/src/egg/eggBin.h b/panda/src/egg/eggBin.h index 3553f467fb..e069a44af1 100644 --- a/panda/src/egg/eggBin.h +++ b/panda/src/egg/eggBin.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggBin : public EggGroup { PUBLISHED: - explicit EggBin(const string &name = ""); + explicit EggBin(const std::string &name = ""); EggBin(const EggGroup ©); EggBin(const EggBin ©); diff --git a/panda/src/egg/eggBinMaker.h b/panda/src/egg/eggBinMaker.h index 2e3da3418f..06590cd0c4 100644 --- a/panda/src/egg/eggBinMaker.h +++ b/panda/src/egg/eggBinMaker.h @@ -177,7 +177,7 @@ PUBLISHED: virtual bool collapse_group(const EggGroup *group, int bin_number); - virtual string + virtual std::string get_bin_name(int bin_number, const EggNode *child); virtual PT(EggBin) diff --git a/panda/src/egg/eggComment.I b/panda/src/egg/eggComment.I index cd26e3b12d..ac99fb54e9 100644 --- a/panda/src/egg/eggComment.I +++ b/panda/src/egg/eggComment.I @@ -15,7 +15,7 @@ * */ INLINE EggComment:: -EggComment(const string &node_name, const string &comment) +EggComment(const std::string &node_name, const std::string &comment) : EggNode(node_name), _comment(comment) { } @@ -31,7 +31,7 @@ EggComment(const EggComment ©) : EggNode(copy), _comment(copy._comment) { * */ INLINE EggComment &EggComment:: -operator = (const string &comment) { +operator = (const std::string &comment) { _comment = comment; return *this; } @@ -51,7 +51,7 @@ operator = (const EggComment ©) { * */ INLINE EggComment:: -operator const string & () const { +operator const std::string & () const { return _comment; } @@ -60,7 +60,7 @@ operator const string & () const { * */ INLINE void EggComment:: -set_comment(const string &comment) { +set_comment(const std::string &comment) { _comment = comment; } @@ -68,7 +68,7 @@ set_comment(const string &comment) { /** * */ -INLINE string EggComment:: +INLINE std::string EggComment:: get_comment() const { return _comment; } diff --git a/panda/src/egg/eggComment.h b/panda/src/egg/eggComment.h index 63d5eb82d8..491ecdf6ba 100644 --- a/panda/src/egg/eggComment.h +++ b/panda/src/egg/eggComment.h @@ -23,26 +23,26 @@ */ class EXPCL_PANDAEGG EggComment : public EggNode { PUBLISHED: - INLINE explicit EggComment(const string &node_name, const string &comment); + INLINE explicit EggComment(const std::string &node_name, const std::string &comment); INLINE EggComment(const EggComment ©); // You can use the string operators to directly set and manipulate the // comment. - INLINE EggComment &operator = (const string &comment); + INLINE EggComment &operator = (const std::string &comment); INLINE EggComment &operator = (const EggComment ©); - INLINE operator const string & () const; + INLINE operator const std::string & () const; // Or, you can set and get it explicitly. - INLINE void set_comment(const string &comment); - INLINE string get_comment() const; + INLINE void set_comment(const std::string &comment); + INLINE std::string get_comment() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; private: - string _comment; + std::string _comment; public: diff --git a/panda/src/egg/eggCompositePrimitive.I b/panda/src/egg/eggCompositePrimitive.I index 9a0d054100..0288f62d97 100644 --- a/panda/src/egg/eggCompositePrimitive.I +++ b/panda/src/egg/eggCompositePrimitive.I @@ -15,7 +15,7 @@ * */ INLINE EggCompositePrimitive:: -EggCompositePrimitive(const string &name) : EggPrimitive(name) { +EggCompositePrimitive(const std::string &name) : EggPrimitive(name) { } /** diff --git a/panda/src/egg/eggCompositePrimitive.h b/panda/src/egg/eggCompositePrimitive.h index 9b5e0fa58d..4cde1084bf 100644 --- a/panda/src/egg/eggCompositePrimitive.h +++ b/panda/src/egg/eggCompositePrimitive.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggCompositePrimitive : public EggPrimitive { PUBLISHED: - INLINE explicit EggCompositePrimitive(const string &name = ""); + INLINE explicit EggCompositePrimitive(const std::string &name = ""); INLINE EggCompositePrimitive(const EggCompositePrimitive ©); INLINE EggCompositePrimitive &operator = (const EggCompositePrimitive ©); virtual ~EggCompositePrimitive(); @@ -56,7 +56,7 @@ protected: virtual bool do_triangulate(EggGroupNode *container) const; - void write_body(ostream &out, int indent_level) const; + void write_body(std::ostream &out, int indent_level) const; private: typedef pvector Components; diff --git a/panda/src/egg/eggCoordinateSystem.h b/panda/src/egg/eggCoordinateSystem.h index bf8469b375..0d4575a708 100644 --- a/panda/src/egg/eggCoordinateSystem.h +++ b/panda/src/egg/eggCoordinateSystem.h @@ -34,7 +34,7 @@ PUBLISHED: INLINE void set_value(CoordinateSystem value); INLINE CoordinateSystem get_value() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; private: CoordinateSystem _value; diff --git a/panda/src/egg/eggCurve.I b/panda/src/egg/eggCurve.I index e8a665fcda..2fe86edf6d 100644 --- a/panda/src/egg/eggCurve.I +++ b/panda/src/egg/eggCurve.I @@ -15,7 +15,7 @@ * */ INLINE EggCurve:: -EggCurve(const string &name) : EggPrimitive(name) { +EggCurve(const std::string &name) : EggPrimitive(name) { _subdiv = 0; _type = CT_none; } diff --git a/panda/src/egg/eggCurve.h b/panda/src/egg/eggCurve.h index 6ea17bc77a..6bbcb64ea5 100644 --- a/panda/src/egg/eggCurve.h +++ b/panda/src/egg/eggCurve.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggCurve : public EggPrimitive { PUBLISHED: - INLINE explicit EggCurve(const string &name = ""); + INLINE explicit EggCurve(const std::string &name = ""); INLINE EggCurve(const EggCurve ©); INLINE EggCurve &operator = (const EggCurve ©); @@ -40,7 +40,7 @@ PUBLISHED: INLINE void set_curve_type(CurveType type); INLINE CurveType get_curve_type() const; - static CurveType string_curve_type(const string &string); + static CurveType string_curve_type(const std::string &string); private: int _subdiv; @@ -65,7 +65,7 @@ private: static TypeHandle _type_handle; }; -ostream &operator << (ostream &out, EggCurve::CurveType t); +std::ostream &operator << (std::ostream &out, EggCurve::CurveType t); #include "eggCurve.I" diff --git a/panda/src/egg/eggData.h b/panda/src/egg/eggData.h index 5544f28d60..4b49ba5f90 100644 --- a/panda/src/egg/eggData.h +++ b/panda/src/egg/eggData.h @@ -43,8 +43,8 @@ PUBLISHED: static bool resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath = DSearchPath()); - bool read(Filename filename, string display_name = string()); - bool read(istream &in); + bool read(Filename filename, std::string display_name = std::string()); + bool read(std::istream &in); void merge(EggData &other); bool load_externals(const DSearchPath &searchpath = DSearchPath()); @@ -53,7 +53,7 @@ PUBLISHED: int collapse_equivalent_materials(); bool write_egg(Filename filename); - bool write_egg(ostream &out); + bool write_egg(std::ostream &out); INLINE void set_auto_resolve_externals(bool resolve); INLINE bool get_auto_resolve_externals() const; @@ -73,7 +73,7 @@ PUBLISHED: INLINE void strip_normals(); protected: - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: void post_read(); diff --git a/panda/src/egg/eggExternalReference.h b/panda/src/egg/eggExternalReference.h index 799c794bd1..ff4f332740 100644 --- a/panda/src/egg/eggExternalReference.h +++ b/panda/src/egg/eggExternalReference.h @@ -24,13 +24,13 @@ */ class EXPCL_PANDAEGG EggExternalReference : public EggFilenameNode { PUBLISHED: - explicit EggExternalReference(const string &node_name, const string &filename); + explicit EggExternalReference(const std::string &node_name, const std::string &filename); EggExternalReference(const EggExternalReference ©); EggExternalReference &operator = (const EggExternalReference ©); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; - virtual string get_default_extension() const; + virtual std::string get_default_extension() const; public: diff --git a/panda/src/egg/eggFilenameNode.I b/panda/src/egg/eggFilenameNode.I index d2aecbb943..c368becdaa 100644 --- a/panda/src/egg/eggFilenameNode.I +++ b/panda/src/egg/eggFilenameNode.I @@ -22,7 +22,7 @@ EggFilenameNode() { * */ INLINE EggFilenameNode:: -EggFilenameNode(const string &node_name, const Filename &filename) : +EggFilenameNode(const std::string &node_name, const Filename &filename) : EggNode(node_name), _filename(filename), _fullpath(filename) diff --git a/panda/src/egg/eggFilenameNode.h b/panda/src/egg/eggFilenameNode.h index 46734f6a24..3eda6ace36 100644 --- a/panda/src/egg/eggFilenameNode.h +++ b/panda/src/egg/eggFilenameNode.h @@ -27,11 +27,11 @@ class EXPCL_PANDAEGG EggFilenameNode : public EggNode { PUBLISHED: INLINE EggFilenameNode(); - INLINE explicit EggFilenameNode(const string &node_name, const Filename &filename); + INLINE explicit EggFilenameNode(const std::string &node_name, const Filename &filename); INLINE EggFilenameNode(const EggFilenameNode ©); INLINE EggFilenameNode &operator = (const EggFilenameNode ©); - virtual string get_default_extension() const; + virtual std::string get_default_extension() const; INLINE const Filename &get_filename() const; INLINE void set_filename(const Filename &filename); diff --git a/panda/src/egg/eggGroup.I b/panda/src/egg/eggGroup.I index 4575966733..7809867047 100644 --- a/panda/src/egg/eggGroup.I +++ b/panda/src/egg/eggGroup.I @@ -127,7 +127,7 @@ get_cs_type() const { * */ INLINE void EggGroup:: -set_collision_name(const string &collision_name) { +set_collision_name(const std::string &collision_name) { _collision_name = collision_name; } @@ -150,7 +150,7 @@ has_collision_name() const { /** * */ -INLINE const string &EggGroup:: +INLINE const std::string &EggGroup:: get_collision_name() const { return _collision_name; } @@ -259,7 +259,7 @@ get_switch_fps() const { * */ INLINE void EggGroup:: -add_object_type(const string &object_type) { +add_object_type(const std::string &object_type) { _object_types.push_back(object_type); } @@ -282,9 +282,9 @@ get_num_object_types() const { /** * */ -INLINE string EggGroup:: +INLINE std::string EggGroup:: get_object_type(int index) const { - nassertr(index >= 0 && index < (int)_object_types.size(), string()); + nassertr(index >= 0 && index < (int)_object_types.size(), std::string()); return _object_types[index]; } @@ -717,7 +717,7 @@ get_lod() const { * of any one key's value. */ INLINE void EggGroup:: -set_tag(const string &key, const string &value) { +set_tag(const std::string &key, const std::string &value) { _tag_data[key] = value; } @@ -726,14 +726,14 @@ set_tag(const string &key, const string &value) { * the particular key, if any. If no value has been previously set, returns * the empty string. */ -INLINE string EggGroup:: -get_tag(const string &key) const { +INLINE std::string EggGroup:: +get_tag(const std::string &key) const { TagData::const_iterator ti; ti = _tag_data.find(key); if (ti != _tag_data.end()) { return (*ti).second; } - return string(); + return std::string(); } /** @@ -742,7 +742,7 @@ get_tag(const string &key) const { * set. */ INLINE bool EggGroup:: -has_tag(const string &key) const { +has_tag(const std::string &key) const { TagData::const_iterator ti; ti = _tag_data.find(key); return (ti != _tag_data.end()); @@ -753,7 +753,7 @@ has_tag(const string &key) const { * call to clear_tag(), has_tag() will return false for the indicated key. */ INLINE void EggGroup:: -clear_tag(const string &key) { +clear_tag(const std::string &key) { _tag_data.erase(key); } diff --git a/panda/src/egg/eggGroup.h b/panda/src/egg/eggGroup.h index 1266e42a49..bc4d095150 100644 --- a/panda/src/egg/eggGroup.h +++ b/panda/src/egg/eggGroup.h @@ -34,7 +34,7 @@ class EXPCL_PANDAEGG EggGroup : public EggGroupNode, public EggRenderMode, public EggTransform { PUBLISHED: typedef pmap VertexRef; - typedef pmap TagData; + typedef pmap TagData; // These bits are all stored somewhere in _flags. enum GroupType { @@ -132,20 +132,20 @@ PUBLISHED: BO_one_minus_alpha_scale, }; - explicit EggGroup(const string &name = ""); + explicit EggGroup(const std::string &name = ""); EggGroup(const EggGroup ©); EggGroup &operator = (const EggGroup ©); ~EggGroup(); - virtual void write(ostream &out, int indent_level) const; - void write_billboard_flags(ostream &out, int indent_level) const; - void write_collide_flags(ostream &out, int indent_level) const; - void write_model_flags(ostream &out, int indent_level) const; - void write_switch_flags(ostream &out, int indent_level) const; - void write_object_types(ostream &out, int indent_level) const; - void write_decal_flags(ostream &out, int indent_level) const; - void write_tags(ostream &out, int indent_level) const; - void write_render_mode(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; + void write_billboard_flags(std::ostream &out, int indent_level) const; + void write_collide_flags(std::ostream &out, int indent_level) const; + void write_model_flags(std::ostream &out, int indent_level) const; + void write_switch_flags(std::ostream &out, int indent_level) const; + void write_object_types(std::ostream &out, int indent_level) const; + void write_decal_flags(std::ostream &out, int indent_level) const; + void write_tags(std::ostream &out, int indent_level) const; + void write_render_mode(std::ostream &out, int indent_level) const; virtual bool is_joint() const; @@ -177,10 +177,10 @@ PUBLISHED: INLINE void set_collide_flags(int flags); INLINE CollideFlags get_collide_flags() const; - INLINE void set_collision_name(const string &collision_name); + INLINE void set_collision_name(const std::string &collision_name); INLINE void clear_collision_name(); INLINE bool has_collision_name() const; - INLINE const string &get_collision_name() const; + INLINE const std::string &get_collision_name() const; INLINE void set_dcs_type(DCSType type); INLINE DCSType get_dcs_type() const; @@ -195,13 +195,13 @@ PUBLISHED: INLINE void set_switch_fps(double fps); INLINE double get_switch_fps() const; - INLINE void add_object_type(const string &object_type); + INLINE void add_object_type(const std::string &object_type); INLINE void clear_object_types(); INLINE int get_num_object_types() const; - INLINE string get_object_type(int index) const; + INLINE std::string get_object_type(int index) const; MAKE_SEQ(get_object_types, get_num_object_types, get_object_type); - bool has_object_type(const string &object_type) const; - bool remove_object_type(const string &object_type); + bool has_object_type(const std::string &object_type) const; + bool remove_object_type(const std::string &object_type); INLINE void set_model_flag(bool flag); INLINE bool get_model_flag() const; @@ -263,10 +263,10 @@ PUBLISHED: INLINE bool has_lod() const; INLINE const EggSwitchCondition &get_lod() const; - INLINE void set_tag(const string &key, const string &value); - INLINE string get_tag(const string &key) const; - INLINE bool has_tag(const string &key) const; - INLINE void clear_tag(const string &key); + INLINE void set_tag(const std::string &key, const std::string &value); + INLINE std::string get_tag(const std::string &key) const; + INLINE bool has_tag(const std::string &key) const; + INLINE void clear_tag(const std::string &key); INLINE const EggTransform &get_default_pose() const; INLINE EggTransform &modify_default_pose(); @@ -355,20 +355,20 @@ PUBLISHED: void remove_group_ref(int n); void clear_group_refs(); - static GroupType string_group_type(const string &strval); - static DartType string_dart_type(const string &strval); - static DCSType string_dcs_type(const string &strval); - static BillboardType string_billboard_type(const string &strval); - static CollisionSolidType string_cs_type(const string &strval); - static CollideFlags string_collide_flags(const string &strval); - static BlendMode string_blend_mode(const string &strval); - static BlendOperand string_blend_operand(const string &strval); + static GroupType string_group_type(const std::string &strval); + static DartType string_dart_type(const std::string &strval); + static DCSType string_dcs_type(const std::string &strval); + static BillboardType string_billboard_type(const std::string &strval); + static CollisionSolidType string_cs_type(const std::string &strval); + static CollideFlags string_collide_flags(const std::string &strval); + static BlendMode string_blend_mode(const std::string &strval); + static BlendOperand string_blend_operand(const std::string &strval); public: virtual EggTransform *as_transform(); protected: - void write_vertex_ref(ostream &out, int indent_level) const; + void write_vertex_ref(std::ostream &out, int indent_level) const; virtual bool egg_start_parse_body(); virtual void adjust_under(); virtual void r_transform(const LMatrix4d &mat, const LMatrix4d &inv, @@ -417,7 +417,7 @@ private: LColor _blend_color; LPoint3d _billboard_center; vector_string _object_types; - string _collision_name; + std::string _collision_name; double _fps; PT(EggSwitchCondition) _lod; TagData _tag_data; @@ -459,14 +459,14 @@ private: static TypeHandle _type_handle; }; -ostream &operator << (ostream &out, EggGroup::GroupType t); -ostream &operator << (ostream &out, EggGroup::DartType t); -ostream &operator << (ostream &out, EggGroup::DCSType t); -ostream &operator << (ostream &out, EggGroup::BillboardType t); -ostream &operator << (ostream &out, EggGroup::CollisionSolidType t); -ostream &operator << (ostream &out, EggGroup::CollideFlags t); -ostream &operator << (ostream &out, EggGroup::BlendMode t); -ostream &operator << (ostream &out, EggGroup::BlendOperand t); +std::ostream &operator << (std::ostream &out, EggGroup::GroupType t); +std::ostream &operator << (std::ostream &out, EggGroup::DartType t); +std::ostream &operator << (std::ostream &out, EggGroup::DCSType t); +std::ostream &operator << (std::ostream &out, EggGroup::BillboardType t); +std::ostream &operator << (std::ostream &out, EggGroup::CollisionSolidType t); +std::ostream &operator << (std::ostream &out, EggGroup::CollideFlags t); +std::ostream &operator << (std::ostream &out, EggGroup::BlendMode t); +std::ostream &operator << (std::ostream &out, EggGroup::BlendOperand t); #include "eggGroup.I" diff --git a/panda/src/egg/eggGroupNode.h b/panda/src/egg/eggGroupNode.h index 85956cd32b..b8e361e97e 100644 --- a/panda/src/egg/eggGroupNode.h +++ b/panda/src/egg/eggGroupNode.h @@ -58,12 +58,12 @@ private: // Here begins the actual public interface to EggGroupNode. PUBLISHED: - explicit EggGroupNode(const string &name = "") : EggNode(name) { } + explicit EggGroupNode(const std::string &name = "") : EggNode(name) { } EggGroupNode(const EggGroupNode ©); EggGroupNode &operator = (const EggGroupNode ©); virtual ~EggGroupNode(); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; // The EggGroupNode itself appears to be an STL container of pointers to // EggNodes. The set of children is read-only, however, except through the @@ -114,7 +114,7 @@ PUBLISHED: PT(EggNode) remove_child(EggNode *node); void steal_children(EggGroupNode &other); - EggNode *find_child(const string &name) const; + EggNode *find_child(const std::string &name) const; bool has_absolute_pathnames() const; void resolve_filenames(const DSearchPath &searchpath); @@ -219,7 +219,7 @@ private: INLINE bool operator < (const TBNVertexValue &other) const; LVertexd _pos; LNormald _normal; - string _uv_name; + std::string _uv_name; LTexCoordd _uv; bool _facing; }; diff --git a/panda/src/egg/eggGroupUniquifier.h b/panda/src/egg/eggGroupUniquifier.h index af9e3b8f77..cacabcb06e 100644 --- a/panda/src/egg/eggGroupUniquifier.h +++ b/panda/src/egg/eggGroupUniquifier.h @@ -27,10 +27,10 @@ class EXPCL_PANDAEGG EggGroupUniquifier : public EggNameUniquifier { PUBLISHED: explicit EggGroupUniquifier(bool filter_names = true); - virtual string get_category(EggNode *node); - virtual string filter_name(EggNode *node); - virtual string generate_name(EggNode *node, - const string &category, int index); + virtual std::string get_category(EggNode *node); + virtual std::string filter_name(EggNode *node); + virtual std::string generate_name(EggNode *node, + const std::string &category, int index); private: bool _filter_names; diff --git a/panda/src/egg/eggLine.I b/panda/src/egg/eggLine.I index 39e894e798..6892c34db0 100644 --- a/panda/src/egg/eggLine.I +++ b/panda/src/egg/eggLine.I @@ -15,7 +15,7 @@ * */ INLINE EggLine:: -EggLine(const string &name) : +EggLine(const std::string &name) : EggCompositePrimitive(name), _has_thick(false) { diff --git a/panda/src/egg/eggLine.h b/panda/src/egg/eggLine.h index 4e5eef098c..09ce5a22c8 100644 --- a/panda/src/egg/eggLine.h +++ b/panda/src/egg/eggLine.h @@ -24,14 +24,14 @@ */ class EXPCL_PANDAEGG EggLine : public EggCompositePrimitive { PUBLISHED: - INLINE explicit EggLine(const string &name = ""); + INLINE explicit EggLine(const std::string &name = ""); INLINE EggLine(const EggLine ©); INLINE EggLine &operator = (const EggLine ©); virtual ~EggLine(); virtual EggLine *make_copy() const override; - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; INLINE bool has_thick() const; INLINE double get_thick() const; diff --git a/panda/src/egg/eggMaterial.h b/panda/src/egg/eggMaterial.h index c1008ae95c..19dc055185 100644 --- a/panda/src/egg/eggMaterial.h +++ b/panda/src/egg/eggMaterial.h @@ -25,10 +25,10 @@ */ class EXPCL_PANDAEGG EggMaterial : public EggNode { PUBLISHED: - explicit EggMaterial(const string &mref_name); + explicit EggMaterial(const std::string &mref_name); EggMaterial(const EggMaterial ©); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; enum Equivalence { E_attributes = 0x001, diff --git a/panda/src/egg/eggMaterialCollection.h b/panda/src/egg/eggMaterialCollection.h index 1041f2f668..bc712704a8 100644 --- a/panda/src/egg/eggMaterialCollection.h +++ b/panda/src/egg/eggMaterialCollection.h @@ -90,7 +90,7 @@ PUBLISHED: EggMaterial *create_unique_material(const EggMaterial ©, int eq); // Find a material with a particular MRef name. - EggMaterial *find_mref(const string &mref_name) const; + EggMaterial *find_mref(const std::string &mref_name) const; private: Materials _materials; diff --git a/panda/src/egg/eggMesher.h b/panda/src/egg/eggMesher.h index 740b0d38cc..5d1a3e0070 100644 --- a/panda/src/egg/eggMesher.h +++ b/panda/src/egg/eggMesher.h @@ -36,7 +36,7 @@ public: void mesh(EggGroupNode *group, bool flat_shaded); - void write(ostream &out) const; + void write(std::ostream &out) const; bool _consider_fans; bool _retesselate_coplanar; diff --git a/panda/src/egg/eggMesherEdge.I b/panda/src/egg/eggMesherEdge.I index abad388cc0..dbd37f0b70 100644 --- a/panda/src/egg/eggMesherEdge.I +++ b/panda/src/egg/eggMesherEdge.I @@ -58,7 +58,7 @@ matches(const EggMesherEdge &other) const { */ INLINE EggMesherEdge *EggMesherEdge:: common_ptr() { - return min(this, _opposite); + return std::min(this, _opposite); } /** diff --git a/panda/src/egg/eggMesherEdge.h b/panda/src/egg/eggMesherEdge.h index 82975bd7fb..5ef30c1c69 100644 --- a/panda/src/egg/eggMesherEdge.h +++ b/panda/src/egg/eggMesherEdge.h @@ -47,7 +47,7 @@ public: INLINE double compute_length(const EggVertexPool *vertex_pool) const; INLINE LVecBase3d compute_box(const EggVertexPool *vertex_pool) const; - void output(ostream &out) const; + void output(std::ostream &out) const; int _vi_a, _vi_b; @@ -56,8 +56,8 @@ public: EggMesherEdge *_opposite; }; -INLINE ostream & -operator << (ostream &out, const EggMesherEdge &edge) { +INLINE std::ostream & +operator << (std::ostream &out, const EggMesherEdge &edge) { edge.output(out); return out; } diff --git a/panda/src/egg/eggMesherFanMaker.I b/panda/src/egg/eggMesherFanMaker.I index 3bca4a4560..357708c27f 100644 --- a/panda/src/egg/eggMesherFanMaker.I +++ b/panda/src/egg/eggMesherFanMaker.I @@ -66,8 +66,8 @@ is_coplanar_with(const EggMesherFanMaker &other) const { egg_coplanar_threshold); } -INLINE ostream & -operator << (ostream &out, const EggMesherFanMaker &fm) { +INLINE std::ostream & +operator << (std::ostream &out, const EggMesherFanMaker &fm) { fm.output(out); return out; } diff --git a/panda/src/egg/eggMesherFanMaker.h b/panda/src/egg/eggMesherFanMaker.h index fcfc65b879..f320b2858b 100644 --- a/panda/src/egg/eggMesherFanMaker.h +++ b/panda/src/egg/eggMesherFanMaker.h @@ -57,7 +57,7 @@ public: Edges::iterator edge_begin, Edges::iterator edge_end, EggGroupNode *unrolled_tris); - void output(ostream &out) const; + void output(std::ostream &out) const; int _vertex; Edges _edges; @@ -66,7 +66,7 @@ public: EggMesher *_mesher; }; -INLINE ostream &operator << (ostream &out, const EggMesherFanMaker &fm); +INLINE std::ostream &operator << (std::ostream &out, const EggMesherFanMaker &fm); #include "eggMesherFanMaker.I" diff --git a/panda/src/egg/eggMesherStrip.h b/panda/src/egg/eggMesherStrip.h index d8a40e3558..6064388ce0 100644 --- a/panda/src/egg/eggMesherStrip.h +++ b/panda/src/egg/eggMesherStrip.h @@ -76,7 +76,7 @@ public: EggMesherStrip &back, const EggVertexPool *vertex_pool); int count_neighbors() const; - void output_neighbors(ostream &out) const; + void output_neighbors(std::ostream &out) const; INLINE bool is_coplanar_with(const EggMesherStrip &other, PN_stdfloat threshold) const; INLINE PN_stdfloat coplanarity(const EggMesherStrip &other) const; @@ -115,7 +115,7 @@ public: bool pick_sheet_mate(const EggMesherStrip &a_strip, const EggMesherStrip &b_strip) const; - void output(ostream &out) const; + void output(std::ostream &out) const; typedef plist Prims; typedef plist Edges; @@ -144,8 +144,8 @@ public: bool _flat_shaded; }; -INLINE ostream & -operator << (ostream &out, const EggMesherStrip &strip) { +INLINE std::ostream & +operator << (std::ostream &out, const EggMesherStrip &strip) { strip.output(out); return out; } diff --git a/panda/src/egg/eggMiscFuncs.h b/panda/src/egg/eggMiscFuncs.h index c157e7c9c9..6d51d6abc0 100644 --- a/panda/src/egg/eggMiscFuncs.h +++ b/panda/src/egg/eggMiscFuncs.h @@ -27,8 +27,8 @@ * any characters special to egg, writes quotation marks around it. If * always_quote is true, writes quotation marks regardless. */ -ostream & -enquote_string(ostream &out, const string &str, +std::ostream & +enquote_string(std::ostream &out, const std::string &str, int indent_level = 0, bool always_quote = false); @@ -38,13 +38,13 @@ enquote_string(ostream &out, const string &str, * A helper function to write out a 3x3 transform matrix. */ void -write_transform(ostream &out, const LMatrix3d &mat, int indent_level); +write_transform(std::ostream &out, const LMatrix3d &mat, int indent_level); /** * A helper function to write out a 4x4 transform matrix. */ void -write_transform(ostream &out, const LMatrix4d &mat, int indent_level); +write_transform(std::ostream &out, const LMatrix4d &mat, int indent_level); #include "eggMiscFuncs.I" diff --git a/panda/src/egg/eggMorph.I b/panda/src/egg/eggMorph.I index 6b39b2a13e..c49f36306f 100644 --- a/panda/src/egg/eggMorph.I +++ b/panda/src/egg/eggMorph.I @@ -16,7 +16,7 @@ */ template INLINE EggMorph:: -EggMorph(const string &name, const Parameter &offset) +EggMorph(const std::string &name, const Parameter &offset) : Namable(name), _offset(offset) { } @@ -89,7 +89,7 @@ compare_to(const EggMorph &other, double threshold) const { */ template INLINE void EggMorph:: -output(ostream &out, const string &tag, int num_dimensions) const { +output(std::ostream &out, const std::string &tag, int num_dimensions) const { out << tag << " " << get_name() << " {"; for (int i = 0; i < num_dimensions; ++i) { out << " " << MAYBE_ZERO(_offset[i]); diff --git a/panda/src/egg/eggMorph.h b/panda/src/egg/eggMorph.h index f58a5f56b8..482b612a6e 100644 --- a/panda/src/egg/eggMorph.h +++ b/panda/src/egg/eggMorph.h @@ -29,7 +29,7 @@ template class EggMorph : public Namable { public: - INLINE EggMorph(const string &name, const Parameter &offset); + INLINE EggMorph(const std::string &name, const Parameter &offset); INLINE void set_offset(const Parameter &offset); INLINE const Parameter &get_offset() const; @@ -39,7 +39,7 @@ public: INLINE int compare_to(const EggMorph &other, double threshold) const; - INLINE void output(ostream &out, const string &tag, + INLINE void output(std::ostream &out, const std::string &tag, int num_dimensions) const; private: diff --git a/panda/src/egg/eggMorphList.I b/panda/src/egg/eggMorphList.I index deded17c7e..0a2f337550 100644 --- a/panda/src/egg/eggMorphList.I +++ b/panda/src/egg/eggMorphList.I @@ -155,9 +155,9 @@ empty() const { * to *be* a set, but we cannot export STL sets from a Windows DLL. */ template -pair::iterator, bool> EggMorphList:: +std::pair::iterator, bool> EggMorphList:: insert(const MorphType &value) { - pair result; + std::pair result; typename Morphs::iterator mi; for (mi = _morphs.begin(); mi != _morphs.end(); ++mi) { if ((*mi) == value) { @@ -189,7 +189,7 @@ clear() { */ template void EggMorphList:: -write(ostream &out, int indent_level, const string &tag, +write(std::ostream &out, int indent_level, const std::string &tag, int num_dimensions) const { const_iterator i; diff --git a/panda/src/egg/eggMorphList.h b/panda/src/egg/eggMorphList.h index 581e53d9e9..0c890e54f2 100644 --- a/panda/src/egg/eggMorphList.h +++ b/panda/src/egg/eggMorphList.h @@ -53,11 +53,11 @@ public: INLINE size_type size() const; INLINE bool empty() const; - pair insert(const MorphType &value); + std::pair insert(const MorphType &value); INLINE void clear(); - void write(ostream &out, int indent_level, - const string &tag, int num_dimensions) const; + void write(std::ostream &out, int indent_level, + const std::string &tag, int num_dimensions) const; private: Morphs _morphs; diff --git a/panda/src/egg/eggNameUniquifier.h b/panda/src/egg/eggNameUniquifier.h index 72a05698f6..ff0c17c00f 100644 --- a/panda/src/egg/eggNameUniquifier.h +++ b/panda/src/egg/eggNameUniquifier.h @@ -65,19 +65,19 @@ PUBLISHED: void uniquify(EggNode *node); - EggNode *get_node(const string &category, const string &name) const; - bool has_name(const string &category, const string &name) const; - bool add_name(const string &category, const string &name, + EggNode *get_node(const std::string &category, const std::string &name) const; + bool has_name(const std::string &category, const std::string &name) const; + bool add_name(const std::string &category, const std::string &name, EggNode *node = nullptr); - virtual string get_category(EggNode *node)=0; - virtual string filter_name(EggNode *node); - virtual string generate_name(EggNode *node, - const string &category, int index); + virtual std::string get_category(EggNode *node)=0; + virtual std::string filter_name(EggNode *node); + virtual std::string generate_name(EggNode *node, + const std::string &category, int index); private: - typedef pmap UsedNames; - typedef pmap Categories; + typedef pmap UsedNames; + typedef pmap Categories; Categories _categories; int _index; diff --git a/panda/src/egg/eggNamedObject.I b/panda/src/egg/eggNamedObject.I index 6227e51696..77bb78194f 100644 --- a/panda/src/egg/eggNamedObject.I +++ b/panda/src/egg/eggNamedObject.I @@ -15,7 +15,7 @@ * */ INLINE EggNamedObject:: -EggNamedObject(const string &name) : Namable(name) { +EggNamedObject(const std::string &name) : Namable(name) { } @@ -37,7 +37,7 @@ operator = (const EggNamedObject ©) { return *this; } -INLINE ostream &operator << (ostream &out, const EggNamedObject &n) { +INLINE std::ostream &operator << (std::ostream &out, const EggNamedObject &n) { n.output(out); return out; } diff --git a/panda/src/egg/eggNamedObject.h b/panda/src/egg/eggNamedObject.h index 140c989237..0b3588d87b 100644 --- a/panda/src/egg/eggNamedObject.h +++ b/panda/src/egg/eggNamedObject.h @@ -25,14 +25,14 @@ */ class EXPCL_PANDAEGG EggNamedObject : public EggObject, public Namable { PUBLISHED: - INLINE explicit EggNamedObject(const string &name = ""); + INLINE explicit EggNamedObject(const std::string &name = ""); INLINE EggNamedObject(const EggNamedObject ©); INLINE EggNamedObject &operator = (const EggNamedObject ©); - void output(ostream &out) const; + void output(std::ostream &out) const; public: - void write_header(ostream &out, int indent_level, + void write_header(std::ostream &out, int indent_level, const char *egg_keyword) const; @@ -55,7 +55,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const EggNamedObject &n); +INLINE std::ostream &operator << (std::ostream &out, const EggNamedObject &n); #include "eggNamedObject.I" diff --git a/panda/src/egg/eggNode.I b/panda/src/egg/eggNode.I index 596d61b826..4022139ea5 100644 --- a/panda/src/egg/eggNode.I +++ b/panda/src/egg/eggNode.I @@ -15,7 +15,7 @@ * */ INLINE EggNode:: -EggNode(const string &name) : EggNamedObject(name) { +EggNode(const std::string &name) : EggNamedObject(name) { _parent = nullptr; _depth = 0; _under_flags = 0; diff --git a/panda/src/egg/eggNode.h b/panda/src/egg/eggNode.h index f4a5df934f..05191dabc5 100644 --- a/panda/src/egg/eggNode.h +++ b/panda/src/egg/eggNode.h @@ -34,7 +34,7 @@ class EggTextureCollection; */ class EXPCL_PANDAEGG EggNode : public EggNamedObject { PUBLISHED: - INLINE explicit EggNode(const string &name = ""); + INLINE explicit EggNode(const std::string &name = ""); INLINE EggNode(const EggNode ©); INLINE EggNode &operator = (const EggNode ©); @@ -78,8 +78,8 @@ PUBLISHED: virtual bool determine_indexed(); virtual bool determine_decal(); - virtual void write(ostream &out, int indent_level) const=0; - bool parse_egg(const string &egg_syntax); + virtual void write(std::ostream &out, int indent_level) const=0; + bool parse_egg(const std::string &egg_syntax); #ifdef _DEBUG void test_under_integrity() const; diff --git a/panda/src/egg/eggNurbsCurve.I b/panda/src/egg/eggNurbsCurve.I index f426541d55..60f16cc9ca 100644 --- a/panda/src/egg/eggNurbsCurve.I +++ b/panda/src/egg/eggNurbsCurve.I @@ -15,7 +15,7 @@ * */ INLINE EggNurbsCurve:: -EggNurbsCurve(const string &name) : EggCurve(name) { +EggNurbsCurve(const std::string &name) : EggCurve(name) { _order = 0; } diff --git a/panda/src/egg/eggNurbsCurve.h b/panda/src/egg/eggNurbsCurve.h index b6b5bc4b55..dd62f6c5ab 100644 --- a/panda/src/egg/eggNurbsCurve.h +++ b/panda/src/egg/eggNurbsCurve.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggNurbsCurve : public EggCurve { PUBLISHED: - INLINE explicit EggNurbsCurve(const string &name = ""); + INLINE explicit EggNurbsCurve(const std::string &name = ""); INLINE EggNurbsCurve(const EggNurbsCurve ©); INLINE EggNurbsCurve &operator = (const EggNurbsCurve ©); @@ -50,7 +50,7 @@ PUBLISHED: INLINE double get_knot(int k) const; MAKE_SEQ(get_knots, get_num_knots, get_knot); - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; MAKE_PROPERTY(order, get_order, set_order); MAKE_PROPERTY(degree, get_degree); diff --git a/panda/src/egg/eggNurbsSurface.I b/panda/src/egg/eggNurbsSurface.I index 1a23a6074a..cced43e69d 100644 --- a/panda/src/egg/eggNurbsSurface.I +++ b/panda/src/egg/eggNurbsSurface.I @@ -15,7 +15,7 @@ * */ INLINE EggNurbsSurface:: -EggNurbsSurface(const string &name) : EggSurface(name) { +EggNurbsSurface(const std::string &name) : EggSurface(name) { _u_order = 0; _v_order = 0; } diff --git a/panda/src/egg/eggNurbsSurface.h b/panda/src/egg/eggNurbsSurface.h index ffadc3cab7..46d9c86357 100644 --- a/panda/src/egg/eggNurbsSurface.h +++ b/panda/src/egg/eggNurbsSurface.h @@ -32,7 +32,7 @@ PUBLISHED: typedef Loops Trim; typedef plist Trims; - INLINE explicit EggNurbsSurface(const string &name = ""); + INLINE explicit EggNurbsSurface(const std::string &name = ""); INLINE EggNurbsSurface(const EggNurbsSurface ©); INLINE EggNurbsSurface &operator = (const EggNurbsSurface ©); @@ -75,7 +75,7 @@ PUBLISHED: MAKE_SEQ(get_v_knots, get_num_v_knots, get_v_knot); INLINE EggVertex *get_cv(int ui, int vi) const; - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; public: Curves _curves_on_surface; diff --git a/panda/src/egg/eggPatch.I b/panda/src/egg/eggPatch.I index b75db18d2d..7356ec98ef 100644 --- a/panda/src/egg/eggPatch.I +++ b/panda/src/egg/eggPatch.I @@ -15,7 +15,7 @@ * */ INLINE EggPatch:: -EggPatch(const string &name) : EggPrimitive(name) { +EggPatch(const std::string &name) : EggPrimitive(name) { } /** diff --git a/panda/src/egg/eggPatch.h b/panda/src/egg/eggPatch.h index 9e93d0ec80..67c94c100a 100644 --- a/panda/src/egg/eggPatch.h +++ b/panda/src/egg/eggPatch.h @@ -24,13 +24,13 @@ */ class EXPCL_PANDAEGG EggPatch : public EggPrimitive { PUBLISHED: - INLINE explicit EggPatch(const string &name = ""); + INLINE explicit EggPatch(const std::string &name = ""); INLINE EggPatch(const EggPatch ©); INLINE EggPatch &operator = (const EggPatch ©); virtual EggPatch *make_copy() const override; - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; public: static TypeHandle get_class_type() { diff --git a/panda/src/egg/eggPoint.I b/panda/src/egg/eggPoint.I index 6fa3e252ef..722e6b7cc5 100644 --- a/panda/src/egg/eggPoint.I +++ b/panda/src/egg/eggPoint.I @@ -15,7 +15,7 @@ * */ INLINE EggPoint:: -EggPoint(const string &name) : +EggPoint(const std::string &name) : EggPrimitive(name), _flags(0), _thick(1.0) diff --git a/panda/src/egg/eggPoint.h b/panda/src/egg/eggPoint.h index 96e8b63fe6..fc1ed8d24c 100644 --- a/panda/src/egg/eggPoint.h +++ b/panda/src/egg/eggPoint.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggPoint : public EggPrimitive { PUBLISHED: - INLINE explicit EggPoint(const string &name = ""); + INLINE explicit EggPoint(const std::string &name = ""); INLINE EggPoint(const EggPoint ©); INLINE EggPoint &operator = (const EggPoint ©); @@ -42,7 +42,7 @@ PUBLISHED: virtual bool cleanup() override; - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; private: enum Flags { diff --git a/panda/src/egg/eggPolygon.I b/panda/src/egg/eggPolygon.I index 69b6d4b7fe..08811e3f7f 100644 --- a/panda/src/egg/eggPolygon.I +++ b/panda/src/egg/eggPolygon.I @@ -15,7 +15,7 @@ * */ INLINE EggPolygon:: -EggPolygon(const string &name) : EggPrimitive(name) { +EggPolygon(const std::string &name) : EggPrimitive(name) { } /** diff --git a/panda/src/egg/eggPolygon.h b/panda/src/egg/eggPolygon.h index e5be0e25f0..3629537814 100644 --- a/panda/src/egg/eggPolygon.h +++ b/panda/src/egg/eggPolygon.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggPolygon : public EggPrimitive { PUBLISHED: - INLINE explicit EggPolygon(const string &name = ""); + INLINE explicit EggPolygon(const std::string &name = ""); INLINE EggPolygon(const EggPolygon ©); INLINE EggPolygon &operator = (const EggPolygon ©); @@ -39,7 +39,7 @@ PUBLISHED: INLINE bool triangulate_into(EggGroupNode *container, bool convex_also) const; PT(EggPolygon) triangulate_in_place(bool convex_also); - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; private: bool decomp_concave(EggGroupNode *container, int asum, int x, int y) const; diff --git a/panda/src/egg/eggPoolUniquifier.h b/panda/src/egg/eggPoolUniquifier.h index 0fb7d1b9d5..8fa0c328d0 100644 --- a/panda/src/egg/eggPoolUniquifier.h +++ b/panda/src/egg/eggPoolUniquifier.h @@ -27,7 +27,7 @@ class EXPCL_PANDAEGG EggPoolUniquifier : public EggNameUniquifier { PUBLISHED: EggPoolUniquifier(); - virtual string get_category(EggNode *node); + virtual std::string get_category(EggNode *node); public: static TypeHandle get_class_type() { diff --git a/panda/src/egg/eggPrimitive.I b/panda/src/egg/eggPrimitive.I index c90c983001..13e994acce 100644 --- a/panda/src/egg/eggPrimitive.I +++ b/panda/src/egg/eggPrimitive.I @@ -15,7 +15,7 @@ * */ INLINE EggPrimitive:: -EggPrimitive(const string &name): EggNode(name) { +EggPrimitive(const std::string &name): EggNode(name) { _bface = false; _connected_shading = S_unknown; } @@ -67,13 +67,13 @@ INLINE EggPrimitive:: * Presently, this is defined as the primitive name itself, unless it begins * with a digit. */ -INLINE string EggPrimitive:: +INLINE std::string EggPrimitive:: get_sort_name() const { - const string &name = get_name(); + const std::string &name = get_name(); if (!name.empty() && !isdigit(name[0])) { return name; } - return string(); + return std::string(); } /** diff --git a/panda/src/egg/eggPrimitive.h b/panda/src/egg/eggPrimitive.h index 9ec9d9cf79..d461762382 100644 --- a/panda/src/egg/eggPrimitive.h +++ b/panda/src/egg/eggPrimitive.h @@ -67,7 +67,7 @@ PUBLISHED: S_per_vertex }; - INLINE explicit EggPrimitive(const string &name = ""); + INLINE explicit EggPrimitive(const std::string &name = ""); INLINE EggPrimitive(const EggPrimitive ©); INLINE EggPrimitive &operator = (const EggPrimitive ©); INLINE ~EggPrimitive(); @@ -82,7 +82,7 @@ PUBLISHED: virtual EggRenderMode *determine_draw_order(); virtual EggRenderMode *determine_bin(); - INLINE string get_sort_name() const; + INLINE std::string get_sort_name() const; virtual Shading get_shading() const; INLINE void clear_connected_shading(); @@ -191,7 +191,7 @@ PUBLISHED: MAKE_SEQ_PROPERTY(vertices, get_num_vertices, get_vertex, set_vertex, remove_vertex, insert_vertex); MAKE_PROPERTY(pool, get_pool); - virtual void write(ostream &out, int indent_level) const=0; + virtual void write(std::ostream &out, int indent_level) const=0; #ifdef _DEBUG void test_vref_integrity() const; @@ -209,7 +209,7 @@ protected: virtual void prepare_remove_vertex(EggVertex *vertex, int i, int n); protected: - void write_body(ostream &out, int indent_level) const; + void write_body(std::ostream &out, int indent_level) const; virtual bool egg_start_parse_body(); virtual void r_transform(const LMatrix4d &mat, const LMatrix4d &inv, diff --git a/panda/src/egg/eggRenderMode.I b/panda/src/egg/eggRenderMode.I index 10d40d01fb..ee21aabf34 100644 --- a/panda/src/egg/eggRenderMode.I +++ b/panda/src/egg/eggRenderMode.I @@ -186,7 +186,7 @@ clear_draw_order() { * CullTraverser) in use for this to work. See also set_draw_order(). */ INLINE void EggRenderMode:: -set_bin(const string &bin) { +set_bin(const std::string &bin) { _bin = bin; } @@ -194,7 +194,7 @@ set_bin(const string &bin) { * Returns the bin name that has been set for this particular object, if any. * See set_bin(). */ -INLINE string EggRenderMode:: +INLINE std::string EggRenderMode:: get_bin() const { return _bin; } @@ -214,7 +214,7 @@ has_bin() const { */ INLINE void EggRenderMode:: clear_bin() { - _bin = string(); + _bin = std::string(); } /** diff --git a/panda/src/egg/eggRenderMode.h b/panda/src/egg/eggRenderMode.h index 66d9a6c645..db18e5d47d 100644 --- a/panda/src/egg/eggRenderMode.h +++ b/panda/src/egg/eggRenderMode.h @@ -34,7 +34,7 @@ PUBLISHED: INLINE EggRenderMode(const EggRenderMode ©); EggRenderMode &operator = (const EggRenderMode ©); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; enum AlphaMode { // Specifies implementation of transparency. AM_unspecified, @@ -83,8 +83,8 @@ PUBLISHED: INLINE bool has_draw_order() const; INLINE void clear_draw_order(); - INLINE void set_bin(const string &bin); - INLINE string get_bin() const; + INLINE void set_bin(const std::string &bin); + INLINE std::string get_bin() const; INLINE bool has_bin() const; INLINE void clear_bin(); @@ -93,10 +93,10 @@ PUBLISHED: INLINE bool operator != (const EggRenderMode &other) const; bool operator < (const EggRenderMode &other) const; - static AlphaMode string_alpha_mode(const string &string); - static DepthWriteMode string_depth_write_mode(const string &string); - static DepthTestMode string_depth_test_mode(const string &string); - static VisibilityMode string_visibility_mode(const string &string); + static AlphaMode string_alpha_mode(const std::string &string); + static DepthWriteMode string_depth_write_mode(const std::string &string); + static DepthTestMode string_depth_test_mode(const std::string &string); + static VisibilityMode string_visibility_mode(const std::string &string); private: AlphaMode _alpha_mode; @@ -107,7 +107,7 @@ private: bool _has_depth_offset; int _draw_order; bool _has_draw_order; - string _bin; + std::string _bin; public: @@ -122,12 +122,12 @@ private: static TypeHandle _type_handle; }; -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::AlphaMode mode); -EXPCL_PANDAEGG istream &operator >> (istream &in, EggRenderMode::AlphaMode &mode); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::AlphaMode mode); +EXPCL_PANDAEGG std::istream &operator >> (std::istream &in, EggRenderMode::AlphaMode &mode); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::DepthWriteMode mode); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::DepthTestMode mode); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggRenderMode::VisibilityMode mode); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthWriteMode mode); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::DepthTestMode mode); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggRenderMode::VisibilityMode mode); #include "eggRenderMode.I" diff --git a/panda/src/egg/eggSAnimData.I b/panda/src/egg/eggSAnimData.I index 866fdd753a..e1fe187d54 100644 --- a/panda/src/egg/eggSAnimData.I +++ b/panda/src/egg/eggSAnimData.I @@ -15,7 +15,7 @@ * */ INLINE EggSAnimData:: -EggSAnimData(const string &name) : EggAnimData(name) { +EggSAnimData(const std::string &name) : EggAnimData(name) { } diff --git a/panda/src/egg/eggSAnimData.h b/panda/src/egg/eggSAnimData.h index 2862b94622..681716f6b0 100644 --- a/panda/src/egg/eggSAnimData.h +++ b/panda/src/egg/eggSAnimData.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggSAnimData : public EggAnimData { PUBLISHED: - INLINE explicit EggSAnimData(const string &name = ""); + INLINE explicit EggSAnimData(const std::string &name = ""); INLINE EggSAnimData(const EggSAnimData ©); INLINE EggSAnimData &operator = (const EggSAnimData ©); @@ -34,7 +34,7 @@ PUBLISHED: void optimize(); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; public: diff --git a/panda/src/egg/eggSurface.I b/panda/src/egg/eggSurface.I index f7856d3ec7..e03d790408 100644 --- a/panda/src/egg/eggSurface.I +++ b/panda/src/egg/eggSurface.I @@ -15,7 +15,7 @@ * */ INLINE EggSurface:: -EggSurface(const string &name) : EggPrimitive(name) { +EggSurface(const std::string &name) : EggPrimitive(name) { _u_subdiv = 0; _v_subdiv = 0; } diff --git a/panda/src/egg/eggSurface.h b/panda/src/egg/eggSurface.h index 3085cb1c48..ca6994f7ba 100644 --- a/panda/src/egg/eggSurface.h +++ b/panda/src/egg/eggSurface.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggSurface : public EggPrimitive { PUBLISHED: - INLINE explicit EggSurface(const string &name = ""); + INLINE explicit EggSurface(const std::string &name = ""); INLINE EggSurface(const EggSurface ©); INLINE EggSurface &operator = (const EggSurface ©); diff --git a/panda/src/egg/eggSwitchCondition.h b/panda/src/egg/eggSwitchCondition.h index a1d16db2ca..35d1c16cc3 100644 --- a/panda/src/egg/eggSwitchCondition.h +++ b/panda/src/egg/eggSwitchCondition.h @@ -29,7 +29,7 @@ class EXPCL_PANDAEGG EggSwitchCondition : public EggObject { PUBLISHED: virtual EggSwitchCondition *make_copy() const=0; - virtual void write(ostream &out, int indent_level) const=0; + virtual void write(std::ostream &out, int indent_level) const=0; virtual void transform(const LMatrix4d &mat)=0; @@ -64,7 +64,7 @@ PUBLISHED: const LPoint3d ¢er, double fade = 0.0); virtual EggSwitchCondition *make_copy() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; virtual void transform(const LMatrix4d &mat); diff --git a/panda/src/egg/eggTable.I b/panda/src/egg/eggTable.I index 33fe8b343a..d5822455ff 100644 --- a/panda/src/egg/eggTable.I +++ b/panda/src/egg/eggTable.I @@ -15,7 +15,7 @@ * */ INLINE EggTable:: -EggTable(const string &name) : EggGroupNode(name) { +EggTable(const std::string &name) : EggGroupNode(name) { _type = TT_table; } diff --git a/panda/src/egg/eggTable.h b/panda/src/egg/eggTable.h index e2a55d7a3e..a2f627f555 100644 --- a/panda/src/egg/eggTable.h +++ b/panda/src/egg/eggTable.h @@ -32,7 +32,7 @@ PUBLISHED: TT_bundle, }; - INLINE explicit EggTable(const string &name = ""); + INLINE explicit EggTable(const std::string &name = ""); INLINE EggTable(const EggTable ©); INLINE EggTable &operator = (const EggTable ©); @@ -40,9 +40,9 @@ PUBLISHED: INLINE TableType get_table_type() const; bool has_transform() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; - static TableType string_table_type(const string &string); + static TableType string_table_type(const std::string &string); protected: virtual void r_transform(const LMatrix4d &mat, const LMatrix4d &inv, @@ -71,7 +71,7 @@ private: static TypeHandle _type_handle; }; -ostream &operator << (ostream &out, EggTable::TableType t); +std::ostream &operator << (std::ostream &out, EggTable::TableType t); #include "eggTable.I" diff --git a/panda/src/egg/eggTexture.I b/panda/src/egg/eggTexture.I index 6380934886..7a71261e31 100644 --- a/panda/src/egg/eggTexture.I +++ b/panda/src/egg/eggTexture.I @@ -376,7 +376,7 @@ get_quality_level() const { * Each different TextureStage in the world must be uniquely named. */ INLINE void EggTexture:: -set_stage_name(const string &stage_name) { +set_stage_name(const std::string &stage_name) { _stage_name = stage_name; _flags |= F_has_stage_name; } @@ -386,7 +386,7 @@ set_stage_name(const string &stage_name) { */ INLINE void EggTexture:: clear_stage_name() { - _stage_name = string(); + _stage_name = std::string(); _flags &= ~F_has_stage_name; } @@ -403,7 +403,7 @@ has_stage_name() const { * Returns the stage name that has been specified for this texture, or the * tref name if no texture stage has explicitly been specified. */ -INLINE const string &EggTexture:: +INLINE const std::string &EggTexture:: get_stage_name() const { return has_stage_name() ? _stage_name : get_name(); } @@ -526,7 +526,7 @@ get_border_color() const { * texture coordinates will be used. */ INLINE void EggTexture:: -set_uv_name(const string &uv_name) { +set_uv_name(const std::string &uv_name) { if (uv_name == "default" || uv_name.empty()) { clear_uv_name(); } else { @@ -541,7 +541,7 @@ set_uv_name(const string &uv_name) { */ INLINE void EggTexture:: clear_uv_name() { - _uv_name = string(); + _uv_name = std::string(); _flags &= ~F_has_uv_name; } @@ -558,7 +558,7 @@ has_uv_name() const { * Returns the texcoord name that has been specified for this texture, or the * empty string if no texcoord name has explicitly been specified. */ -INLINE const string &EggTexture:: +INLINE const std::string &EggTexture:: get_uv_name() const { return _uv_name; } diff --git a/panda/src/egg/eggTexture.h b/panda/src/egg/eggTexture.h index 174b7c99db..e20c19b9cc 100644 --- a/panda/src/egg/eggTexture.h +++ b/panda/src/egg/eggTexture.h @@ -29,12 +29,12 @@ */ class EXPCL_PANDAEGG EggTexture : public EggFilenameNode, public EggRenderMode, public EggTransform { PUBLISHED: - explicit EggTexture(const string &tref_name, const Filename &filename); + explicit EggTexture(const std::string &tref_name, const Filename &filename); EggTexture(const EggTexture ©); EggTexture &operator = (const EggTexture ©); virtual ~EggTexture(); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; enum Equivalence { E_basename = 0x001, @@ -219,10 +219,10 @@ PUBLISHED: INLINE void set_quality_level(QualityLevel quality_level); INLINE QualityLevel get_quality_level() const; - INLINE void set_stage_name(const string &stage_name); + INLINE void set_stage_name(const std::string &stage_name); INLINE void clear_stage_name(); INLINE bool has_stage_name() const; - INLINE const string &get_stage_name() const; + INLINE const std::string &get_stage_name() const; INLINE void set_priority(int priority); INLINE void clear_priority(); @@ -239,10 +239,10 @@ PUBLISHED: INLINE bool has_border_color() const; INLINE const LColor &get_border_color() const; - INLINE void set_uv_name(const string &uv_name); + INLINE void set_uv_name(const std::string &uv_name); INLINE void clear_uv_name(); INLINE bool has_uv_name() const; - INLINE const string &get_uv_name() const; + INLINE const std::string &get_uv_name() const; INLINE void set_rgb_scale(int rgb_scale); INLINE void clear_rgb_scale(); @@ -297,17 +297,17 @@ PUBLISHED: bool multitexture_over(EggTexture *other); INLINE int get_multitexture_sort() const; - static TextureType string_texture_type(const string &string); - static Format string_format(const string &string); - static CompressionMode string_compression_mode(const string &string); - static WrapMode string_wrap_mode(const string &string); - static FilterType string_filter_type(const string &string); - static EnvType string_env_type(const string &string); - static CombineMode string_combine_mode(const string &string); - static CombineSource string_combine_source(const string &string); - static CombineOperand string_combine_operand(const string &string); - static TexGen string_tex_gen(const string &string); - static QualityLevel string_quality_level(const string &string); + static TextureType string_texture_type(const std::string &string); + static Format string_format(const std::string &string); + static CompressionMode string_compression_mode(const std::string &string); + static WrapMode string_wrap_mode(const std::string &string); + static FilterType string_filter_type(const std::string &string); + static EnvType string_env_type(const std::string &string); + static CombineMode string_combine_mode(const std::string &string); + static CombineSource string_combine_source(const std::string &string); + static CombineOperand string_combine_operand(const std::string &string); + static TexGen string_tex_gen(const std::string &string); + static QualityLevel string_quality_level(const std::string &string); PUBLISHED: MAKE_PROPERTY(texture_type, get_texture_type, set_texture_type); @@ -396,11 +396,11 @@ private: int _num_views; TexGen _tex_gen; QualityLevel _quality_level; - string _stage_name; + std::string _stage_name; int _priority; LColor _color; LColor _border_color; - string _uv_name; + std::string _uv_name; int _rgb_scale; int _alpha_scale; int _flags; @@ -466,22 +466,22 @@ public: int _eq; }; -INLINE ostream &operator << (ostream &out, const EggTexture &n) { +INLINE std::ostream &operator << (std::ostream &out, const EggTexture &n) { return out << n.get_filename(); } -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::TextureType texture_type); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::Format format); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::CompressionMode mode); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::WrapMode mode); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::FilterType type); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::EnvType type); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::CombineMode cm); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::CombineChannel cc); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::CombineSource cs); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::CombineOperand co); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::TexGen tex_gen); -EXPCL_PANDAEGG ostream &operator << (ostream &out, EggTexture::QualityLevel quality_level); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::TextureType texture_type); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::Format format); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CompressionMode mode); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::WrapMode mode); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::FilterType type); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::EnvType type); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineMode cm); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineChannel cc); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineSource cs); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::CombineOperand co); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::TexGen tex_gen); +EXPCL_PANDAEGG std::ostream &operator << (std::ostream &out, EggTexture::QualityLevel quality_level); #include "eggTexture.I" diff --git a/panda/src/egg/eggTextureCollection.h b/panda/src/egg/eggTextureCollection.h index e5276eef5c..db9f64ae93 100644 --- a/panda/src/egg/eggTextureCollection.h +++ b/panda/src/egg/eggTextureCollection.h @@ -98,7 +98,7 @@ PUBLISHED: EggTexture *create_unique_texture(const EggTexture ©, int eq); // Find a texture with a particular TRef name. - EggTexture *find_tref(const string &tref_name) const; + EggTexture *find_tref(const std::string &tref_name) const; // Find a texture with a particular filename. EggTexture *find_filename(const Filename &filename) const; diff --git a/panda/src/egg/eggTransform.h b/panda/src/egg/eggTransform.h index 857617ff43..9a6b95b434 100644 --- a/panda/src/egg/eggTransform.h +++ b/panda/src/egg/eggTransform.h @@ -82,8 +82,8 @@ PUBLISHED: INLINE const LMatrix3d &get_component_mat3(int n) const; INLINE const LMatrix4d &get_component_mat4(int n) const; - void write(ostream &out, int indent_level, - const string &label) const; + void write(std::ostream &out, int indent_level, + const std::string &label) const; protected: void internal_clear_transform(); diff --git a/panda/src/egg/eggTriangleFan.I b/panda/src/egg/eggTriangleFan.I index 367b956e9e..d2ddbbdeb3 100644 --- a/panda/src/egg/eggTriangleFan.I +++ b/panda/src/egg/eggTriangleFan.I @@ -15,7 +15,7 @@ * */ INLINE EggTriangleFan:: -EggTriangleFan(const string &name) : EggCompositePrimitive(name) { +EggTriangleFan(const std::string &name) : EggCompositePrimitive(name) { } /** diff --git a/panda/src/egg/eggTriangleFan.h b/panda/src/egg/eggTriangleFan.h index 6435650284..d8a1c7807f 100644 --- a/panda/src/egg/eggTriangleFan.h +++ b/panda/src/egg/eggTriangleFan.h @@ -24,14 +24,14 @@ */ class EXPCL_PANDAEGG EggTriangleFan : public EggCompositePrimitive { PUBLISHED: - INLINE explicit EggTriangleFan(const string &name = ""); + INLINE explicit EggTriangleFan(const std::string &name = ""); INLINE EggTriangleFan(const EggTriangleFan ©); INLINE EggTriangleFan &operator = (const EggTriangleFan ©); virtual ~EggTriangleFan(); virtual EggTriangleFan *make_copy() const override; - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; virtual void apply_first_attribute() override; protected: diff --git a/panda/src/egg/eggTriangleStrip.I b/panda/src/egg/eggTriangleStrip.I index 4fcb25b907..5e2e5bd33a 100644 --- a/panda/src/egg/eggTriangleStrip.I +++ b/panda/src/egg/eggTriangleStrip.I @@ -15,7 +15,7 @@ * */ INLINE EggTriangleStrip:: -EggTriangleStrip(const string &name) : EggCompositePrimitive(name) { +EggTriangleStrip(const std::string &name) : EggCompositePrimitive(name) { } /** diff --git a/panda/src/egg/eggTriangleStrip.h b/panda/src/egg/eggTriangleStrip.h index fa371d4185..728b6e2e30 100644 --- a/panda/src/egg/eggTriangleStrip.h +++ b/panda/src/egg/eggTriangleStrip.h @@ -24,14 +24,14 @@ */ class EXPCL_PANDAEGG EggTriangleStrip : public EggCompositePrimitive { PUBLISHED: - INLINE explicit EggTriangleStrip(const string &name = ""); + INLINE explicit EggTriangleStrip(const std::string &name = ""); INLINE EggTriangleStrip(const EggTriangleStrip ©); INLINE EggTriangleStrip &operator = (const EggTriangleStrip ©); virtual ~EggTriangleStrip(); virtual EggTriangleStrip *make_copy() const override; - virtual void write(ostream &out, int indent_level) const override; + virtual void write(std::ostream &out, int indent_level) const override; protected: virtual int get_num_lead_vertices() const override; diff --git a/panda/src/egg/eggVertex.h b/panda/src/egg/eggVertex.h index 4bbbd773d1..4c2cc2e36d 100644 --- a/panda/src/egg/eggVertex.h +++ b/panda/src/egg/eggVertex.h @@ -40,8 +40,8 @@ class EXPCL_PANDAEGG EggVertex : public EggObject, public EggAttributes { public: typedef pset GroupRef; typedef pmultiset PrimitiveRef; - typedef pmap< string, PT(EggVertexUV) > UVMap; - typedef pmap< string, PT(EggVertexAux) > AuxMap; + typedef pmap< std::string, PT(EggVertexUV) > UVMap; + typedef pmap< std::string, PT(EggVertexAux) > AuxMap; typedef second_of_pair_iterator uv_iterator; typedef uv_iterator const_uv_iterator; @@ -85,26 +85,26 @@ PUBLISHED: INLINE LTexCoordd get_uv() const; INLINE void set_uv(const LTexCoordd &texCoord); INLINE void clear_uv(); - bool has_uv(const string &name) const; - bool has_uvw(const string &name) const; - LTexCoordd get_uv(const string &name) const; - const LTexCoord3d &get_uvw(const string &name) const; - void set_uv(const string &name, const LTexCoordd &texCoord); - void set_uvw(const string &name, const LTexCoord3d &texCoord); - const EggVertexUV *get_uv_obj(const string &name) const; - EggVertexUV *modify_uv_obj(const string &name); + bool has_uv(const std::string &name) const; + bool has_uvw(const std::string &name) const; + LTexCoordd get_uv(const std::string &name) const; + const LTexCoord3d &get_uvw(const std::string &name) const; + void set_uv(const std::string &name, const LTexCoordd &texCoord); + void set_uvw(const std::string &name, const LTexCoord3d &texCoord); + const EggVertexUV *get_uv_obj(const std::string &name) const; + EggVertexUV *modify_uv_obj(const std::string &name); void set_uv_obj(EggVertexUV *vertex_uv); - void clear_uv(const string &name); + void clear_uv(const std::string &name); INLINE bool has_aux() const; INLINE void clear_aux(); - bool has_aux(const string &name) const; - const LVecBase4d &get_aux(const string &name) const; - void set_aux(const string &name, const LVecBase4d &aux); - const EggVertexAux *get_aux_obj(const string &name) const; - EggVertexAux *modify_aux_obj(const string &name); + bool has_aux(const std::string &name) const; + const LVecBase4d &get_aux(const std::string &name) const; + void set_aux(const std::string &name, const LVecBase4d &aux); + const EggVertexAux *get_aux_obj(const std::string &name) const; + EggVertexAux *modify_aux_obj(const std::string &name); void set_aux_obj(EggVertexAux *vertex_aux); - void clear_aux(const string &name); + void clear_aux(const std::string &name); static PT(EggVertex) make_average(const EggVertex *first, const EggVertex *second); @@ -126,7 +126,7 @@ PUBLISHED: INLINE void set_external_index2(int external_index2); INLINE int get_external_index2() const; - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; INLINE bool sorts_less_than(const EggVertex &other) const; int compare_to(const EggVertex &other) const; @@ -160,7 +160,7 @@ PUBLISHED: void test_pref_integrity() const { } #endif // _DEBUG - void output(ostream &out) const; + void output(std::ostream &out) const; EggMorphVertexList _dxyzs; @@ -201,7 +201,7 @@ private: friend class EggPrimitive; }; -INLINE ostream &operator << (ostream &out, const EggVertex &vert) { +INLINE std::ostream &operator << (std::ostream &out, const EggVertex &vert) { vert.output(out); return out; } diff --git a/panda/src/egg/eggVertexAux.I b/panda/src/egg/eggVertexAux.I index 40a41e26ac..0ff1966d46 100644 --- a/panda/src/egg/eggVertexAux.I +++ b/panda/src/egg/eggVertexAux.I @@ -15,7 +15,7 @@ * */ INLINE void EggVertexAux:: -set_name(const string &name) { +set_name(const std::string &name) { Namable::set_name(name); } diff --git a/panda/src/egg/eggVertexAux.h b/panda/src/egg/eggVertexAux.h index b0338cdec3..20c80dd531 100644 --- a/panda/src/egg/eggVertexAux.h +++ b/panda/src/egg/eggVertexAux.h @@ -29,12 +29,12 @@ */ class EXPCL_PANDAEGG EggVertexAux : public EggNamedObject { PUBLISHED: - explicit EggVertexAux(const string &name, const LVecBase4d &aux); + explicit EggVertexAux(const std::string &name, const LVecBase4d &aux); EggVertexAux(const EggVertexAux ©); EggVertexAux &operator = (const EggVertexAux ©); virtual ~EggVertexAux(); - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); INLINE const LVecBase4d &get_aux() const; INLINE void set_aux(const LVecBase4d &aux); @@ -42,7 +42,7 @@ PUBLISHED: static PT(EggVertexAux) make_average(const EggVertexAux *first, const EggVertexAux *second); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; int compare_to(const EggVertexAux &other) const; private: diff --git a/panda/src/egg/eggVertexPool.h b/panda/src/egg/eggVertexPool.h index 2b44ad38d2..dd8672abb4 100644 --- a/panda/src/egg/eggVertexPool.h +++ b/panda/src/egg/eggVertexPool.h @@ -65,7 +65,7 @@ public: // Here begins the actual public interface to EggVertexPool. PUBLISHED: - explicit EggVertexPool(const string &name); + explicit EggVertexPool(const std::string &name); EggVertexPool(const EggVertexPool ©); ~EggVertexPool(); @@ -129,7 +129,7 @@ PUBLISHED: void transform(const LMatrix4d &mat); void sort_by_external_index(); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; protected: virtual void r_transform(const LMatrix4d &mat, const LMatrix4d &inv, diff --git a/panda/src/egg/eggVertexUV.I b/panda/src/egg/eggVertexUV.I index 4eb9983d21..05f6f8609f 100644 --- a/panda/src/egg/eggVertexUV.I +++ b/panda/src/egg/eggVertexUV.I @@ -16,10 +16,10 @@ * Usually this is the same string that is input, but for historical reasons * the texture coordinate name "default" is mapped to the empty string. */ -INLINE string EggVertexUV:: -filter_name(const string &name) { +INLINE std::string EggVertexUV:: +filter_name(const std::string &name) { if (name == "default") { - return string(); + return std::string(); } return name; } @@ -28,7 +28,7 @@ filter_name(const string &name) { * */ INLINE void EggVertexUV:: -set_name(const string &name) { +set_name(const std::string &name) { Namable::set_name(filter_name(name)); } diff --git a/panda/src/egg/eggVertexUV.h b/panda/src/egg/eggVertexUV.h index 21b6e5b7c2..2483432aa9 100644 --- a/panda/src/egg/eggVertexUV.h +++ b/panda/src/egg/eggVertexUV.h @@ -28,14 +28,14 @@ */ class EXPCL_PANDAEGG EggVertexUV : public EggNamedObject { PUBLISHED: - explicit EggVertexUV(const string &name, const LTexCoordd &uv); - explicit EggVertexUV(const string &name, const LTexCoord3d &uvw); + explicit EggVertexUV(const std::string &name, const LTexCoordd &uv); + explicit EggVertexUV(const std::string &name, const LTexCoord3d &uvw); EggVertexUV(const EggVertexUV ©); EggVertexUV &operator = (const EggVertexUV ©); virtual ~EggVertexUV(); - INLINE static string filter_name(const string &name); - INLINE void set_name(const string &name); + INLINE static std::string filter_name(const std::string &name); + INLINE void set_name(const std::string &name); INLINE int get_num_dimensions() const; INLINE bool has_w() const; @@ -59,7 +59,7 @@ PUBLISHED: void transform(const LMatrix4d &mat); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; int compare_to(const EggVertexUV &other) const; EggMorphTexCoordList _duvs; diff --git a/panda/src/egg/eggXfmAnimData.I b/panda/src/egg/eggXfmAnimData.I index 41bbaaa103..92a888a3c6 100644 --- a/panda/src/egg/eggXfmAnimData.I +++ b/panda/src/egg/eggXfmAnimData.I @@ -15,7 +15,7 @@ * */ INLINE EggXfmAnimData:: -EggXfmAnimData(const string &name, CoordinateSystem cs) : EggAnimData(name) { +EggXfmAnimData(const std::string &name, CoordinateSystem cs) : EggAnimData(name) { _coordsys = cs; } @@ -50,7 +50,7 @@ operator = (const EggXfmAnimData ©) { * */ INLINE void EggXfmAnimData:: -set_order(const string &order) { +set_order(const std::string &order) { _order = order; } @@ -73,7 +73,7 @@ has_order() const { /** * */ -INLINE const string &EggXfmAnimData:: +INLINE const std::string &EggXfmAnimData:: get_order() const { if (has_order()) { return _order; @@ -87,7 +87,7 @@ get_order() const { * the order string must be set to in order to use set_value() or add_data() * successfully. */ -INLINE const string &EggXfmAnimData:: +INLINE const std::string &EggXfmAnimData:: get_standard_order() { return EggXfmSAnim::get_standard_order(); } @@ -97,7 +97,7 @@ get_standard_order() { * */ INLINE void EggXfmAnimData:: -set_contents(const string &contents) { +set_contents(const std::string &contents) { _contents = contents; } @@ -120,7 +120,7 @@ has_contents() const { /** * */ -INLINE const string &EggXfmAnimData:: +INLINE const std::string &EggXfmAnimData:: get_contents() const { return _contents; } diff --git a/panda/src/egg/eggXfmAnimData.h b/panda/src/egg/eggXfmAnimData.h index dac7762931..412b586b73 100644 --- a/panda/src/egg/eggXfmAnimData.h +++ b/panda/src/egg/eggXfmAnimData.h @@ -28,23 +28,23 @@ */ class EXPCL_PANDAEGG EggXfmAnimData : public EggAnimData { PUBLISHED: - INLINE explicit EggXfmAnimData(const string &name = "", + INLINE explicit EggXfmAnimData(const std::string &name = "", CoordinateSystem cs = CS_default); EggXfmAnimData(const EggXfmSAnim &convert_from); INLINE EggXfmAnimData(const EggXfmAnimData ©); INLINE EggXfmAnimData &operator = (const EggXfmAnimData ©); - INLINE void set_order(const string &order); + INLINE void set_order(const std::string &order); INLINE void clear_order(); INLINE bool has_order() const; - INLINE const string &get_order() const; - INLINE static const string &get_standard_order(); + INLINE const std::string &get_order() const; + INLINE static const std::string &get_standard_order(); - INLINE void set_contents(const string &contents); + INLINE void set_contents(const std::string &contents); INLINE void clear_contents(); INLINE bool has_contents() const; - INLINE const string &get_contents() const; + INLINE const std::string &get_contents() const; INLINE CoordinateSystem get_coordinate_system() const; @@ -55,7 +55,7 @@ PUBLISHED: void get_value(int row, LMatrix4d &mat) const; virtual bool is_anim_matrix() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; protected: virtual void r_transform(const LMatrix4d &mat, const LMatrix4d &inv, @@ -63,8 +63,8 @@ protected: virtual void r_mark_coordsys(CoordinateSystem cs); private: - string _order; - string _contents; + std::string _order; + std::string _contents; CoordinateSystem _coordsys; public: diff --git a/panda/src/egg/eggXfmSAnim.I b/panda/src/egg/eggXfmSAnim.I index a16a7ef2cb..62ba430096 100644 --- a/panda/src/egg/eggXfmSAnim.I +++ b/panda/src/egg/eggXfmSAnim.I @@ -15,7 +15,7 @@ * */ INLINE EggXfmSAnim:: -EggXfmSAnim(const string &name, CoordinateSystem cs) : EggGroupNode(name) { +EggXfmSAnim(const std::string &name, CoordinateSystem cs) : EggGroupNode(name) { _has_fps = false; _coordsys = cs; } @@ -88,7 +88,7 @@ get_fps() const { * */ INLINE void EggXfmSAnim:: -set_order(const string &order) { +set_order(const std::string &order) { _order = order; } @@ -111,7 +111,7 @@ has_order() const { /** * */ -INLINE const string &EggXfmSAnim:: +INLINE const std::string &EggXfmSAnim:: get_order() const { if (has_order()) { return _order; @@ -125,7 +125,7 @@ get_order() const { * the order string must be set to in order to use set_value() or add_data() * successfully. */ -INLINE const string &EggXfmSAnim:: +INLINE const std::string &EggXfmSAnim:: get_standard_order() { return _standard_order; } diff --git a/panda/src/egg/eggXfmSAnim.h b/panda/src/egg/eggXfmSAnim.h index eae0349559..508f0cd67d 100644 --- a/panda/src/egg/eggXfmSAnim.h +++ b/panda/src/egg/eggXfmSAnim.h @@ -27,7 +27,7 @@ class EggXfmAnimData; */ class EXPCL_PANDAEGG EggXfmSAnim : public EggGroupNode { PUBLISHED: - INLINE explicit EggXfmSAnim(const string &name = "", + INLINE explicit EggXfmSAnim(const std::string &name = "", CoordinateSystem cs = CS_default); EggXfmSAnim(const EggXfmAnimData &convert_from); @@ -39,11 +39,11 @@ PUBLISHED: INLINE bool has_fps() const; INLINE double get_fps() const; - INLINE void set_order(const string &order); + INLINE void set_order(const std::string &order); INLINE void clear_order(); INLINE bool has_order() const; - INLINE const string &get_order() const; - INLINE static const string &get_standard_order(); + INLINE const std::string &get_order() const; + INLINE static const std::string &get_standard_order(); INLINE CoordinateSystem get_coordinate_system() const; @@ -57,18 +57,18 @@ PUBLISHED: INLINE void clear_data(); bool add_data(const LMatrix4d &mat); - void add_component_data(const string &component_name, double value); + void add_component_data(const std::string &component_name, double value); void add_component_data(int component, double value); virtual bool is_anim_matrix() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; static void compose_with_order(LMatrix4d &mat, const LVecBase3d &scale, const LVecBase3d &shear, const LVecBase3d &hpr, const LVecBase3d &trans, - const string &order, + const std::string &order, CoordinateSystem cs); protected: @@ -84,10 +84,10 @@ private: private: double _fps; bool _has_fps; - string _order; + std::string _order; CoordinateSystem _coordsys; - static const string _standard_order; + static const std::string _standard_order; public: diff --git a/panda/src/egg/lexerDefs.h b/panda/src/egg/lexerDefs.h index 0337830028..4e39cb0b10 100644 --- a/panda/src/egg/lexerDefs.h +++ b/panda/src/egg/lexerDefs.h @@ -20,18 +20,18 @@ #include -void egg_init_lexer(istream &in, const string &filename); +void egg_init_lexer(std::istream &in, const std::string &filename); void egg_start_group_body(); void egg_start_texture_body(); void egg_start_primitive_body(); int egg_error_count(); int egg_warning_count(); -void eggyyerror(const string &msg); -void eggyyerror(ostringstream &strm); +void eggyyerror(const std::string &msg); +void eggyyerror(std::ostringstream &strm); -void eggyywarning(const string &msg); -void eggyywarning(ostringstream &strm); +void eggyywarning(const std::string &msg); +void eggyywarning(std::ostringstream &strm); int eggyylex(); diff --git a/panda/src/egg/parserDefs.h b/panda/src/egg/parserDefs.h index b0938d567d..df91568015 100644 --- a/panda/src/egg/parserDefs.h +++ b/panda/src/egg/parserDefs.h @@ -29,7 +29,7 @@ class LightMutex; extern LightMutex egg_lock; -void egg_init_parser(istream &in, const string &filename, +void egg_init_parser(std::istream &in, const std::string &filename, EggObject *tos, EggGroupNode *egg_top_node); void egg_cleanup_parser(); @@ -44,7 +44,7 @@ class EXPCL_PANDAEGG EggTokenType { public: double _number; unsigned long _ulong; - string _string; + std::string _string; PT(EggObject) _egg; PTA_double _number_list; }; diff --git a/panda/src/egg2pg/animBundleMaker.h b/panda/src/egg2pg/animBundleMaker.h index fa95030718..62a8e1f7bf 100644 --- a/panda/src/egg2pg/animBundleMaker.h +++ b/panda/src/egg2pg/animBundleMaker.h @@ -45,13 +45,13 @@ private: void build_hierarchy(EggTable *egg_table, AnimGroup *parent); AnimChannelScalarTable * - create_s_channel(EggSAnimData *egg_anim, const string &name, + create_s_channel(EggSAnimData *egg_anim, const std::string &name, AnimGroup *parent); AnimChannelMatrixXfmTable * - create_xfm_channel(EggNode *egg_node, const string &name, + create_xfm_channel(EggNode *egg_node, const std::string &name, AnimGroup *parent); AnimChannelMatrixXfmTable * - create_xfm_channel(EggXfmSAnim *egg_anim, const string &name, + create_xfm_channel(EggXfmSAnim *egg_anim, const std::string &name, AnimGroup *parent); PN_stdfloat _fps; diff --git a/panda/src/egg2pg/characterMaker.h b/panda/src/egg2pg/characterMaker.h index b2309c0be7..466f890f36 100644 --- a/panda/src/egg2pg/characterMaker.h +++ b/panda/src/egg2pg/characterMaker.h @@ -48,14 +48,14 @@ public: Character *make_node(); - string get_name() const; + std::string get_name() const; PartGroup *egg_to_part(EggNode *egg_node) const; VertexTransform *egg_to_transform(EggNode *egg_node); int egg_to_index(EggNode *egg_node) const; - PandaNode *part_to_node(PartGroup *part, const string &name) const; + PandaNode *part_to_node(PartGroup *part, const std::string &name) const; - int create_slider(const string &name); - VertexSlider *egg_to_slider(const string &name); + int create_slider(const std::string &name); + VertexSlider *egg_to_slider(const std::string &name); private: CharacterJointBundle *make_bundle(); @@ -78,7 +78,7 @@ private: VertexTransforms _vertex_transforms; PT(VertexTransform) _identity_transform; - typedef pmap VertexSliders; + typedef pmap VertexSliders; VertexSliders _vertex_sliders; EggLoader &_loader; diff --git a/panda/src/egg2pg/eggBinner.h b/panda/src/egg2pg/eggBinner.h index a259e522d9..a7e3c10894 100644 --- a/panda/src/egg2pg/eggBinner.h +++ b/panda/src/egg2pg/eggBinner.h @@ -47,7 +47,7 @@ public: virtual int get_bin_number(const EggNode *node); - virtual string + virtual std::string get_bin_name(int bin_number, const EggNode *child); virtual bool diff --git a/panda/src/egg2pg/eggLoader.h b/panda/src/egg2pg/eggLoader.h index 504028432e..aa36475e05 100644 --- a/panda/src/egg2pg/eggLoader.h +++ b/panda/src/egg2pg/eggLoader.h @@ -147,7 +147,7 @@ private: CharacterMaker *character_maker); void record_morph (GeomVertexArrayFormat *array_format, - CharacterMaker *character_maker, const string &morph_name, + CharacterMaker *character_maker, const std::string &morph_name, InternalName *column_name, int num_components); void make_primitive(const EggRenderState *render_state, @@ -200,11 +200,11 @@ private: void apply_deferred_nodes(PandaNode *node, const DeferredNodeProperty &prop); bool expand_all_object_types(EggNode *egg_node); - bool expand_object_types(EggGroup *egg_group, const pset &expanded, - const pvector &expanded_history); - bool do_expand_object_type(EggGroup *egg_group, const pset &expanded, - const pvector &expanded_history, - const string &object_type); + bool expand_object_types(EggGroup *egg_group, const pset &expanded, + const pvector &expanded_history); + bool do_expand_object_type(EggGroup *egg_group, const pset &expanded, + const pvector &expanded_history, + const std::string &object_type); static TextureStage::CombineMode get_combine_mode(const EggTexture *egg_tex, diff --git a/panda/src/egg2pg/eggSaver.h b/panda/src/egg2pg/eggSaver.h index bd2905398f..8041d346cc 100644 --- a/panda/src/egg2pg/eggSaver.h +++ b/panda/src/egg2pg/eggSaver.h @@ -59,7 +59,7 @@ PUBLISHED: INLINE EggData *get_egg_data() const; private: - typedef pmap > > CharacterJointMap; + typedef pmap > > CharacterJointMap; void convert_node(const WorkingNodePath &node_path, EggGroupNode *egg_parent, bool has_decal, CharacterJointMap *joint_map); @@ -95,7 +95,7 @@ private: bool apply_node_properties(EggGroup *egg_group, PandaNode *node, bool allow_backstage = true); bool apply_state_properties(EggRenderMode *egg_render_mode, const RenderState *state); bool apply_tags(EggGroup *egg_group, PandaNode *node); - bool apply_tag(EggGroup *egg_group, PandaNode *node, const string &tag); + bool apply_tag(EggGroup *egg_group, PandaNode *node, const std::string &tag); EggMaterial *get_egg_material(Material *tex); EggTexture *get_egg_texture(Texture *tex); diff --git a/panda/src/egg2pg/loaderFileTypeEgg.h b/panda/src/egg2pg/loaderFileTypeEgg.h index b1c9c00e7b..a0ca9474ed 100644 --- a/panda/src/egg2pg/loaderFileTypeEgg.h +++ b/panda/src/egg2pg/loaderFileTypeEgg.h @@ -25,8 +25,8 @@ class EXPCL_PANDAEGG LoaderFileTypeEgg : public LoaderFileType { public: LoaderFileTypeEgg(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool supports_load() const; diff --git a/panda/src/egldisplay/config_egldisplay.h b/panda/src/egldisplay/config_egldisplay.h index 2df5bcc1f4..40e30893b8 100644 --- a/panda/src/egldisplay/config_egldisplay.h +++ b/panda/src/egldisplay/config_egldisplay.h @@ -31,12 +31,12 @@ NotifyCategoryDecl(egldisplay, EXPCL_PANDAGLES2, EXPTP_PANDAGLES2); extern EXPCL_PANDAGLES2 void init_libegldisplay(); - extern EXPCL_PANDAGLES2 const string get_egl_error_string(int error); + extern EXPCL_PANDAGLES2 const std::string get_egl_error_string(int error); #else NotifyCategoryDecl(egldisplay, EXPCL_PANDAGLES, EXPTP_PANDAGLES); extern EXPCL_PANDAGLES void init_libegldisplay(); - extern EXPCL_PANDAGLES const string get_egl_error_string(int error); + extern EXPCL_PANDAGLES const std::string get_egl_error_string(int error); #endif #endif diff --git a/panda/src/egldisplay/eglGraphicsBuffer.h b/panda/src/egldisplay/eglGraphicsBuffer.h index 7bed62cb83..68697ef94c 100644 --- a/panda/src/egldisplay/eglGraphicsBuffer.h +++ b/panda/src/egldisplay/eglGraphicsBuffer.h @@ -25,7 +25,7 @@ class eglGraphicsBuffer : public GraphicsBuffer { public: eglGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/egldisplay/eglGraphicsPipe.h b/panda/src/egldisplay/eglGraphicsPipe.h index aea34925e6..aebd9c70e1 100644 --- a/panda/src/egldisplay/eglGraphicsPipe.h +++ b/panda/src/egldisplay/eglGraphicsPipe.h @@ -44,14 +44,14 @@ class eglGraphicsWindow; */ class eglGraphicsPipe : public x11GraphicsPipe { public: - eglGraphicsPipe(const string &display = string()); + eglGraphicsPipe(const std::string &display = std::string()); virtual ~eglGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/egldisplay/eglGraphicsPixmap.h b/panda/src/egldisplay/eglGraphicsPixmap.h index cbd132c1ac..ed7e7f90e9 100644 --- a/panda/src/egldisplay/eglGraphicsPixmap.h +++ b/panda/src/egldisplay/eglGraphicsPixmap.h @@ -27,7 +27,7 @@ class eglGraphicsPixmap : public GraphicsBuffer { public: eglGraphicsPixmap(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/egldisplay/eglGraphicsWindow.h b/panda/src/egldisplay/eglGraphicsWindow.h index 508365cc65..7647605fd3 100644 --- a/panda/src/egldisplay/eglGraphicsWindow.h +++ b/panda/src/egldisplay/eglGraphicsWindow.h @@ -25,7 +25,7 @@ class eglGraphicsWindow : public x11GraphicsWindow { public: eglGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/event/asyncFuture.I b/panda/src/event/asyncFuture.I index 960ce56b49..bc46e17c9b 100644 --- a/panda/src/event/asyncFuture.I +++ b/panda/src/event/asyncFuture.I @@ -44,7 +44,7 @@ cancelled() const { * a coroutine task that exits with an exception. */ INLINE void AsyncFuture:: -set_done_event(const string &done_event) { +set_done_event(const std::string &done_event) { nassertv(!done()); _done_event = done_event; } @@ -53,7 +53,7 @@ set_done_event(const string &done_event) { * Returns the event name that will be triggered when the future finishes. * See set_done_event(). */ -INLINE const string &AsyncFuture:: +INLINE const std::string &AsyncFuture:: get_done_event() const { return _done_event; } @@ -129,7 +129,7 @@ gather(Futures futures) { } else if (futures.size() == 1) { return futures[0].p(); } else { - return (AsyncFuture *)new AsyncGatheringFuture(move(futures)); + return (AsyncFuture *)new AsyncGatheringFuture(std::move(futures)); } } diff --git a/panda/src/event/asyncFuture.h b/panda/src/event/asyncFuture.h index 5349ced637..27cab7b585 100644 --- a/panda/src/event/asyncFuture.h +++ b/panda/src/event/asyncFuture.h @@ -70,15 +70,15 @@ PUBLISHED: virtual bool cancel(); - INLINE void set_done_event(const string &done_event); - INLINE const string &get_done_event() const; + INLINE void set_done_event(const std::string &done_event); + INLINE const std::string &get_done_event() const; MAKE_PROPERTY(done_event, get_done_event, set_done_event); EXTENSION(PyObject *add_done_callback(PyObject *self, PyObject *fn)); EXTENSION(static PyObject *gather(PyObject *args)); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; BLOCKING void wait(); BLOCKING void wait(double timeout); @@ -125,7 +125,7 @@ protected: PT(ReferenceCount) _result_ref; AtomicAdjust::Integer _future_state; - string _done_event; + std::string _done_event; // Tasks and gathering futures waiting for this one to complete. Futures _waiting; @@ -152,7 +152,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const AsyncFuture &fut) { +INLINE std::ostream &operator << (std::ostream &out, const AsyncFuture &fut) { fut.output(out); return out; }; diff --git a/panda/src/event/asyncTask.I b/panda/src/event/asyncTask.I index 869b0b33f7..c9cdbeb179 100644 --- a/panda/src/event/asyncTask.I +++ b/panda/src/event/asyncTask.I @@ -131,7 +131,7 @@ get_start_frame() const { */ INLINE void AsyncTask:: clear_name() { - set_name(string()); + set_name(std::string()); } /** @@ -147,7 +147,7 @@ get_task_id() const { * Returns the AsyncTaskChain on which this task will be running. Each task * chain runs tasks independently of the others. */ -INLINE const string &AsyncTask:: +INLINE const std::string &AsyncTask:: get_task_chain() const { return _chain_name; } @@ -176,7 +176,7 @@ get_priority() const { * returns S_inactive). */ INLINE void AsyncTask:: -set_done_event(const string &done_event) { +set_done_event(const std::string &done_event) { nassertv(_state == S_inactive); _done_event = done_event; } diff --git a/panda/src/event/asyncTask.h b/panda/src/event/asyncTask.h index e36c3c8324..f5871ae2f2 100644 --- a/panda/src/event/asyncTask.h +++ b/panda/src/event/asyncTask.h @@ -31,7 +31,7 @@ class AsyncTaskChain; */ class EXPCL_PANDA_EVENT AsyncTask : public AsyncFuture, public Namable { public: - AsyncTask(const string &name = string()); + AsyncTask(const std::string &name = std::string()); ALLOC_DELETED_CHAIN(AsyncTask); PUBLISHED: @@ -76,14 +76,14 @@ PUBLISHED: INLINE int get_start_frame() const; int get_elapsed_frames() const; - void set_name(const string &name); + void set_name(const std::string &name); INLINE void clear_name(); - string get_name_prefix() const; + std::string get_name_prefix() const; INLINE AtomicAdjust::Integer get_task_id() const; - void set_task_chain(const string &chain_name); - INLINE const string &get_task_chain() const; + void set_task_chain(const std::string &chain_name); + INLINE const std::string &get_task_chain() const; void set_sort(int sort); INLINE int get_sort() const; @@ -91,13 +91,13 @@ PUBLISHED: void set_priority(int priority); INLINE int get_priority() const; - INLINE void set_done_event(const string &done_event); + INLINE void set_done_event(const std::string &done_event); INLINE double get_dt() const; INLINE double get_max_dt() const; INLINE double get_average_dt() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: void jump_to_task_chain(AsyncTaskManager *manager); @@ -113,7 +113,7 @@ protected: protected: AtomicAdjust::Integer _task_id; - string _chain_name; + std::string _chain_name; double _delay; bool _has_delay; double _wake_time; @@ -163,7 +163,7 @@ private: friend class AsyncTaskSequence; }; -INLINE ostream &operator << (ostream &out, const AsyncTask &task) { +INLINE std::ostream &operator << (std::ostream &out, const AsyncTask &task) { task.output(out); return out; }; diff --git a/panda/src/event/asyncTaskChain.h b/panda/src/event/asyncTaskChain.h index 5f81f6c3dd..c211b30c85 100644 --- a/panda/src/event/asyncTaskChain.h +++ b/panda/src/event/asyncTaskChain.h @@ -49,7 +49,7 @@ class AsyncTaskManager; */ class EXPCL_PANDA_EVENT AsyncTaskChain : public TypedReferenceCount, public Namable { public: - AsyncTaskChain(AsyncTaskManager *manager, const string &name); + AsyncTaskChain(AsyncTaskManager *manager, const std::string &name); ~AsyncTaskChain(); PUBLISHED: @@ -88,8 +88,8 @@ PUBLISHED: void poll(); double get_next_wake_time() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: class AsyncTaskChainThread; @@ -115,15 +115,15 @@ protected: void cleanup_pickup_mode(); INLINE double do_get_next_wake_time() const; static INLINE double get_wake_time(AsyncTask *task); - void do_output(ostream &out) const; - void do_write(ostream &out, int indent_level) const; + void do_output(std::ostream &out) const; + void do_write(std::ostream &out, int indent_level) const; - void write_task_line(ostream &out, int indent_level, AsyncTask *task, double now) const; + void write_task_line(std::ostream &out, int indent_level, AsyncTask *task, double now) const; protected: class AsyncTaskChainThread : public Thread { public: - AsyncTaskChainThread(const string &name, AsyncTaskChain *chain); + AsyncTaskChainThread(const std::string &name, AsyncTaskChain *chain); virtual void thread_main(); AsyncTaskChain *_chain; @@ -220,7 +220,7 @@ private: friend class AsyncTaskSortWakeTime; }; -INLINE ostream &operator << (ostream &out, const AsyncTaskChain &chain) { +INLINE std::ostream &operator << (std::ostream &out, const AsyncTaskChain &chain) { chain.output(out); return out; }; diff --git a/panda/src/event/asyncTaskCollection.h b/panda/src/event/asyncTaskCollection.h index 70918bc49f..a2334df839 100644 --- a/panda/src/event/asyncTaskCollection.h +++ b/panda/src/event/asyncTaskCollection.h @@ -39,7 +39,7 @@ PUBLISHED: bool has_task(AsyncTask *task) const; void clear(); - AsyncTask *find_task(const string &name) const; + AsyncTask *find_task(const std::string &name) const; size_t get_num_tasks() const; AsyncTask *get_task(size_t index) const; @@ -50,15 +50,15 @@ PUBLISHED: INLINE void operator += (const AsyncTaskCollection &other); INLINE AsyncTaskCollection operator + (const AsyncTaskCollection &other) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef PTA(PT(AsyncTask)) AsyncTasks; AsyncTasks _tasks; }; -INLINE ostream &operator << (ostream &out, const AsyncTaskCollection &col) { +INLINE std::ostream &operator << (std::ostream &out, const AsyncTaskCollection &col) { col.output(out); return out; } diff --git a/panda/src/event/asyncTaskManager.h b/panda/src/event/asyncTaskManager.h index d843508de7..69711ab6f6 100644 --- a/panda/src/event/asyncTaskManager.h +++ b/panda/src/event/asyncTaskManager.h @@ -47,7 +47,7 @@ */ class EXPCL_PANDA_EVENT AsyncTaskManager : public TypedReferenceCount, public Namable { PUBLISHED: - explicit AsyncTaskManager(const string &name); + explicit AsyncTaskManager(const std::string &name); BLOCKING virtual ~AsyncTaskManager(); BLOCKING void cleanup(); @@ -59,15 +59,15 @@ PUBLISHED: int get_num_task_chains() const; AsyncTaskChain *get_task_chain(int n) const; MAKE_SEQ(get_task_chains, get_num_task_chains, get_task_chain); - AsyncTaskChain *make_task_chain(const string &name); - AsyncTaskChain *find_task_chain(const string &name); - BLOCKING bool remove_task_chain(const string &name); + AsyncTaskChain *make_task_chain(const std::string &name); + AsyncTaskChain *find_task_chain(const std::string &name); + BLOCKING bool remove_task_chain(const std::string &name); void add(AsyncTask *task); bool has_task(AsyncTask *task) const; - AsyncTask *find_task(const string &name) const; - AsyncTaskCollection find_tasks(const string &name) const; + AsyncTask *find_task(const std::string &name) const; + AsyncTaskCollection find_tasks(const std::string &name) const; AsyncTaskCollection find_tasks_matching(const GlobPattern &pattern) const; bool remove(AsyncTask *task); @@ -90,21 +90,21 @@ PUBLISHED: double get_next_wake_time() const; MAKE_PROPERTY(next_wake_time, get_next_wake_time); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; INLINE static AsyncTaskManager *get_global_ptr(); protected: - AsyncTaskChain *do_make_task_chain(const string &name); - AsyncTaskChain *do_find_task_chain(const string &name); + AsyncTaskChain *do_make_task_chain(const std::string &name); + AsyncTaskChain *do_find_task_chain(const std::string &name); INLINE void add_task_by_name(AsyncTask *task); void remove_task_by_name(AsyncTask *task); bool do_has_task(AsyncTask *task) const; - virtual void do_output(ostream &out) const; + virtual void do_output(std::ostream &out) const; private: static void make_global_ptr(); @@ -159,7 +159,7 @@ private: friend class PythonTask; }; -INLINE ostream &operator << (ostream &out, const AsyncTaskManager &manager) { +INLINE std::ostream &operator << (std::ostream &out, const AsyncTaskManager &manager) { manager.output(out); return out; }; diff --git a/panda/src/event/asyncTaskSequence.h b/panda/src/event/asyncTaskSequence.h index de0127a1d8..3d1c4cc450 100644 --- a/panda/src/event/asyncTaskSequence.h +++ b/panda/src/event/asyncTaskSequence.h @@ -32,7 +32,7 @@ class AsyncTaskManager; */ class EXPCL_PANDA_EVENT AsyncTaskSequence : public AsyncTask, public AsyncTaskCollection { PUBLISHED: - explicit AsyncTaskSequence(const string &name); + explicit AsyncTaskSequence(const std::string &name); virtual ~AsyncTaskSequence(); ALLOC_DELETED_CHAIN(AsyncTaskSequence); diff --git a/panda/src/event/buttonEvent.I b/panda/src/event/buttonEvent.I index 41bea9f2d5..f082a4bee9 100644 --- a/panda/src/event/buttonEvent.I +++ b/panda/src/event/buttonEvent.I @@ -55,7 +55,7 @@ ButtonEvent(int keycode, double time) : * */ INLINE ButtonEvent:: -ButtonEvent(const wstring &candidate_string, size_t highlight_start, +ButtonEvent(const std::wstring &candidate_string, size_t highlight_start, size_t highlight_end, size_t cursor_pos) : _button(ButtonHandle::none()), _keycode(0), diff --git a/panda/src/event/buttonEvent.h b/panda/src/event/buttonEvent.h index d2e2b82176..e839924c48 100644 --- a/panda/src/event/buttonEvent.h +++ b/panda/src/event/buttonEvent.h @@ -87,7 +87,7 @@ public: INLINE ButtonEvent(); INLINE ButtonEvent(ButtonHandle button, Type type, double time = ClockObject::get_global_clock()->get_frame_time()); INLINE ButtonEvent(int keycode, double time = ClockObject::get_global_clock()->get_frame_time()); - INLINE ButtonEvent(const wstring &candidate_string, size_t highlight_start, + INLINE ButtonEvent(const std::wstring &candidate_string, size_t highlight_start, size_t highlight_end, size_t cursor_pos); INLINE ButtonEvent(const ButtonEvent ©); INLINE void operator = (const ButtonEvent ©); @@ -98,7 +98,7 @@ public: INLINE bool update_mods(ModifierButtons &mods) const; - void output(ostream &out) const; + void output(std::ostream &out) const; void write_datagram(Datagram &dg) const; void read_datagram(DatagramIterator &scan); @@ -112,7 +112,7 @@ public: int _keycode; // _candidate_string will be filled in if type is T_candidate. - wstring _candidate_string; + std::wstring _candidate_string; size_t _highlight_start; size_t _highlight_end; size_t _cursor_pos; @@ -127,7 +127,7 @@ public: double _time; }; -INLINE ostream &operator << (ostream &out, const ButtonEvent &be) { +INLINE std::ostream &operator << (std::ostream &out, const ButtonEvent &be) { be.output(out); return out; } diff --git a/panda/src/event/buttonEventList.h b/panda/src/event/buttonEventList.h index d4f097f98d..c9d9479490 100644 --- a/panda/src/event/buttonEventList.h +++ b/panda/src/event/buttonEventList.h @@ -44,8 +44,8 @@ public: void add_events(const ButtonEventList &other); void update_mods(ModifierButtons &mods) const; - virtual void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef pvector Events; @@ -79,7 +79,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const ButtonEventList &buttonlist) { +INLINE std::ostream &operator << (std::ostream &out, const ButtonEventList &buttonlist) { buttonlist.output(out); return out; } diff --git a/panda/src/event/event.I b/panda/src/event/event.I index dd2b0e95f6..fd60e3e10f 100644 --- a/panda/src/event/event.I +++ b/panda/src/event/event.I @@ -15,7 +15,7 @@ * */ INLINE void Event:: -set_name(const string &name) { +set_name(const std::string &name) { _name = name; } @@ -39,13 +39,13 @@ has_name() const { /** * */ -INLINE const string &Event:: +INLINE const std::string &Event:: get_name() const { return _name; } -INLINE ostream &operator << (ostream &out, const Event &n) { +INLINE std::ostream &operator << (std::ostream &out, const Event &n) { n.output(out); return out; } diff --git a/panda/src/event/event.h b/panda/src/event/event.h index 383329e233..beb13f0b11 100644 --- a/panda/src/event/event.h +++ b/panda/src/event/event.h @@ -32,15 +32,15 @@ class EventReceiver; */ class EXPCL_PANDA_EVENT Event : public TypedReferenceCount { PUBLISHED: - Event(const string &event_name, EventReceiver *receiver = nullptr); + Event(const std::string &event_name, EventReceiver *receiver = nullptr); Event(const Event ©); void operator = (const Event ©); ~Event(); - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); INLINE void clear_name(); INLINE bool has_name() const; - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; void add_parameter(const EventParameter &obj); @@ -53,7 +53,7 @@ PUBLISHED: void set_receiver(EventReceiver *receiver); void clear_receiver(); - void output(ostream &out) const; + void output(std::ostream &out) const; MAKE_PROPERTY(name, get_name, set_name); MAKE_SEQ_PROPERTY(parameters, get_num_parameters, get_parameter); @@ -65,7 +65,7 @@ protected: EventReceiver *_receiver; private: - string _name; + std::string _name; public: static TypeHandle get_class_type() { @@ -85,7 +85,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const Event &n); +INLINE std::ostream &operator << (std::ostream &out, const Event &n); #include "event.I" diff --git a/panda/src/event/eventHandler.h b/panda/src/event/eventHandler.h index cefba2710f..8e616f1581 100644 --- a/panda/src/event/eventHandler.h +++ b/panda/src/event/eventHandler.h @@ -44,29 +44,29 @@ PUBLISHED: explicit EventHandler(EventQueue *ev_queue); ~EventHandler() {} - AsyncFuture *get_future(const string &event_name); + AsyncFuture *get_future(const std::string &event_name); void process_events(); virtual void dispatch_event(const Event *event); - void write(ostream &out) const; + void write(std::ostream &out) const; INLINE static EventHandler *get_global_event_handler(EventQueue *queue = nullptr); public: - bool add_hook(const string &event_name, EventFunction *function); - bool add_hook(const string &event_name, EventCallbackFunction *function, + bool add_hook(const std::string &event_name, EventFunction *function); + bool add_hook(const std::string &event_name, EventCallbackFunction *function, void *data); - bool has_hook(const string &event_name) const; - bool has_hook(const string &event_name, EventFunction *function) const; - bool has_hook(const string &event_name, EventCallbackFunction *function, + bool has_hook(const std::string &event_name) const; + bool has_hook(const std::string &event_name, EventFunction *function) const; + bool has_hook(const std::string &event_name, EventCallbackFunction *function, void *data) const; - bool remove_hook(const string &event_name, EventFunction *function); - bool remove_hook(const string &event_name, EventCallbackFunction *function, + bool remove_hook(const std::string &event_name, EventFunction *function); + bool remove_hook(const std::string &event_name, EventCallbackFunction *function, void *data); - bool remove_hooks(const string &event_name); + bool remove_hooks(const std::string &event_name); bool remove_hooks_with(void *data); void remove_all_hooks(); @@ -74,11 +74,11 @@ public: protected: typedef pset Functions; - typedef pmap Hooks; - typedef pair CallbackFunction; + typedef pmap Hooks; + typedef std::pair CallbackFunction; typedef pset CallbackFunctions; - typedef pmap CallbackHooks; - typedef pmap Futures; + typedef pmap CallbackHooks; + typedef pmap Futures; Hooks _hooks; CallbackHooks _cbhooks; @@ -89,8 +89,8 @@ protected: static void make_global_event_handler(); private: - void write_hook(ostream &out, const Hooks::value_type &hook) const; - void write_cbhook(ostream &out, const CallbackHooks::value_type &hook) const; + void write_hook(std::ostream &out, const Hooks::value_type &hook) const; + void write_cbhook(std::ostream &out, const CallbackHooks::value_type &hook) const; public: diff --git a/panda/src/event/eventParameter.I b/panda/src/event/eventParameter.I index 1aa1888017..1d3d168344 100644 --- a/panda/src/event/eventParameter.I +++ b/panda/src/event/eventParameter.I @@ -55,13 +55,13 @@ EventParameter(double value) : _ptr(new EventStoreDouble(value)) { } * Defines an EventParameter that stores a string value. */ INLINE EventParameter:: -EventParameter(const string &value) : _ptr(new EventStoreString(value)) { } +EventParameter(const std::string &value) : _ptr(new EventStoreString(value)) { } /** * Defines an EventParameter that stores a wstring value. */ INLINE EventParameter:: -EventParameter(const wstring &value) : _ptr(new EventStoreWstring(value)) { } +EventParameter(const std::wstring &value) : _ptr(new EventStoreWstring(value)) { } /** @@ -158,7 +158,7 @@ is_string() const { * Retrieves the value stored in the EventParameter. It is only valid to call * this if is_string() has already returned true. */ -INLINE string EventParameter:: +INLINE std::string EventParameter:: get_string_value() const { nassertr(is_string(), ""); return ((const EventStoreString *)_ptr.p())->get_value(); @@ -179,9 +179,9 @@ is_wstring() const { * Retrieves the value stored in the EventParameter. It is only valid to call * this if is_wstring() has already returned true. */ -INLINE wstring EventParameter:: +INLINE std::wstring EventParameter:: get_wstring_value() const { - nassertr(is_wstring(), wstring()); + nassertr(is_wstring(), std::wstring()); return ((const EventStoreWstring *)_ptr.p())->get_value(); } @@ -220,8 +220,8 @@ get_ptr() const { return _ptr; } -INLINE ostream & -operator << (ostream &out, const EventParameter ¶m) { +INLINE std::ostream & +operator << (std::ostream &out, const EventParameter ¶m) { param.output(out); return out; } diff --git a/panda/src/event/eventParameter.h b/panda/src/event/eventParameter.h index 8519c3c4d6..5f817fc149 100644 --- a/panda/src/event/eventParameter.h +++ b/panda/src/event/eventParameter.h @@ -40,8 +40,8 @@ PUBLISHED: INLINE EventParameter(const TypedReferenceCount *ptr); INLINE EventParameter(int value); INLINE EventParameter(double value); - INLINE EventParameter(const string &value); - INLINE EventParameter(const wstring &value); + INLINE EventParameter(const std::string &value); + INLINE EventParameter(const std::wstring &value); INLINE EventParameter(const EventParameter ©); INLINE EventParameter &operator = (const EventParameter ©); @@ -57,22 +57,22 @@ PUBLISHED: INLINE bool is_double() const; INLINE double get_double_value() const; INLINE bool is_string() const; - INLINE string get_string_value() const; + INLINE std::string get_string_value() const; INLINE bool is_wstring() const; - INLINE wstring get_wstring_value() const; + INLINE std::wstring get_wstring_value() const; INLINE bool is_typed_ref_count() const; INLINE TypedReferenceCount *get_typed_ref_count_value() const; INLINE TypedWritableReferenceCount *get_ptr() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: PT(TypedWritableReferenceCount) _ptr; }; -INLINE ostream &operator << (ostream &out, const EventParameter ¶m); +INLINE std::ostream &operator << (std::ostream &out, const EventParameter ¶m); typedef ParamTypedRefCount EventStoreTypedRefCount; diff --git a/panda/src/event/genericAsyncTask.h b/panda/src/event/genericAsyncTask.h index 6530a8112a..f35d780e3b 100644 --- a/panda/src/event/genericAsyncTask.h +++ b/panda/src/event/genericAsyncTask.h @@ -29,8 +29,8 @@ public: typedef void BirthFunc(GenericAsyncTask *task, void *user_data); typedef void DeathFunc(GenericAsyncTask *task, bool clean_exit, void *user_data); - GenericAsyncTask(const string &name = string()); - GenericAsyncTask(const string &name, TaskFunc *function, void *user_data); + GenericAsyncTask(const std::string &name = std::string()); + GenericAsyncTask(const std::string &name, TaskFunc *function, void *user_data); ALLOC_DELETED_CHAIN(GenericAsyncTask); INLINE void set_function(TaskFunc *function); diff --git a/panda/src/event/pointerEvent.h b/panda/src/event/pointerEvent.h index f69d8d4223..d98cc99989 100644 --- a/panda/src/event/pointerEvent.h +++ b/panda/src/event/pointerEvent.h @@ -34,7 +34,7 @@ public: INLINE bool operator != (const PointerEvent &other) const; INLINE bool operator < (const PointerEvent &other) const; - void output(ostream &out) const; + void output(std::ostream &out) const; void write_datagram(Datagram &dg) const; void read_datagram(DatagramIterator &scan); @@ -52,7 +52,7 @@ public: double _time; }; -INLINE ostream &operator << (ostream &out, const PointerEvent &pe) { +INLINE std::ostream &operator << (std::ostream &out, const PointerEvent &pe) { pe.output(out); return out; } diff --git a/panda/src/event/pointerEventList.h b/panda/src/event/pointerEventList.h index 7c2400c769..b9daf9ca4d 100644 --- a/panda/src/event/pointerEventList.h +++ b/panda/src/event/pointerEventList.h @@ -52,17 +52,17 @@ PUBLISHED: bool encircles(int x, int y) const; double total_turns(double sec) const; - double match_pattern(const string &pattern, double rot, double seglen); + double match_pattern(const std::string &pattern, double rot, double seglen); public: INLINE PointerEventList(const PointerEventList ©); INLINE void operator = (const PointerEventList ©); - virtual void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: - void parse_pattern(const string &ascpat, vector_double &pattern); + void parse_pattern(const std::string &ascpat, vector_double &pattern); typedef pdeque Events; Events _events; @@ -84,7 +84,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const PointerEventList &pointerlist) { +INLINE std::ostream &operator << (std::ostream &out, const PointerEventList &pointerlist) { pointerlist.output(out); return out; } diff --git a/panda/src/event/pythonTask.h b/panda/src/event/pythonTask.h index 33dde9af0a..3771d46d8b 100644 --- a/panda/src/event/pythonTask.h +++ b/panda/src/event/pythonTask.h @@ -28,7 +28,7 @@ */ class PythonTask final : public AsyncTask { PUBLISHED: - PythonTask(PyObject *function = Py_None, const string &name = string()); + PythonTask(PyObject *function = Py_None, const std::string &name = std::string()); virtual ~PythonTask(); ALLOC_DELETED_CHAIN(PythonTask); diff --git a/panda/src/event/throw_event.I b/panda/src/event/throw_event.I index 303b356dad..bf3618d38a 100644 --- a/panda/src/event/throw_event.I +++ b/panda/src/event/throw_event.I @@ -17,12 +17,12 @@ throw_event(const CPT_Event &event) { } INLINE void -throw_event(const string &event_name) { +throw_event(const std::string &event_name) { EventQueue::get_global_event_queue()->queue_event(new Event(event_name)); } INLINE void -throw_event(const string &event_name, +throw_event(const std::string &event_name, const EventParameter &p1) { Event *event = new Event(event_name); event->add_parameter(p1); @@ -30,7 +30,7 @@ throw_event(const string &event_name, } INLINE void -throw_event(const string &event_name, +throw_event(const std::string &event_name, const EventParameter &p1, const EventParameter &p2) { Event *event = new Event(event_name); @@ -40,7 +40,7 @@ throw_event(const string &event_name, } INLINE void -throw_event(const string &event_name, +throw_event(const std::string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3) { @@ -52,7 +52,7 @@ throw_event(const string &event_name, } INLINE void -throw_event(const string &event_name, +throw_event(const std::string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3, @@ -74,13 +74,13 @@ throw_event_directly(EventHandler& handler, INLINE void throw_event_directly(EventHandler& handler, - const string &event_name) { + const std::string &event_name) { handler.dispatch_event(new Event(event_name)); } INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const std::string &event_name, const EventParameter &p1) { Event *event = new Event(event_name); event->add_parameter(p1); @@ -89,7 +89,7 @@ throw_event_directly(EventHandler& handler, INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const std::string &event_name, const EventParameter &p1, const EventParameter &p2) { Event *event = new Event(event_name); @@ -100,7 +100,7 @@ throw_event_directly(EventHandler& handler, INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const std::string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3) { diff --git a/panda/src/event/throw_event.h b/panda/src/event/throw_event.h index d1d2554c3a..435a959d64 100644 --- a/panda/src/event/throw_event.h +++ b/panda/src/event/throw_event.h @@ -22,17 +22,17 @@ // A handful of convenience functions to throw events. INLINE void throw_event(const CPT_Event &event); -INLINE void throw_event(const string &event_name); -INLINE void throw_event(const string &event_name, +INLINE void throw_event(const std::string &event_name); +INLINE void throw_event(const std::string &event_name, const EventParameter &p1); -INLINE void throw_event(const string &event_name, +INLINE void throw_event(const std::string &event_name, const EventParameter &p1, const EventParameter &p2); -INLINE void throw_event(const string &event_name, +INLINE void throw_event(const std::string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3); -INLINE void throw_event(const string &event_name, +INLINE void throw_event(const std::string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3, @@ -43,16 +43,16 @@ INLINE void throw_event(const string &event_name, INLINE void throw_event_directly(EventHandler& handler, const CPT_Event &event); INLINE void throw_event_directly(EventHandler& handler, - const string &event_name); + const std::string &event_name); INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const std::string &event_name, const EventParameter &p1); INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const std::string &event_name, const EventParameter &p1, const EventParameter &p2); INLINE void throw_event_directly(EventHandler& handler, - const string &event_name, + const std::string &event_name, const EventParameter &p1, const EventParameter &p2, const EventParameter &p3); diff --git a/panda/src/express/checksumHashGenerator.h b/panda/src/express/checksumHashGenerator.h index d1ee27afa3..c809230565 100644 --- a/panda/src/express/checksumHashGenerator.h +++ b/panda/src/express/checksumHashGenerator.h @@ -29,7 +29,7 @@ public: INLINE void add_fp(float num, float threshold); INLINE void add_fp(double num, double threshold); INLINE void add_pointer(void *ptr); - void add_string(const string &str); + void add_string(const std::string &str); }; #include "checksumHashGenerator.I" diff --git a/panda/src/express/compress_string.h b/panda/src/express/compress_string.h index 433f1dd3e6..3fdbc4b258 100644 --- a/panda/src/express/compress_string.h +++ b/panda/src/express/compress_string.h @@ -22,11 +22,11 @@ BEGIN_PUBLISH -EXPCL_PANDAEXPRESS string -compress_string(const string &source, int compression_level); +EXPCL_PANDAEXPRESS std::string +compress_string(const std::string &source, int compression_level); -EXPCL_PANDAEXPRESS string -decompress_string(const string &source); +EXPCL_PANDAEXPRESS std::string +decompress_string(const std::string &source); EXPCL_PANDAEXPRESS bool compress_file(const Filename &source, const Filename &dest, int compression_level); @@ -34,9 +34,9 @@ EXPCL_PANDAEXPRESS bool decompress_file(const Filename &source, const Filename &dest); EXPCL_PANDAEXPRESS bool -compress_stream(istream &source, ostream &dest, int compression_level); +compress_stream(std::istream &source, std::ostream &dest, int compression_level); EXPCL_PANDAEXPRESS bool -decompress_stream(istream &source, ostream &dest); +decompress_stream(std::istream &source, std::ostream &dest); END_PUBLISH diff --git a/panda/src/express/copy_stream.h b/panda/src/express/copy_stream.h index b501bb682e..d93e00fa69 100644 --- a/panda/src/express/copy_stream.h +++ b/panda/src/express/copy_stream.h @@ -18,7 +18,7 @@ BEGIN_PUBLISH EXPCL_PANDAEXPRESS bool -copy_stream(istream &source, ostream &dest); +copy_stream(std::istream &source, std::ostream &dest); END_PUBLISH #endif diff --git a/panda/src/express/datagram.I b/panda/src/express/datagram.I index 98f5fcea14..98b71820e5 100644 --- a/panda/src/express/datagram.I +++ b/panda/src/express/datagram.I @@ -43,7 +43,7 @@ Datagram(const void *data, size_t size) : */ INLINE Datagram:: Datagram(vector_uchar data) : - _data(move(data)), + _data(std::move(data)), #ifdef STDFLOAT_DOUBLE _stdfloat_double(true) #else @@ -241,7 +241,7 @@ add_be_float64(PN_float64 value) { * followed by n bytes. */ INLINE void Datagram:: -add_string(const string &str) { +add_string(const std::string &str) { // The max sendable length for a string is 2^16. nassertv(str.length() <= (uint16_t)0xffff); @@ -257,7 +257,7 @@ add_string(const string &str) { * to allow very long strings. */ INLINE void Datagram:: -add_string32(const string &str) { +add_string32(const std::string &str) { // Strings always are preceded by their length add_uint32((uint32_t)str.length()); @@ -269,7 +269,7 @@ add_string32(const string &str) { * Adds a variable-length string to the datagram, as a NULL-terminated string. */ INLINE void Datagram:: -add_z_string(const string &str) { +add_z_string(const std::string &str) { // We must not have any nested null characters in the string. size_t null_pos = str.find('\0'); // Add the string (sans the null character). @@ -285,7 +285,7 @@ add_z_string(const string &str) { * greater than the requested size, this will silently truncate the string. */ INLINE void Datagram:: -add_fixed_string(const string &str, size_t size) { +add_fixed_string(const std::string &str, size_t size) { if (str.length() < size) { append_data(str.data(), str.length()); pad_bytes(size - str.length()); @@ -306,13 +306,13 @@ append_data(const vector_uchar &data) { /** * Returns the datagram's data as a string. */ -INLINE string Datagram:: +INLINE std::string Datagram:: get_message() const { // Silly special case for gcc 3.2, which can't tolerate string(NULL, 0). if (_data.size() == 0) { - return string(); + return std::string(); } else { - return string((const char *)_data.p(), _data.size()); + return std::string((const char *)_data.p(), _data.size()); } } @@ -474,11 +474,11 @@ generic_write_datagram(Datagram &dest, double value) { } INLINE void -generic_write_datagram(Datagram &dest, const string &value) { +generic_write_datagram(Datagram &dest, const std::string &value) { dest.add_string(value); } INLINE void -generic_write_datagram(Datagram &dest, const wstring &value) { +generic_write_datagram(Datagram &dest, const std::wstring &value) { dest.add_wstring(value); } diff --git a/panda/src/express/datagram.h b/panda/src/express/datagram.h index 7cf50368fc..a865c6bec6 100644 --- a/panda/src/express/datagram.h +++ b/panda/src/express/datagram.h @@ -48,7 +48,7 @@ PUBLISHED: Datagram &operator = (Datagram &&from) noexcept = default; virtual void clear(); - void dump_hex(ostream &out, unsigned int indent=0) const; + void dump_hex(std::ostream &out, unsigned int indent=0) const; INLINE void add_bool(bool value); INLINE void add_int8(int8_t value); @@ -75,11 +75,11 @@ PUBLISHED: INLINE void add_be_float32(PN_float32 value); INLINE void add_be_float64(PN_float64 value); - INLINE void add_string(const string &str); - INLINE void add_string32(const string &str); - INLINE void add_z_string(const string &str); - INLINE void add_fixed_string(const string &str, size_t size); - void add_wstring(const wstring &str); + INLINE void add_string(const std::string &str); + INLINE void add_string32(const std::string &str); + INLINE void add_z_string(const std::string &str); + INLINE void add_fixed_string(const std::string &str, size_t size); + void add_wstring(const std::wstring &str); void pad_bytes(size_t size); void append_data(const void *data, size_t size); @@ -87,7 +87,7 @@ PUBLISHED: void assign(const void *data, size_t size); - INLINE string get_message() const; + INLINE std::string get_message() const; INLINE vector_uchar __bytes__() const; INLINE const void *get_data() const; INLINE size_t get_length() const; @@ -104,8 +104,8 @@ PUBLISHED: INLINE bool operator != (const Datagram &other) const; INLINE bool operator < (const Datagram &other) const; - void output(ostream &out) const; - void write(ostream &out, unsigned int indent=0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, unsigned int indent=0) const; private: PTA_uchar _data; @@ -145,9 +145,9 @@ generic_write_datagram(Datagram &dest, float value); INLINE void generic_write_datagram(Datagram &dest, double value); INLINE void -generic_write_datagram(Datagram &dest, const string &value); +generic_write_datagram(Datagram &dest, const std::string &value); INLINE void -generic_write_datagram(Datagram &dest, const wstring &value); +generic_write_datagram(Datagram &dest, const std::wstring &value); #include "datagram.I" diff --git a/panda/src/express/datagramGenerator.h b/panda/src/express/datagramGenerator.h index 8d46f9df80..621cb73517 100644 --- a/panda/src/express/datagramGenerator.h +++ b/panda/src/express/datagramGenerator.h @@ -41,7 +41,7 @@ PUBLISHED: virtual time_t get_timestamp() const; virtual const FileReference *get_file(); virtual VirtualFile *get_vfile(); - virtual streampos get_file_pos(); + virtual std::streampos get_file_pos(); }; #include "datagramGenerator.I" diff --git a/panda/src/express/datagramIterator.I b/panda/src/express/datagramIterator.I index 33af92539f..763850b60c 100644 --- a/panda/src/express/datagramIterator.I +++ b/panda/src/express/datagramIterator.I @@ -477,11 +477,11 @@ generic_read_datagram(double &result, DatagramIterator &source) { } INLINE void -generic_read_datagram(string &result, DatagramIterator &source) { +generic_read_datagram(std::string &result, DatagramIterator &source) { result = source.get_string(); } INLINE void -generic_read_datagram(wstring &result, DatagramIterator &source) { +generic_read_datagram(std::wstring &result, DatagramIterator &source) { result = source.get_wstring(); } diff --git a/panda/src/express/datagramIterator.h b/panda/src/express/datagramIterator.h index ec76be3f07..60a893f477 100644 --- a/panda/src/express/datagramIterator.h +++ b/panda/src/express/datagramIterator.h @@ -55,11 +55,11 @@ PUBLISHED: INLINE PN_float32 get_be_float32(); INLINE PN_float64 get_be_float64(); - string get_string(); - string get_string32(); - string get_z_string(); - string get_fixed_string(size_t size); - wstring get_wstring(); + std::string get_string(); + std::string get_string32(); + std::string get_z_string(); + std::string get_fixed_string(size_t size); + std::wstring get_wstring(); INLINE void skip_bytes(size_t size); vector_uchar extract_bytes(size_t size); @@ -71,8 +71,8 @@ PUBLISHED: INLINE const Datagram &get_datagram() const; INLINE size_t get_current_index() const; - void output(ostream &out) const; - void write(ostream &out, unsigned int indent=0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, unsigned int indent=0) const; private: const Datagram *_datagram; @@ -104,9 +104,9 @@ generic_read_datagram(float &result, DatagramIterator &source); INLINE void generic_read_datagram(double &result, DatagramIterator &source); INLINE void -generic_read_datagram(string &result, DatagramIterator &source); +generic_read_datagram(std::string &result, DatagramIterator &source); INLINE void -generic_read_datagram(wstring &result, DatagramIterator &source); +generic_read_datagram(std::wstring &result, DatagramIterator &source); #include "datagramIterator.I" diff --git a/panda/src/express/datagramSink.h b/panda/src/express/datagramSink.h index c72cf7595d..04d19dfaec 100644 --- a/panda/src/express/datagramSink.h +++ b/panda/src/express/datagramSink.h @@ -39,7 +39,7 @@ PUBLISHED: virtual const Filename &get_filename(); virtual const FileReference *get_file(); - virtual streampos get_file_pos(); + virtual std::streampos get_file_pos(); MAKE_PROPERTY(filename, get_filename); MAKE_PROPERTY(file, get_file); diff --git a/panda/src/express/encrypt_string.h b/panda/src/express/encrypt_string.h index 4e0d12bafb..317c9231c8 100644 --- a/panda/src/express/encrypt_string.h +++ b/panda/src/express/encrypt_string.h @@ -22,26 +22,26 @@ BEGIN_PUBLISH -EXPCL_PANDAEXPRESS string -encrypt_string(const string &source, const string &password, - const string &algorithm = string(), int key_length = -1, +EXPCL_PANDAEXPRESS std::string +encrypt_string(const std::string &source, const std::string &password, + const std::string &algorithm = std::string(), int key_length = -1, int iteration_count = -1); -EXPCL_PANDAEXPRESS string -decrypt_string(const string &source, const string &password); +EXPCL_PANDAEXPRESS std::string +decrypt_string(const std::string &source, const std::string &password); EXPCL_PANDAEXPRESS bool -encrypt_file(const Filename &source, const Filename &dest, const string &password, - const string &algorithm = string(), int key_length = -1, +encrypt_file(const Filename &source, const Filename &dest, const std::string &password, + const std::string &algorithm = std::string(), int key_length = -1, int iteration_count = -1); EXPCL_PANDAEXPRESS bool -decrypt_file(const Filename &source, const Filename &dest, const string &password); +decrypt_file(const Filename &source, const Filename &dest, const std::string &password); EXPCL_PANDAEXPRESS bool -encrypt_stream(istream &source, ostream &dest, const string &password, - const string &algorithm = string(), int key_length = -1, +encrypt_stream(std::istream &source, std::ostream &dest, const std::string &password, + const std::string &algorithm = std::string(), int key_length = -1, int iteration_count = -1); EXPCL_PANDAEXPRESS bool -decrypt_stream(istream &source, ostream &dest, const string &password); +decrypt_stream(std::istream &source, std::ostream &dest, const std::string &password); END_PUBLISH diff --git a/panda/src/express/error_utils.h b/panda/src/express/error_utils.h index 10ed4d4bd8..161a2482fe 100644 --- a/panda/src/express/error_utils.h +++ b/panda/src/express/error_utils.h @@ -74,11 +74,11 @@ enum ErrorUtilCode { EU_error_zlib = -80, }; -EXPCL_PANDAEXPRESS string error_to_text(ErrorUtilCode err); +EXPCL_PANDAEXPRESS std::string error_to_text(ErrorUtilCode err); EXPCL_PANDAEXPRESS int get_write_error(); #ifdef HAVE_NET -EXPCL_PANDAEXPRESS string handle_socket_error(); +EXPCL_PANDAEXPRESS std::string handle_socket_error(); EXPCL_PANDAEXPRESS int get_network_error(); #endif diff --git a/panda/src/express/hashVal.I b/panda/src/express/hashVal.I index 6519915034..2f78f5254a 100644 --- a/panda/src/express/hashVal.I +++ b/panda/src/express/hashVal.I @@ -100,7 +100,7 @@ merge_with(const HashVal &other) { * Outputs the HashVal as four unsigned decimal integers. */ INLINE void HashVal:: -output_dec(ostream &out) const { +output_dec(std::ostream &out) const { out << _hv[0] << " " << _hv[1] << " " << _hv[2] << " " << _hv[3]; } @@ -108,7 +108,7 @@ output_dec(ostream &out) const { * Inputs the HashVal as four unsigned decimal integers. */ INLINE void HashVal:: -input_dec(istream &in) { +input_dec(std::istream &in) { in >> _hv[0] >> _hv[1] >> _hv[2] >> _hv[3]; } @@ -116,7 +116,7 @@ input_dec(istream &in) { * */ INLINE void HashVal:: -output(ostream &out) const { +output(std::ostream &out) const { output_hex(out); } @@ -181,7 +181,7 @@ hash_ramfile(const Ramfile &ramfile) { * functionality) available. */ INLINE void HashVal:: -hash_string(const string &data) { +hash_string(const std::string &data) { hash_buffer(data.data(), data.length()); } @@ -221,7 +221,7 @@ fromhex(char digit) { } -INLINE ostream &operator << (ostream &out, const HashVal &hv) { +INLINE std::ostream &operator << (std::ostream &out, const HashVal &hv) { hv.output(out); return out; } diff --git a/panda/src/express/hashVal.h b/panda/src/express/hashVal.h index a4b3754614..eebff3eaff 100644 --- a/panda/src/express/hashVal.h +++ b/panda/src/express/hashVal.h @@ -40,20 +40,20 @@ PUBLISHED: INLINE void merge_with(const HashVal &other); - INLINE void output_dec(ostream &out) const; - INLINE void input_dec(istream &in); - void output_hex(ostream &out) const; - void input_hex(istream &in); - void output_binary(ostream &out) const; - void input_binary(istream &in); + INLINE void output_dec(std::ostream &out) const; + INLINE void input_dec(std::istream &in); + void output_hex(std::ostream &out) const; + void input_hex(std::istream &in); + void output_binary(std::ostream &out) const; + void input_binary(std::istream &in); - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; - string as_dec() const; - bool set_from_dec(const string &text); + std::string as_dec() const; + bool set_from_dec(const std::string &text); - string as_hex() const; - bool set_from_hex(const string &text); + std::string as_hex() const; + bool set_from_hex(const std::string &text); vector_uchar as_bin() const; bool set_from_bin(const vector_uchar &text); @@ -65,9 +65,9 @@ PUBLISHED: #ifdef HAVE_OPENSSL bool hash_file(const Filename &filename); - bool hash_stream(istream &stream); + bool hash_stream(std::istream &stream); INLINE void hash_ramfile(const Ramfile &ramfile); - INLINE void hash_string(const string &data); + INLINE void hash_string(const std::string &data); INLINE void hash_bytes(const pvector &data); void hash_buffer(const char *buffer, int length); #endif // HAVE_OPENSSL @@ -81,7 +81,7 @@ private: uint32_t _hv[4]; }; -INLINE ostream &operator << (ostream &out, const HashVal &hv); +INLINE std::ostream &operator << (std::ostream &out, const HashVal &hv); #include "hashVal.I" diff --git a/panda/src/express/memoryUsage.h b/panda/src/express/memoryUsage.h index cd72581704..4e33ef3766 100644 --- a/panda/src/express/memoryUsage.h +++ b/panda/src/express/memoryUsage.h @@ -179,7 +179,7 @@ private: private: // Cannot use a pmap, since that would be recursive! - typedef map Counts; + typedef std::map Counts; Counts _counts; }; TypeHistogram _trend_types; diff --git a/panda/src/express/memoryUsagePointerCounts.I b/panda/src/express/memoryUsagePointerCounts.I index 79aeba084c..0c4f97ae78 100644 --- a/panda/src/express/memoryUsagePointerCounts.I +++ b/panda/src/express/memoryUsagePointerCounts.I @@ -98,8 +98,8 @@ operator < (const MemoryUsagePointerCounts &other) const { return false; } -INLINE ostream & -operator << (ostream &out, const MemoryUsagePointerCounts &c) { +INLINE std::ostream & +operator << (std::ostream &out, const MemoryUsagePointerCounts &c) { c.output(out); return out; } diff --git a/panda/src/express/memoryUsagePointerCounts.h b/panda/src/express/memoryUsagePointerCounts.h index 2d95052ad8..b0a1820a44 100644 --- a/panda/src/express/memoryUsagePointerCounts.h +++ b/panda/src/express/memoryUsagePointerCounts.h @@ -32,7 +32,7 @@ public: INLINE void clear(); void add_info(MemoryInfo *info); - void output(ostream &out) const; + void output(std::ostream &out) const; INLINE bool is_size_unknown() const; INLINE size_t get_size() const; @@ -41,7 +41,7 @@ public: INLINE bool operator < (const MemoryUsagePointerCounts &other) const; private: - static void output_bytes(ostream &out, size_t size); + static void output_bytes(std::ostream &out, size_t size); private: int _count; @@ -49,7 +49,7 @@ private: size_t _size; }; -INLINE ostream &operator << (ostream &out, const MemoryUsagePointerCounts &c); +INLINE std::ostream &operator << (std::ostream &out, const MemoryUsagePointerCounts &c); #include "memoryUsagePointerCounts.I" diff --git a/panda/src/express/memoryUsagePointers.h b/panda/src/express/memoryUsagePointers.h index 344c2edc6b..526efec7c8 100644 --- a/panda/src/express/memoryUsagePointers.h +++ b/panda/src/express/memoryUsagePointers.h @@ -47,7 +47,7 @@ PUBLISHED: MAKE_SEQ(get_typed_pointers, get_num_pointers, get_typed_pointer); TypeHandle get_type(size_t n) const; - string get_type_name(size_t n) const; + std::string get_type_name(size_t n) const; double get_age(size_t n) const; #ifdef DO_MEMORY_USAGE @@ -56,7 +56,7 @@ PUBLISHED: void clear(); - void output(ostream &out) const; + void output(std::ostream &out) const; private: void add_entry(ReferenceCount *ref_ptr, TypedObject *typed_ptr, @@ -86,7 +86,7 @@ private: friend class MemoryUsage; }; -INLINE ostream &operator << (ostream &out, const MemoryUsagePointers &mup) { +INLINE std::ostream &operator << (std::ostream &out, const MemoryUsagePointers &mup) { mup.output(out); return out; } diff --git a/panda/src/express/multifile.I b/panda/src/express/multifile.I index aa10b223f1..128eb5297e 100644 --- a/panda/src/express/multifile.I +++ b/panda/src/express/multifile.I @@ -143,7 +143,7 @@ get_encryption_flag() const { * implicit call to flush(). */ INLINE void Multifile:: -set_encryption_password(const string &encryption_password) { +set_encryption_password(const std::string &encryption_password) { if (_encryption_password != encryption_password) { if (!_new_subfiles.empty()) { flush(); @@ -156,7 +156,7 @@ set_encryption_password(const string &encryption_password) { * Returns the password that will be used to encrypt subfiles subsequently * added to the multifile. See set_encryption_password(). */ -INLINE const string &Multifile:: +INLINE const std::string &Multifile:: get_encryption_password() const { return _encryption_password; } @@ -176,7 +176,7 @@ get_encryption_password() const { * flush(). */ INLINE void Multifile:: -set_encryption_algorithm(const string &encryption_algorithm) { +set_encryption_algorithm(const std::string &encryption_algorithm) { if (_encryption_algorithm != encryption_algorithm) { if (!_new_subfiles.empty()) { flush(); @@ -189,7 +189,7 @@ set_encryption_algorithm(const string &encryption_algorithm) { * Returns the encryption algorithm that was specified by * set_encryption_algorithm(). */ -INLINE const string &Multifile:: +INLINE const std::string &Multifile:: get_encryption_algorithm() const { return _encryption_algorithm; } @@ -268,7 +268,7 @@ get_encryption_iteration_count() const { * reduced in size after this operation, until the next call to repack(). */ INLINE bool Multifile:: -remove_subfile(const string &subfile_name) { +remove_subfile(const std::string &subfile_name) { int index = find_subfile(subfile_name); if (index >= 0) { remove_subfile(index); @@ -292,16 +292,16 @@ read_subfile(int index) { * Returns a string with the first n bytes written to a Multifile, to identify * it as a Multifile. */ -INLINE string Multifile:: +INLINE std::string Multifile:: get_magic_number() { - return string(_header, _header_size); + return std::string(_header, _header_size); } /** * Returns the string that preceded the Multifile header on the file, if any. * See set_header_prefix(). */ -INLINE const string &Multifile:: +INLINE const std::string &Multifile:: get_header_prefix() const { return _header_prefix; } @@ -310,9 +310,9 @@ get_header_prefix() const { * Converts a size_t address read from the file to a streampos byte address * within the file. */ -INLINE streampos Multifile:: +INLINE std::streampos Multifile:: word_to_streampos(size_t word) const { - return (streampos)word * (streampos)_scale_factor; + return (std::streampos)word * (std::streampos)_scale_factor; } /** @@ -320,16 +320,16 @@ word_to_streampos(size_t word) const { * suitable for writing to the file. */ INLINE size_t Multifile:: -streampos_to_word(streampos fpos) const { - return (size_t)((fpos + (streampos)_scale_factor - (streampos)1) / (streampos)_scale_factor); +streampos_to_word(std::streampos fpos) const { + return (size_t)((fpos + (std::streampos)_scale_factor - (std::streampos)1) / (std::streampos)_scale_factor); } /** * Rounds the streampos byte address up to the next multiple of _scale_factor. * Only multiples of _scale_factor may be written to the file. */ -INLINE streampos Multifile:: -normalize_streampos(streampos fpos) const { +INLINE std::streampos Multifile:: +normalize_streampos(std::streampos fpos) const { return word_to_streampos(streampos_to_word(fpos)); } @@ -418,8 +418,8 @@ is_cert_special() const { * contributes to this Subfile, either in the index record or in the subfile * data. */ -INLINE streampos Multifile::Subfile:: +INLINE std::streampos Multifile::Subfile:: get_last_byte_pos() const { - return max(_index_start + (streampos)_index_length, - _data_start + (streampos)_data_length) - (streampos)1; + return std::max(_index_start + (std::streampos)_index_length, + _data_start + (std::streampos)_data_length) - (std::streampos)1; } diff --git a/panda/src/express/multifile.h b/panda/src/express/multifile.h index ad0296055c..5ea0ce46e4 100644 --- a/panda/src/express/multifile.h +++ b/panda/src/express/multifile.h @@ -43,12 +43,12 @@ PUBLISHED: Multifile &operator = (const Multifile ©) = delete; PUBLISHED: - BLOCKING bool open_read(const Filename &multifile_name, const streampos &offset = 0); - BLOCKING bool open_read(IStreamWrapper *multifile_stream, bool owns_pointer = false, const streampos &offset = 0); + BLOCKING bool open_read(const Filename &multifile_name, const std::streampos &offset = 0); + BLOCKING bool open_read(IStreamWrapper *multifile_stream, bool owns_pointer = false, const std::streampos &offset = 0); BLOCKING bool open_write(const Filename &multifile_name); - BLOCKING bool open_write(ostream *multifile_stream, bool owns_pointer = false); + BLOCKING bool open_write(std::ostream *multifile_stream, bool owns_pointer = false); BLOCKING bool open_read_write(const Filename &multifile_name); - BLOCKING bool open_read_write(iostream *multifile_stream, bool owns_pointer = false); + BLOCKING bool open_read_write(std::iostream *multifile_stream, bool owns_pointer = false); BLOCKING void close(); INLINE const Filename &get_multifile_name() const; @@ -68,37 +68,37 @@ PUBLISHED: INLINE void set_encryption_flag(bool flag); INLINE bool get_encryption_flag() const; - INLINE void set_encryption_password(const string &encryption_password); - INLINE const string &get_encryption_password() const; + INLINE void set_encryption_password(const std::string &encryption_password); + INLINE const std::string &get_encryption_password() const; - INLINE void set_encryption_algorithm(const string &encryption_algorithm); - INLINE const string &get_encryption_algorithm() const; + INLINE void set_encryption_algorithm(const std::string &encryption_algorithm); + INLINE const std::string &get_encryption_algorithm() const; INLINE void set_encryption_key_length(int encryption_key_length); INLINE int get_encryption_key_length() const; INLINE void set_encryption_iteration_count(int encryption_iteration_count); INLINE int get_encryption_iteration_count() const; - string add_subfile(const string &subfile_name, const Filename &filename, + std::string add_subfile(const std::string &subfile_name, const Filename &filename, int compression_level); - string add_subfile(const string &subfile_name, istream *subfile_data, + std::string add_subfile(const std::string &subfile_name, std::istream *subfile_data, int compression_level); - string update_subfile(const string &subfile_name, const Filename &filename, + std::string update_subfile(const std::string &subfile_name, const Filename &filename, int compression_level); #ifdef HAVE_OPENSSL bool add_signature(const Filename &certificate, const Filename &chain, const Filename &pkey, - const string &password = ""); + const std::string &password = ""); bool add_signature(const Filename &composite, - const string &password = ""); + const std::string &password = ""); int get_num_signatures() const; - string get_signature_subject_name(int n) const; - string get_signature_friendly_name(int n) const; - string get_signature_public_key(int n) const; - void print_signature_certificate(int n, ostream &out) const; - void write_signature_certificate(int n, ostream &out) const; + std::string get_signature_subject_name(int n) const; + std::string get_signature_friendly_name(int n) const; + std::string get_signature_public_key(int n) const; + void print_signature_certificate(int n, std::ostream &out) const; + void write_signature_certificate(int n, std::ostream &out) const; int validate_signature_certificate(int n) const; #endif // HAVE_OPENSSL @@ -107,13 +107,13 @@ PUBLISHED: BLOCKING bool repack(); int get_num_subfiles() const; - int find_subfile(const string &subfile_name) const; - bool has_directory(const string &subfile_name) const; + int find_subfile(const std::string &subfile_name) const; + bool has_directory(const std::string &subfile_name) const; bool scan_directory(vector_string &contents, - const string &subfile_name) const; + const std::string &subfile_name) const; void remove_subfile(int index); - INLINE bool remove_subfile(const string &subfile_name); - const string &get_subfile_name(int index) const; + INLINE bool remove_subfile(const std::string &subfile_name); + const std::string &get_subfile_name(int index) const; MAKE_SEQ(get_subfile_names, get_num_subfiles, get_subfile_name); size_t get_subfile_length(int index) const; time_t get_subfile_timestamp(int index) const; @@ -121,25 +121,25 @@ PUBLISHED: bool is_subfile_encrypted(int index) const; bool is_subfile_text(int index) const; - streampos get_index_end() const; - streampos get_subfile_internal_start(int index) const; + std::streampos get_index_end() const; + std::streampos get_subfile_internal_start(int index) const; size_t get_subfile_internal_length(int index) const; BLOCKING INLINE vector_uchar read_subfile(int index); - BLOCKING istream *open_read_subfile(int index); - BLOCKING static void close_read_subfile(istream *stream); + BLOCKING std::istream *open_read_subfile(int index); + BLOCKING static void close_read_subfile(std::istream *stream); BLOCKING bool extract_subfile(int index, const Filename &filename); - BLOCKING bool extract_subfile_to(int index, ostream &out); + BLOCKING bool extract_subfile_to(int index, std::ostream &out); BLOCKING bool compare_subfile(int index, const Filename &filename); - void output(ostream &out) const; - void ls(ostream &out = cout) const; + void output(std::ostream &out) const; + void ls(std::ostream &out = std::cout) const; - static INLINE string get_magic_number(); + static INLINE std::string get_magic_number(); MAKE_PROPERTY(magic_number, get_magic_number); - void set_header_prefix(const string &header_prefix); - INLINE const string &get_header_prefix() const; + void set_header_prefix(const std::string &header_prefix); + INLINE const std::string &get_header_prefix() const; public: #ifdef HAVE_OPENSSL @@ -158,7 +158,7 @@ public: const CertChain &get_signature(int n) const; #endif // HAVE_OPENSSL - bool read_subfile(int index, string &result); + bool read_subfile(int index, std::string &result); bool read_subfile(int index, pvector &result); private: @@ -176,28 +176,28 @@ private: public: INLINE Subfile(); INLINE bool operator < (const Subfile &other) const; - streampos read_index(istream &read, streampos fpos, + std::streampos read_index(std::istream &read, std::streampos fpos, Multifile *multfile); - streampos write_index(ostream &write, streampos fpos, + std::streampos write_index(std::ostream &write, std::streampos fpos, Multifile *multifile); - streampos write_data(ostream &write, istream *read, streampos fpos, + std::streampos write_data(std::ostream &write, std::istream *read, std::streampos fpos, Multifile *multifile); - void rewrite_index_data_start(ostream &write, Multifile *multifile); - void rewrite_index_flags(ostream &write); + void rewrite_index_data_start(std::ostream &write, Multifile *multifile); + void rewrite_index_flags(std::ostream &write); INLINE bool is_deleted() const; INLINE bool is_index_invalid() const; INLINE bool is_data_invalid() const; INLINE bool is_cert_special() const; - INLINE streampos get_last_byte_pos() const; + INLINE std::streampos get_last_byte_pos() const; - string _name; - streampos _index_start; + std::string _name; + std::streampos _index_start; size_t _index_length; - streampos _data_start; + std::streampos _data_start; size_t _data_length; size_t _uncompressed_length; time_t _timestamp; - istream *_source; + std::istream *_source; Filename _source_filename; int _flags; int _compression_level; // Not preserved on disk. @@ -206,14 +206,14 @@ private: #endif }; - INLINE streampos word_to_streampos(size_t word) const; - INLINE size_t streampos_to_word(streampos fpos) const; - INLINE streampos normalize_streampos(streampos fpos) const; - streampos pad_to_streampos(streampos fpos); + INLINE std::streampos word_to_streampos(size_t word) const; + INLINE size_t streampos_to_word(std::streampos fpos) const; + INLINE std::streampos normalize_streampos(std::streampos fpos) const; + std::streampos pad_to_streampos(std::streampos fpos); void add_new_subfile(Subfile *subfile, int compression_level); - istream *open_read_subfile(Subfile *subfile); - string standardize_subfile_name(const string &subfile_name) const; + std::istream *open_read_subfile(Subfile *subfile); + std::string standardize_subfile_name(const std::string &subfile_name) const; void clear_subfiles(); bool read_index(); @@ -235,13 +235,13 @@ private: Certificates _signatures; #endif - streampos _offset; + std::streampos _offset; IStreamWrapper *_read; - ostream *_write; + std::ostream *_write; bool _owns_stream; - streampos _next_index; - streampos _last_index; - streampos _last_data_byte; + std::streampos _next_index; + std::streampos _last_index; + std::streampos _last_data_byte; bool _needs_repack; time_t _timestamp; @@ -251,8 +251,8 @@ private: size_t _new_scale_factor; bool _encryption_flag; - string _encryption_password; - string _encryption_algorithm; + std::string _encryption_password; + std::string _encryption_algorithm; int _encryption_key_length; int _encryption_iteration_count; @@ -262,7 +262,7 @@ private: pfstream _read_write_file; StreamWrapper _read_write_filew; Filename _multifile_name; - string _header_prefix; + std::string _header_prefix; int _file_major_ver; int _file_minor_ver; diff --git a/panda/src/express/namable.I b/panda/src/express/namable.I index 75aa846087..d7060ce1c9 100644 --- a/panda/src/express/namable.I +++ b/panda/src/express/namable.I @@ -15,7 +15,7 @@ * */ INLINE Namable:: -Namable(const string &initial_name) : +Namable(const std::string &initial_name) : _name(initial_name) { } @@ -24,7 +24,7 @@ Namable(const string &initial_name) : * */ INLINE void Namable:: -set_name(const string &name) { +set_name(const std::string &name) { _name = name; } @@ -48,7 +48,7 @@ has_name() const { /** * */ -INLINE const string &Namable:: +INLINE const std::string &Namable:: get_name() const { return _name; } @@ -58,12 +58,12 @@ get_name() const { * stream; most Namable derivatives will probably redefine this. */ INLINE void Namable:: -output(ostream &out) const { +output(std::ostream &out) const { out << get_name(); } -INLINE ostream &operator << (ostream &out, const Namable &n) { +INLINE std::ostream &operator << (std::ostream &out, const Namable &n) { n.output(out); return out; } diff --git a/panda/src/express/namable.h b/panda/src/express/namable.h index 19a712d9d3..7dc42d089b 100644 --- a/panda/src/express/namable.h +++ b/panda/src/express/namable.h @@ -25,20 +25,20 @@ */ class EXPCL_PANDAEXPRESS Namable : public MemoryBase { PUBLISHED: - INLINE explicit Namable(const string &initial_name = ""); + INLINE explicit Namable(const std::string &initial_name = ""); - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); INLINE void clear_name(); INLINE bool has_name() const; - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; MAKE_PROPERTY(name, get_name, set_name); // In the absence of any definition to the contrary, outputting a Namable // will write out its name. - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; private: - string _name; + std::string _name; public: static TypeHandle get_class_type() { @@ -52,7 +52,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const Namable &n); +INLINE std::ostream &operator << (std::ostream &out, const Namable &n); /** * An STL function object for sorting an array of pointers to Namables into diff --git a/panda/src/express/nodePointerTo.I b/panda/src/express/nodePointerTo.I index c8020d0181..6d5d3bd669 100644 --- a/panda/src/express/nodePointerTo.I +++ b/panda/src/express/nodePointerTo.I @@ -52,7 +52,7 @@ NodePointerTo(NodePointerTo &&from) noexcept : template INLINE NodePointerTo &NodePointerTo:: operator = (NodePointerTo &&from) noexcept { - this->reassign(move(from)); + this->reassign(std::move(from)); return *this; } #endif // CPPPARSER @@ -196,7 +196,7 @@ NodeConstPointerTo(NodeConstPointerTo &&from) noexcept : template INLINE NodeConstPointerTo &NodeConstPointerTo:: operator = (NodePointerTo &&from) noexcept { - this->reassign(move(from)); + this->reassign(std::move(from)); return *this; } #endif // CPPPARSER @@ -208,7 +208,7 @@ operator = (NodePointerTo &&from) noexcept { template INLINE NodeConstPointerTo &NodeConstPointerTo:: operator = (NodeConstPointerTo &&from) noexcept { - this->reassign(move(from)); + this->reassign(std::move(from)); return *this; } #endif // CPPPARSER diff --git a/panda/src/express/nodePointerToBase.I b/panda/src/express/nodePointerToBase.I index 40c9eb6506..48a7fe3fff 100644 --- a/panda/src/express/nodePointerToBase.I +++ b/panda/src/express/nodePointerToBase.I @@ -134,7 +134,7 @@ clear() { */ template INLINE void NodePointerToBase:: -output(ostream &out) const { +output(std::ostream &out) const { out << _void_ptr; if (_void_ptr != nullptr) { out << ":" << ((To *)_void_ptr)->get_node_ref_count() << "/" diff --git a/panda/src/express/nodePointerToBase.h b/panda/src/express/nodePointerToBase.h index 0b28a5c6bc..d4ddd7caad 100644 --- a/panda/src/express/nodePointerToBase.h +++ b/panda/src/express/nodePointerToBase.h @@ -49,11 +49,11 @@ protected: PUBLISHED: INLINE void clear(); - void output(ostream &out) const; + void output(std::ostream &out) const; }; template -INLINE ostream &operator <<(ostream &out, const NodePointerToBase &pointer) { +INLINE std::ostream &operator <<(std::ostream &out, const NodePointerToBase &pointer) { pointer.output(out); return out; } diff --git a/panda/src/express/nodeReferenceCount.I b/panda/src/express/nodeReferenceCount.I index 4f963476f7..d87bc982d8 100644 --- a/panda/src/express/nodeReferenceCount.I +++ b/panda/src/express/nodeReferenceCount.I @@ -215,9 +215,9 @@ void NodeRefCountObj:: init_type() { #if defined(HAVE_RTTI) && !defined(__EDG__) // If we have RTTI, we can determine the name of the base type. - string base_name = typeid(Base).name(); + std::string base_name = typeid(Base).name(); #else - string base_name = "unknown"; + std::string base_name = "unknown"; #endif TypeHandle base_type = register_dynamic_type(base_name); diff --git a/panda/src/express/openSSLWrapper.I b/panda/src/express/openSSLWrapper.I index 3d5cf81999..a8b8e396a6 100644 --- a/panda/src/express/openSSLWrapper.I +++ b/panda/src/express/openSSLWrapper.I @@ -21,7 +21,7 @@ * with certificates received from an untrusted source. */ INLINE int OpenSSLWrapper:: -load_certificates_from_pem_ram(const string &data) { +load_certificates_from_pem_ram(const std::string &data) { return load_certificates_from_pem_ram(data.data(), data.size()); } @@ -35,6 +35,6 @@ load_certificates_from_pem_ram(const string &data) { * with certificates received from an untrusted source. */ INLINE int OpenSSLWrapper:: -load_certificates_from_der_ram(const string &data) { +load_certificates_from_der_ram(const std::string &data) { return load_certificates_from_der_ram(data.data(), data.size()); } diff --git a/panda/src/express/openSSLWrapper.h b/panda/src/express/openSSLWrapper.h index 306039e1c0..134bc28ccb 100644 --- a/panda/src/express/openSSLWrapper.h +++ b/panda/src/express/openSSLWrapper.h @@ -54,8 +54,8 @@ PUBLISHED: int load_certificates_from_pem_ram(const char *data, size_t data_size); int load_certificates_from_der_ram(const char *data, size_t data_size); - INLINE int load_certificates_from_pem_ram(const string &data); - INLINE int load_certificates_from_der_ram(const string &data); + INLINE int load_certificates_from_pem_ram(const std::string &data); + INLINE int load_certificates_from_der_ram(const std::string &data); X509_STORE *get_x509_store(); diff --git a/panda/src/express/ordered_vector.I b/panda/src/express/ordered_vector.I index aedee72232..d55a0b98b6 100644 --- a/panda/src/express/ordered_vector.I +++ b/panda/src/express/ordered_vector.I @@ -312,25 +312,25 @@ operator >= (const ordered_vector &other) const { * componet is true if the insert operation has taken place. */ template -INLINE pair::ITERATOR, bool> ordered_vector:: +INLINE std::pair::ITERATOR, bool> ordered_vector:: insert_unique(const typename ordered_vector::VALUE_TYPE &key) { TAU_PROFILE("ordered_vector::insert_unique(const value_type &)", " ", TAU_USER); ITERATOR position = find_insert_position(begin(), end(), key); #ifdef NDEBUG - pair bogus_result(end(), false); + std::pair bogus_result(end(), false); nassertr(position >= begin() && position <= end(), bogus_result); #endif // If there's already an equivalent key in the vector, it's at *(position - // 1). if (position != begin() && !_compare(*(position - 1), key)) { - pair result(position - 1, false); + std::pair result(position - 1, false); nassertr(!_compare(key, *(position - 1)), result); return result; } ITERATOR result = _vector.insert(position, key); - return pair(result, true); + return std::pair(result, true); } /** @@ -387,7 +387,7 @@ template INLINE typename ordered_vector::SIZE_TYPE ordered_vector:: erase(const typename ordered_vector::KEY_TYPE &key) { TAU_PROFILE("ordered_vector::erase(const key_type &)", " ", TAU_USER); - pair result = equal_range(key); + std::pair result = equal_range(key); SIZE_TYPE count = result.second - result.first; erase(result.first, result.second); return count; @@ -534,19 +534,19 @@ upper_bound(const typename ordered_vector::KEY_TYPE &key) * Returns the pair (lower_bound(key), upper_bound(key)). */ template -INLINE pair::ITERATOR, typename ordered_vector::ITERATOR> ordered_vector:: +INLINE std::pair::ITERATOR, typename ordered_vector::ITERATOR> ordered_vector:: equal_range(const typename ordered_vector::KEY_TYPE &key) { TAU_PROFILE("ordered_vector::equal_range(const key_type &)", " ", TAU_USER); - pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> result; + std::pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> result; result = r_equal_range(begin(), end(), key); - return pair::ITERATOR, typename ordered_vector::ITERATOR>(nci(result.first), nci(result.second)); + return std::pair::ITERATOR, typename ordered_vector::ITERATOR>(nci(result.first), nci(result.second)); } /** * Returns the pair (lower_bound(key), upper_bound(key)). */ template -INLINE pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> ordered_vector:: +INLINE std::pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> ordered_vector:: equal_range(const typename ordered_vector::KEY_TYPE &key) const { TAU_PROFILE("ordered_vector::equal_range(const key_type &)", " ", TAU_USER); return r_equal_range(begin(), end(), key); @@ -625,7 +625,7 @@ template INLINE void ordered_vector:: push_back(value_type &&key) { TAU_PROFILE("ordered_vector::push_back()", " ", TAU_USER); - _vector.push_back(move(key)); + _vector.push_back(std::move(key)); } /** @@ -718,7 +718,7 @@ insert(typename ov_set::ITERATOR position, * Maps to insert_unique(). */ template -INLINE pair::ITERATOR, bool> ov_set:: +INLINE std::pair::ITERATOR, bool> ov_set:: insert(const typename ov_set::VALUE_TYPE &key) { return ordered_vector::insert_unique(key); } diff --git a/panda/src/express/ordered_vector.T b/panda/src/express/ordered_vector.T index 2d57d0a1d3..f41109dab1 100644 --- a/panda/src/express/ordered_vector.T +++ b/panda/src/express/ordered_vector.T @@ -348,11 +348,11 @@ r_upper_bound(typename ordered_vector::CONST_ITERATOR firs * The recursive implementation of equal_range(). */ template -pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> ordered_vector:: +std::pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> ordered_vector:: r_equal_range(typename ordered_vector::CONST_ITERATOR first, typename ordered_vector::CONST_ITERATOR last, const typename ordered_vector::KEY_TYPE &key) const { - typedef pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> pair_type; + typedef std::pair::CONST_ITERATOR, typename ordered_vector::CONST_ITERATOR> pair_type; if (first == last) { // The list is empty; the key is not on the list. diff --git a/panda/src/express/ordered_vector.h b/panda/src/express/ordered_vector.h index 651a0c27fb..1a4869b91a 100644 --- a/panda/src/express/ordered_vector.h +++ b/panda/src/express/ordered_vector.h @@ -19,15 +19,15 @@ // memory foot pront and user time by a bunch on pc cygwin from 3 minutes to // 17 seconds ?? really need to explore interigate to figure out what is going // on .. -template, class Vector = pvector > class ov_multiset +template, class Vector = pvector > class ov_multiset { }; -template, class Vector = pvector > class ov_set +template, class Vector = pvector > class ov_set { }; -template, class Vector = pvector > class ordered_vector +template, class Vector = pvector > class ordered_vector { }; @@ -91,7 +91,7 @@ template, class Vector = pvector > cla * * (4) Random access into the set is easy with the [] operator. */ -template, class Vector = pvector > +template, class Vector = pvector > class ordered_vector { public: // Typedefs @@ -179,7 +179,7 @@ public: // Insert operations. ITERATOR insert_unique(ITERATOR position, const VALUE_TYPE &key); ITERATOR insert_nonunique(ITERATOR position, const VALUE_TYPE &key); - INLINE pair insert_unique(const VALUE_TYPE &key); + INLINE std::pair insert_unique(const VALUE_TYPE &key); INLINE ITERATOR insert_nonunique(const VALUE_TYPE &key); INLINE ITERATOR insert_unverified(ITERATOR position, const VALUE_TYPE &key); @@ -200,8 +200,8 @@ public: INLINE CONST_ITERATOR lower_bound(const KEY_TYPE &key) const; INLINE ITERATOR upper_bound(const KEY_TYPE &key); INLINE CONST_ITERATOR upper_bound(const KEY_TYPE &key) const; - INLINE pair equal_range(const KEY_TYPE &key); - INLINE pair equal_range(const KEY_TYPE &key) const; + INLINE std::pair equal_range(const KEY_TYPE &key); + INLINE std::pair equal_range(const KEY_TYPE &key) const; // Special operations. INLINE void swap(ordered_vector &other); @@ -235,7 +235,7 @@ private: const KEY_TYPE &key) const; CONST_ITERATOR r_upper_bound(CONST_ITERATOR first, CONST_ITERATOR last, const KEY_TYPE &key) const; - pair + std::pair r_equal_range(CONST_ITERATOR first, CONST_ITERATOR last, const KEY_TYPE &key) const; @@ -265,7 +265,7 @@ private: * A specialization of ordered_vector that emulates a standard STL set: one * copy of each element is allowed. */ -template, class Vector = pvector > +template, class Vector = pvector > class ov_set : public ordered_vector { public: typedef typename ordered_vector::ITERATOR ITERATOR; @@ -276,7 +276,7 @@ public: TypeHandle type_handle = ov_set_type_handle); INLINE ITERATOR insert(ITERATOR position, const VALUE_TYPE &key0); - INLINE pair insert(const VALUE_TYPE &key0); + INLINE std::pair insert(const VALUE_TYPE &key0); INLINE void sort(); INLINE bool verify_list() const; @@ -286,7 +286,7 @@ public: * A specialization of ordered_vector that emulates a standard STL set: many * copies of each element are allowed. */ -template, class Vector = pvector > +template, class Vector = pvector > class ov_multiset : public ordered_vector { public: typedef typename ordered_vector::ITERATOR ITERATOR; diff --git a/panda/src/express/password_hash.h b/panda/src/express/password_hash.h index 8006d8d9ea..a1af7e8b26 100644 --- a/panda/src/express/password_hash.h +++ b/panda/src/express/password_hash.h @@ -22,8 +22,8 @@ BEGIN_PUBLISH -EXPCL_PANDAEXPRESS string password_hash(const string &password, - const string &salt, +EXPCL_PANDAEXPRESS std::string password_hash(const std::string &password, + const std::string &salt, int iters, int keylen); END_PUBLISH diff --git a/panda/src/express/patchfile.I b/panda/src/express/patchfile.I index 600c7e92ca..bea1547c28 100644 --- a/panda/src/express/patchfile.I +++ b/panda/src/express/patchfile.I @@ -21,7 +21,7 @@ INLINE PN_stdfloat Patchfile:: get_progress() const { if (!_initiated) { express_cat.warning() - << "Patchfile::get_progress() - Patch has not been initiated" << endl; + << "Patchfile::get_progress() - Patch has not been initiated" << std::endl; return 0.0f; } nassertr(_total_bytes_to_process > 0, 0.0f); diff --git a/panda/src/express/patchfile.h b/panda/src/express/patchfile.h index c32c1d59e7..6e40d65aee 100644 --- a/panda/src/express/patchfile.h +++ b/panda/src/express/patchfile.h @@ -88,49 +88,49 @@ private: uint32_t calc_match_length(const char* buf1, const char* buf2, uint32_t max_length, uint32_t min_length); - void emit_ADD(ostream &write_stream, uint32_t length, const char* buffer); - void emit_COPY(ostream &write_stream, uint32_t length, uint32_t COPY_pos); - void emit_add_and_copy(ostream &write_stream, + void emit_ADD(std::ostream &write_stream, uint32_t length, const char* buffer); + void emit_COPY(std::ostream &write_stream, uint32_t length, uint32_t COPY_pos); + void emit_add_and_copy(std::ostream &write_stream, uint32_t add_length, const char *add_buffer, uint32_t copy_length, uint32_t copy_pos); - void cache_add_and_copy(ostream &write_stream, + void cache_add_and_copy(std::ostream &write_stream, uint32_t add_length, const char *add_buffer, uint32_t copy_length, uint32_t copy_pos); - void cache_flush(ostream &write_stream); + void cache_flush(std::ostream &write_stream); - void write_header(ostream &write_stream, - istream &stream_orig, istream &stream_new); - void write_terminator(ostream &write_stream); + void write_header(std::ostream &write_stream, + std::istream &stream_orig, std::istream &stream_new); + void write_terminator(std::ostream &write_stream); - bool compute_file_patches(ostream &write_stream, + bool compute_file_patches(std::ostream &write_stream, uint32_t offset_orig, uint32_t offset_new, - istream &stream_orig, istream &stream_new); - bool compute_mf_patches(ostream &write_stream, + std::istream &stream_orig, std::istream &stream_new); + bool compute_mf_patches(std::ostream &write_stream, uint32_t offset_orig, uint32_t offset_new, - istream &stream_orig, istream &stream_new); + std::istream &stream_orig, std::istream &stream_new); #ifdef HAVE_TAR class TarSubfile { public: inline bool operator < (const TarSubfile &other) const { return _name < other._name; } - string _name; - streampos _header_start; - streampos _data_start; - streampos _data_end; - streampos _end; + std::string _name; + std::streampos _header_start; + std::streampos _data_start; + std::streampos _data_end; + std::streampos _end; }; typedef ov_set TarDef; - bool read_tar(TarDef &tar, istream &stream); - bool compute_tar_patches(ostream &write_stream, + bool read_tar(TarDef &tar, std::istream &stream); + bool compute_tar_patches(std::ostream &write_stream, uint32_t offset_orig, uint32_t offset_new, - istream &stream_orig, istream &stream_new, + std::istream &stream_orig, std::istream &stream_new, TarDef &tar_orig, TarDef &tar_new); // Because this is static, we can only call read_tar() one at a time--no // threads, please. - static istream *_tar_istream; + static std::istream *_tar_istream; static int tar_openfunc(const char *filename, int oflags, ...); static int tar_closefunc(int fd); @@ -139,15 +139,15 @@ private: #endif // HAVE_TAR bool do_compute_patches(const Filename &file_orig, const Filename &file_new, - ostream &write_stream, + std::ostream &write_stream, uint32_t offset_orig, uint32_t offset_new, - istream &stream_orig, istream &stream_new); + std::istream &stream_orig, std::istream &stream_new); - bool patch_subfile(ostream &write_stream, + bool patch_subfile(std::ostream &write_stream, uint32_t offset_orig, uint32_t offset_new, const Filename &filename, - IStreamWrapper &stream_orig, streampos orig_start, streampos orig_end, - IStreamWrapper &stream_new, streampos new_start, streampos new_end); + IStreamWrapper &stream_orig, std::streampos orig_start, std::streampos orig_end, + IStreamWrapper &stream_new, std::streampos new_start, std::streampos new_end); static const uint32_t _HASH_BITS; static const uint32_t _HASHTABLESIZE; @@ -164,7 +164,7 @@ private: uint32_t _add_pos; uint32_t _last_copy_pos; - string _cache_add_data; + std::string _cache_add_data; uint32_t _cache_copy_start; uint32_t _cache_copy_length; @@ -183,9 +183,9 @@ private: uint32_t _total_bytes_to_process; uint32_t _total_bytes_processed; - istream *_patch_stream; + std::istream *_patch_stream; pofstream _write_stream; - istream *_origfile_stream; + std::istream *_origfile_stream; Filename _patch_file; Filename _orig_file; diff --git a/panda/src/express/pointerTo.I b/panda/src/express/pointerTo.I index 20e667fa11..e0f8c85046 100644 --- a/panda/src/express/pointerTo.I +++ b/panda/src/express/pointerTo.I @@ -35,7 +35,7 @@ PointerTo(const PointerTo ©) : template INLINE PointerTo:: PointerTo(PointerTo &&from) noexcept : - PointerToBase(move(from)) + PointerToBase(std::move(from)) { } @@ -45,7 +45,7 @@ PointerTo(PointerTo &&from) noexcept : template INLINE PointerTo &PointerTo:: operator = (PointerTo &&from) noexcept { - this->reassign(move(from)); + this->reassign(std::move(from)); return *this; } @@ -158,7 +158,7 @@ ConstPointerTo(const ConstPointerTo ©) : template INLINE ConstPointerTo:: ConstPointerTo(PointerTo &&from) noexcept : - PointerToBase(move(from)) + PointerToBase(std::move(from)) { } @@ -168,7 +168,7 @@ ConstPointerTo(PointerTo &&from) noexcept : template INLINE ConstPointerTo:: ConstPointerTo(ConstPointerTo &&from) noexcept : - PointerToBase(move(from)) + PointerToBase(std::move(from)) { } @@ -178,7 +178,7 @@ ConstPointerTo(ConstPointerTo &&from) noexcept : template INLINE ConstPointerTo &ConstPointerTo:: operator = (PointerTo &&from) noexcept { - this->reassign(move(from)); + this->reassign(std::move(from)); return *this; } @@ -188,7 +188,7 @@ operator = (PointerTo &&from) noexcept { template INLINE ConstPointerTo &ConstPointerTo:: operator = (ConstPointerTo &&from) noexcept { - this->reassign(move(from)); + this->reassign(std::move(from)); return *this; } diff --git a/panda/src/express/pointerToArray.I b/panda/src/express/pointerToArray.I index 04e943c5fc..5fb560b695 100644 --- a/panda/src/express/pointerToArray.I +++ b/panda/src/express/pointerToArray.I @@ -85,7 +85,7 @@ PointerToArray(const Element *begin, const Element *end, TypeHandle type_handle) template INLINE PointerToArray:: PointerToArray(PointerToArray &&from) noexcept : - PointerToArrayBase(move(from)), + PointerToArrayBase(std::move(from)), _type_handle(from._type_handle) { } @@ -96,7 +96,7 @@ PointerToArray(PointerToArray &&from) noexcept : template INLINE PointerToArray:: PointerToArray(pvector &&from, TypeHandle type_handle) : - PointerToArrayBase(new ReferenceCountedVector(move(from))), + PointerToArrayBase(new ReferenceCountedVector(std::move(from))), _type_handle(type_handle) { } @@ -443,7 +443,7 @@ set_element(size_type n, const Element &value) { * string. */ template -INLINE string PointerToArray:: +INLINE std::string PointerToArray:: get_data() const { return get_subdata(0, size()); } @@ -457,7 +457,7 @@ get_data() const { */ template INLINE void PointerToArray:: -set_data(const string &data) { +set_data(const std::string &data) { set_subdata(0, size(), data); } @@ -469,12 +469,12 @@ set_data(const string &data) { * through element (n + count - 1)--as a block of raw data in a string. */ template -INLINE string PointerToArray:: +INLINE std::string PointerToArray:: get_subdata(size_type n, size_type count) const { - n = min(n, size()); - count = max(count, n); - count = min(count, size() - n); - return string((const char *)(p() + n), sizeof(Element) * count); + n = std::min(n, size()); + count = std::max(count, n); + count = std::min(count, size() - n); + return std::string((const char *)(p() + n), sizeof(Element) * count); } /** @@ -489,7 +489,7 @@ get_subdata(size_type n, size_type count) const { */ template INLINE void PointerToArray:: -set_subdata(size_type n, size_type count, const string &data) { +set_subdata(size_type n, size_type count, const std::string &data) { nassertv((data.length() % sizeof(Element)) == 0); nassertv(n <= size() && n + count <= size()); if ((this->_void_ptr) == nullptr) { @@ -631,7 +631,7 @@ template INLINE PointerToArray &PointerToArray:: operator = (PointerToArray &&from) noexcept { _type_handle = from._type_handle; - ((PointerToArray *)this)->reassign(move(from)); + ((PointerToArray *)this)->reassign(std::move(from)); return *this; } @@ -697,7 +697,7 @@ ConstPointerToArray(const ConstPointerToArray ©) : template INLINE ConstPointerToArray:: ConstPointerToArray(PointerToArray &&from) noexcept : - PointerToArrayBase(move(from)), + PointerToArrayBase(std::move(from)), _type_handle(from._type_handle) { } @@ -708,7 +708,7 @@ ConstPointerToArray(PointerToArray &&from) noexcept : template INLINE ConstPointerToArray:: ConstPointerToArray(ConstPointerToArray &&from) noexcept : - PointerToArrayBase(move(from)), + PointerToArrayBase(std::move(from)), _type_handle(from._type_handle) { } @@ -719,7 +719,7 @@ ConstPointerToArray(ConstPointerToArray &&from) noexcept : template INLINE ConstPointerToArray:: ConstPointerToArray(pvector &&from, TypeHandle type_handle) : - PointerToArrayBase(new ReferenceCountedVector(move(from))), + PointerToArrayBase(new ReferenceCountedVector(std::move(from))), _type_handle(type_handle) { } @@ -950,7 +950,7 @@ get_element(size_type n) const { * string. */ template -INLINE string ConstPointerToArray:: +INLINE std::string ConstPointerToArray:: get_data() const { return get_subdata(0, size()); } @@ -963,12 +963,12 @@ get_data() const { * through element (n + count - 1)--as a block of raw data in a string. */ template -INLINE string ConstPointerToArray:: +INLINE std::string ConstPointerToArray:: get_subdata(size_type n, size_type count) const { - n = min(n, size()); - count = max(count, n); - count = min(count, size() - n); - return string((const char *)(p() + n), sizeof(Element) * count); + n = std::min(n, size()); + count = std::max(count, n); + count = std::min(count, size() - n); + return std::string((const char *)(p() + n), sizeof(Element) * count); } /** @@ -1085,7 +1085,7 @@ template INLINE ConstPointerToArray &ConstPointerToArray:: operator = (PointerToArray &&from) noexcept { _type_handle = from._type_handle; - ((ConstPointerToArray *)this)->reassign(move(from)); + ((ConstPointerToArray *)this)->reassign(std::move(from)); return *this; } @@ -1096,7 +1096,7 @@ template INLINE ConstPointerToArray &ConstPointerToArray:: operator = (ConstPointerToArray &&from) noexcept { _type_handle = from._type_handle; - ((ConstPointerToArray *)this)->reassign(move(from)); + ((ConstPointerToArray *)this)->reassign(std::move(from)); return *this; } diff --git a/panda/src/express/pointerToArray.h b/panda/src/express/pointerToArray.h index 57c8be2f92..7ff07a5ef1 100644 --- a/panda/src/express/pointerToArray.h +++ b/panda/src/express/pointerToArray.h @@ -110,7 +110,7 @@ PUBLISHED: EXTENSION(PyObject *get_data() const); EXTENSION(void set_data(PyObject *data)); EXTENSION(PyObject *get_subdata(size_type n, size_type count) const); - INLINE void set_subdata(size_type n, size_type count, const string &data); + INLINE void set_subdata(size_type n, size_type count, const std::string &data); INLINE int get_ref_count() const; INLINE int get_node_ref_count() const; @@ -196,10 +196,10 @@ public: // Methods to help out Python and other high-level languages. INLINE const Element &get_element(size_type n) const; INLINE void set_element(size_type n, const Element &value); - INLINE string get_data() const; - INLINE void set_data(const string &data); - INLINE string get_subdata(size_type n, size_type count) const; - INLINE void set_subdata(size_type n, size_type count, const string &data); + INLINE std::string get_data() const; + INLINE void set_data(const std::string &data); + INLINE std::string get_subdata(size_type n, size_type count) const; + INLINE void set_subdata(size_type n, size_type count, const std::string &data); // These functions are only to be used in Reading through BamReader. They // are designed to work in pairs, so that you register what is returned by @@ -336,8 +336,8 @@ PUBLISHED: // Methods to help out Python and other high-level languages. INLINE const Element &get_element(size_type n) const; - INLINE string get_data() const; - INLINE string get_subdata(size_type n, size_type count) const; + INLINE std::string get_data() const; + INLINE std::string get_subdata(size_type n, size_type count) const; INLINE int get_ref_count() const; INLINE void ref() const; diff --git a/panda/src/express/pointerToArrayBase.I b/panda/src/express/pointerToArrayBase.I index a5188040fb..d22b113ac5 100644 --- a/panda/src/express/pointerToArrayBase.I +++ b/panda/src/express/pointerToArrayBase.I @@ -45,7 +45,7 @@ ReferenceCountedVector(const Element *begin, const Element *end, TypeHandle type template INLINE ReferenceCountedVector:: ReferenceCountedVector(pvector &&from) : - pvector(move(from)) + pvector(std::move(from)) { } @@ -138,7 +138,7 @@ PointerToArrayBase(const PointerToArrayBase ©) : template INLINE PointerToArrayBase:: PointerToArrayBase(PointerToArrayBase &&from) noexcept : - PointerToBase >(move(from)) + PointerToBase >(std::move(from)) { } diff --git a/panda/src/express/pointerToArray_ext.I b/panda/src/express/pointerToArray_ext.I index eedb92d3f4..ee4c10e155 100644 --- a/panda/src/express/pointerToArray_ext.I +++ b/panda/src/express/pointerToArray_ext.I @@ -248,9 +248,9 @@ set_data(PyObject *data) { template INLINE PyObject *Extension >:: get_subdata(size_t n, size_t count) const { - n = min(n, this->_this->size()); - count = max(count, n); - count = min(count, this->_this->size() - n); + n = std::min(n, this->_this->size()); + count = std::max(count, n); + count = std::min(count, this->_this->size() - n); #if PY_MAJOR_VERSION >= 3 return PyBytes_FromStringAndSize((char *)(this->_this->p() + n), sizeof(Element) * count); #else @@ -293,9 +293,9 @@ get_data() const { template INLINE PyObject *Extension >:: get_subdata(size_t n, size_t count) const { - n = min(n, this->_this->size()); - count = max(count, n); - count = min(count, this->_this->size() - n); + n = std::min(n, this->_this->size()); + count = std::max(count, n); + count = std::min(count, this->_this->size() - n); #if PY_MAJOR_VERSION >= 3 return PyBytes_FromStringAndSize((char *)(this->_this->p() + n), sizeof(Element) * count); #else diff --git a/panda/src/express/pointerToBase.I b/panda/src/express/pointerToBase.I index acd3123394..e6e749f1f4 100644 --- a/panda/src/express/pointerToBase.I +++ b/panda/src/express/pointerToBase.I @@ -176,7 +176,7 @@ clear() { */ template INLINE void PointerToBase:: -output(ostream &out) const { +output(std::ostream &out) const { out << _void_ptr; if (_void_ptr != nullptr) { out << ":" << ((To *)_void_ptr)->get_ref_count(); diff --git a/panda/src/express/pointerToBase.h b/panda/src/express/pointerToBase.h index 4ac546993c..057a465454 100644 --- a/panda/src/express/pointerToBase.h +++ b/panda/src/express/pointerToBase.h @@ -49,11 +49,11 @@ protected: PUBLISHED: ALWAYS_INLINE void clear(); - void output(ostream &out) const; + void output(std::ostream &out) const; }; template -INLINE ostream &operator <<(ostream &out, const PointerToBase &pointer) { +INLINE std::ostream &operator <<(std::ostream &out, const PointerToBase &pointer) { pointer.output(out); return out; } diff --git a/panda/src/express/profileTimer.I b/panda/src/express/profileTimer.I index 107f86f6af..bd5102e6de 100644 --- a/panda/src/express/profileTimer.I +++ b/panda/src/express/profileTimer.I @@ -28,7 +28,7 @@ getTime() { INLINE void ProfileTimer:: mark(const char* tag) { if (!_entries) { - cerr << "ProfileTimer::mark !_entries" << endl; + std::cerr << "ProfileTimer::mark !_entries" << std::endl; exit(1); } if (_entryCount < _maxEntries-1) { diff --git a/panda/src/express/profileTimer.h b/panda/src/express/profileTimer.h index 94eb39bd01..6a2daae21a 100644 --- a/panda/src/express/profileTimer.h +++ b/panda/src/express/profileTimer.h @@ -54,10 +54,10 @@ PUBLISHED: // Don't call any of the following during timing: (Because they are slow, // not because anything will break). double getTotalTime() const; - static void consolidateAllTo(ostream &out=cout); - void consolidateTo(ostream &out=cout) const; - static void printAllTo(ostream &out=cout); - void printTo(ostream &out=cout) const; + static void consolidateAllTo(std::ostream &out=std::cout); + void consolidateTo(std::ostream &out=std::cout) const; + static void printAllTo(std::ostream &out=std::cout); + void printTo(std::ostream &out=std::cout) const; public: /* diff --git a/panda/src/express/ramfile.I b/panda/src/express/ramfile.I index 797eab3c1b..cd045a3d3d 100644 --- a/panda/src/express/ramfile.I +++ b/panda/src/express/ramfile.I @@ -41,7 +41,7 @@ tell() const { * Returns the entire buffer contents as a string, regardless of the current * data pointer. */ -INLINE const string &Ramfile:: +INLINE const std::string &Ramfile:: get_data() const { return _data; } diff --git a/panda/src/express/ramfile.h b/panda/src/express/ramfile.h index a4dbd17727..0d7c031fcc 100644 --- a/panda/src/express/ramfile.h +++ b/panda/src/express/ramfile.h @@ -37,12 +37,12 @@ PUBLISHED: INLINE void clear(); public: - string read(size_t length); - string readline(); - INLINE const string &get_data() const; + std::string read(size_t length); + std::string readline(); + INLINE const std::string &get_data() const; size_t _pos; - string _data; + std::string _data; friend class Extension; }; diff --git a/panda/src/express/referenceCount.I b/panda/src/express/referenceCount.I index da0ede4a73..bb4ac1fc18 100644 --- a/panda/src/express/referenceCount.I +++ b/panda/src/express/referenceCount.I @@ -411,9 +411,9 @@ void RefCountObj:: init_type() { #if defined(HAVE_RTTI) && !defined(__EDG__) // If we have RTTI, we can determine the name of the base type. - string base_name = typeid(Base).name(); + std::string base_name = typeid(Base).name(); #else - string base_name = "unknown"; + std::string base_name = "unknown"; #endif TypeHandle base_type = register_dynamic_type(base_name); diff --git a/panda/src/express/subStream.I b/panda/src/express/subStream.I index 0749a4012a..30f8ecce60 100644 --- a/panda/src/express/subStream.I +++ b/panda/src/express/subStream.I @@ -15,14 +15,14 @@ * */ INLINE ISubStream:: -ISubStream() : istream(&_buf) { +ISubStream() : std::istream(&_buf) { } /** * */ INLINE ISubStream:: -ISubStream(IStreamWrapper *source, streampos start, streampos end) : istream(&_buf) { +ISubStream(IStreamWrapper *source, std::streampos start, std::streampos end) : std::istream(&_buf) { open(source, start, end); } @@ -36,7 +36,7 @@ ISubStream(IStreamWrapper *source, streampos start, streampos end) : istream(&_b * end of the source stream. */ INLINE ISubStream &ISubStream:: -open(IStreamWrapper *source, streampos start, streampos end) { +open(IStreamWrapper *source, std::streampos start, std::streampos end) { clear((ios_iostate)0); _buf.open(source, nullptr, start, end, false); return *this; @@ -56,14 +56,14 @@ close() { * */ INLINE OSubStream:: -OSubStream() : ostream(&_buf) { +OSubStream() : std::ostream(&_buf) { } /** * */ INLINE OSubStream:: -OSubStream(OStreamWrapper *dest, streampos start, streampos end, bool append) : ostream(&_buf) { +OSubStream(OStreamWrapper *dest, std::streampos start, std::streampos end, bool append) : std::ostream(&_buf) { open(dest, start, end, append); } @@ -77,7 +77,7 @@ OSubStream(OStreamWrapper *dest, streampos start, streampos end, bool append) : * end of the dest stream. */ INLINE OSubStream &OSubStream:: -open(OStreamWrapper *dest, streampos start, streampos end, bool append) { +open(OStreamWrapper *dest, std::streampos start, std::streampos end, bool append) { clear((ios_iostate)0); _buf.open(nullptr, dest, start, end, append); return *this; @@ -97,14 +97,14 @@ close() { * */ INLINE SubStream:: -SubStream() : iostream(&_buf) { +SubStream() : std::iostream(&_buf) { } /** * */ INLINE SubStream:: -SubStream(StreamWrapper *nested, streampos start, streampos end, bool append) : iostream(&_buf) { +SubStream(StreamWrapper *nested, std::streampos start, std::streampos end, bool append) : std::iostream(&_buf) { open(nested, start, end, append); } @@ -117,7 +117,7 @@ SubStream(StreamWrapper *nested, streampos start, streampos end, bool append) : * of the nested stream. */ INLINE SubStream &SubStream:: -open(StreamWrapper *nested, streampos start, streampos end, bool append) { +open(StreamWrapper *nested, std::streampos start, std::streampos end, bool append) { clear((ios_iostate)0); _buf.open(nested, nested, start, end, append); return *this; diff --git a/panda/src/express/subStream.h b/panda/src/express/subStream.h index 3d071b9c7f..84d8a8a460 100644 --- a/panda/src/express/subStream.h +++ b/panda/src/express/subStream.h @@ -27,16 +27,16 @@ * The source stream must be one that we can randomly seek within. The * resulting ISubStream will also support arbitrary seeks. */ -class EXPCL_PANDAEXPRESS ISubStream : public istream { +class EXPCL_PANDAEXPRESS ISubStream : public std::istream { PUBLISHED: INLINE ISubStream(); - INLINE explicit ISubStream(IStreamWrapper *source, streampos start, streampos end); + INLINE explicit ISubStream(IStreamWrapper *source, std::streampos start, std::streampos end); #if _MSC_VER >= 1800 INLINE ISubStream(const ISubStream ©) = delete; #endif - INLINE ISubStream &open(IStreamWrapper *source, streampos start, streampos end); + INLINE ISubStream &open(IStreamWrapper *source, std::streampos start, std::streampos end); INLINE ISubStream &close(); private: @@ -52,16 +52,16 @@ private: * The dest stream must be one that we can randomly seek within. The * resulting OSubStream will also support arbitrary seeks. */ -class EXPCL_PANDAEXPRESS OSubStream : public ostream { +class EXPCL_PANDAEXPRESS OSubStream : public std::ostream { PUBLISHED: INLINE OSubStream(); - INLINE explicit OSubStream(OStreamWrapper *dest, streampos start, streampos end, bool append = false); + INLINE explicit OSubStream(OStreamWrapper *dest, std::streampos start, std::streampos end, bool append = false); #if _MSC_VER >= 1800 INLINE OSubStream(const OSubStream ©) = delete; #endif - INLINE OSubStream &open(OStreamWrapper *dest, streampos start, streampos end, bool append = false); + INLINE OSubStream &open(OStreamWrapper *dest, std::streampos start, std::streampos end, bool append = false); INLINE OSubStream &close(); private: @@ -71,16 +71,16 @@ private: /** * Combined ISubStream and OSubStream for bidirectional I/O. */ -class EXPCL_PANDAEXPRESS SubStream : public iostream { +class EXPCL_PANDAEXPRESS SubStream : public std::iostream { PUBLISHED: INLINE SubStream(); - INLINE explicit SubStream(StreamWrapper *nested, streampos start, streampos end, bool append = false); + INLINE explicit SubStream(StreamWrapper *nested, std::streampos start, std::streampos end, bool append = false); #if _MSC_VER >= 1800 INLINE SubStream(const SubStream ©) = delete; #endif - INLINE SubStream &open(StreamWrapper *nested, streampos start, streampos end, bool append = false); + INLINE SubStream &open(StreamWrapper *nested, std::streampos start, std::streampos end, bool append = false); INLINE SubStream &close(); private: diff --git a/panda/src/express/subStreamBuf.h b/panda/src/express/subStreamBuf.h index bfa94e2e6e..260f849098 100644 --- a/panda/src/express/subStreamBuf.h +++ b/panda/src/express/subStreamBuf.h @@ -20,16 +20,16 @@ /** * The streambuf object that implements ISubStream. */ -class EXPCL_PANDAEXPRESS SubStreamBuf : public streambuf { +class EXPCL_PANDAEXPRESS SubStreamBuf : public std::streambuf { public: SubStreamBuf(); virtual ~SubStreamBuf(); - void open(IStreamWrapper *source, OStreamWrapper *dest, streampos start, streampos end, bool append); + void open(IStreamWrapper *source, OStreamWrapper *dest, std::streampos start, std::streampos end, bool append); void close(); - virtual streampos seekoff(streamoff off, ios_seekdir dir, ios_openmode which); - virtual streampos seekpos(streampos pos, ios_openmode which); + virtual std::streampos seekoff(std::streamoff off, ios_seekdir dir, ios_openmode which); + virtual std::streampos seekpos(std::streampos pos, ios_openmode which); protected: virtual int overflow(int c); @@ -39,11 +39,11 @@ protected: private: IStreamWrapper *_source; OStreamWrapper *_dest; - streampos _start; - streampos _end; + std::streampos _start; + std::streampos _end; bool _append; - streampos _gpos; - streampos _ppos; + std::streampos _gpos; + std::streampos _ppos; char *_buffer; }; diff --git a/panda/src/express/subfileInfo.I b/panda/src/express/subfileInfo.I index d488537b60..a0a7826f97 100644 --- a/panda/src/express/subfileInfo.I +++ b/panda/src/express/subfileInfo.I @@ -25,7 +25,7 @@ SubfileInfo() : * */ INLINE SubfileInfo:: -SubfileInfo(const FileReference *file, streampos start, streamsize size) : +SubfileInfo(const FileReference *file, std::streampos start, std::streamsize size) : _file(file), _start(start), _size(size) @@ -36,7 +36,7 @@ SubfileInfo(const FileReference *file, streampos start, streamsize size) : * */ INLINE SubfileInfo:: -SubfileInfo(const Filename &filename, streampos start, streamsize size) : +SubfileInfo(const Filename &filename, std::streampos start, std::streamsize size) : _file(new FileReference(filename)), _start(start), _size(size) @@ -96,7 +96,7 @@ get_filename() const { /** * Returns the offset within the file at which this file data begins. */ -INLINE streampos SubfileInfo:: +INLINE std::streampos SubfileInfo:: get_start() const { return _start; } @@ -105,13 +105,13 @@ get_start() const { * Returns the number of consecutive bytes, beginning at get_start(), that * correspond to this file data. */ -INLINE streamsize SubfileInfo:: +INLINE std::streamsize SubfileInfo:: get_size() const { return _size; } -INLINE ostream & -operator << (ostream &out, const SubfileInfo &info) { +INLINE std::ostream & +operator << (std::ostream &out, const SubfileInfo &info) { info.output(out); return out; } diff --git a/panda/src/express/subfileInfo.h b/panda/src/express/subfileInfo.h index de2f85fa3e..7faa59c1e6 100644 --- a/panda/src/express/subfileInfo.h +++ b/panda/src/express/subfileInfo.h @@ -26,8 +26,8 @@ class EXPCL_PANDAEXPRESS SubfileInfo { PUBLISHED: INLINE SubfileInfo(); - INLINE explicit SubfileInfo(const FileReference *file, streampos start, streamsize size); - INLINE explicit SubfileInfo(const Filename &filename, streampos start, streamsize size); + INLINE explicit SubfileInfo(const FileReference *file, std::streampos start, std::streamsize size); + INLINE explicit SubfileInfo(const Filename &filename, std::streampos start, std::streamsize size); INLINE SubfileInfo(const SubfileInfo ©); INLINE void operator = (const SubfileInfo ©); @@ -35,18 +35,18 @@ PUBLISHED: INLINE const FileReference *get_file() const; INLINE const Filename &get_filename() const; - INLINE streampos get_start() const; - INLINE streamsize get_size() const; + INLINE std::streampos get_start() const; + INLINE std::streamsize get_size() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: CPT(FileReference) _file; - streampos _start; - streamsize _size; + std::streampos _start; + std::streamsize _size; }; -INLINE ostream &operator << (ostream &out, const SubfileInfo &info); +INLINE std::ostream &operator << (std::ostream &out, const SubfileInfo &info); #include "subfileInfo.I" diff --git a/panda/src/express/threadSafePointerToBase.I b/panda/src/express/threadSafePointerToBase.I index d00bcf1dbc..bee16180b1 100644 --- a/panda/src/express/threadSafePointerToBase.I +++ b/panda/src/express/threadSafePointerToBase.I @@ -124,7 +124,7 @@ clear() { */ template INLINE void ThreadSafePointerToBase:: -output(ostream &out) const { +output(std::ostream &out) const { out << _void_ptr; if (_void_ptr != nullptr) { out << ":" << ((To *)_void_ptr)->get_ref_count(); diff --git a/panda/src/express/threadSafePointerToBase.h b/panda/src/express/threadSafePointerToBase.h index 78c6d75cca..764e538d2b 100644 --- a/panda/src/express/threadSafePointerToBase.h +++ b/panda/src/express/threadSafePointerToBase.h @@ -49,11 +49,11 @@ protected: PUBLISHED: INLINE void clear(); - void output(ostream &out) const; + void output(std::ostream &out) const; }; template -INLINE ostream &operator <<(ostream &out, const ThreadSafePointerToBase &pointer) { +INLINE std::ostream &operator <<(std::ostream &out, const ThreadSafePointerToBase &pointer) { pointer.output(out); return out; } diff --git a/panda/src/express/virtualFile.I b/panda/src/express/virtualFile.I index f9fee3c999..64fa9f7d00 100644 --- a/panda/src/express/virtualFile.I +++ b/panda/src/express/virtualFile.I @@ -31,9 +31,9 @@ get_original_filename() const { /** * Returns the entire contents of the file as a string. */ -INLINE string VirtualFile:: +INLINE std::string VirtualFile:: read_file(bool auto_unwrap) const { - string result; + std::string result; read_file(result, auto_unwrap); return result; } @@ -42,7 +42,7 @@ read_file(bool auto_unwrap) const { * Writes the entire contents of the file as a string, if it is writable. */ INLINE bool VirtualFile:: -write_file(const string &data, bool auto_wrap) { +write_file(const std::string &data, bool auto_wrap) { return write_file((const unsigned char *)data.data(), data.size(), auto_wrap); } @@ -57,8 +57,8 @@ set_original_filename(const Filename &filename) { } -INLINE ostream & -operator << (ostream &out, const VirtualFile &file) { +INLINE std::ostream & +operator << (std::ostream &out, const VirtualFile &file) { file.output(out); return out; } diff --git a/panda/src/express/virtualFile.h b/panda/src/express/virtualFile.h index 5322fce670..6bab505a43 100644 --- a/panda/src/express/virtualFile.h +++ b/panda/src/express/virtualFile.h @@ -52,51 +52,51 @@ PUBLISHED: BLOCKING PT(VirtualFileList) scan_directory() const; - void output(ostream &out) const; - BLOCKING void ls(ostream &out = cout) const; - BLOCKING void ls_all(ostream &out = cout) const; + void output(std::ostream &out) const; + BLOCKING void ls(std::ostream &out = std::cout) const; + BLOCKING void ls_all(std::ostream &out = std::cout) const; EXTENSION(PyObject *read_file(bool auto_unwrap) const); - BLOCKING virtual istream *open_read_file(bool auto_unwrap) const; - BLOCKING virtual void close_read_file(istream *stream) const; + BLOCKING virtual std::istream *open_read_file(bool auto_unwrap) const; + BLOCKING virtual void close_read_file(std::istream *stream) const; virtual bool was_read_successful() const; EXTENSION(PyObject *write_file(PyObject *data, bool auto_wrap)); - BLOCKING virtual ostream *open_write_file(bool auto_wrap, bool truncate); - BLOCKING virtual ostream *open_append_file(); - BLOCKING virtual void close_write_file(ostream *stream); + BLOCKING virtual std::ostream *open_write_file(bool auto_wrap, bool truncate); + BLOCKING virtual std::ostream *open_append_file(); + BLOCKING virtual void close_write_file(std::ostream *stream); - BLOCKING virtual iostream *open_read_write_file(bool truncate); - BLOCKING virtual iostream *open_read_append_file(); - BLOCKING virtual void close_read_write_file(iostream *stream); + BLOCKING virtual std::iostream *open_read_write_file(bool truncate); + BLOCKING virtual std::iostream *open_read_append_file(); + BLOCKING virtual void close_read_write_file(std::iostream *stream); - BLOCKING virtual streamsize get_file_size(istream *stream) const; - BLOCKING virtual streamsize get_file_size() const; + BLOCKING virtual std::streamsize get_file_size(std::istream *stream) const; + BLOCKING virtual std::streamsize get_file_size() const; BLOCKING virtual time_t get_timestamp() const; virtual bool get_system_info(SubfileInfo &info); public: - virtual bool atomic_compare_and_exchange_contents(string &orig_contents, const string &old_contents, const string &new_contents); - virtual bool atomic_read_contents(string &contents) const; + virtual bool atomic_compare_and_exchange_contents(std::string &orig_contents, const std::string &old_contents, const std::string &new_contents); + virtual bool atomic_read_contents(std::string &contents) const; - INLINE string read_file(bool auto_unwrap) const; - INLINE bool write_file(const string &data, bool auto_wrap); + INLINE std::string read_file(bool auto_unwrap) const; + INLINE bool write_file(const std::string &data, bool auto_wrap); INLINE void set_original_filename(const Filename &filename); - bool read_file(string &result, bool auto_unwrap) const; + bool read_file(std::string &result, bool auto_unwrap) const; virtual bool read_file(pvector &result, bool auto_unwrap) const; virtual bool write_file(const unsigned char *data, size_t data_size, bool auto_wrap); - static bool simple_read_file(istream *stream, pvector &result); - static bool simple_read_file(istream *stream, pvector &result, size_t max_bytes); + static bool simple_read_file(std::istream *stream, pvector &result); + static bool simple_read_file(std::istream *stream, pvector &result, size_t max_bytes); protected: virtual bool scan_local_directory(VirtualFileList *file_list, - const ov_set &mount_points) const; + const ov_set &mount_points) const; private: - void r_ls_all(ostream &out, const Filename &root) const; + void r_ls_all(std::ostream &out, const Filename &root) const; Filename _original_filename; @@ -121,7 +121,7 @@ private: friend class VirtualFileComposite; }; -INLINE ostream &operator << (ostream &out, const VirtualFile &file); +INLINE std::ostream &operator << (std::ostream &out, const VirtualFile &file); #include "virtualFile.I" diff --git a/panda/src/express/virtualFileComposite.h b/panda/src/express/virtualFileComposite.h index d7e39ed302..3d76b96168 100644 --- a/panda/src/express/virtualFileComposite.h +++ b/panda/src/express/virtualFileComposite.h @@ -38,7 +38,7 @@ public: protected: virtual bool scan_local_directory(VirtualFileList *file_list, - const ov_set &mount_points) const; + const ov_set &mount_points) const; private: VirtualFileSystem *_file_system; diff --git a/panda/src/express/virtualFileMount.I b/panda/src/express/virtualFileMount.I index f1195a49ef..31da104cf8 100644 --- a/panda/src/express/virtualFileMount.I +++ b/panda/src/express/virtualFileMount.I @@ -49,8 +49,8 @@ get_mount_flags() const { } -INLINE ostream & -operator << (ostream &out, const VirtualFileMount &mount) { +INLINE std::ostream & +operator << (std::ostream &out, const VirtualFileMount &mount) { mount.output(out); return out; } diff --git a/panda/src/express/virtualFileMount.h b/panda/src/express/virtualFileMount.h index 47b36b52f1..f192b268ce 100644 --- a/panda/src/express/virtualFileMount.h +++ b/panda/src/express/virtualFileMount.h @@ -58,33 +58,33 @@ public: virtual bool write_file(const Filename &file, bool do_compress, const unsigned char *data, size_t data_size); - virtual istream *open_read_file(const Filename &file) const=0; - istream *open_read_file(const Filename &file, bool do_uncompress) const; - virtual void close_read_file(istream *stream) const; + virtual std::istream *open_read_file(const Filename &file) const=0; + std::istream *open_read_file(const Filename &file, bool do_uncompress) const; + virtual void close_read_file(std::istream *stream) const; - virtual ostream *open_write_file(const Filename &file, bool truncate); - ostream *open_write_file(const Filename &file, bool do_compress, bool truncate); - virtual ostream *open_append_file(const Filename &file); - virtual void close_write_file(ostream *stream); + virtual std::ostream *open_write_file(const Filename &file, bool truncate); + std::ostream *open_write_file(const Filename &file, bool do_compress, bool truncate); + virtual std::ostream *open_append_file(const Filename &file); + virtual void close_write_file(std::ostream *stream); - virtual iostream *open_read_write_file(const Filename &file, bool truncate); - virtual iostream *open_read_append_file(const Filename &file); - virtual void close_read_write_file(iostream *stream); + virtual std::iostream *open_read_write_file(const Filename &file, bool truncate); + virtual std::iostream *open_read_append_file(const Filename &file); + virtual void close_read_write_file(std::iostream *stream); - virtual streamsize get_file_size(const Filename &file, istream *stream) const=0; - virtual streamsize get_file_size(const Filename &file) const=0; + virtual std::streamsize get_file_size(const Filename &file, std::istream *stream) const=0; + virtual std::streamsize get_file_size(const Filename &file) const=0; virtual time_t get_timestamp(const Filename &file) const=0; virtual bool get_system_info(const Filename &file, SubfileInfo &info); virtual bool scan_directory(vector_string &contents, const Filename &dir) const=0; - virtual bool atomic_compare_and_exchange_contents(const Filename &file, string &orig_contents, const string &old_contents, const string &new_contents); - virtual bool atomic_read_contents(const Filename &file, string &contents) const; + virtual bool atomic_compare_and_exchange_contents(const Filename &file, std::string &orig_contents, const std::string &old_contents, const std::string &new_contents); + virtual bool atomic_read_contents(const Filename &file, std::string &contents) const; PUBLISHED: - virtual void output(ostream &out) const; - virtual void write(ostream &out) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out) const; protected: VirtualFileSystem *_file_system; @@ -112,7 +112,7 @@ private: friend class VirtualFileSystem; }; -INLINE ostream &operator << (ostream &out, const VirtualFileMount &mount); +INLINE std::ostream &operator << (std::ostream &out, const VirtualFileMount &mount); #include "virtualFileMount.I" diff --git a/panda/src/express/virtualFileMountAndroidAsset.I b/panda/src/express/virtualFileMountAndroidAsset.I index 7a96300d99..c3079e04ee 100644 --- a/panda/src/express/virtualFileMountAndroidAsset.I +++ b/panda/src/express/virtualFileMountAndroidAsset.I @@ -15,7 +15,7 @@ * */ VirtualFileMountAndroidAsset:: -VirtualFileMountAndroidAsset(AAssetManager *mgr, const string &apk_path) : +VirtualFileMountAndroidAsset(AAssetManager *mgr, const std::string &apk_path) : _asset_mgr(mgr), _apk_path(apk_path) { } @@ -25,5 +25,5 @@ VirtualFileMountAndroidAsset(AAssetManager *mgr, const string &apk_path) : */ INLINE VirtualFileMountAndroidAsset::AssetStream:: AssetStream(AAsset *asset) : - istream(new VirtualFileMountAndroidAsset::AssetStreamBuf(asset)) { + std::istream(new VirtualFileMountAndroidAsset::AssetStreamBuf(asset)) { } diff --git a/panda/src/express/virtualFileMountAndroidAsset.h b/panda/src/express/virtualFileMountAndroidAsset.h index 792db38ffc..650180f7eb 100644 --- a/panda/src/express/virtualFileMountAndroidAsset.h +++ b/panda/src/express/virtualFileMountAndroidAsset.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDAEXPRESS VirtualFileMountAndroidAsset : public VirtualFileMount { PUBLISHED: - INLINE VirtualFileMountAndroidAsset(AAssetManager *mgr, const string &apk_path); + INLINE VirtualFileMountAndroidAsset(AAssetManager *mgr, const std::string &apk_path); virtual ~VirtualFileMountAndroidAsset(); public: @@ -42,9 +42,9 @@ public: virtual bool read_file(const Filename &file, bool do_uncompress, pvector &result) const; - virtual istream *open_read_file(const Filename &file) const; - virtual streamsize get_file_size(const Filename &file, istream *stream) const; - virtual streamsize get_file_size(const Filename &file) const; + virtual std::istream *open_read_file(const Filename &file) const; + virtual std::streamsize get_file_size(const Filename &file, std::istream *stream) const; + virtual std::streamsize get_file_size(const Filename &file) const; virtual time_t get_timestamp(const Filename &file) const; virtual bool get_system_info(const Filename &file, SubfileInfo &info); @@ -53,21 +53,21 @@ public: private: AAssetManager *_asset_mgr; - string _apk_path; + std::string _apk_path; - class AssetStream : public istream { + class AssetStream : public std::istream { public: INLINE AssetStream(AAsset *asset); virtual ~AssetStream(); }; - class AssetStreamBuf : public streambuf { + class AssetStreamBuf : public std::streambuf { public: AssetStreamBuf(AAsset *asset); virtual ~AssetStreamBuf(); - virtual streampos seekoff(streamoff off, ios_seekdir dir, ios_openmode which); - virtual streampos seekpos(streampos pos, ios_openmode which); + virtual std::streampos seekoff(std::streamoff off, ios_seekdir dir, ios_openmode which); + virtual std::streampos seekpos(std::streampos pos, ios_openmode which); protected: virtual int underflow(); diff --git a/panda/src/express/virtualFileMountMultifile.h b/panda/src/express/virtualFileMountMultifile.h index d82b29af4d..3676990042 100644 --- a/panda/src/express/virtualFileMountMultifile.h +++ b/panda/src/express/virtualFileMountMultifile.h @@ -38,16 +38,16 @@ public: virtual bool read_file(const Filename &file, bool do_uncompress, pvector &result) const; - virtual istream *open_read_file(const Filename &file) const; - virtual streamsize get_file_size(const Filename &file, istream *stream) const; - virtual streamsize get_file_size(const Filename &file) const; + virtual std::istream *open_read_file(const Filename &file) const; + virtual std::streamsize get_file_size(const Filename &file, std::istream *stream) const; + virtual std::streamsize get_file_size(const Filename &file) const; virtual time_t get_timestamp(const Filename &file) const; virtual bool get_system_info(const Filename &file, SubfileInfo &info); virtual bool scan_directory(vector_string &contents, const Filename &dir) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: PT(Multifile) _multifile; diff --git a/panda/src/express/virtualFileMountRamdisk.I b/panda/src/express/virtualFileMountRamdisk.I index b943f8bb51..27c07c4dce 100644 --- a/panda/src/express/virtualFileMountRamdisk.I +++ b/panda/src/express/virtualFileMountRamdisk.I @@ -15,7 +15,7 @@ * */ INLINE VirtualFileMountRamdisk::FileBase:: -FileBase(const string &basename) : _basename(basename), _timestamp(time(nullptr)) { +FileBase(const std::string &basename) : _basename(basename), _timestamp(time(nullptr)) { } /** @@ -30,7 +30,7 @@ operator < (const FileBase &other) const { * */ INLINE VirtualFileMountRamdisk::File:: -File(const string &basename) : +File(const std::string &basename) : FileBase(basename), _wrapper(&_data, false, true) { @@ -40,5 +40,5 @@ File(const string &basename) : * */ INLINE VirtualFileMountRamdisk::Directory:: -Directory(const string &basename) : FileBase(basename) { +Directory(const std::string &basename) : FileBase(basename) { } diff --git a/panda/src/express/virtualFileMountRamdisk.h b/panda/src/express/virtualFileMountRamdisk.h index 9812746534..0175f2682c 100644 --- a/panda/src/express/virtualFileMountRamdisk.h +++ b/panda/src/express/virtualFileMountRamdisk.h @@ -42,23 +42,23 @@ public: virtual bool is_regular_file(const Filename &file) const; virtual bool is_writable(const Filename &file) const; - virtual istream *open_read_file(const Filename &file) const; - virtual ostream *open_write_file(const Filename &file, bool truncate); - virtual ostream *open_append_file(const Filename &file); - virtual iostream *open_read_write_file(const Filename &file, bool truncate); - virtual iostream *open_read_append_file(const Filename &file); + virtual std::istream *open_read_file(const Filename &file) const; + virtual std::ostream *open_write_file(const Filename &file, bool truncate); + virtual std::ostream *open_append_file(const Filename &file); + virtual std::iostream *open_read_write_file(const Filename &file, bool truncate); + virtual std::iostream *open_read_append_file(const Filename &file); - virtual streamsize get_file_size(const Filename &file, istream *stream) const; - virtual streamsize get_file_size(const Filename &file) const; + virtual std::streamsize get_file_size(const Filename &file, std::istream *stream) const; + virtual std::streamsize get_file_size(const Filename &file) const; virtual time_t get_timestamp(const Filename &file) const; virtual bool scan_directory(vector_string &contents, const Filename &dir) const; - virtual bool atomic_compare_and_exchange_contents(const Filename &file, string &orig_contents, const string &old_contents, const string &new_contents); - virtual bool atomic_read_contents(const Filename &file, string &contents) const; + virtual bool atomic_compare_and_exchange_contents(const Filename &file, std::string &orig_contents, const std::string &old_contents, const std::string &new_contents); + virtual bool atomic_read_contents(const Filename &file, std::string &contents) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: class FileBase; @@ -67,13 +67,13 @@ private: class FileBase : public TypedReferenceCount { public: - INLINE FileBase(const string &basename); + INLINE FileBase(const std::string &basename); virtual ~FileBase(); INLINE bool operator < (const FileBase &other) const; virtual bool is_directory() const; - string _basename; + std::string _basename; time_t _timestamp; public: @@ -96,9 +96,9 @@ private: class File : public FileBase { public: - INLINE File(const string &basename); + INLINE File(const std::string &basename); - stringstream _data; + std::stringstream _data; StreamWrapper _wrapper; public: @@ -123,14 +123,14 @@ private: class Directory : public FileBase { public: - INLINE Directory(const string &basename); + INLINE Directory(const std::string &basename); virtual bool is_directory() const; - PT(FileBase) do_find_file(const string &filename) const; - PT(File) do_create_file(const string &filename); - PT(Directory) do_make_directory(const string &filename); - PT(FileBase) do_delete_file(const string &filename); + PT(FileBase) do_find_file(const std::string &filename) const; + PT(File) do_create_file(const std::string &filename); + PT(Directory) do_make_directory(const std::string &filename); + PT(FileBase) do_delete_file(const std::string &filename); bool do_scan_directory(vector_string &contents) const; Files _files; diff --git a/panda/src/express/virtualFileMountSystem.h b/panda/src/express/virtualFileMountSystem.h index 2854c32ae0..69761b1df7 100644 --- a/panda/src/express/virtualFileMountSystem.h +++ b/panda/src/express/virtualFileMountSystem.h @@ -38,24 +38,24 @@ public: virtual bool is_regular_file(const Filename &file) const; virtual bool is_writable(const Filename &file) const; - virtual istream *open_read_file(const Filename &file) const; - virtual ostream *open_write_file(const Filename &file, bool truncate); - virtual ostream *open_append_file(const Filename &file); - virtual iostream *open_read_write_file(const Filename &file, bool truncate); - virtual iostream *open_read_append_file(const Filename &file); + virtual std::istream *open_read_file(const Filename &file) const; + virtual std::ostream *open_write_file(const Filename &file, bool truncate); + virtual std::ostream *open_append_file(const Filename &file); + virtual std::iostream *open_read_write_file(const Filename &file, bool truncate); + virtual std::iostream *open_read_append_file(const Filename &file); - virtual streamsize get_file_size(const Filename &file, istream *stream) const; - virtual streamsize get_file_size(const Filename &file) const; + virtual std::streamsize get_file_size(const Filename &file, std::istream *stream) const; + virtual std::streamsize get_file_size(const Filename &file) const; virtual time_t get_timestamp(const Filename &file) const; virtual bool get_system_info(const Filename &file, SubfileInfo &info); virtual bool scan_directory(vector_string &contents, const Filename &dir) const; - virtual bool atomic_compare_and_exchange_contents(const Filename &file, string &orig_contents, const string &old_contents, const string &new_contents); - virtual bool atomic_read_contents(const Filename &file, string &contents) const; + virtual bool atomic_compare_and_exchange_contents(const Filename &file, std::string &orig_contents, const std::string &old_contents, const std::string &new_contents); + virtual bool atomic_read_contents(const Filename &file, std::string &contents) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: Filename _physical_filename; diff --git a/panda/src/express/virtualFileSimple.h b/panda/src/express/virtualFileSimple.h index c0f1da1fc7..671d435f44 100644 --- a/panda/src/express/virtualFileSimple.h +++ b/panda/src/express/virtualFileSimple.h @@ -45,30 +45,30 @@ PUBLISHED: virtual bool rename_file(VirtualFile *new_file); virtual bool copy_file(VirtualFile *new_file); - virtual istream *open_read_file(bool auto_unwrap) const; - virtual void close_read_file(istream *stream) const; - virtual ostream *open_write_file(bool auto_wrap, bool truncate); - virtual ostream *open_append_file(); - virtual void close_write_file(ostream *stream); - virtual iostream *open_read_write_file(bool truncate); - virtual iostream *open_read_append_file(); - virtual void close_read_write_file(iostream *stream); + virtual std::istream *open_read_file(bool auto_unwrap) const; + virtual void close_read_file(std::istream *stream) const; + virtual std::ostream *open_write_file(bool auto_wrap, bool truncate); + virtual std::ostream *open_append_file(); + virtual void close_write_file(std::ostream *stream); + virtual std::iostream *open_read_write_file(bool truncate); + virtual std::iostream *open_read_append_file(); + virtual void close_read_write_file(std::iostream *stream); - virtual streamsize get_file_size(istream *stream) const; - virtual streamsize get_file_size() const; + virtual std::streamsize get_file_size(std::istream *stream) const; + virtual std::streamsize get_file_size() const; virtual time_t get_timestamp() const; virtual bool get_system_info(SubfileInfo &info); public: - virtual bool atomic_compare_and_exchange_contents(string &orig_contents, const string &old_contents, const string &new_contents); - virtual bool atomic_read_contents(string &contents) const; + virtual bool atomic_compare_and_exchange_contents(std::string &orig_contents, const std::string &old_contents, const std::string &new_contents); + virtual bool atomic_read_contents(std::string &contents) const; virtual bool read_file(pvector &result, bool auto_unwrap) const; virtual bool write_file(const unsigned char *data, size_t data_size, bool auto_wrap); protected: virtual bool scan_local_directory(VirtualFileList *file_list, - const ov_set &mount_points) const; + const ov_set &mount_points) const; private: VirtualFileMount *_mount; diff --git a/panda/src/express/virtualFileSystem.I b/panda/src/express/virtualFileSystem.I index b2f86e17bb..cd9e9d8a03 100644 --- a/panda/src/express/virtualFileSystem.I +++ b/panda/src/express/virtualFileSystem.I @@ -93,11 +93,11 @@ ls_all(const Filename &filename) const { * than vfs-implicit-pz, which will automatically decompress a file if the * extension .pz is *not* given. */ -INLINE string VirtualFileSystem:: +INLINE std::string VirtualFileSystem:: read_file(const Filename &filename, bool auto_unwrap) const { - string result; + std::string result; bool okflag = read_file(filename, result, auto_unwrap); - nassertr(okflag, string()); + nassertr(okflag, std::string()); return result; } @@ -109,7 +109,7 @@ read_file(const Filename &filename, bool auto_unwrap) const { * compressed while writing. */ INLINE bool VirtualFileSystem:: -write_file(const Filename &filename, const string &data, bool auto_wrap) { +write_file(const Filename &filename, const std::string &data, bool auto_wrap) { return write_file(filename, (const unsigned char *)data.data(), data.size(), auto_wrap); } @@ -124,7 +124,7 @@ write_file(const Filename &filename, const string &data, bool auto_wrap) { * extension .pz is *not* given. */ INLINE bool VirtualFileSystem:: -read_file(const Filename &filename, string &result, bool auto_unwrap) const { +read_file(const Filename &filename, std::string &result, bool auto_unwrap) const { PT(VirtualFile) file = get_file(filename, false); return (file != nullptr && file->read_file(result, auto_unwrap)); } diff --git a/panda/src/express/virtualFileSystem.h b/panda/src/express/virtualFileSystem.h index e1d7e6fd37..7da00d4249 100644 --- a/panda/src/express/virtualFileSystem.h +++ b/panda/src/express/virtualFileSystem.h @@ -48,9 +48,9 @@ PUBLISHED: BLOCKING bool mount(Multifile *multifile, const Filename &mount_point, int flags); BLOCKING bool mount(const Filename &physical_filename, const Filename &mount_point, - int flags, const string &password = ""); + int flags, const std::string &password = ""); BLOCKING bool mount_loop(const Filename &virtual_filename, const Filename &mount_point, - int flags, const string &password = ""); + int flags, const std::string &password = ""); bool mount(VirtualFileMount *mount, const Filename &mount_point, int flags); BLOCKING int unmount(Multifile *multifile); BLOCKING int unmount(const Filename &physical_filename); @@ -78,7 +78,7 @@ PUBLISHED: BLOCKING bool copy_file(const Filename &orig_filename, const Filename &new_filename); BLOCKING bool resolve_filename(Filename &filename, const DSearchPath &searchpath, - const string &default_extension = string()) const; + const std::string &default_extension = std::string()) const; BLOCKING int find_all_files(const Filename &filename, const DSearchPath &searchpath, DSearchPath::Results &results) const; @@ -91,42 +91,42 @@ PUBLISHED: INLINE void ls(const Filename &filename) const; INLINE void ls_all(const Filename &filename) const; - void write(ostream &out) const; + void write(std::ostream &out) const; static VirtualFileSystem *get_global_ptr(); EXTENSION(PyObject *read_file(const Filename &filename, bool auto_unwrap) const); - BLOCKING istream *open_read_file(const Filename &filename, bool auto_unwrap) const; - BLOCKING static void close_read_file(istream *stream); + BLOCKING std::istream *open_read_file(const Filename &filename, bool auto_unwrap) const; + BLOCKING static void close_read_file(std::istream *stream); EXTENSION(PyObject *write_file(const Filename &filename, PyObject *data, bool auto_wrap)); - BLOCKING ostream *open_write_file(const Filename &filename, bool auto_wrap, bool truncate); - BLOCKING ostream *open_append_file(const Filename &filename); - BLOCKING static void close_write_file(ostream *stream); + BLOCKING std::ostream *open_write_file(const Filename &filename, bool auto_wrap, bool truncate); + BLOCKING std::ostream *open_append_file(const Filename &filename); + BLOCKING static void close_write_file(std::ostream *stream); - BLOCKING iostream *open_read_write_file(const Filename &filename, bool truncate); - BLOCKING iostream *open_read_append_file(const Filename &filename); - BLOCKING static void close_read_write_file(iostream *stream); + BLOCKING std::iostream *open_read_write_file(const Filename &filename, bool truncate); + BLOCKING std::iostream *open_read_append_file(const Filename &filename); + BLOCKING static void close_read_write_file(std::iostream *stream); public: // We provide Python versions of these as efficient extension methods, // above. - BLOCKING INLINE string read_file(const Filename &filename, bool auto_unwrap) const; - BLOCKING INLINE bool write_file(const Filename &filename, const string &data, bool auto_wrap); + BLOCKING INLINE std::string read_file(const Filename &filename, bool auto_unwrap) const; + BLOCKING INLINE bool write_file(const Filename &filename, const std::string &data, bool auto_wrap); - bool atomic_compare_and_exchange_contents(const Filename &filename, string &orig_contents, const string &old_contents, const string &new_contents); - bool atomic_read_contents(const Filename &filename, string &contents) const; + bool atomic_compare_and_exchange_contents(const Filename &filename, std::string &orig_contents, const std::string &old_contents, const std::string &new_contents); + bool atomic_read_contents(const Filename &filename, std::string &contents) const; - INLINE bool read_file(const Filename &filename, string &result, bool auto_unwrap) const; + INLINE bool read_file(const Filename &filename, std::string &result, bool auto_unwrap) const; INLINE bool read_file(const Filename &filename, pvector &result, bool auto_unwrap) const; INLINE bool write_file(const Filename &filename, const unsigned char *data, size_t data_size, bool auto_wrap); void scan_mount_points(vector_string &names, const Filename &path) const; - static void parse_options(const string &options, - int &flags, string &password); - static void parse_option(const string &option, - int &flags, string &password); + static void parse_options(const std::string &options, + int &flags, std::string &password); + static void parse_option(const std::string &option, + int &flags, std::string &password); public: // These flags are passed to do_get_file() and diff --git a/panda/src/express/weakPointerToBase.I b/panda/src/express/weakPointerToBase.I index 4b610e34fd..30690458be 100644 --- a/panda/src/express/weakPointerToBase.I +++ b/panda/src/express/weakPointerToBase.I @@ -505,7 +505,7 @@ refresh() const { */ template INLINE void WeakPointerToBase:: -output(ostream &out) const { +output(std::ostream &out) const { out << _void_ptr; if (was_deleted()) { out << ":deleted"; diff --git a/panda/src/express/weakPointerToBase.h b/panda/src/express/weakPointerToBase.h index 34960920ab..b1267c448a 100644 --- a/panda/src/express/weakPointerToBase.h +++ b/panda/src/express/weakPointerToBase.h @@ -88,11 +88,11 @@ PUBLISHED: INLINE void clear(); INLINE void refresh() const; - void output(ostream &out) const; + void output(std::ostream &out) const; }; template -INLINE ostream &operator <<(ostream &out, const WeakPointerToBase &pointer) { +INLINE std::ostream &operator <<(std::ostream &out, const WeakPointerToBase &pointer) { pointer.output(out); return out; } diff --git a/panda/src/express/windowsRegistry.h b/panda/src/express/windowsRegistry.h index d8fa951234..215b8217c8 100644 --- a/panda/src/express/windowsRegistry.h +++ b/panda/src/express/windowsRegistry.h @@ -33,27 +33,27 @@ PUBLISHED: rl_user = 1 }; - static bool set_string_value(const string &key, const string &name, - const string &value, RegLevel rl = rl_machine); - static bool set_int_value(const string &key, const string &name, int value, RegLevel rl = rl_machine); + static bool set_string_value(const std::string &key, const std::string &name, + const std::string &value, RegLevel rl = rl_machine); + static bool set_int_value(const std::string &key, const std::string &name, int value, RegLevel rl = rl_machine); enum Type { T_none, T_int, T_string, }; - static Type get_key_type(const string &key, const string &name, RegLevel rl = rl_machine); - static string get_string_value(const string &key, const string &name, - const string &default_value, RegLevel rl = rl_machine); - static int get_int_value(const string &key, const string &name, + static Type get_key_type(const std::string &key, const std::string &name, RegLevel rl = rl_machine); + static std::string get_string_value(const std::string &key, const std::string &name, + const std::string &default_value, RegLevel rl = rl_machine); + static int get_int_value(const std::string &key, const std::string &name, int default_value, RegLevel rl = rl_machine); private: - static bool do_set(const string &key, const string &name, + static bool do_set(const std::string &key, const std::string &name, int data_type, const void *data, int data_length, const RegLevel rl); - static bool do_get(const string &key, const string &name, - int &data_type, string &data, const RegLevel rl); - static string format_message(int error_code); + static bool do_get(const std::string &key, const std::string &name, + int &data_type, std::string &data, const RegLevel rl); + static std::string format_message(int error_code); }; #endif // WIN32_VC diff --git a/panda/src/express/zStream.I b/panda/src/express/zStream.I index 6385b26e67..6442d03037 100644 --- a/panda/src/express/zStream.I +++ b/panda/src/express/zStream.I @@ -15,14 +15,14 @@ * */ INLINE IDecompressStream:: -IDecompressStream() : istream(&_buf) { +IDecompressStream() : std::istream(&_buf) { } /** * */ INLINE IDecompressStream:: -IDecompressStream(istream *source, bool owns_source) : istream(&_buf) { +IDecompressStream(std::istream *source, bool owns_source) : std::istream(&_buf) { open(source, owns_source); } @@ -30,7 +30,7 @@ IDecompressStream(istream *source, bool owns_source) : istream(&_buf) { * */ INLINE IDecompressStream &IDecompressStream:: -open(istream *source, bool owns_source) { +open(std::istream *source, bool owns_source) { clear((ios_iostate)0); _buf.open_read(source, owns_source); return *this; @@ -51,15 +51,15 @@ close() { * */ INLINE OCompressStream:: -OCompressStream() : ostream(&_buf) { +OCompressStream() : std::ostream(&_buf) { } /** * */ INLINE OCompressStream:: -OCompressStream(ostream *dest, bool owns_dest, int compression_level) : - ostream(&_buf) +OCompressStream(std::ostream *dest, bool owns_dest, int compression_level) : + std::ostream(&_buf) { open(dest, owns_dest, compression_level); } @@ -68,7 +68,7 @@ OCompressStream(ostream *dest, bool owns_dest, int compression_level) : * */ INLINE OCompressStream &OCompressStream:: -open(ostream *dest, bool owns_dest, int compression_level) { +open(std::ostream *dest, bool owns_dest, int compression_level) { clear((ios_iostate)0); _buf.open_write(dest, owns_dest, compression_level); return *this; diff --git a/panda/src/express/zStream.h b/panda/src/express/zStream.h index b5fcd2d7a5..08c1301c9b 100644 --- a/panda/src/express/zStream.h +++ b/panda/src/express/zStream.h @@ -31,16 +31,16 @@ * * Seeking is not supported. */ -class EXPCL_PANDAEXPRESS IDecompressStream : public istream { +class EXPCL_PANDAEXPRESS IDecompressStream : public std::istream { PUBLISHED: INLINE IDecompressStream(); - INLINE explicit IDecompressStream(istream *source, bool owns_source); + INLINE explicit IDecompressStream(std::istream *source, bool owns_source); #if _MSC_VER >= 1800 INLINE IDecompressStream(const IDecompressStream ©) = delete; #endif - INLINE IDecompressStream &open(istream *source, bool owns_source); + INLINE IDecompressStream &open(std::istream *source, bool owns_source); INLINE IDecompressStream &close(); private: @@ -57,17 +57,17 @@ private: * * Seeking is not supported. */ -class EXPCL_PANDAEXPRESS OCompressStream : public ostream { +class EXPCL_PANDAEXPRESS OCompressStream : public std::ostream { PUBLISHED: INLINE OCompressStream(); - INLINE explicit OCompressStream(ostream *dest, bool owns_dest, + INLINE explicit OCompressStream(std::ostream *dest, bool owns_dest, int compression_level = 6); #if _MSC_VER >= 1800 INLINE OCompressStream(const OCompressStream ©) = delete; #endif - INLINE OCompressStream &open(ostream *dest, bool owns_dest, + INLINE OCompressStream &open(std::ostream *dest, bool owns_dest, int compression_level = 6); INLINE OCompressStream &close(); diff --git a/panda/src/express/zStreamBuf.h b/panda/src/express/zStreamBuf.h index a034a76d6c..e4cb77bf04 100644 --- a/panda/src/express/zStreamBuf.h +++ b/panda/src/express/zStreamBuf.h @@ -24,19 +24,19 @@ /** * The streambuf object that implements IDecompressStream and OCompressStream. */ -class EXPCL_PANDAEXPRESS ZStreamBuf : public streambuf { +class EXPCL_PANDAEXPRESS ZStreamBuf : public std::streambuf { public: ZStreamBuf(); virtual ~ZStreamBuf(); - void open_read(istream *source, bool owns_source); + void open_read(std::istream *source, bool owns_source); void close_read(); - void open_write(ostream *dest, bool owns_dest, int compression_level); + void open_write(std::ostream *dest, bool owns_dest, int compression_level); void close_write(); - virtual streampos seekoff(streamoff off, ios_seekdir dir, ios_openmode which); - virtual streampos seekpos(streampos pos, ios_openmode which); + virtual std::streampos seekoff(std::streamoff off, ios_seekdir dir, ios_openmode which); + virtual std::streampos seekpos(std::streampos pos, ios_openmode which); protected: virtual int overflow(int c); @@ -49,10 +49,10 @@ private: void show_zlib_error(const char *function, int error_code, z_stream &z); private: - istream *_source; + std::istream *_source; bool _owns_source; - ostream *_dest; + std::ostream *_dest; bool _owns_dest; z_stream _z_source; diff --git a/panda/src/ffmpeg/ffmpegVideoCursor.h b/panda/src/ffmpeg/ffmpegVideoCursor.h index b37637a0b0..58d63eb6ba 100644 --- a/panda/src/ffmpeg/ffmpegVideoCursor.h +++ b/panda/src/ffmpeg/ffmpegVideoCursor.h @@ -100,7 +100,7 @@ private: void cleanup(); Filename _filename; - string _sync_name; + std::string _sync_name; int _max_readahead_frames; ThreadPriority _thread_priority; PT(GenericThread) _thread; diff --git a/panda/src/ffmpeg/ffmpegVirtualFile.h b/panda/src/ffmpeg/ffmpegVirtualFile.h index 197320d4dc..3e7bd4f796 100644 --- a/panda/src/ffmpeg/ffmpegVirtualFile.h +++ b/panda/src/ffmpeg/ffmpegVirtualFile.h @@ -58,9 +58,9 @@ private: private: AVIOContext *_io_context; AVFormatContext *_format_context; - streampos _start; - streamsize _size; - istream *_in; + std::streampos _start; + std::streamsize _size; + std::istream *_in; pifstream _file_in; bool _owns_in; int _buffer_size; diff --git a/panda/src/framework/pandaFramework.I b/panda/src/framework/pandaFramework.I index d17bc8dad7..24e6bc3644 100644 --- a/panda/src/framework/pandaFramework.I +++ b/panda/src/framework/pandaFramework.I @@ -57,7 +57,7 @@ get_task_mgr() { * Specifies the title that is set for all subsequently created windows. */ INLINE void PandaFramework:: -set_window_title(const string &title) { +set_window_title(const std::string &title) { _window_title = title; } diff --git a/panda/src/framework/pandaFramework.h b/panda/src/framework/pandaFramework.h index 01c50ae8d0..ef570a6c96 100644 --- a/panda/src/framework/pandaFramework.h +++ b/panda/src/framework/pandaFramework.h @@ -51,12 +51,12 @@ public: NodePath get_mouse(GraphicsOutput *window); void remove_mouse(const GraphicsOutput *window); - void define_key(const string &event_name, - const string &description, + void define_key(const std::string &event_name, + const std::string &description, EventHandler::EventCallbackFunction *function, void *data); - INLINE void set_window_title(const string &title); + INLINE void set_window_title(const std::string &title); virtual void get_default_window_props(WindowProperties &props); WindowFramework *open_window(); @@ -77,7 +77,7 @@ public: NodePath &get_models(); - void report_frame_rate(ostream &out) const; + void report_frame_rate(std::ostream &out) const; void reset_frame_rate(); void set_wireframe(bool enable); @@ -163,7 +163,7 @@ private: bool _is_open; bool _made_default_pipe; - string _window_title; + std::string _window_title; PT(GraphicsPipe) _default_pipe; PT(GraphicsEngine) _engine; @@ -200,8 +200,8 @@ private: class KeyDefinition { public: - string _event_name; - string _description; + std::string _event_name; + std::string _description; }; typedef pvector KeyDefinitions; KeyDefinitions _key_definitions; diff --git a/panda/src/framework/windowFramework.h b/panda/src/framework/windowFramework.h index c7745b0fea..b6e93041eb 100644 --- a/panda/src/framework/windowFramework.h +++ b/panda/src/framework/windowFramework.h @@ -147,7 +147,7 @@ private: void destroy_anim_controls(); void update_anim_controls(); - void setup_shuttle_button(const string &label, int index, + void setup_shuttle_button(const std::string &label, int index, EventHandler::EventCallbackFunction *func); void back_button(); void pause_button(); diff --git a/panda/src/glstuff/glGraphicsBuffer_src.h b/panda/src/glstuff/glGraphicsBuffer_src.h index 31f7c91912..c383a0a5d4 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.h +++ b/panda/src/glstuff/glGraphicsBuffer_src.h @@ -50,7 +50,7 @@ class EXPCL_GL CLP(GraphicsBuffer) : public GraphicsBuffer { public: CLP(GraphicsBuffer)(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, @@ -135,7 +135,7 @@ protected: UpdateSeq _last_textures_seq; CLP(GraphicsBuffer) *_shared_depth_buffer; - list _shared_depth_buffer_list; + std::list _shared_depth_buffer_list; PStatCollector _bind_texture_pcollector; PStatCollector _generate_mipmap_pcollector; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.I b/panda/src/glstuff/glGraphicsStateGuardian_src.I index 5ce7902917..bdb9db6eb5 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.I +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.I @@ -93,7 +93,7 @@ clear_my_errors(int line, const char *source_file) { /** * Returns the GL vendor string reported by the driver. */ -INLINE const string &CLP(GraphicsStateGuardian):: +INLINE const std::string &CLP(GraphicsStateGuardian):: get_gl_vendor() const { return _gl_vendor; } @@ -101,7 +101,7 @@ get_gl_vendor() const { /** * Returns the GL renderer string reported by the driver. */ -INLINE const string &CLP(GraphicsStateGuardian):: +INLINE const std::string &CLP(GraphicsStateGuardian):: get_gl_renderer() const { return _gl_renderer; } @@ -109,7 +109,7 @@ get_gl_renderer() const { /** * Returns the GL version string reported by the driver. */ -INLINE const string &CLP(GraphicsStateGuardian):: +INLINE const std::string &CLP(GraphicsStateGuardian):: get_gl_version() const { return _gl_version; } @@ -174,7 +174,7 @@ maybe_gl_finish() const { * otherwise. The extension name is case-sensitive. */ INLINE bool CLP(GraphicsStateGuardian):: -has_extension(const string &extension) const { +has_extension(const std::string &extension) const { bool has_ext = (_extensions.find(extension) != _extensions.end()); #ifndef NDEBUG if (GLCAT.is_debug()) { @@ -491,13 +491,13 @@ enable_stencil_test(bool val) { if (val) { #ifdef GSG_VERBOSE GLCAT.spam() - << "glEnable(GL_STENCIL_TEST)" << endl; + << "glEnable(GL_STENCIL_TEST)" << std::endl; #endif glEnable(GL_STENCIL_TEST); } else { #ifdef GSG_VERBOSE GLCAT.spam() - << "glDisable(GL_STENCIL_TEST)" << endl; + << "glDisable(GL_STENCIL_TEST)" << std::endl; #endif glDisable(GL_STENCIL_TEST); } @@ -514,13 +514,13 @@ enable_blend(bool val) { if (val) { #ifdef GSG_VERBOSE GLCAT.spam() - << "glEnable(GL_BLEND)" << endl; + << "glEnable(GL_BLEND)" << std::endl; #endif glEnable(GL_BLEND); } else { #ifdef GSG_VERBOSE GLCAT.spam() - << "glDisable(GL_BLEND)" << endl; + << "glDisable(GL_BLEND)" << std::endl; #endif glDisable(GL_BLEND); } @@ -537,13 +537,13 @@ enable_depth_test(bool val) { if (val) { #ifdef GSG_VERBOSE GLCAT.spam() - << "glEnable(GL_DEPTH_TEST)" << endl; + << "glEnable(GL_DEPTH_TEST)" << std::endl; #endif glEnable(GL_DEPTH_TEST); } else { #ifdef GSG_VERBOSE GLCAT.spam() - << "glDisable(GL_DEPTH_TEST)" << endl; + << "glDisable(GL_DEPTH_TEST)" << std::endl; #endif glDisable(GL_DEPTH_TEST); } @@ -561,13 +561,13 @@ enable_fog(bool val) { if (val) { #ifdef GSG_VERBOSE GLCAT.spam() - << "glEnable(GL_FOG)" << endl; + << "glEnable(GL_FOG)" << std::endl; #endif glEnable(GL_FOG); } else { #ifdef GSG_VERBOSE GLCAT.spam() - << "glDisable(GL_FOG)" << endl; + << "glDisable(GL_FOG)" << std::endl; #endif glDisable(GL_FOG); } @@ -586,13 +586,13 @@ enable_alpha_test(bool val) { if (val) { #ifdef GSG_VERBOSE GLCAT.spam() - << "glEnable(GL_ALPHA_TEST)" << endl; + << "glEnable(GL_ALPHA_TEST)" << std::endl; #endif glEnable(GL_ALPHA_TEST); } else { #ifdef GSG_VERBOSE GLCAT.spam() - << "glDisable(GL_ALPHA_TEST)" << endl; + << "glDisable(GL_ALPHA_TEST)" << std::endl; #endif glDisable(GL_ALPHA_TEST); } @@ -610,7 +610,7 @@ enable_polygon_offset(bool val) { if (val) { #ifdef GSG_VERBOSE GLCAT.spam() - << "glEnable(GL_POLYGON_OFFSET_*)" << endl; + << "glEnable(GL_POLYGON_OFFSET_*)" << std::endl; #endif glEnable(GL_POLYGON_OFFSET_FILL); // glEnable(GL_POLYGON_OFFSET_LINE); not widely supported anyway @@ -618,7 +618,7 @@ enable_polygon_offset(bool val) { } else { #ifdef GSG_VERBOSE GLCAT.spam() - << "glDisable(GL_POLYGON_OFFSET_*)" << endl; + << "glDisable(GL_POLYGON_OFFSET_*)" << std::endl; #endif glDisable(GL_POLYGON_OFFSET_FILL); // glDisable(GL_POLYGON_OFFSET_LINE); not widely supported anyway diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 15ecebe439..5c29d4bcad 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -261,9 +261,9 @@ public: virtual ~CLP(GraphicsStateGuardian)(); // #--- Zhao Nov2011 - virtual string get_driver_vendor(); - virtual string get_driver_renderer(); - virtual string get_driver_version(); + virtual std::string get_driver_vendor(); + virtual std::string get_driver_renderer(); + virtual std::string get_driver_version(); virtual int get_driver_version_major(); virtual int get_driver_version_minor(); virtual int get_driver_shader_version_major(); @@ -411,9 +411,9 @@ public: INLINE bool clear_errors(int line, const char *source_file); INLINE void clear_my_errors(int line, const char *source_file); - INLINE const string &get_gl_vendor() const; - INLINE const string &get_gl_renderer() const; - INLINE const string &get_gl_version() const; + INLINE const std::string &get_gl_vendor() const; + INLINE const std::string &get_gl_renderer() const; + INLINE const std::string &get_gl_version() const; INLINE int get_gl_version_major() const; INLINE int get_gl_version_minor() const; INLINE bool has_fixed_function_pipeline() const; @@ -422,7 +422,7 @@ public: const TransformState *transform); void bind_fbo(GLuint fbo); - virtual bool get_supports_cg_profile(const string &name) const; + virtual bool get_supports_cg_profile(const std::string &name) const; void finish(); protected: @@ -466,14 +466,14 @@ protected: static bool report_errors_loop(int line, const char *source_file, GLenum error_code, int &error_count); - static string get_error_string(GLenum error_code); - string show_gl_string(const string &name, GLenum id); + static std::string get_error_string(GLenum error_code); + std::string show_gl_string(const std::string &name, GLenum id); virtual void query_gl_version(); void query_glsl_version(); void save_extensions(const char *extensions); virtual void get_extra_extensions(); void report_extensions() const; - INLINE virtual bool has_extension(const string &extension) const; + INLINE virtual bool has_extension(const std::string &extension) const; INLINE bool is_at_least_gl_version(int major_version, int minor_version) const; INLINE bool is_at_least_gles_version(int major_version, int minor_version) const; void *get_extension_func(const char *name); @@ -728,14 +728,14 @@ protected: bool _supports_depth32; #endif - string _gl_vendor; - string _gl_renderer; - string _gl_version; + std::string _gl_vendor; + std::string _gl_renderer; + std::string _gl_version; int _gl_version_major, _gl_version_minor; // #--- Zhao Nov2011 int _gl_shadlang_ver_major, _gl_shadlang_ver_minor; - pset _extensions; + pset _extensions; #ifndef OPENGLES // True for non-compatibility GL 3.2+ contexts. diff --git a/panda/src/glstuff/glmisc_src.h b/panda/src/glstuff/glmisc_src.h index fb8040828f..5ba0b35d20 100644 --- a/panda/src/glstuff/glmisc_src.h +++ b/panda/src/glstuff/glmisc_src.h @@ -87,8 +87,8 @@ extern EXPCL_GL void CLP(init_classes)(); #if !defined(WIN32) && defined(GSG_VERBOSE) -ostream &output_gl_enum(ostream &out, GLenum v); -INLINE ostream &operator << (ostream &out, GLenum v) { +std::ostream &output_gl_enum(std::ostream &out, GLenum v); +INLINE std::ostream &operator << (std::ostream &out, GLenum v) { return output_gl_enum(out, v); } #endif diff --git a/panda/src/glxdisplay/glxGraphicsBuffer.h b/panda/src/glxdisplay/glxGraphicsBuffer.h index e14a329db0..0ccbd6007b 100644 --- a/panda/src/glxdisplay/glxGraphicsBuffer.h +++ b/panda/src/glxdisplay/glxGraphicsBuffer.h @@ -25,7 +25,7 @@ class glxGraphicsBuffer : public GraphicsBuffer { public: glxGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/glxdisplay/glxGraphicsPipe.h b/panda/src/glxdisplay/glxGraphicsPipe.h index 25ff9a7fd1..1d08297ab2 100644 --- a/panda/src/glxdisplay/glxGraphicsPipe.h +++ b/panda/src/glxdisplay/glxGraphicsPipe.h @@ -75,14 +75,14 @@ class FrameBufferProperties; */ class glxGraphicsPipe : public x11GraphicsPipe { public: - glxGraphicsPipe(const string &display = string()); + glxGraphicsPipe(const std::string &display = std::string()); virtual ~glxGraphicsPipe() {}; - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/glxdisplay/glxGraphicsPixmap.h b/panda/src/glxdisplay/glxGraphicsPixmap.h index 7c724d4d71..9cc542fbcc 100644 --- a/panda/src/glxdisplay/glxGraphicsPixmap.h +++ b/panda/src/glxdisplay/glxGraphicsPixmap.h @@ -28,7 +28,7 @@ class glxGraphicsPixmap : public GraphicsBuffer { public: glxGraphicsPixmap(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/glxdisplay/glxGraphicsStateGuardian.h b/panda/src/glxdisplay/glxGraphicsStateGuardian.h index 7d31b6d8a9..4470f00d0b 100644 --- a/panda/src/glxdisplay/glxGraphicsStateGuardian.h +++ b/panda/src/glxdisplay/glxGraphicsStateGuardian.h @@ -131,8 +131,8 @@ protected: private: void query_glx_extensions(); - void show_glx_client_string(const string &name, int id); - void show_glx_server_string(const string &name, int id); + void show_glx_client_string(const std::string &name, int id); + void show_glx_server_string(const std::string &name, int id); void choose_temp_visual(const FrameBufferProperties &properties); void init_temp_context(); void destroy_temp_xwindow(); diff --git a/panda/src/glxdisplay/glxGraphicsWindow.h b/panda/src/glxdisplay/glxGraphicsWindow.h index d89ab1552b..4c583c186c 100644 --- a/panda/src/glxdisplay/glxGraphicsWindow.h +++ b/panda/src/glxdisplay/glxGraphicsWindow.h @@ -27,7 +27,7 @@ class glxGraphicsWindow : public x11GraphicsWindow { public: glxGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/gobj/adaptiveLru.h b/panda/src/gobj/adaptiveLru.h index 4729f63f2c..e01fa02bfb 100644 --- a/panda/src/gobj/adaptiveLru.h +++ b/panda/src/gobj/adaptiveLru.h @@ -44,7 +44,7 @@ public: */ class EXPCL_PANDA_GOBJ AdaptiveLru : public Namable { PUBLISHED: - explicit AdaptiveLru(const string &name, size_t max_size); + explicit AdaptiveLru(const std::string &name, size_t max_size); ~AdaptiveLru(); INLINE size_t get_total_size() const; @@ -58,8 +58,8 @@ PUBLISHED: INLINE bool validate(); - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; // The following methods are specific to AdaptiveLru, and do not exist in // the SimpleLru implementation. In most cases, the defaults will be @@ -153,8 +153,8 @@ PUBLISHED: virtual void evict_lru(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; // Not defined in SimpleLruPage. unsigned int get_num_frames() const; @@ -179,12 +179,12 @@ private: friend class AdaptiveLru; }; -inline ostream &operator << (ostream &out, const AdaptiveLru &lru) { +inline std::ostream &operator << (std::ostream &out, const AdaptiveLru &lru) { lru.output(out); return out; } -inline ostream &operator << (ostream &out, const AdaptiveLruPage &page) { +inline std::ostream &operator << (std::ostream &out, const AdaptiveLruPage &page) { page.output(out); return out; } diff --git a/panda/src/gobj/bufferContextChain.h b/panda/src/gobj/bufferContextChain.h index a9943fddbf..b995c2e583 100644 --- a/panda/src/gobj/bufferContextChain.h +++ b/panda/src/gobj/bufferContextChain.h @@ -40,7 +40,7 @@ public: void take_from(BufferContextChain &other); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; private: INLINE void adjust_bytes(int delta); diff --git a/panda/src/gobj/bufferResidencyTracker.h b/panda/src/gobj/bufferResidencyTracker.h index 973d249d41..d3714cd232 100644 --- a/panda/src/gobj/bufferResidencyTracker.h +++ b/panda/src/gobj/bufferResidencyTracker.h @@ -31,7 +31,7 @@ class BufferContext; */ class EXPCL_PANDA_GOBJ BufferResidencyTracker { public: - BufferResidencyTracker(const string &pgo_name, const string &type_name); + BufferResidencyTracker(const std::string &pgo_name, const std::string &type_name); ~BufferResidencyTracker(); void begin_frame(Thread *current_thread); @@ -43,7 +43,7 @@ public: INLINE BufferContextChain &get_inactive_resident(); INLINE BufferContextChain &get_active_resident(); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; private: void move_inactive(BufferContextChain &inactive, BufferContextChain &active); diff --git a/panda/src/gobj/geom.I b/panda/src/gobj/geom.I index 81a545d6b6..94469ec77c 100644 --- a/panda/src/gobj/geom.I +++ b/panda/src/gobj/geom.I @@ -448,8 +448,8 @@ CacheKey(const CacheKey ©) : */ INLINE Geom::CacheKey:: CacheKey(CacheKey &&from) noexcept : - _source_data(move(from._source_data)), - _modifier(move(from._modifier)) + _source_data(std::move(from._source_data)), + _modifier(std::move(from._modifier)) { } @@ -497,7 +497,7 @@ CacheEntry(Geom *source, const Geom::CacheKey &key) : INLINE Geom::CacheEntry:: CacheEntry(Geom *source, Geom::CacheKey &&key) noexcept : _source(source), - _key(move(key)) + _key(std::move(key)) { } @@ -696,8 +696,8 @@ prepare_now(PreparedGraphicsObjects *prepared_objects, return ((Geom *)_object)->prepare_now(prepared_objects, gsg); } -INLINE ostream & -operator << (ostream &out, const Geom &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const Geom &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/geom.h b/panda/src/gobj/geom.h index 41ac95adea..833ac3cd83 100644 --- a/panda/src/gobj/geom.h +++ b/panda/src/gobj/geom.h @@ -140,8 +140,8 @@ PUBLISHED: INLINE void clear_bounds(); MAKE_PROPERTY(bounds_type, get_bounds_type, set_bounds_type); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; void clear_cache(); void clear_cache_stage(Thread *current_thread); @@ -275,7 +275,7 @@ public: ALLOC_DELETED_CHAIN(CacheEntry); virtual void evict_callback(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; Geom *_source; // A back pointer to the containing Geom CacheKey _key; @@ -450,7 +450,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const Geom &obj); +INLINE std::ostream &operator << (std::ostream &out, const Geom &obj); #include "geom.I" diff --git a/panda/src/gobj/geomCacheEntry.I b/panda/src/gobj/geomCacheEntry.I index 6d9f2dd2cc..0529d0f5cb 100644 --- a/panda/src/gobj/geomCacheEntry.I +++ b/panda/src/gobj/geomCacheEntry.I @@ -51,8 +51,8 @@ insert_before(GeomCacheEntry *node) { node->_prev = this; } -INLINE ostream & -operator << (ostream &out, const GeomCacheEntry &entry) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomCacheEntry &entry) { entry.output(out); return out; } diff --git a/panda/src/gobj/geomCacheEntry.h b/panda/src/gobj/geomCacheEntry.h index 85f1dfb106..ff79d096c2 100644 --- a/panda/src/gobj/geomCacheEntry.h +++ b/panda/src/gobj/geomCacheEntry.h @@ -38,7 +38,7 @@ public: PT(GeomCacheEntry) erase(); virtual void evict_callback(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: int _last_frame_used; @@ -65,7 +65,7 @@ private: friend class GeomCacheManager; }; -INLINE ostream &operator << (ostream &out, const GeomCacheEntry &entry); +INLINE std::ostream &operator << (std::ostream &out, const GeomCacheEntry &entry); #include "geomCacheEntry.I" diff --git a/panda/src/gobj/geomEnums.h b/panda/src/gobj/geomEnums.h index 80af6d0ea2..b9a19138eb 100644 --- a/panda/src/gobj/geomEnums.h +++ b/panda/src/gobj/geomEnums.h @@ -220,9 +220,9 @@ PUBLISHED: }; }; -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, GeomEnums::UsageHint usage_hint); -EXPCL_PANDA_GOBJ istream &operator >> (istream &in, GeomEnums::UsageHint &usage_hint); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, GeomEnums::NumericType numeric_type); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, GeomEnums::Contents contents); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, GeomEnums::UsageHint usage_hint); +EXPCL_PANDA_GOBJ std::istream &operator >> (std::istream &in, GeomEnums::UsageHint &usage_hint); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, GeomEnums::NumericType numeric_type); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, GeomEnums::Contents contents); #endif diff --git a/panda/src/gobj/geomMunger.h b/panda/src/gobj/geomMunger.h index 840057539d..00105108bf 100644 --- a/panda/src/gobj/geomMunger.h +++ b/panda/src/gobj/geomMunger.h @@ -109,7 +109,7 @@ private: private: class CacheEntry : public GeomCacheEntry { public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PT(GeomMunger) _munger; }; diff --git a/panda/src/gobj/geomPrimitive.I b/panda/src/gobj/geomPrimitive.I index 061a49c527..0984dbecb3 100644 --- a/panda/src/gobj/geomPrimitive.I +++ b/panda/src/gobj/geomPrimitive.I @@ -445,7 +445,7 @@ CData(const GeomPrimitive::CData ©) : INLINE GeomPrimitivePipelineReader:: GeomPrimitivePipelineReader(CPT(GeomPrimitive) object, Thread *current_thread) : - _object(move(object)), + _object(std::move(object)), _current_thread(current_thread), #ifndef CPPPARSER _cdata(_object->_cycler.read_unlocked(current_thread)), @@ -667,8 +667,8 @@ draw(GraphicsStateGuardianBase *gsg, bool force) const { return _object->draw(gsg, this, force); } -INLINE ostream & -operator << (ostream &out, const GeomPrimitive &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomPrimitive &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/geomPrimitive.h b/panda/src/gobj/geomPrimitive.h index 50cb5695aa..b8012507b8 100644 --- a/panda/src/gobj/geomPrimitive.h +++ b/panda/src/gobj/geomPrimitive.h @@ -147,8 +147,8 @@ PUBLISHED: INLINE bool check_valid(const GeomVertexData *vertex_data) const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; PUBLISHED: /* @@ -408,7 +408,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const GeomPrimitive &obj); +INLINE std::ostream &operator << (std::ostream &out, const GeomPrimitive &obj); #include "geomPrimitive.I" diff --git a/panda/src/gobj/geomVertexAnimationSpec.I b/panda/src/gobj/geomVertexAnimationSpec.I index eb32efb5eb..0942ce5d78 100644 --- a/panda/src/gobj/geomVertexAnimationSpec.I +++ b/panda/src/gobj/geomVertexAnimationSpec.I @@ -150,8 +150,8 @@ compare_to(const GeomVertexAnimationSpec &other) const { return 0; } -INLINE ostream & -operator << (ostream &out, const GeomVertexAnimationSpec &animation) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexAnimationSpec &animation) { animation.output(out); return out; } diff --git a/panda/src/gobj/geomVertexAnimationSpec.h b/panda/src/gobj/geomVertexAnimationSpec.h index ddd94866a5..c377dd9f94 100644 --- a/panda/src/gobj/geomVertexAnimationSpec.h +++ b/panda/src/gobj/geomVertexAnimationSpec.h @@ -53,7 +53,7 @@ PUBLISHED: INLINE void set_panda(); INLINE void set_hardware(int num_transforms, bool indexed_transforms); - void output(ostream &out) const; + void output(std::ostream &out) const; public: INLINE bool operator < (const GeomVertexAnimationSpec &other) const; @@ -72,8 +72,8 @@ private: bool _indexed_transforms; }; -INLINE ostream & -operator << (ostream &out, const GeomVertexAnimationSpec &animation); +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexAnimationSpec &animation); #include "geomVertexAnimationSpec.I" diff --git a/panda/src/gobj/geomVertexArrayData.I b/panda/src/gobj/geomVertexArrayData.I index a4b3f51397..d573489ba6 100644 --- a/panda/src/gobj/geomVertexArrayData.I +++ b/panda/src/gobj/geomVertexArrayData.I @@ -240,9 +240,9 @@ CData(UsageHint usage_hint) : */ INLINE GeomVertexArrayData::CData:: CData(GeomVertexArrayData::CData &&from) noexcept : - _usage_hint(move(from._usage_hint)), - _buffer(move(from._buffer)), - _modified(move(from._modified)), + _usage_hint(std::move(from._usage_hint)), + _buffer(std::move(from._buffer)), + _modified(std::move(from._modified)), _rw_lock("GeomVertexArrayData::CData::_rw_lock") { } @@ -518,10 +518,10 @@ prepare_now(PreparedGraphicsObjects *prepared_objects, * a string. This is primarily for the benefit of high-level languages such * as Python. */ -INLINE string GeomVertexArrayDataHandle:: +INLINE std::string GeomVertexArrayDataHandle:: get_data() const { mark_used(); - return string((const char *)_cdata->_buffer.get_read_pointer(true), _cdata->_buffer.get_size()); + return std::string((const char *)_cdata->_buffer.get_read_pointer(true), _cdata->_buffer.get_size()); } /** @@ -529,12 +529,12 @@ get_data() const { * formatted as a string. This is primarily for the benefit of high-level * languages such as Python. */ -INLINE string GeomVertexArrayDataHandle:: +INLINE std::string GeomVertexArrayDataHandle:: get_subdata(size_t start, size_t size) const { mark_used(); - start = min(start, _cdata->_buffer.get_size()); - size = min(size, _cdata->_buffer.get_size() - start); - return string((const char *)_cdata->_buffer.get_read_pointer(true) + start, size); + start = std::min(start, _cdata->_buffer.get_size()); + size = std::min(size, _cdata->_buffer.get_size() - start); + return std::string((const char *)_cdata->_buffer.get_read_pointer(true) + start, size); } /** @@ -545,8 +545,8 @@ mark_used() const { _object->mark_used(); } -INLINE ostream & -operator << (ostream &out, const GeomVertexArrayData &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexArrayData &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/geomVertexArrayData.h b/panda/src/gobj/geomVertexArrayData.h index 264c9a1971..40935563e5 100644 --- a/panda/src/gobj/geomVertexArrayData.h +++ b/panda/src/gobj/geomVertexArrayData.h @@ -92,8 +92,8 @@ PUBLISHED: MAKE_PROPERTY(data_size_bytes, get_data_size_bytes); MAKE_PROPERTY(modified, get_modified); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; INLINE bool request_resident(Thread *current_thread = Thread::get_current_thread()) const; @@ -316,10 +316,10 @@ PUBLISHED: PyObject *buffer, size_t from_start, size_t from_size)); - INLINE string get_data() const; - void set_data(const string &data); - INLINE string get_subdata(size_t start, size_t size) const; - void set_subdata(size_t start, size_t size, const string &data); + INLINE std::string get_data() const; + void set_data(const std::string &data); + INLINE std::string get_subdata(size_t start, size_t size) const; + void set_subdata(size_t start, size_t size, const std::string &data); INLINE void mark_used() const; @@ -350,7 +350,7 @@ private: friend class GeomVertexArrayData; }; -INLINE ostream &operator << (ostream &out, const GeomVertexArrayData &obj); +INLINE std::ostream &operator << (std::ostream &out, const GeomVertexArrayData &obj); #include "geomVertexArrayData.I" diff --git a/panda/src/gobj/geomVertexArrayFormat.I b/panda/src/gobj/geomVertexArrayFormat.I index 94e62b109b..10fb6b8329 100644 --- a/panda/src/gobj/geomVertexArrayFormat.I +++ b/panda/src/gobj/geomVertexArrayFormat.I @@ -160,8 +160,8 @@ consider_sort_columns() const { } } -INLINE ostream & -operator << (ostream &out, const GeomVertexArrayFormat &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexArrayFormat &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/geomVertexArrayFormat.h b/panda/src/gobj/geomVertexArrayFormat.h index fbd697fe3a..2cb8aa5f14 100644 --- a/panda/src/gobj/geomVertexArrayFormat.h +++ b/panda/src/gobj/geomVertexArrayFormat.h @@ -113,12 +113,12 @@ PUBLISHED: bool is_data_subset_of(const GeomVertexArrayFormat &other) const; int count_unused_space() const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; - void write_with_data(ostream &out, int indent_level, + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; + void write_with_data(std::ostream &out, int indent_level, const GeomVertexArrayData *array_data) const; - string get_format_string(bool pad = true) const; + std::string get_format_string(bool pad = true) const; public: int compare_to(const GeomVertexArrayFormat &other) const; @@ -192,7 +192,7 @@ private: friend class GeomVertexFormat; }; -INLINE ostream &operator << (ostream &out, const GeomVertexArrayFormat &obj); +INLINE std::ostream &operator << (std::ostream &out, const GeomVertexArrayFormat &obj); #include "geomVertexArrayFormat.I" diff --git a/panda/src/gobj/geomVertexColumn.I b/panda/src/gobj/geomVertexColumn.I index c9e4a2fb8a..b382071eac 100644 --- a/panda/src/gobj/geomVertexColumn.I +++ b/panda/src/gobj/geomVertexColumn.I @@ -300,8 +300,8 @@ operator < (const GeomVertexColumn &other) const { return 0; } -INLINE ostream & -operator << (ostream &out, const GeomVertexColumn &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexColumn &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/geomVertexColumn.h b/panda/src/gobj/geomVertexColumn.h index 6e31233946..1ff36b3eda 100644 --- a/panda/src/gobj/geomVertexColumn.h +++ b/panda/src/gobj/geomVertexColumn.h @@ -69,7 +69,7 @@ PUBLISHED: void set_start(int start); void set_column_alignment(int column_alignment); - void output(ostream &out) const; + void output(std::ostream &out) const; public: INLINE bool is_packed_argb() const; @@ -433,7 +433,7 @@ private: friend class GeomVertexWriter; }; -INLINE ostream &operator << (ostream &out, const GeomVertexColumn &obj); +INLINE std::ostream &operator << (std::ostream &out, const GeomVertexColumn &obj); #include "geomVertexColumn.I" diff --git a/panda/src/gobj/geomVertexData.I b/panda/src/gobj/geomVertexData.I index 6575397fa2..dd1d800309 100644 --- a/panda/src/gobj/geomVertexData.I +++ b/panda/src/gobj/geomVertexData.I @@ -15,7 +15,7 @@ * Returns the name passed to the constructor, if any. This name is reported * on the PStats graph for vertex computations. */ -INLINE const string &GeomVertexData:: +INLINE const std::string &GeomVertexData:: get_name() const { return _name; } @@ -476,7 +476,7 @@ unpack_ufloat_c(uint32_t data) { INLINE int GeomVertexData:: add_transform(TransformTable *table, const VertexTransform *transform, TransformMap &already_added) { - pair result = already_added.insert(TransformMap::value_type(transform, table->get_num_transforms())); + std::pair result = already_added.insert(TransformMap::value_type(transform, table->get_num_transforms())); if (result.second) { table->add_transform(transform); @@ -886,8 +886,8 @@ get_array_writer(size_t i) const { return _array_writers[i]; } -INLINE ostream & -operator << (ostream &out, const GeomVertexData &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexData &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/geomVertexData.h b/panda/src/gobj/geomVertexData.h index 806f5887d3..52d177e5e2 100644 --- a/panda/src/gobj/geomVertexData.h +++ b/panda/src/gobj/geomVertexData.h @@ -72,7 +72,7 @@ protected: virtual PT(CopyOnWriteObject) make_cow_copy(); PUBLISHED: - explicit GeomVertexData(const string &name, + explicit GeomVertexData(const std::string &name, const GeomVertexFormat *format, UsageHint usage_hint); GeomVertexData(const GeomVertexData ©); @@ -84,8 +84,8 @@ PUBLISHED: int compare_to(const GeomVertexData &other) const; - INLINE const string &get_name() const; - void set_name(const string &name); + INLINE const std::string &get_name() const; + void set_name(const std::string &name); MAKE_PROPERTY(name, get_name, set_name); INLINE UsageHint get_usage_hint() const; @@ -164,9 +164,9 @@ PUBLISHED: replace_column(InternalName *name, int num_components, NumericType numeric_type, Contents contents) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; - void describe_vertex(ostream &out, int row) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; + void describe_vertex(std::ostream &out, int row) const; void clear_cache(); void clear_cache_stage(); @@ -206,7 +206,7 @@ private: TransformMap &already_added); private: - string _name; + std::string _name; typedef pvector< COWPT(GeomVertexArrayData) > Arrays; @@ -263,7 +263,7 @@ public: ALLOC_DELETED_CHAIN(CacheEntry); virtual void evict_callback(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; GeomVertexData *_source; // A back pointer to the containing data. CacheKey _key; @@ -546,7 +546,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const GeomVertexData &obj); +INLINE std::ostream &operator << (std::ostream &out, const GeomVertexData &obj); #include "geomVertexData.I" diff --git a/panda/src/gobj/geomVertexFormat.I b/panda/src/gobj/geomVertexFormat.I index 680f779447..a6f85e57ff 100644 --- a/panda/src/gobj/geomVertexFormat.I +++ b/panda/src/gobj/geomVertexFormat.I @@ -11,8 +11,8 @@ * @date 2005-03-07 */ -INLINE ostream & -operator << (ostream &out, const GeomVertexFormat &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexFormat &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/geomVertexFormat.h b/panda/src/gobj/geomVertexFormat.h index 6e4f668436..82eec7f8a9 100644 --- a/panda/src/gobj/geomVertexFormat.h +++ b/panda/src/gobj/geomVertexFormat.h @@ -129,9 +129,9 @@ PUBLISHED: MAKE_MAP_PROPERTY(columns, has_column, get_column); MAKE_MAP_KEYS_SEQ(columns, get_num_columns, get_column_name); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; - void write_with_data(ostream &out, int indent_level, + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; + void write_with_data(std::ostream &out, int indent_level, const GeomVertexData *data) const; INLINE static const GeomVertexFormat *get_empty(); @@ -289,7 +289,7 @@ private: friend class GeomMunger; }; -INLINE ostream &operator << (ostream &out, const GeomVertexFormat &obj); +INLINE std::ostream &operator << (std::ostream &out, const GeomVertexFormat &obj); #include "geomVertexFormat.I" diff --git a/panda/src/gobj/geomVertexReader.h b/panda/src/gobj/geomVertexReader.h index f657975a63..beb92b017e 100644 --- a/panda/src/gobj/geomVertexReader.h +++ b/panda/src/gobj/geomVertexReader.h @@ -119,7 +119,7 @@ PUBLISHED: INLINE const LVecBase3i &get_data3i(); INLINE const LVecBase4i &get_data4i(); - void output(ostream &out) const; + void output(std::ostream &out) const; protected: INLINE GeomVertexColumn::Packer *get_packer() const; @@ -162,8 +162,8 @@ private: #endif }; -INLINE ostream & -operator << (ostream &out, const GeomVertexReader &reader) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexReader &reader) { reader.output(out); return out; } diff --git a/panda/src/gobj/geomVertexRewriter.h b/panda/src/gobj/geomVertexRewriter.h index d9291ea06a..2ed1699522 100644 --- a/panda/src/gobj/geomVertexRewriter.h +++ b/panda/src/gobj/geomVertexRewriter.h @@ -65,11 +65,11 @@ PUBLISHED: INLINE int get_start_row() const; INLINE bool is_at_end() const; - void output(ostream &out) const; + void output(std::ostream &out) const; }; -INLINE ostream & -operator << (ostream &out, const GeomVertexRewriter &rewriter) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexRewriter &rewriter) { rewriter.output(out); return out; } diff --git a/panda/src/gobj/geomVertexWriter.I b/panda/src/gobj/geomVertexWriter.I index cc25e79531..b55fdd5f4a 100644 --- a/panda/src/gobj/geomVertexWriter.I +++ b/panda/src/gobj/geomVertexWriter.I @@ -1382,13 +1382,13 @@ inc_add_pointer() { _handle = nullptr; GeomVertexDataPipelineWriter writer(_vertex_data, true, _current_thread); writer.check_array_writers(); - writer.set_num_rows(max(write_row + 1, writer.get_num_rows())); + writer.set_num_rows(std::max(write_row + 1, writer.get_num_rows())); _handle = writer.get_array_writer(_array); } else { // Otherwise, we can get away with modifying only the one array we're // using. - _handle->set_num_rows(max(write_row + 1, _handle->get_num_rows())); + _handle->set_num_rows(std::max(write_row + 1, _handle->get_num_rows())); } set_pointer(write_row); diff --git a/panda/src/gobj/geomVertexWriter.h b/panda/src/gobj/geomVertexWriter.h index aaedaf565b..f50b0e1596 100644 --- a/panda/src/gobj/geomVertexWriter.h +++ b/panda/src/gobj/geomVertexWriter.h @@ -174,7 +174,7 @@ PUBLISHED: INLINE void add_data4i(int a, int b, int c, int d); INLINE void add_data4i(const LVecBase4i &data); - void output(ostream &out) const; + void output(std::ostream &out) const; protected: INLINE GeomVertexColumn::Packer *get_packer() const; @@ -219,8 +219,8 @@ private: #endif }; -INLINE ostream & -operator << (ostream &out, const GeomVertexWriter &writer) { +INLINE std::ostream & +operator << (std::ostream &out, const GeomVertexWriter &writer) { writer.output(out); return out; } diff --git a/panda/src/gobj/indexBufferContext.h b/panda/src/gobj/indexBufferContext.h index 4e3019c507..6b2004fac2 100644 --- a/panda/src/gobj/indexBufferContext.h +++ b/panda/src/gobj/indexBufferContext.h @@ -46,8 +46,8 @@ public: INLINE void mark_loaded(const GeomPrimitivePipelineReader *reader); INLINE void mark_unloaded(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; private: // This cannot be a PT(GeomPrimitive), because the data and the GSG both own @@ -75,7 +75,7 @@ private: friend class PreparedGraphicsObjects; }; -inline ostream &operator << (ostream &out, const IndexBufferContext &context) { +inline std::ostream &operator << (std::ostream &out, const IndexBufferContext &context) { context.output(out); return out; } diff --git a/panda/src/gobj/internalName.I b/panda/src/gobj/internalName.I index 644ed998d3..4773faeb14 100644 --- a/panda/src/gobj/internalName.I +++ b/panda/src/gobj/internalName.I @@ -22,7 +22,7 @@ * handled transparently. */ INLINE PT(InternalName) InternalName:: -make(const string &name) { +make(const std::string &name) { return get_root()->append(name); } @@ -63,7 +63,7 @@ get_parent() const { * Return the name represented by just this particular InternalName object, * ignoring its parents names. This is everything after the rightmost dot. */ -INLINE const string &InternalName:: +INLINE const std::string &InternalName:: get_basename() const { return _basename; } @@ -136,7 +136,7 @@ get_tangent() { * coordinate set. */ INLINE PT(InternalName) InternalName:: -get_tangent_name(const string &name) { +get_tangent_name(const std::string &name) { return get_tangent()->append(name); } @@ -161,7 +161,7 @@ get_binormal() { * named texture coordinate set. */ INLINE PT(InternalName) InternalName:: -get_binormal_name(const string &name) { +get_binormal_name(const std::string &name) { return get_binormal()->append(name); } @@ -185,7 +185,7 @@ get_texcoord() { * set in a TextureStage. */ INLINE PT(InternalName) InternalName:: -get_texcoord_name(const string &name) { +get_texcoord_name(const std::string &name) { return get_texcoord()->append(name); } @@ -298,7 +298,7 @@ get_transform_index() { * column it applies to. */ INLINE PT(InternalName) InternalName:: -get_morph(InternalName *column, const string &slider) { +get_morph(InternalName *column, const std::string &slider) { // This actually returns "column.morph.slider", although that's just an // implementation detail--as long as it returns a consistent, unique name // for each combination of column and slider, everything is good. @@ -369,8 +369,8 @@ get_view() { /** * */ -INLINE ostream & -operator << (ostream &out, const InternalName &tcn) { +INLINE std::ostream & +operator << (std::ostream &out, const InternalName &tcn) { tcn.output(out); return out; } @@ -407,7 +407,7 @@ CPT_InternalName(const ConstPointerTo ©) : * */ INLINE CPT_InternalName:: -CPT_InternalName(const string &name) : +CPT_InternalName(const std::string &name) : ConstPointerTo(InternalName::make(name)) { } diff --git a/panda/src/gobj/internalName.h b/panda/src/gobj/internalName.h index 1c8b942a5b..729ec15ab8 100644 --- a/panda/src/gobj/internalName.h +++ b/panda/src/gobj/internalName.h @@ -37,10 +37,10 @@ class FactoryParams; */ class EXPCL_PANDA_GOBJ InternalName final : public TypedWritableReferenceCount { private: - InternalName(InternalName *parent, const string &basename); + InternalName(InternalName *parent, const std::string &basename); public: - INLINE static PT(InternalName) make(const string &name); + INLINE static PT(InternalName) make(const std::string &name); template INLINE static PT(InternalName) make(const char (&literal)[N]); @@ -49,24 +49,24 @@ PUBLISHED: virtual ~InternalName(); virtual bool unref() const; - static PT(InternalName) make(const string &name, int index); - PT(InternalName) append(const string &basename); + static PT(InternalName) make(const std::string &name, int index); + PT(InternalName) append(const std::string &basename); INLINE InternalName *get_parent() const; - string get_name() const; - string join(const string &sep) const; - INLINE const string &get_basename() const; + std::string get_name() const; + std::string join(const std::string &sep) const; + INLINE const std::string &get_basename() const; MAKE_PROPERTY(parent, get_parent); MAKE_PROPERTY(name, get_name); MAKE_PROPERTY(basename, get_basename); - int find_ancestor(const string &basename) const; + int find_ancestor(const std::string &basename) const; const InternalName *get_ancestor(int n) const; const InternalName *get_top() const; - string get_net_basename(int n) const; + std::string get_net_basename(int n) const; - void output(ostream &out) const; + void output(std::ostream &out) const; // Some predefined built-in names. INLINE static PT(InternalName) get_root(); @@ -74,11 +74,11 @@ PUBLISHED: INLINE static PT(InternalName) get_vertex(); INLINE static PT(InternalName) get_normal(); INLINE static PT(InternalName) get_tangent(); - INLINE static PT(InternalName) get_tangent_name(const string &name); + INLINE static PT(InternalName) get_tangent_name(const std::string &name); INLINE static PT(InternalName) get_binormal(); - INLINE static PT(InternalName) get_binormal_name(const string &name); + INLINE static PT(InternalName) get_binormal_name(const std::string &name); INLINE static PT(InternalName) get_texcoord(); - INLINE static PT(InternalName) get_texcoord_name(const string &name); + INLINE static PT(InternalName) get_texcoord_name(const std::string &name); INLINE static PT(InternalName) get_color(); INLINE static PT(InternalName) get_rotate(); INLINE static PT(InternalName) get_size(); @@ -86,7 +86,7 @@ PUBLISHED: INLINE static PT(InternalName) get_transform_blend(); INLINE static PT(InternalName) get_transform_weight(); INLINE static PT(InternalName) get_transform_index(); - INLINE static PT(InternalName) get_morph(InternalName *column, const string &slider); + INLINE static PT(InternalName) get_morph(InternalName *column, const std::string &slider); INLINE static PT(InternalName) get_index(); INLINE static PT(InternalName) get_world(); INLINE static PT(InternalName) get_camera(); @@ -113,9 +113,9 @@ public: private: PT(InternalName) _parent; - string _basename; + std::string _basename; - typedef phash_map NameTable; + typedef phash_map NameTable; NameTable _name_table; LightMutex _name_table_lock; @@ -182,7 +182,7 @@ private: template<> INLINE void PointerToBase::update_type(To *ptr) {} -INLINE ostream &operator << (ostream &out, const InternalName &tcn); +INLINE std::ostream &operator << (std::ostream &out, const InternalName &tcn); /** * This is a const pointer to an InternalName, and should be used in lieu of a @@ -201,7 +201,7 @@ public: INLINE CPT_InternalName(PointerTo &&from) noexcept; INLINE CPT_InternalName(const ConstPointerTo ©); INLINE CPT_InternalName(ConstPointerTo &&from) noexcept; - INLINE CPT_InternalName(const string &name); + INLINE CPT_InternalName(const std::string &name); template INLINE CPT_InternalName(const char (&literal)[N]); diff --git a/panda/src/gobj/lens.I b/panda/src/gobj/lens.I index 337b60ab0c..91fb6e7170 100644 --- a/panda/src/gobj/lens.I +++ b/panda/src/gobj/lens.I @@ -142,7 +142,7 @@ project(const LPoint3 &point3d, LPoint3 &point2d) const { * to automatically track changes to camera fov, etc. in the application. */ INLINE void Lens:: -set_change_event(const string &event) { +set_change_event(const std::string &event) { CDWriter cdata(_cycler, true); cdata->_change_event = event; } @@ -151,7 +151,7 @@ set_change_event(const string &event) { * Returns the name of the event that will be generated whenever any * properties of this particular Lens have changed. */ -INLINE const string &Lens:: +INLINE const std::string &Lens:: get_change_event() const { CDReader cdata(_cycler); return cdata->_change_event; @@ -709,8 +709,8 @@ do_set_near_far(CData *cdata, PN_stdfloat near_distance, PN_stdfloat far_distanc do_throw_change_event(cdata); } -INLINE ostream & -operator << (ostream &out, const Lens &lens) { +INLINE std::ostream & +operator << (std::ostream &out, const Lens &lens) { lens.output(out); return out; } diff --git a/panda/src/gobj/lens.h b/panda/src/gobj/lens.h index f695d36558..b0ac72d907 100644 --- a/panda/src/gobj/lens.h +++ b/panda/src/gobj/lens.h @@ -64,8 +64,8 @@ PUBLISHED: INLINE bool project(const LPoint3 &point3d, LPoint3 &point2d) const; INLINE bool project(const LPoint3 &point3d, LPoint2 &point2d) const; - INLINE void set_change_event(const string &event); - INLINE const string &get_change_event() const; + INLINE void set_change_event(const std::string &event); + INLINE const std::string &get_change_event() const; MAKE_PROPERTY(change_event, get_change_event, set_change_event); void set_coordinate_system(CoordinateSystem cs); @@ -182,8 +182,8 @@ PUBLISHED: INLINE const LMatrix4 &get_lens_mat() const; INLINE const LMatrix4 &get_lens_mat_inv() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; INLINE UpdateSeq get_last_change() const; @@ -322,7 +322,7 @@ protected: void clear(); - string _change_event; + std::string _change_event; UpdateSeq _last_change; CoordinateSystem _cs; @@ -399,7 +399,7 @@ private: static TypeHandle _type_handle; }; -EXPCL_PANDA_GOBJ INLINE ostream &operator << (ostream &out, const Lens &lens); +EXPCL_PANDA_GOBJ INLINE std::ostream &operator << (std::ostream &out, const Lens &lens); #include "lens.I" diff --git a/panda/src/gobj/material.I b/panda/src/gobj/material.I index 777a555200..b9e30ba262 100644 --- a/panda/src/gobj/material.I +++ b/panda/src/gobj/material.I @@ -15,7 +15,7 @@ * */ INLINE Material:: -Material(const string &name) : Namable(name) { +Material(const std::string &name) : Namable(name) { _base_color.set(1.0f, 1.0f, 1.0f, 1.0f); _ambient.set(1.0f, 1.0f, 1.0f, 1.0f); _diffuse.set(1.0f, 1.0f, 1.0f, 1.0f); diff --git a/panda/src/gobj/material.h b/panda/src/gobj/material.h index 17344df46a..5835a81ae3 100644 --- a/panda/src/gobj/material.h +++ b/panda/src/gobj/material.h @@ -41,7 +41,7 @@ class FactoryParams; */ class EXPCL_PANDA_GOBJ Material : public TypedWritableReferenceCount, public Namable { PUBLISHED: - INLINE explicit Material(const string &name = ""); + INLINE explicit Material(const std::string &name = ""); INLINE Material(const Material ©); void operator = (const Material ©); INLINE ~Material(); @@ -100,8 +100,8 @@ PUBLISHED: int compare_to(const Material &other) const; - void output(ostream &out) const; - void write(ostream &out, int indent) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent) const; INLINE bool is_attrib_locked() const; INLINE void set_attrib_lock(); @@ -186,7 +186,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const Material &m) { +INLINE std::ostream &operator << (std::ostream &out, const Material &m) { m.output(out); return out; } diff --git a/panda/src/gobj/materialPool.I b/panda/src/gobj/materialPool.I index 6d6726bde6..271bda6fa8 100644 --- a/panda/src/gobj/materialPool.I +++ b/panda/src/gobj/materialPool.I @@ -63,7 +63,7 @@ garbage_collect() { * Lists the contents of the material pool to the indicated output stream. */ INLINE void MaterialPool:: -list_contents(ostream &out) { +list_contents(std::ostream &out) { get_global_ptr()->ns_list_contents(out); } diff --git a/panda/src/gobj/materialPool.h b/panda/src/gobj/materialPool.h index e5a0775b0b..d4cc1cc67b 100644 --- a/panda/src/gobj/materialPool.h +++ b/panda/src/gobj/materialPool.h @@ -40,9 +40,9 @@ PUBLISHED: INLINE static void release_all_materials(); INLINE static int garbage_collect(); - INLINE static void list_contents(ostream &out); + INLINE static void list_contents(std::ostream &out); - static void write(ostream &out); + static void write(std::ostream &out); private: INLINE MaterialPool(); @@ -52,7 +52,7 @@ private: void ns_release_all_materials(); int ns_garbage_collect(); - void ns_list_contents(ostream &out) const; + void ns_list_contents(std::ostream &out) const; static MaterialPool *get_global_ptr(); diff --git a/panda/src/gobj/matrixLens.h b/panda/src/gobj/matrixLens.h index 0b4f068b88..e5d1d1a688 100644 --- a/panda/src/gobj/matrixLens.h +++ b/panda/src/gobj/matrixLens.h @@ -52,7 +52,7 @@ public: virtual PT(Lens) make_copy() const; virtual bool is_linear() const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: virtual void do_compute_projection_mat(Lens::CData *lens_cdata); diff --git a/panda/src/gobj/orthographicLens.h b/panda/src/gobj/orthographicLens.h index 8798d4d8e7..da150fa681 100644 --- a/panda/src/gobj/orthographicLens.h +++ b/panda/src/gobj/orthographicLens.h @@ -40,7 +40,7 @@ public: virtual bool is_linear() const; virtual bool is_orthographic() const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: virtual bool do_extrude_depth(const CData *cdata, const LPoint3 &point2d, diff --git a/panda/src/gobj/paramTexture.I b/panda/src/gobj/paramTexture.I index c25c71ca28..c8235778e8 100644 --- a/panda/src/gobj/paramTexture.I +++ b/panda/src/gobj/paramTexture.I @@ -55,7 +55,7 @@ INLINE ParamTextureImage:: ParamTextureImage(Texture *tex, bool read, bool write, int z, int n) : _texture(tex), _access(0), - _bind_level(min(n, 127)), + _bind_level(std::min(n, 127)), _bind_layer(z) { if (read) { diff --git a/panda/src/gobj/paramTexture.h b/panda/src/gobj/paramTexture.h index d78ceb06b9..fb9b2a5a81 100644 --- a/panda/src/gobj/paramTexture.h +++ b/panda/src/gobj/paramTexture.h @@ -37,7 +37,7 @@ PUBLISHED: MAKE_PROPERTY(texture, get_texture); MAKE_PROPERTY(sampler, get_sampler); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: PT(Texture) _texture; @@ -106,7 +106,7 @@ PUBLISHED: MAKE_PROPERTY(bind_level, get_bind_level); MAKE_PROPERTY2(bind_layer, get_bind_layered, get_bind_layer); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: PT(Texture) _texture; diff --git a/panda/src/gobj/preparedGraphicsObjects.I b/panda/src/gobj/preparedGraphicsObjects.I index 6cc6daf914..a37a447489 100644 --- a/panda/src/gobj/preparedGraphicsObjects.I +++ b/panda/src/gobj/preparedGraphicsObjects.I @@ -16,7 +16,7 @@ * arbitrary name that serves mainly to uniquify the context for PStats * reporting. */ -INLINE const string &PreparedGraphicsObjects:: +INLINE const std::string &PreparedGraphicsObjects:: get_name() const { return _name; } diff --git a/panda/src/gobj/preparedGraphicsObjects.h b/panda/src/gobj/preparedGraphicsObjects.h index 3d673b615b..77ee91eca3 100644 --- a/panda/src/gobj/preparedGraphicsObjects.h +++ b/panda/src/gobj/preparedGraphicsObjects.h @@ -61,12 +61,12 @@ public: ~PreparedGraphicsObjects(); PUBLISHED: - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; void set_graphics_memory_limit(size_t limit); INLINE size_t get_graphics_memory_limit() const; - void show_graphics_memory_lru(ostream &out) const; - void show_residency_trackers(ostream &out) const; + void show_graphics_memory_lru(std::ostream &out) const; + void show_residency_trackers(std::ostream &out) const; INLINE void release_all(); INLINE int get_num_queued() const; @@ -215,7 +215,7 @@ public: void end_frame(Thread *current_thread); private: - static string init_name(); + static std::string init_name(); private: typedef phash_set Textures; @@ -261,7 +261,7 @@ private: size_t &buffer_cache_size); ReMutex _lock; - string _name; + std::string _name; Textures _prepared_textures, _released_textures; EnqueuedTextures _enqueued_textures; PreparedSamplers _prepared_samplers; diff --git a/panda/src/gobj/samplerContext.h b/panda/src/gobj/samplerContext.h index edb684c4b4..bf47b98b84 100644 --- a/panda/src/gobj/samplerContext.h +++ b/panda/src/gobj/samplerContext.h @@ -35,8 +35,8 @@ class EXPCL_PANDA_GOBJ SamplerContext : public SavedContext, public SimpleLruPag public: INLINE SamplerContext(const SamplerState &sampler); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; public: static TypeHandle get_class_type() { @@ -58,7 +58,7 @@ private: friend class PreparedGraphicsObjects; }; -inline ostream &operator << (ostream &out, const SamplerContext &context) { +inline std::ostream &operator << (std::ostream &out, const SamplerContext &context) { context.output(out); return out; } diff --git a/panda/src/gobj/samplerState.h b/panda/src/gobj/samplerState.h index 2236092b81..bef695cd83 100644 --- a/panda/src/gobj/samplerState.h +++ b/panda/src/gobj/samplerState.h @@ -126,11 +126,11 @@ PUBLISHED: INLINE bool uses_mipmaps() const; INLINE static bool is_mipmap(FilterType type); - static string format_filter_type(FilterType ft); - static FilterType string_filter_type(const string &str); + static std::string format_filter_type(FilterType ft); + static FilterType string_filter_type(const std::string &str); - static string format_wrap_mode(WrapMode wm); - static WrapMode string_wrap_mode(const string &str); + static std::string format_wrap_mode(WrapMode wm); + static WrapMode string_wrap_mode(const std::string &str); INLINE bool operator == (const SamplerState &other) const; INLINE bool operator != (const SamplerState &other) const; @@ -146,8 +146,8 @@ PUBLISHED: public: int compare_to(const SamplerState &other) const; - void output(ostream &out) const; - void write(ostream &out, int indent) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent) const; private: LColor _border_color; @@ -194,28 +194,28 @@ extern EXPCL_PANDA_GOBJ ConfigVariableEnum texture_min extern EXPCL_PANDA_GOBJ ConfigVariableEnum texture_magfilter; extern EXPCL_PANDA_GOBJ ConfigVariableInt texture_anisotropic_degree; -INLINE ostream &operator << (ostream &out, const SamplerState &m) { +INLINE std::ostream &operator << (std::ostream &out, const SamplerState &m) { m.output(out); return out; } -INLINE ostream &operator << (ostream &out, SamplerState::FilterType ft) { +INLINE std::ostream &operator << (std::ostream &out, SamplerState::FilterType ft) { return out << SamplerState::format_filter_type(ft); } -INLINE istream &operator >> (istream &in, SamplerState::FilterType &ft) { - string word; +INLINE std::istream &operator >> (std::istream &in, SamplerState::FilterType &ft) { + std::string word; in >> word; ft = SamplerState::string_filter_type(word); return in; } -INLINE ostream &operator << (ostream &out, SamplerState::WrapMode wm) { +INLINE std::ostream &operator << (std::ostream &out, SamplerState::WrapMode wm) { return out << SamplerState::format_wrap_mode(wm); } -INLINE istream &operator >> (istream &in, SamplerState::WrapMode &wm) { - string word; +INLINE std::istream &operator >> (std::istream &in, SamplerState::WrapMode &wm) { + std::string word; in >> word; wm = SamplerState::string_wrap_mode(word); return in; diff --git a/panda/src/gobj/savedContext.h b/panda/src/gobj/savedContext.h index 1e5a28594e..6c2db6aec8 100644 --- a/panda/src/gobj/savedContext.h +++ b/panda/src/gobj/savedContext.h @@ -27,8 +27,8 @@ class EXPCL_PANDA_GOBJ SavedContext : public TypedObject { public: INLINE SavedContext(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; PUBLISHED: static TypeHandle get_class_type() { @@ -49,7 +49,7 @@ private: static TypeHandle _type_handle; }; -inline ostream &operator << (ostream &out, const SavedContext &context) { +inline std::ostream &operator << (std::ostream &out, const SavedContext &context) { context.output(out); return out; } diff --git a/panda/src/gobj/shader.I b/panda/src/gobj/shader.I index 080fd46860..3a671a5f9f 100644 --- a/panda/src/gobj/shader.I +++ b/panda/src/gobj/shader.I @@ -85,7 +85,7 @@ set_filename(ShaderType type, const Filename &filename) { /** * Return the Shader's text for the given shader type. */ -INLINE const string &Shader:: +INLINE const std::string &Shader:: get_text(ShaderType type) const { if (_text._separate) { nassertr(type != ST_none || !_text._shared.empty(), _text._shared); @@ -694,9 +694,9 @@ read_datagram(DatagramIterator &scan) { * */ INLINE Shader::ShaderFile:: -ShaderFile(string shared) : +ShaderFile(std::string shared) : _separate(false), - _shared(move(shared)) + _shared(std::move(shared)) { } @@ -704,14 +704,14 @@ ShaderFile(string shared) : * */ INLINE Shader::ShaderFile:: -ShaderFile(string vertex, string fragment, string geometry, - string tess_control, string tess_evaluation) : +ShaderFile(std::string vertex, std::string fragment, std::string geometry, + std::string tess_control, std::string tess_evaluation) : _separate(true), - _vertex(move(vertex)), - _fragment(move(fragment)), - _geometry(move(geometry)), - _tess_control(move(tess_control)), - _tess_evaluation(move(tess_evaluation)) + _vertex(std::move(vertex)), + _fragment(std::move(fragment)), + _geometry(std::move(geometry)), + _tess_control(std::move(tess_control)), + _tess_evaluation(std::move(tess_evaluation)) { } diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 07e1e8b46e..52b1904c4d 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -84,7 +84,7 @@ PUBLISHED: }; static PT(Shader) load(const Filename &file, ShaderLanguage lang = SL_none); - static PT(Shader) make(string body, ShaderLanguage lang = SL_none); + static PT(Shader) make(std::string body, ShaderLanguage lang = SL_none); static PT(Shader) load(ShaderLanguage lang, const Filename &vertex, const Filename &fragment, const Filename &geometry = "", @@ -92,15 +92,15 @@ PUBLISHED: const Filename &tess_evaluation = ""); static PT(Shader) load_compute(ShaderLanguage lang, const Filename &fn); static PT(Shader) make(ShaderLanguage lang, - string vertex, string fragment, - string geometry = "", - string tess_control = "", - string tess_evaluation = ""); - static PT(Shader) make_compute(ShaderLanguage lang, string body); + std::string vertex, std::string fragment, + std::string geometry = "", + std::string tess_control = "", + std::string tess_evaluation = ""); + static PT(Shader) make_compute(ShaderLanguage lang, std::string body); INLINE Filename get_filename(ShaderType type = ST_none) const; INLINE void set_filename(ShaderType type, const Filename &filename); - INLINE const string &get_text(ShaderType type = ST_none) const; + INLINE const std::string &get_text(ShaderType type = ST_none) const; INLINE bool get_error_flag() const; INLINE ShaderLanguage get_language() const; @@ -327,7 +327,7 @@ public: }; struct ShaderArgId { - string _name; + std::string _name; ShaderType _type; int _seqno; }; @@ -464,9 +464,9 @@ public: class ShaderFile : public ReferenceCount { public: INLINE ShaderFile() {}; - INLINE ShaderFile(string shared); - INLINE ShaderFile(string vertex, string fragment, string geometry, - string tess_control, string tess_evaluation); + INLINE ShaderFile(std::string shared); + INLINE ShaderFile(std::string vertex, std::string fragment, std::string geometry, + std::string tess_control, std::string tess_evaluation); INLINE void write_datagram(Datagram &dg) const; INLINE void read_datagram(DatagramIterator &source); @@ -475,13 +475,13 @@ public: public: bool _separate; - string _shared; - string _vertex; - string _fragment; - string _geometry; - string _tess_control; - string _tess_evaluation; - string _compute; + std::string _shared; + std::string _vertex; + std::string _fragment; + std::string _geometry; + std::string _tess_control; + std::string _tess_evaluation; + std::string _compute; }; public: @@ -489,12 +489,12 @@ public: // implementations that need to do so. Don't use them when you use separate // shader programs. void parse_init(); - void parse_line(string &result, bool rt, bool lt); - void parse_upto(string &result, string pattern, bool include); - void parse_rest(string &result); + void parse_line(std::string &result, bool rt, bool lt); + void parse_upto(std::string &result, std::string pattern, bool include); + void parse_rest(std::string &result); bool parse_eof(); - void cp_report_error(ShaderArgInfo &arg, const string &msg); + void cp_report_error(ShaderArgInfo &arg, const std::string &msg); bool cp_errchk_parameter_words(ShaderArgInfo &arg, int len); bool cp_errchk_parameter_in(ShaderArgInfo &arg); bool cp_errchk_parameter_ptr(ShaderArgInfo &p); @@ -506,7 +506,7 @@ public: vector_string &pieces, int &next); bool cp_parse_delimiter(ShaderArgInfo &arg, vector_string &pieces, int &next); - string cp_parse_non_delimiter(vector_string &pieces, int &next); + std::string cp_parse_non_delimiter(vector_string &pieces, int &next); bool cp_parse_coord_sys(ShaderArgInfo &arg, vector_string &pieces, int &next, ShaderMatSpec &spec, bool fromflag); @@ -524,7 +524,7 @@ public: void clear_parameters(); void set_compiled(unsigned int format, const char *data, size_t length); - bool get_compiled(unsigned int &format, string &binary) const; + bool get_compiled(unsigned int &format, std::string &binary) const; private: #ifdef HAVE_CG @@ -593,7 +593,7 @@ protected: PT(BamCacheRecord) _record; bool _cache_compiled_shader; unsigned int _compiled_format; - string _compiled_binary; + std::string _compiled_binary; static ShaderCaps _default_caps; static int _shaders_generated; @@ -615,10 +615,10 @@ private: Shader(ShaderLanguage lang); bool read(const ShaderFile &sfile, BamCacheRecord *record = nullptr); - bool do_read_source(string &into, const Filename &fn, BamCacheRecord *record); - bool r_preprocess_source(ostream &out, const Filename &fn, + bool do_read_source(std::string &into, const Filename &fn, BamCacheRecord *record); + bool r_preprocess_source(std::ostream &out, const Filename &fn, const Filename &source_dir, - set &open_files, + std::set &open_files, BamCacheRecord *record, int depth = 0); bool check_modified() const; diff --git a/panda/src/gobj/shaderBuffer.I b/panda/src/gobj/shaderBuffer.I index 8e328e933e..3d76a9c2a2 100644 --- a/panda/src/gobj/shaderBuffer.I +++ b/panda/src/gobj/shaderBuffer.I @@ -16,7 +16,7 @@ * parameters cannot be modified, but this may change in the future. */ INLINE ShaderBuffer:: -ShaderBuffer(const string &name, uint64_t size, UsageHint usage_hint) : +ShaderBuffer(const std::string &name, uint64_t size, UsageHint usage_hint) : Namable(name), _data_size_bytes(size), _usage_hint(usage_hint), @@ -28,7 +28,7 @@ ShaderBuffer(const string &name, uint64_t size, UsageHint usage_hint) : * parameters cannot be modified, but this may change in the future. */ INLINE ShaderBuffer:: -ShaderBuffer(const string &name, pvector initial_data, UsageHint usage_hint) : +ShaderBuffer(const std::string &name, pvector initial_data, UsageHint usage_hint) : Namable(name), _data_size_bytes(initial_data.size()), _usage_hint(usage_hint), diff --git a/panda/src/gobj/shaderBuffer.h b/panda/src/gobj/shaderBuffer.h index 53c110048b..70270fb0d3 100644 --- a/panda/src/gobj/shaderBuffer.h +++ b/panda/src/gobj/shaderBuffer.h @@ -34,15 +34,15 @@ private: PUBLISHED: ~ShaderBuffer(); - INLINE explicit ShaderBuffer(const string &name, uint64_t size, UsageHint usage_hint); - INLINE explicit ShaderBuffer(const string &name, pvector initial_data, UsageHint usage_hint); + INLINE explicit ShaderBuffer(const std::string &name, uint64_t size, UsageHint usage_hint); + INLINE explicit ShaderBuffer(const std::string &name, pvector initial_data, UsageHint usage_hint); public: INLINE uint64_t get_data_size_bytes() const; INLINE UsageHint get_usage_hint() const; INLINE const unsigned char *get_initial_data() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: MAKE_PROPERTY(data_size_bytes, get_data_size_bytes); @@ -92,7 +92,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const ShaderBuffer &m) { +INLINE std::ostream &operator << (std::ostream &out, const ShaderBuffer &m) { m.output(out); return out; } diff --git a/panda/src/gobj/simpleAllocator.h b/panda/src/gobj/simpleAllocator.h index 7793fdc3fe..9e4cb7661b 100644 --- a/panda/src/gobj/simpleAllocator.h +++ b/panda/src/gobj/simpleAllocator.h @@ -41,8 +41,8 @@ PUBLISHED: INLINE SimpleAllocatorBlock *get_first_block() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; protected: SimpleAllocatorBlock *do_alloc(size_t size); @@ -106,7 +106,7 @@ PUBLISHED: INLINE SimpleAllocatorBlock *get_next_block() const; - void output(ostream &out) const; + void output(std::ostream &out) const; protected: INLINE void do_free(); @@ -121,12 +121,12 @@ private: friend class SimpleAllocator; }; -INLINE ostream &operator << (ostream &out, const SimpleAllocator &obj) { +INLINE std::ostream &operator << (std::ostream &out, const SimpleAllocator &obj) { obj.output(out); return out; } -INLINE ostream &operator << (ostream &out, const SimpleAllocatorBlock &obj) { +INLINE std::ostream &operator << (std::ostream &out, const SimpleAllocatorBlock &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/simpleLru.h b/panda/src/gobj/simpleLru.h index 0eaaced1c8..5a712d8ffc 100644 --- a/panda/src/gobj/simpleLru.h +++ b/panda/src/gobj/simpleLru.h @@ -27,7 +27,7 @@ class SimpleLruPage; */ class EXPCL_PANDA_GOBJ SimpleLru : public LinkedListNode, public Namable { PUBLISHED: - explicit SimpleLru(const string &name, size_t max_size); + explicit SimpleLru(const std::string &name, size_t max_size); ~SimpleLru(); INLINE size_t get_total_size() const; @@ -41,8 +41,8 @@ PUBLISHED: INLINE bool validate(); - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; public: static LightMutex &_global_lock; @@ -83,8 +83,8 @@ PUBLISHED: virtual void evict_lru(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; private: SimpleLru *_lru; @@ -94,12 +94,12 @@ private: friend class SimpleLru; }; -inline ostream &operator << (ostream &out, const SimpleLru &lru) { +inline std::ostream &operator << (std::ostream &out, const SimpleLru &lru) { lru.output(out); return out; } -inline ostream &operator << (ostream &out, const SimpleLruPage &page) { +inline std::ostream &operator << (std::ostream &out, const SimpleLruPage &page) { page.output(out); return out; } diff --git a/panda/src/gobj/sliderTable.h b/panda/src/gobj/sliderTable.h index 9cc939c678..69d982112d 100644 --- a/panda/src/gobj/sliderTable.h +++ b/panda/src/gobj/sliderTable.h @@ -60,7 +60,7 @@ PUBLISHED: void remove_slider(size_t n); size_t add_slider(const VertexSlider *slider, const SparseArray &rows); - void write(ostream &out) const; + void write(std::ostream &out) const; private: void do_register(); @@ -132,7 +132,7 @@ private: friend class VertexSlider; }; -INLINE ostream &operator << (ostream &out, const SliderTable &obj); +INLINE std::ostream &operator << (std::ostream &out, const SliderTable &obj); #include "sliderTable.I" diff --git a/panda/src/gobj/texture.I b/panda/src/gobj/texture.I index 17023fce5c..c766c5b82d 100644 --- a/panda/src/gobj/texture.I +++ b/panda/src/gobj/texture.I @@ -2147,7 +2147,7 @@ rescale_texture() { * power-2. */ INLINE bool Texture:: -adjust_this_size(int &x_size, int &y_size, const string &name, +adjust_this_size(int &x_size, int &y_size, const std::string &name, bool for_padding) const { CDReader cdata(_cycler); return do_adjust_this_size(cdata, x_size, y_size, name, for_padding); @@ -2385,7 +2385,7 @@ get_half_float(const unsigned char *&p) { */ INLINE bool Texture:: is_txo_filename(const Filename &fullpath) { - string extension = fullpath.get_extension(); + std::string extension = fullpath.get_extension(); #ifdef HAVE_ZLIB if (extension == "pz" || extension == "gz") { extension = Filename(fullpath.get_basename_wo_extension()).get_extension(); @@ -2400,7 +2400,7 @@ is_txo_filename(const Filename &fullpath) { */ INLINE bool Texture:: is_dds_filename(const Filename &fullpath) { - string extension = fullpath.get_extension(); + std::string extension = fullpath.get_extension(); #ifdef HAVE_ZLIB if (extension == "pz" || extension == "gz") { extension = Filename(fullpath.get_basename_wo_extension()).get_extension(); @@ -2415,7 +2415,7 @@ is_dds_filename(const Filename &fullpath) { */ INLINE bool Texture:: is_ktx_filename(const Filename &fullpath) { - string extension = fullpath.get_extension(); + std::string extension = fullpath.get_extension(); #ifdef HAVE_ZLIB if (extension == "pz" || extension == "gz") { extension = Filename(fullpath.get_basename_wo_extension()).get_extension(); diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index 7e7f5ad57f..852f618c81 100644 --- a/panda/src/gobj/texture.h +++ b/panda/src/gobj/texture.h @@ -222,7 +222,7 @@ PUBLISHED: }; PUBLISHED: - explicit Texture(const string &name = string()); + explicit Texture(const std::string &name = std::string()); protected: Texture(const Texture ©); @@ -286,11 +286,11 @@ PUBLISHED: BLOCKING INLINE bool write(const Filename &fullpath, int z, int n, bool write_pages, bool write_mipmaps); - BLOCKING bool read_txo(istream &in, const string &filename = ""); - BLOCKING static PT(Texture) make_from_txo(istream &in, const string &filename = ""); - BLOCKING bool write_txo(ostream &out, const string &filename = "") const; - BLOCKING bool read_dds(istream &in, const string &filename = "", bool header_only = false); - BLOCKING bool read_ktx(istream &in, const string &filename = "", bool header_only = false); + BLOCKING bool read_txo(std::istream &in, const std::string &filename = ""); + BLOCKING static PT(Texture) make_from_txo(std::istream &in, const std::string &filename = ""); + BLOCKING bool write_txo(std::ostream &out, const std::string &filename = "") const; + BLOCKING bool read_dds(std::istream &in, const std::string &filename = "", bool header_only = false); + BLOCKING bool read_ktx(std::istream &in, const std::string &filename = "", bool header_only = false); BLOCKING INLINE bool load(const PNMImage &pnmimage, const LoaderOptions &options = LoaderOptions()); BLOCKING INLINE bool load(const PNMImage &pnmimage, int z, int n, const LoaderOptions &options = LoaderOptions()); @@ -443,17 +443,17 @@ PUBLISHED: INLINE CPTA_uchar get_ram_image(); INLINE CompressionMode get_ram_image_compression() const; INLINE CPTA_uchar get_uncompressed_ram_image(); - CPTA_uchar get_ram_image_as(const string &requested_format); + CPTA_uchar get_ram_image_as(const std::string &requested_format); INLINE PTA_uchar modify_ram_image(); INLINE PTA_uchar make_ram_image(); #ifndef CPPPARSER INLINE void set_ram_image(CPTA_uchar image, CompressionMode compression = CM_off, size_t page_size = 0); - void set_ram_image_as(CPTA_uchar image, const string &provided_format); + void set_ram_image_as(CPTA_uchar image, const std::string &provided_format); #else EXTEND void set_ram_image(PyObject *image, CompressionMode compression = CM_off, size_t page_size = 0); - EXTEND void set_ram_image_as(PyObject *image, const string &provided_format); + EXTEND void set_ram_image_as(PyObject *image, const std::string &provided_format); #endif INLINE void clear_ram_image(); INLINE void set_keep_ram_image(bool keep_ram_image); @@ -533,13 +533,13 @@ PUBLISHED: bool release(PreparedGraphicsObjects *prepared_objects); int release_all(); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; size_t estimate_texture_memory() const; - void set_aux_data(const string &key, TypedReferenceCount *aux_data); - void clear_aux_data(const string &key); - TypedReferenceCount *get_aux_data(const string &key) const; + void set_aux_data(const std::string &key, TypedReferenceCount *aux_data); + void clear_aux_data(const std::string &key); + TypedReferenceCount *get_aux_data(const std::string &key) const; MAKE_MAP_PROPERTY(aux_data, get_aux_data, get_aux_data, set_aux_data, clear_aux_data); @@ -593,23 +593,23 @@ PUBLISHED: static int down_to_power_2(int value); void consider_rescale(PNMImage &pnmimage); - static void consider_rescale(PNMImage &pnmimage, const string &name, AutoTextureScale auto_texture_scale = ATS_unspecified); + static void consider_rescale(PNMImage &pnmimage, const std::string &name, AutoTextureScale auto_texture_scale = ATS_unspecified); INLINE bool rescale_texture(); - static string format_texture_type(TextureType tt); - static TextureType string_texture_type(const string &str); + static std::string format_texture_type(TextureType tt); + static TextureType string_texture_type(const std::string &str); - static string format_component_type(ComponentType ct); - static ComponentType string_component_type(const string &str); + static std::string format_component_type(ComponentType ct); + static ComponentType string_component_type(const std::string &str); - static string format_format(Format f); - static Format string_format(const string &str); + static std::string format_format(Format f); + static Format string_format(const std::string &str); - static string format_compression_mode(CompressionMode cm); - static CompressionMode string_compression_mode(const string &str); + static std::string format_compression_mode(CompressionMode cm); + static CompressionMode string_compression_mode(const std::string &str); - static string format_quality_level(QualityLevel tql); - static QualityLevel string_quality_level(const string &str); + static std::string format_quality_level(QualityLevel tql); + static QualityLevel string_quality_level(const std::string &str); public: void texture_uploaded(); @@ -626,9 +626,9 @@ public: static bool has_binary_alpha(Format format); static bool is_srgb(Format format); - static bool adjust_size(int &x_size, int &y_size, const string &name, + static bool adjust_size(int &x_size, int &y_size, const std::string &name, bool for_padding, AutoTextureScale auto_texture_scale = ATS_unspecified); - INLINE bool adjust_this_size(int &x_size, int &y_size, const string &name, + INLINE bool adjust_this_size(int &x_size, int &y_size, const std::string &name, bool for_padding) const; virtual void ensure_loader_type(const Filename &filename); @@ -647,7 +647,7 @@ protected: // pointer representing that lock); generally, they also avoid adjusting the // _properties_modified and _image_modified semaphores. virtual bool do_adjust_this_size(const CData *cdata, - int &x_size, int &y_size, const string &name, + int &x_size, int &y_size, const std::string &name, bool for_padding) const; virtual bool do_read(CData *cdata, @@ -661,19 +661,19 @@ protected: const LoaderOptions &options, bool header_only, BamCacheRecord *record); virtual bool do_load_one(CData *cdata, - const PNMImage &pnmimage, const string &name, + const PNMImage &pnmimage, const std::string &name, int z, int n, const LoaderOptions &options); virtual bool do_load_one(CData *cdata, - const PfmFile &pfm, const string &name, + const PfmFile &pfm, const std::string &name, int z, int n, const LoaderOptions &options); virtual bool do_load_sub_image(CData *cdata, const PNMImage &image, int x, int y, int z, int n); bool do_read_txo_file(CData *cdata, const Filename &fullpath); - bool do_read_txo(CData *cdata, istream &in, const string &filename); + bool do_read_txo(CData *cdata, std::istream &in, const std::string &filename); bool do_read_dds_file(CData *cdata, const Filename &fullpath, bool header_only); - bool do_read_dds(CData *cdata, istream &in, const string &filename, bool header_only); + bool do_read_dds(CData *cdata, std::istream &in, const std::string &filename, bool header_only); bool do_read_ktx_file(CData *cdata, const Filename &fullpath, bool header_only); - bool do_read_ktx(CData *cdata, istream &in, const string &filename, bool header_only); + bool do_read_ktx(CData *cdata, std::istream &in, const std::string &filename, bool header_only); bool do_write(CData *cdata, const Filename &fullpath, int z, int n, bool write_pages, bool write_mipmaps); @@ -681,7 +681,7 @@ protected: bool do_store_one(CData *cdata, PNMImage &pnmimage, int z, int n); bool do_store_one(CData *cdata, PfmFile &pfm, int z, int n); bool do_write_txo_file(const CData *cdata, const Filename &fullpath) const; - bool do_write_txo(const CData *cdata, ostream &out, const string &filename) const; + bool do_write_txo(const CData *cdata, std::ostream &out, const std::string &filename) const; virtual CData *unlocked_ensure_ram_image(bool allow_compression); virtual void do_reload_ram_image(CData *cdata, bool allow_compression); @@ -810,44 +810,44 @@ private: CPTA_uchar image, size_t page_size, int z); static PTA_uchar read_dds_level_bgr8(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_rgb8(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_abgr8(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_rgba8(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_abgr16(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_abgr32(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_raw(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_generic_uncompressed(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_luminance_uncompressed(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_bc1(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_bc2(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_bc3(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_bc4(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); static PTA_uchar read_dds_level_bc5(Texture *tex, CData *cdata, const DDSHeader &header, - int n, istream &in); + int n, std::istream &in); void clear_prepared(int view, PreparedGraphicsObjects *prepared_objects); - static void consider_downgrade(PNMImage &pnmimage, int num_channels, const string &name); + static void consider_downgrade(PNMImage &pnmimage, int num_channels, const std::string &name); static bool compare_images(const PNMImage &a, const PNMImage &b); @@ -1058,7 +1058,7 @@ protected: private: // The auxiliary data is not recorded to a bam file. - typedef pmap AuxData; + typedef pmap AuxData; AuxData _aux_data; static AutoTextureScale _textures_power_2; @@ -1108,13 +1108,13 @@ private: extern EXPCL_PANDA_GOBJ ConfigVariableEnum texture_quality_level; -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, Texture::TextureType tt); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, Texture::ComponentType ct); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, Texture::Format f); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, Texture::TextureType tt); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, Texture::ComponentType ct); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, Texture::Format f); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, Texture::CompressionMode cm); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, Texture::QualityLevel tql); -EXPCL_PANDA_GOBJ istream &operator >> (istream &in, Texture::QualityLevel &tql); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, Texture::CompressionMode cm); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, Texture::QualityLevel tql); +EXPCL_PANDA_GOBJ std::istream &operator >> (std::istream &in, Texture::QualityLevel &tql); #include "texture.I" diff --git a/panda/src/gobj/textureCollection.h b/panda/src/gobj/textureCollection.h index 4cf0872708..5250d94a17 100644 --- a/panda/src/gobj/textureCollection.h +++ b/panda/src/gobj/textureCollection.h @@ -43,7 +43,7 @@ PUBLISHED: void clear(); void reserve(size_t num); - Texture *find_texture(const string &name) const; + Texture *find_texture(const std::string &name) const; int get_num_textures() const; Texture *get_texture(int index) const; @@ -57,15 +57,15 @@ PUBLISHED: INLINE void append(Texture *texture); INLINE void extend(const TextureCollection &other); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef PTA(PT(Texture)) Textures; Textures _textures; }; -INLINE ostream &operator << (ostream &out, const TextureCollection &col) { +INLINE std::ostream &operator << (std::ostream &out, const TextureCollection &col) { col.output(out); return out; } diff --git a/panda/src/gobj/textureContext.I b/panda/src/gobj/textureContext.I index b5d3712ad8..fa947755d0 100644 --- a/panda/src/gobj/textureContext.I +++ b/panda/src/gobj/textureContext.I @@ -123,7 +123,7 @@ mark_loaded() { // _data_size_bytes = _data->get_texture_size_bytes(); _properties_modified = _texture->get_properties_modified(); _image_modified = _texture->get_image_modified(); - update_modified(max(_properties_modified, _image_modified)); + update_modified(std::max(_properties_modified, _image_modified)); // Assume the texture is now resident. set_resident(true); @@ -137,7 +137,7 @@ INLINE void TextureContext:: mark_simple_loaded() { _properties_modified = _texture->get_properties_modified(); _simple_image_modified = _texture->get_simple_image_modified(); - update_modified(max(_properties_modified, _simple_image_modified)); + update_modified(std::max(_properties_modified, _simple_image_modified)); // The texture's not exactly resident now, but some part of it is. set_resident(true); diff --git a/panda/src/gobj/textureContext.h b/panda/src/gobj/textureContext.h index 813cd37dd9..c7ae367ccc 100644 --- a/panda/src/gobj/textureContext.h +++ b/panda/src/gobj/textureContext.h @@ -56,8 +56,8 @@ public: INLINE void mark_unloaded(); INLINE void mark_needs_reload(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; private: // This cannot be a PT(Texture), because the texture and the GSG both own @@ -88,7 +88,7 @@ private: friend class PreparedGraphicsObjects; }; -inline ostream &operator << (ostream &out, const TextureContext &context) { +inline std::ostream &operator << (std::ostream &out, const TextureContext &context) { context.output(out); return out; } diff --git a/panda/src/gobj/texturePool.I b/panda/src/gobj/texturePool.I index d8b1e96c9d..6ff48f14d3 100644 --- a/panda/src/gobj/texturePool.I +++ b/panda/src/gobj/texturePool.I @@ -200,7 +200,7 @@ garbage_collect() { * Lists the contents of the texture pool to the indicated output stream. */ INLINE void TexturePool:: -list_contents(ostream &out) { +list_contents(std::ostream &out) { get_global_ptr()->ns_list_contents(out); } @@ -209,7 +209,7 @@ list_contents(ostream &out) { */ INLINE void TexturePool:: list_contents() { - get_global_ptr()->ns_list_contents(cout); + get_global_ptr()->ns_list_contents(std::cout); } /** @@ -218,7 +218,7 @@ list_contents() { * if it is not. */ INLINE Texture *TexturePool:: -find_texture(const string &name) { +find_texture(const std::string &name) { return get_global_ptr()->ns_find_texture(name); } @@ -227,7 +227,7 @@ find_texture(const string &name) { * name (which may contain wildcards). */ INLINE TextureCollection TexturePool:: -find_all_textures(const string &name) { +find_all_textures(const std::string &name) { return get_global_ptr()->ns_find_all_textures(name); } @@ -245,7 +245,7 @@ set_fake_texture_image(const Filename &filename) { */ INLINE void TexturePool:: clear_fake_texture_image() { - set_fake_texture_image(string()); + set_fake_texture_image(std::string()); } /** @@ -272,6 +272,6 @@ get_fake_texture_image() { * register_texture_type(). */ PT(Texture) TexturePool:: -make_texture(const string &extension) { +make_texture(const std::string &extension) { return get_global_ptr()->ns_make_texture(extension); } diff --git a/panda/src/gobj/texturePool.h b/panda/src/gobj/texturePool.h index 2f0866cf3f..866374ec96 100644 --- a/panda/src/gobj/texturePool.h +++ b/panda/src/gobj/texturePool.h @@ -68,27 +68,27 @@ PUBLISHED: INLINE static int garbage_collect(); - INLINE static void list_contents(ostream &out); + INLINE static void list_contents(std::ostream &out); INLINE static void list_contents(); - INLINE static Texture *find_texture(const string &name); - INLINE static TextureCollection find_all_textures(const string &name = "*"); + INLINE static Texture *find_texture(const std::string &name); + INLINE static TextureCollection find_all_textures(const std::string &name = "*"); INLINE static void set_fake_texture_image(const Filename &filename); INLINE static void clear_fake_texture_image(); INLINE static bool has_fake_texture_image(); INLINE static const Filename &get_fake_texture_image(); - INLINE static PT(Texture) make_texture(const string &extension); + INLINE static PT(Texture) make_texture(const std::string &extension); - static void write(ostream &out); + static void write(std::ostream &out); public: typedef Texture::MakeTextureFunc MakeTextureFunc; - void register_texture_type(MakeTextureFunc *func, const string &extensions); + void register_texture_type(MakeTextureFunc *func, const std::string &extensions); void register_filter(TexturePoolFilter *filter); - MakeTextureFunc *get_texture_type(const string &extension) const; - void write_texture_types(ostream &out, int indent_level) const; + MakeTextureFunc *get_texture_type(const std::string &extension) const; + void write_texture_types(std::ostream &out, int indent_level) const; static TexturePool *get_global_ptr(); @@ -122,10 +122,10 @@ private: void ns_release_texture(Texture *texture); void ns_release_all_textures(); int ns_garbage_collect(); - void ns_list_contents(ostream &out) const; - Texture *ns_find_texture(const string &name) const; - TextureCollection ns_find_all_textures(const string &name) const; - PT(Texture) ns_make_texture(const string &extension) const; + void ns_list_contents(std::ostream &out) const; + Texture *ns_find_texture(const std::string &name) const; + TextureCollection ns_find_all_textures(const std::string &name) const; + PT(Texture) ns_make_texture(const std::string &extension) const; void resolve_filename(Filename &new_filename, const Filename &orig_filename, bool read_mipmaps, const LoaderOptions &options); @@ -159,7 +159,7 @@ private: PT(Texture) _normalization_cube_map; PT(Texture) _alpha_scale_map; - typedef pmap TypeRegistry; + typedef pmap TypeRegistry; TypeRegistry _type_registry; typedef pvector FilterRegistry; diff --git a/panda/src/gobj/texturePoolFilter.h b/panda/src/gobj/texturePoolFilter.h index 019b66fa9f..69a5278ff7 100644 --- a/panda/src/gobj/texturePoolFilter.h +++ b/panda/src/gobj/texturePoolFilter.h @@ -51,7 +51,7 @@ public: const LoaderOptions &options); virtual PT(Texture) post_load(Texture *tex); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; public: static TypeHandle get_class_type() { @@ -71,7 +71,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const TexturePoolFilter &filter) { +INLINE std::ostream &operator << (std::ostream &out, const TexturePoolFilter &filter) { filter.output(out); return out; } diff --git a/panda/src/gobj/textureReloadRequest.I b/panda/src/gobj/textureReloadRequest.I index a4e4e6fd7b..1b958ac6ef 100644 --- a/panda/src/gobj/textureReloadRequest.I +++ b/panda/src/gobj/textureReloadRequest.I @@ -16,7 +16,7 @@ * load_async(), to begin an asynchronous load. */ INLINE TextureReloadRequest:: -TextureReloadRequest(const string &name, +TextureReloadRequest(const std::string &name, PreparedGraphicsObjects *pgo, Texture *texture, bool allow_compressed) : AsyncTask(name), diff --git a/panda/src/gobj/textureReloadRequest.h b/panda/src/gobj/textureReloadRequest.h index 1e97c99ea2..625ac3ce3e 100644 --- a/panda/src/gobj/textureReloadRequest.h +++ b/panda/src/gobj/textureReloadRequest.h @@ -33,7 +33,7 @@ public: ALLOC_DELETED_CHAIN(TextureReloadRequest); PUBLISHED: - INLINE explicit TextureReloadRequest(const string &name, + INLINE explicit TextureReloadRequest(const std::string &name, PreparedGraphicsObjects *pgo, Texture *texture, bool allow_compressed); diff --git a/panda/src/gobj/textureStage.I b/panda/src/gobj/textureStage.I index dd8e24bce2..a6d26d8600 100644 --- a/panda/src/gobj/textureStage.I +++ b/panda/src/gobj/textureStage.I @@ -22,7 +22,7 @@ TextureStage(const TextureStage ©) { /** * Returns the name of this texture stage */ -INLINE const string &TextureStage:: +INLINE const std::string &TextureStage:: get_name() const { return _name; } @@ -31,7 +31,7 @@ get_name() const { * Changes the name of this texture stage */ INLINE void TextureStage:: -set_name(const string &name) { +set_name(const std::string &name) { _name = name; } @@ -121,7 +121,7 @@ set_texcoord_name(InternalName *name) { * any number of associated UV sets, each of which must have a unique name. */ INLINE void TextureStage:: -set_texcoord_name(const string &name) { +set_texcoord_name(const std::string &name) { set_texcoord_name(InternalName::get_texcoord_name(name)); } @@ -733,8 +733,8 @@ update_color_flags() { } } -INLINE ostream & -operator << (ostream &out, const TextureStage &ts) { +INLINE std::ostream & +operator << (std::ostream &out, const TextureStage &ts) { ts.output(out); return out; } diff --git a/panda/src/gobj/textureStage.h b/panda/src/gobj/textureStage.h index 2414e72991..5635f1e65a 100644 --- a/panda/src/gobj/textureStage.h +++ b/panda/src/gobj/textureStage.h @@ -34,7 +34,7 @@ class FactoryParams; */ class EXPCL_PANDA_GOBJ TextureStage : public TypedWritableReferenceCount { PUBLISHED: - explicit TextureStage(const string &name); + explicit TextureStage(const std::string &name); INLINE TextureStage(const TextureStage ©); void operator = (const TextureStage ©); @@ -97,8 +97,8 @@ PUBLISHED: CO_one_minus_src_alpha, }; - INLINE void set_name(const string &name); - INLINE const string &get_name() const; + INLINE void set_name(const std::string &name); + INLINE const std::string &get_name() const; INLINE void set_sort(int sort); INLINE int get_sort() const; @@ -107,7 +107,7 @@ PUBLISHED: INLINE int get_priority() const; INLINE void set_texcoord_name(InternalName *name); - INLINE void set_texcoord_name(const string &texcoord_name); + INLINE void set_texcoord_name(const std::string &texcoord_name); INLINE InternalName *get_texcoord_name() const; INLINE InternalName *get_tangent_name() const; INLINE InternalName *get_binormal_name() const; @@ -179,8 +179,8 @@ PUBLISHED: int compare_to(const TextureStage &other) const; - void write(ostream &out) const; - void output(ostream &out) const; + void write(std::ostream &out) const; + void output(std::ostream &out) const; INLINE static TextureStage *get_default(); @@ -216,7 +216,7 @@ private: static bool operand_valid_for_rgb(CombineOperand co); static bool operand_valid_for_alpha(CombineOperand co); - string _name; + std::string _name; int _sort; int _priority; PT(InternalName) _texcoord_name; @@ -283,12 +283,12 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const TextureStage &ts); +INLINE std::ostream &operator << (std::ostream &out, const TextureStage &ts); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, TextureStage::Mode mode); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, TextureStage::CombineMode cm); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, TextureStage::CombineSource cs); -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, TextureStage::CombineOperand co); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, TextureStage::Mode mode); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, TextureStage::CombineMode cm); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, TextureStage::CombineSource cs); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, TextureStage::CombineOperand co); #include "textureStage.I" diff --git a/panda/src/gobj/textureStagePool.I b/panda/src/gobj/textureStagePool.I index a88d5e1561..3023116285 100644 --- a/panda/src/gobj/textureStagePool.I +++ b/panda/src/gobj/textureStagePool.I @@ -87,6 +87,6 @@ garbage_collect() { * Lists the contents of the TextureStage pool to the indicated output stream. */ INLINE void TextureStagePool:: -list_contents(ostream &out) { +list_contents(std::ostream &out) { get_global_ptr()->ns_list_contents(out); } diff --git a/panda/src/gobj/textureStagePool.h b/panda/src/gobj/textureStagePool.h index 4db775251d..3e654d50cb 100644 --- a/panda/src/gobj/textureStagePool.h +++ b/panda/src/gobj/textureStagePool.h @@ -46,8 +46,8 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode, set_mode); INLINE static int garbage_collect(); - INLINE static void list_contents(ostream &out); - static void write(ostream &out); + INLINE static void list_contents(std::ostream &out); + static void write(std::ostream &out); private: TextureStagePool(); @@ -60,7 +60,7 @@ private: Mode ns_get_mode(); int ns_garbage_collect(); - void ns_list_contents(ostream &out) const; + void ns_list_contents(std::ostream &out) const; static TextureStagePool *get_global_ptr(); @@ -75,14 +75,14 @@ private: typedef pmap > StagesByProperties; StagesByProperties _stages_by_properties; - typedef pmap StagesByName; + typedef pmap StagesByName; StagesByName _stages_by_name; Mode _mode; }; -EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, TextureStagePool::Mode mode); -EXPCL_PANDA_GOBJ istream &operator >> (istream &in, TextureStagePool::Mode &mode); +EXPCL_PANDA_GOBJ std::ostream &operator << (std::ostream &out, TextureStagePool::Mode mode); +EXPCL_PANDA_GOBJ std::istream &operator >> (std::istream &in, TextureStagePool::Mode &mode); #include "textureStagePool.I" diff --git a/panda/src/gobj/texture_ext.h b/panda/src/gobj/texture_ext.h index d33fce24ef..b4f0559b08 100644 --- a/panda/src/gobj/texture_ext.h +++ b/panda/src/gobj/texture_ext.h @@ -31,7 +31,7 @@ class Extension : public ExtensionBase { public: void set_ram_image(PyObject *image, Texture::CompressionMode compression = Texture::CM_off, size_t page_size = 0); - void set_ram_image_as(PyObject *image, const string &provided_format); + void set_ram_image_as(PyObject *image, const std::string &provided_format); }; #endif // HAVE_PYTHON diff --git a/panda/src/gobj/transformBlend.I b/panda/src/gobj/transformBlend.I index aed8e95ca7..092e9bbeec 100644 --- a/panda/src/gobj/transformBlend.I +++ b/panda/src/gobj/transformBlend.I @@ -376,8 +376,8 @@ CData(const TransformBlend::CData ©) : { } -INLINE ostream & -operator << (ostream &out, const TransformBlend &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const TransformBlend &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/transformBlend.h b/panda/src/gobj/transformBlend.h index 45b5793294..3adcb73128 100644 --- a/panda/src/gobj/transformBlend.h +++ b/panda/src/gobj/transformBlend.h @@ -86,8 +86,8 @@ PUBLISHED: INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const; MAKE_PROPERTY(modified, get_modified); - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; private: class CData; @@ -145,7 +145,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const TransformBlend &obj); +INLINE std::ostream &operator << (std::ostream &out, const TransformBlend &obj); #include "transformBlend.I" diff --git a/panda/src/gobj/transformBlendTable.h b/panda/src/gobj/transformBlendTable.h index 55d628d349..644fbbb9b9 100644 --- a/panda/src/gobj/transformBlendTable.h +++ b/panda/src/gobj/transformBlendTable.h @@ -68,7 +68,7 @@ PUBLISHED: INLINE const SparseArray &get_rows() const; INLINE SparseArray &modify_rows(); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; MAKE_SEQ_PROPERTY(blends, get_num_blends, get_blend, set_blend, remove_blend); MAKE_PROPERTY(modified, get_modified); @@ -156,7 +156,7 @@ private: friend class VertexTransform; }; -INLINE ostream &operator << (ostream &out, const TransformBlendTable &obj); +INLINE std::ostream &operator << (std::ostream &out, const TransformBlendTable &obj); #include "transformBlendTable.I" diff --git a/panda/src/gobj/transformTable.h b/panda/src/gobj/transformTable.h index b55e4106df..8d77777dbb 100644 --- a/panda/src/gobj/transformTable.h +++ b/panda/src/gobj/transformTable.h @@ -55,7 +55,7 @@ PUBLISHED: void remove_transform(size_t n); size_t add_transform(const VertexTransform *transform); - void write(ostream &out) const; + void write(std::ostream &out) const; MAKE_PROPERTY(registered, is_registered); MAKE_PROPERTY(modified, get_modified); @@ -121,7 +121,7 @@ private: friend class VertexTransform; }; -INLINE ostream &operator << (ostream &out, const TransformTable &obj); +INLINE std::ostream &operator << (std::ostream &out, const TransformTable &obj); #include "transformTable.I" diff --git a/panda/src/gobj/userVertexSlider.h b/panda/src/gobj/userVertexSlider.h index aadeafd893..574e6bc6b7 100644 --- a/panda/src/gobj/userVertexSlider.h +++ b/panda/src/gobj/userVertexSlider.h @@ -30,7 +30,7 @@ class FactoryParams; */ class EXPCL_PANDA_GOBJ UserVertexSlider : public VertexSlider { PUBLISHED: - explicit UserVertexSlider(const string &name); + explicit UserVertexSlider(const std::string &name); explicit UserVertexSlider(const InternalName *name); INLINE void set_slider(PN_stdfloat slider); diff --git a/panda/src/gobj/userVertexTransform.I b/panda/src/gobj/userVertexTransform.I index 3b6d7b046a..3ac9204cca 100644 --- a/panda/src/gobj/userVertexTransform.I +++ b/panda/src/gobj/userVertexTransform.I @@ -14,7 +14,7 @@ /** * Returns the name passed to the constructor. Completely arbitrary. */ -INLINE const string &UserVertexTransform:: +INLINE const std::string &UserVertexTransform:: get_name() const { return _name; } diff --git a/panda/src/gobj/userVertexTransform.h b/panda/src/gobj/userVertexTransform.h index 377dff2a17..356d4f823a 100644 --- a/panda/src/gobj/userVertexTransform.h +++ b/panda/src/gobj/userVertexTransform.h @@ -30,17 +30,17 @@ class FactoryParams; */ class EXPCL_PANDA_GOBJ UserVertexTransform : public VertexTransform { PUBLISHED: - explicit UserVertexTransform(const string &name); + explicit UserVertexTransform(const std::string &name); - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE void set_matrix(const LMatrix4 &matrix); virtual void get_matrix(LMatrix4 &matrix) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: - string _name; + std::string _name; // This is the data that must be cycled between pipeline stages. class EXPCL_PANDA_GOBJ CData : public CycleData { diff --git a/panda/src/gobj/vertexBufferContext.h b/panda/src/gobj/vertexBufferContext.h index 76956aa8d2..69f02e0ed7 100644 --- a/panda/src/gobj/vertexBufferContext.h +++ b/panda/src/gobj/vertexBufferContext.h @@ -47,8 +47,8 @@ public: INLINE void mark_loaded(const GeomVertexArrayDataHandle *reader); INLINE void mark_unloaded(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; private: // This cannot be a PT(GeomVertexArrayData), because the data and the GSG @@ -77,7 +77,7 @@ private: friend class PreparedGraphicsObjects; }; -inline ostream &operator << (ostream &out, const VertexBufferContext &context) { +inline std::ostream &operator << (std::ostream &out, const VertexBufferContext &context) { context.output(out); return out; } diff --git a/panda/src/gobj/vertexDataPage.h b/panda/src/gobj/vertexDataPage.h index 24cc6af7d0..bceca6adea 100644 --- a/panda/src/gobj/vertexDataPage.h +++ b/panda/src/gobj/vertexDataPage.h @@ -74,8 +74,8 @@ PUBLISHED: static void stop_threads(); static void flush_threads(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; public: INLINE unsigned char *get_page_data(bool force); @@ -114,7 +114,7 @@ private: class PageThreadManager; class EXPCL_PANDA_GOBJ PageThread : public Thread { public: - PageThread(PageThreadManager *manager, const string &name); + PageThread(PageThreadManager *manager, const std::string &name); protected: virtual void thread_main(); @@ -228,7 +228,7 @@ private: friend class VertexDataBook; }; -inline ostream &operator << (ostream &out, const VertexDataPage &page) { +inline std::ostream &operator << (std::ostream &out, const VertexDataPage &page) { page.output(out); return out; } diff --git a/panda/src/gobj/vertexDataSaveFile.h b/panda/src/gobj/vertexDataSaveFile.h index d71708227a..56eac67ee3 100644 --- a/panda/src/gobj/vertexDataSaveFile.h +++ b/panda/src/gobj/vertexDataSaveFile.h @@ -35,7 +35,7 @@ class VertexDataSaveBlock; */ class EXPCL_PANDA_GOBJ VertexDataSaveFile : public SimpleAllocator { public: - VertexDataSaveFile(const Filename &directory, const string &prefix, + VertexDataSaveFile(const Filename &directory, const std::string &prefix, size_t max_size); ~VertexDataSaveFile(); diff --git a/panda/src/gobj/vertexSlider.I b/panda/src/gobj/vertexSlider.I index 2d48a56e29..faad108d69 100644 --- a/panda/src/gobj/vertexSlider.I +++ b/panda/src/gobj/vertexSlider.I @@ -47,8 +47,8 @@ CData(const VertexSlider::CData ©) : { } -INLINE ostream & -operator << (ostream &out, const VertexSlider &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const VertexSlider &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/vertexSlider.h b/panda/src/gobj/vertexSlider.h index 7c3c135292..649fab72fb 100644 --- a/panda/src/gobj/vertexSlider.h +++ b/panda/src/gobj/vertexSlider.h @@ -47,8 +47,8 @@ PUBLISHED: MAKE_PROPERTY(slider, get_slider); MAKE_PROPERTY(modified, get_modified); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; protected: void mark_modified(Thread *current_thread); @@ -106,7 +106,7 @@ private: friend class SliderTable; }; -INLINE ostream &operator << (ostream &out, const VertexSlider &obj); +INLINE std::ostream &operator << (std::ostream &out, const VertexSlider &obj); #include "vertexSlider.I" diff --git a/panda/src/gobj/vertexTransform.I b/panda/src/gobj/vertexTransform.I index cf7830c296..57fd7dd939 100644 --- a/panda/src/gobj/vertexTransform.I +++ b/panda/src/gobj/vertexTransform.I @@ -48,8 +48,8 @@ CData(const VertexTransform::CData ©) : { } -INLINE ostream & -operator << (ostream &out, const VertexTransform &obj) { +INLINE std::ostream & +operator << (std::ostream &out, const VertexTransform &obj) { obj.output(out); return out; } diff --git a/panda/src/gobj/vertexTransform.h b/panda/src/gobj/vertexTransform.h index ff106bf56e..86a663c9b3 100644 --- a/panda/src/gobj/vertexTransform.h +++ b/panda/src/gobj/vertexTransform.h @@ -44,8 +44,8 @@ PUBLISHED: INLINE UpdateSeq get_modified(Thread *current_thread = Thread::get_current_thread()) const; MAKE_PROPERTY(modified, get_modified); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; static UpdateSeq get_next_modified(Thread *current_thread); INLINE static UpdateSeq get_global_modified(Thread *current_thread); @@ -107,7 +107,7 @@ private: friend class TransformTable; }; -INLINE ostream &operator << (ostream &out, const VertexTransform &obj); +INLINE std::ostream &operator << (std::ostream &out, const VertexTransform &obj); #include "vertexTransform.I" diff --git a/panda/src/gobj/videoTexture.h b/panda/src/gobj/videoTexture.h index 755bc763c1..b9a0b4540e 100644 --- a/panda/src/gobj/videoTexture.h +++ b/panda/src/gobj/videoTexture.h @@ -27,7 +27,7 @@ */ class EXPCL_PANDA_GOBJ VideoTexture : public Texture, public AnimInterface { protected: - VideoTexture(const string &name); + VideoTexture(const std::string &name); VideoTexture(const VideoTexture ©); PUBLISHED: @@ -53,7 +53,7 @@ protected: virtual bool do_can_reload(const Texture::CData *cdata) const; virtual bool do_adjust_this_size(const Texture::CData *cdata, - int &x_size, int &y_size, const string &name, + int &x_size, int &y_size, const std::string &name, bool for_padding) const; virtual void consider_update(); diff --git a/panda/src/grutil/cardMaker.I b/panda/src/grutil/cardMaker.I index c10991e92d..b960808ca0 100644 --- a/panda/src/grutil/cardMaker.I +++ b/panda/src/grutil/cardMaker.I @@ -15,7 +15,7 @@ * */ INLINE CardMaker:: -CardMaker(const string &name) : Namable(name) { +CardMaker(const std::string &name) : Namable(name) { reset(); } diff --git a/panda/src/grutil/cardMaker.h b/panda/src/grutil/cardMaker.h index ff8e6e2eb6..426fc2d5c5 100644 --- a/panda/src/grutil/cardMaker.h +++ b/panda/src/grutil/cardMaker.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_GRUTIL CardMaker : public Namable { PUBLISHED: - INLINE explicit CardMaker(const string &name); + INLINE explicit CardMaker(const std::string &name); INLINE ~CardMaker(); void reset(); diff --git a/panda/src/grutil/fisheyeMaker.I b/panda/src/grutil/fisheyeMaker.I index c567e9e43e..54085a23e0 100644 --- a/panda/src/grutil/fisheyeMaker.I +++ b/panda/src/grutil/fisheyeMaker.I @@ -15,7 +15,7 @@ * */ INLINE FisheyeMaker:: -FisheyeMaker(const string &name) : Namable(name) { +FisheyeMaker(const std::string &name) : Namable(name) { reset(); } diff --git a/panda/src/grutil/fisheyeMaker.h b/panda/src/grutil/fisheyeMaker.h index d6bb5b7a73..83aa118ac3 100644 --- a/panda/src/grutil/fisheyeMaker.h +++ b/panda/src/grutil/fisheyeMaker.h @@ -33,7 +33,7 @@ class GeomVertexWriter; */ class EXPCL_PANDA_GRUTIL FisheyeMaker : public Namable { PUBLISHED: - INLINE explicit FisheyeMaker(const string &name); + INLINE explicit FisheyeMaker(const std::string &name); INLINE ~FisheyeMaker(); void reset(); diff --git a/panda/src/grutil/frameRateMeter.I b/panda/src/grutil/frameRateMeter.I index 744ed17d49..02877fa226 100644 --- a/panda/src/grutil/frameRateMeter.I +++ b/panda/src/grutil/frameRateMeter.I @@ -56,7 +56,7 @@ get_update_interval() const { * per second. */ INLINE void FrameRateMeter:: -set_text_pattern(const string &text_pattern) { +set_text_pattern(const std::string &text_pattern) { _text_pattern = text_pattern; Thread *current_thread = Thread::get_current_thread(); do_update(current_thread); @@ -65,7 +65,7 @@ set_text_pattern(const string &text_pattern) { /** * Returns the sprintf() pattern that is used to format the text. */ -INLINE const string &FrameRateMeter:: +INLINE const std::string &FrameRateMeter:: get_text_pattern() const { return _text_pattern; } diff --git a/panda/src/grutil/frameRateMeter.h b/panda/src/grutil/frameRateMeter.h index 2e3f657819..5faa692a43 100644 --- a/panda/src/grutil/frameRateMeter.h +++ b/panda/src/grutil/frameRateMeter.h @@ -36,7 +36,7 @@ class ClockObject; */ class EXPCL_PANDA_GRUTIL FrameRateMeter : public TextNode { PUBLISHED: - explicit FrameRateMeter(const string &name); + explicit FrameRateMeter(const std::string &name); virtual ~FrameRateMeter(); void setup_window(GraphicsOutput *window); @@ -48,8 +48,8 @@ PUBLISHED: INLINE void set_update_interval(double update_interval); INLINE double get_update_interval() const; - INLINE void set_text_pattern(const string &text_pattern); - INLINE const string &get_text_pattern() const; + INLINE void set_text_pattern(const std::string &text_pattern); + INLINE const std::string &get_text_pattern() const; INLINE void set_clock_object(ClockObject *clock_object); INLINE ClockObject *get_clock_object() const; @@ -70,7 +70,7 @@ private: bool _show_milliseconds; double _update_interval; double _last_update; - string _text_pattern; + std::string _text_pattern; ClockObject *_clock_object; PN_stdfloat _last_aspect_ratio; diff --git a/panda/src/grutil/geoMipTerrain.I b/panda/src/grutil/geoMipTerrain.I index eb41d492fc..7eeeddab7a 100644 --- a/panda/src/grutil/geoMipTerrain.I +++ b/panda/src/grutil/geoMipTerrain.I @@ -17,7 +17,7 @@ * */ INLINE GeoMipTerrain:: -GeoMipTerrain(const string &name) { +GeoMipTerrain(const std::string &name) { _root = NodePath(name); _root_flattened = false; _xsize = 0; @@ -425,7 +425,7 @@ set_color_map(const Texture *tex) { } INLINE bool GeoMipTerrain:: -set_color_map(const string &path) { +set_color_map(const std::string &path) { return set_color_map(Filename(path)); } @@ -479,8 +479,8 @@ get_border_stitching() { */ INLINE double GeoMipTerrain:: get_pixel_value(int x, int y) { - x = max(min(x,int(_xsize-1)),0); - y = max(min(y,int(_ysize-1)),0); + x = std::max(std::min(x,int(_xsize-1)),0); + y = std::max(std::min(y,int(_ysize-1)),0); if (_heightfield.is_grayscale()) { return double(_heightfield.get_bright(x, y)); } else { diff --git a/panda/src/grutil/geoMipTerrain.h b/panda/src/grutil/geoMipTerrain.h index cc68450419..0d0ce94da0 100644 --- a/panda/src/grutil/geoMipTerrain.h +++ b/panda/src/grutil/geoMipTerrain.h @@ -35,7 +35,7 @@ */ class EXPCL_PANDA_GRUTIL GeoMipTerrain : public TypedObject { PUBLISHED: - INLINE explicit GeoMipTerrain(const string &name); + INLINE explicit GeoMipTerrain(const std::string &name); INLINE ~GeoMipTerrain(); INLINE PNMImage &heightfield(); @@ -46,7 +46,7 @@ PUBLISHED: PNMFileType *type = nullptr); INLINE bool set_color_map(const PNMImage &image); INLINE bool set_color_map(const Texture *image); - INLINE bool set_color_map(const string &path); + INLINE bool set_color_map(const std::string &path); INLINE bool has_color_map() const; INLINE void clear_color_map(); void calc_ambient_occlusion(PN_stdfloat radius = 32, PN_stdfloat contrast = 2.0f, PN_stdfloat brightness = 0.75f); diff --git a/panda/src/grutil/heightfieldTesselator.I b/panda/src/grutil/heightfieldTesselator.I index dee41354a1..7bab2b0a45 100644 --- a/panda/src/grutil/heightfieldTesselator.I +++ b/panda/src/grutil/heightfieldTesselator.I @@ -15,7 +15,7 @@ * */ INLINE HeightfieldTesselator:: -HeightfieldTesselator(const string &name) : Namable(name) { +HeightfieldTesselator(const std::string &name) : Namable(name) { _poly_count = 10000; _visibility_radius = 32768; _focal_x = 0; diff --git a/panda/src/grutil/heightfieldTesselator.h b/panda/src/grutil/heightfieldTesselator.h index cd39245e7b..f2d358a82f 100644 --- a/panda/src/grutil/heightfieldTesselator.h +++ b/panda/src/grutil/heightfieldTesselator.h @@ -57,7 +57,7 @@ class EXPCL_PANDA_GRUTIL HeightfieldTesselator : public Namable { PUBLISHED: - INLINE explicit HeightfieldTesselator(const string &name); + INLINE explicit HeightfieldTesselator(const std::string &name); INLINE ~HeightfieldTesselator(); INLINE PNMImage &heightfield(); diff --git a/panda/src/grutil/lineSegs.h b/panda/src/grutil/lineSegs.h index 174467da31..08bc56ab0e 100644 --- a/panda/src/grutil/lineSegs.h +++ b/panda/src/grutil/lineSegs.h @@ -32,7 +32,7 @@ */ class EXPCL_PANDA_GRUTIL LineSegs : public Namable { PUBLISHED: - explicit LineSegs(const string &name = "lines"); + explicit LineSegs(const std::string &name = "lines"); ~LineSegs(); void reset(); diff --git a/panda/src/grutil/movieTexture.h b/panda/src/grutil/movieTexture.h index ab4d549b86..c1721f4320 100644 --- a/panda/src/grutil/movieTexture.h +++ b/panda/src/grutil/movieTexture.h @@ -32,7 +32,7 @@ */ class EXPCL_PANDA_GRUTIL MovieTexture : public Texture { PUBLISHED: - explicit MovieTexture(const string &name); + explicit MovieTexture(const std::string &name); explicit MovieTexture(MovieVideo *video); MovieTexture(const MovieTexture ©) = delete; virtual ~MovieTexture(); @@ -91,7 +91,7 @@ protected: virtual bool do_can_reload(const Texture::CData *cdata) const; virtual bool do_adjust_this_size(const Texture::CData *cdata, - int &x_size, int &y_size, const string &name, + int &x_size, int &y_size, const std::string &name, bool for_padding) const; virtual bool do_read_one(Texture::CData *cdata, @@ -100,7 +100,7 @@ protected: const LoaderOptions &options, bool header_only, BamCacheRecord *record); virtual bool do_load_one(Texture::CData *cdata, - const PNMImage &pnmimage, const string &name, + const PNMImage &pnmimage, const std::string &name, int z, int n, const LoaderOptions &options); bool do_load_one(Texture::CData *cdata, PT(MovieVideoCursor) color, PT(MovieVideoCursor) alpha, diff --git a/panda/src/grutil/nodeVertexTransform.h b/panda/src/grutil/nodeVertexTransform.h index 55bb0bc6bf..12b8b11667 100644 --- a/panda/src/grutil/nodeVertexTransform.h +++ b/panda/src/grutil/nodeVertexTransform.h @@ -38,7 +38,7 @@ PUBLISHED: virtual void get_matrix(LMatrix4 &matrix) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: CPT(PandaNode) _node; diff --git a/panda/src/grutil/rigidBodyCombiner.h b/panda/src/grutil/rigidBodyCombiner.h index fca66e0031..f1694f49b0 100644 --- a/panda/src/grutil/rigidBodyCombiner.h +++ b/panda/src/grutil/rigidBodyCombiner.h @@ -43,7 +43,7 @@ class NodePath; */ class EXPCL_PANDA_GRUTIL RigidBodyCombiner : public PandaNode { PUBLISHED: - explicit RigidBodyCombiner(const string &name); + explicit RigidBodyCombiner(const std::string &name); protected: RigidBodyCombiner(const RigidBodyCombiner ©); virtual PandaNode *make_copy() const; diff --git a/panda/src/grutil/sceneGraphAnalyzerMeter.h b/panda/src/grutil/sceneGraphAnalyzerMeter.h index a20066d9d7..148aa37022 100644 --- a/panda/src/grutil/sceneGraphAnalyzerMeter.h +++ b/panda/src/grutil/sceneGraphAnalyzerMeter.h @@ -38,7 +38,7 @@ class ClockObject; */ class EXPCL_PANDA_GRUTIL SceneGraphAnalyzerMeter : public TextNode { PUBLISHED: - explicit SceneGraphAnalyzerMeter(const string &name, PandaNode *node); + explicit SceneGraphAnalyzerMeter(const std::string &name, PandaNode *node); virtual ~SceneGraphAnalyzerMeter(); void setup_window(GraphicsOutput *window); diff --git a/panda/src/iphonedisplay/iPhoneGraphicsPipe.h b/panda/src/iphonedisplay/iPhoneGraphicsPipe.h index 24418bda12..12405bcbbc 100644 --- a/panda/src/iphonedisplay/iPhoneGraphicsPipe.h +++ b/panda/src/iphonedisplay/iPhoneGraphicsPipe.h @@ -33,14 +33,14 @@ public: IPhoneGraphicsPipe(); virtual ~IPhoneGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); virtual PreferredWindowThread get_preferred_window_thread() const; void rotate_windows(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/iphonedisplay/iPhoneGraphicsWindow.h b/panda/src/iphonedisplay/iPhoneGraphicsWindow.h index 7a73a70302..6da377b18d 100644 --- a/panda/src/iphonedisplay/iPhoneGraphicsWindow.h +++ b/panda/src/iphonedisplay/iPhoneGraphicsWindow.h @@ -28,7 +28,7 @@ class IPhoneGraphicsWindow : public GraphicsWindow { public: IPhoneGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/linmath/configVariableColor.I b/panda/src/linmath/configVariableColor.I index c600d7246b..751d7f415a 100644 --- a/panda/src/linmath/configVariableColor.I +++ b/panda/src/linmath/configVariableColor.I @@ -15,7 +15,7 @@ * */ INLINE ConfigVariableColor:: -ConfigVariableColor(const string &name) : +ConfigVariableColor(const std::string &name) : ConfigVariable(name, VT_color), _local_modified(initial_invalid_cache()), _cache(0, 0, 0, 1) @@ -27,12 +27,12 @@ ConfigVariableColor(const string &name) : * */ INLINE ConfigVariableColor:: -ConfigVariableColor(const string &name, const LColor &default_value, - const string &description, int flags) : +ConfigVariableColor(const std::string &name, const LColor &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_color, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_color, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_color, std::string(), flags), #endif _local_modified(initial_invalid_cache()), _cache(0, 0, 0, 1) @@ -45,12 +45,12 @@ ConfigVariableColor(const string &name, const LColor &default_value, * */ INLINE ConfigVariableColor:: -ConfigVariableColor(const string &name, const string &default_value, - const string &description, int flags) : +ConfigVariableColor(const std::string &name, const std::string &default_value, + const std::string &description, int flags) : #ifdef PRC_SAVE_DESCRIPTIONS ConfigVariable(name, ConfigVariableCore::VT_color, description, flags), #else - ConfigVariable(name, ConfigVariableCore::VT_color, string(), flags), + ConfigVariable(name, ConfigVariableCore::VT_color, std::string(), flags), #endif _local_modified(initial_invalid_cache()), _cache(0, 0, 0, 1) diff --git a/panda/src/linmath/configVariableColor.h b/panda/src/linmath/configVariableColor.h index 380644a57a..fba5330e26 100644 --- a/panda/src/linmath/configVariableColor.h +++ b/panda/src/linmath/configVariableColor.h @@ -34,12 +34,12 @@ */ class EXPCL_PANDA_LINMATH ConfigVariableColor : public ConfigVariable { PUBLISHED: - INLINE ConfigVariableColor(const string &name); - INLINE ConfigVariableColor(const string &name, const LColor &default_value, - const string &description = string(), + INLINE ConfigVariableColor(const std::string &name); + INLINE ConfigVariableColor(const std::string &name, const LColor &default_value, + const std::string &description = std::string(), int flags = 0); - INLINE ConfigVariableColor(const string &name, const string &default_value, - const string &description = string(), + INLINE ConfigVariableColor(const std::string &name, const std::string &default_value, + const std::string &description = std::string(), int flags = 0); INLINE void operator = (const LColor &value); diff --git a/panda/src/linmath/coordinateSystem.h b/panda/src/linmath/coordinateSystem.h index ba40f3d2b0..313645a35e 100644 --- a/panda/src/linmath/coordinateSystem.h +++ b/panda/src/linmath/coordinateSystem.h @@ -38,16 +38,16 @@ enum CoordinateSystem { }; EXPCL_PANDA_LINMATH CoordinateSystem get_default_coordinate_system(); -EXPCL_PANDA_LINMATH CoordinateSystem parse_coordinate_system_string(const string &str); -EXPCL_PANDA_LINMATH string format_coordinate_system(CoordinateSystem cs); +EXPCL_PANDA_LINMATH CoordinateSystem parse_coordinate_system_string(const std::string &str); +EXPCL_PANDA_LINMATH std::string format_coordinate_system(CoordinateSystem cs); EXPCL_PANDA_LINMATH bool is_right_handed(CoordinateSystem cs = CS_default); END_PUBLISH #define IS_LEFT_HANDED_COORDSYSTEM(cs) ((cs==CS_zup_left) || (cs==CS_yup_left)) -EXPCL_PANDA_LINMATH ostream &operator << (ostream &out, CoordinateSystem cs); -EXPCL_PANDA_LINMATH istream &operator >> (istream &in, CoordinateSystem &cs); +EXPCL_PANDA_LINMATH std::ostream &operator << (std::ostream &out, CoordinateSystem cs); +EXPCL_PANDA_LINMATH std::istream &operator >> (std::istream &in, CoordinateSystem &cs); #endif diff --git a/panda/src/linmath/lmatrix3_ext_src.I b/panda/src/linmath/lmatrix3_ext_src.I index a58a57c155..0d92b37aa4 100644 --- a/panda/src/linmath/lmatrix3_ext_src.I +++ b/panda/src/linmath/lmatrix3_ext_src.I @@ -37,9 +37,9 @@ __reduce__(PyObject *self) const { /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LMatrix3" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_m(0, 0)) << ", " << MAYBE_ZERO(_this->_m(0, 1)) << ", " diff --git a/panda/src/linmath/lmatrix3_ext_src.h b/panda/src/linmath/lmatrix3_ext_src.h index 34828c9133..6c4894c69f 100644 --- a/panda/src/linmath/lmatrix3_ext_src.h +++ b/panda/src/linmath/lmatrix3_ext_src.h @@ -19,7 +19,7 @@ template<> class Extension : public ExtensionBase { public: INLINE_LINMATH PyObject *__reduce__(PyObject *self) const; - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH std::string __repr__() const; }; #include "lmatrix3_ext_src.I" diff --git a/panda/src/linmath/lmatrix3_src.h b/panda/src/linmath/lmatrix3_src.h index fa01ef2c27..399508ed5f 100644 --- a/panda/src/linmath/lmatrix3_src.h +++ b/panda/src/linmath/lmatrix3_src.h @@ -285,9 +285,9 @@ PUBLISHED: INLINE_LINMATH bool almost_equal(const FLOATNAME(LMatrix3) &other) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; - EXTENSION(INLINE_LINMATH string __repr__() const); + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; + EXTENSION(INLINE_LINMATH std::string __repr__() const); INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen) const; void generate_hash( @@ -327,7 +327,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const FLOATNAME(LMatrix3) &mat) { +INLINE std::ostream &operator << (std::ostream &out, const FLOATNAME(LMatrix3) &mat) { mat.output(out); return out; } diff --git a/panda/src/linmath/lmatrix4_ext_src.I b/panda/src/linmath/lmatrix4_ext_src.I index 928ce1c837..68a2741bbb 100644 --- a/panda/src/linmath/lmatrix4_ext_src.I +++ b/panda/src/linmath/lmatrix4_ext_src.I @@ -38,9 +38,9 @@ __reduce__(PyObject *self) const { /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LMatrix4" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_m(0, 0)) << ", " << MAYBE_ZERO(_this->_m(0, 1)) << ", " diff --git a/panda/src/linmath/lmatrix4_ext_src.h b/panda/src/linmath/lmatrix4_ext_src.h index 65dfe8bb20..768be01526 100644 --- a/panda/src/linmath/lmatrix4_ext_src.h +++ b/panda/src/linmath/lmatrix4_ext_src.h @@ -19,7 +19,7 @@ template<> class Extension : public ExtensionBase { public: INLINE_LINMATH PyObject *__reduce__(PyObject *self) const; - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH std::string __repr__() const; }; #include "lmatrix4_ext_src.I" diff --git a/panda/src/linmath/lmatrix4_src.h b/panda/src/linmath/lmatrix4_src.h index de2d2fbf78..4d749cddd5 100644 --- a/panda/src/linmath/lmatrix4_src.h +++ b/panda/src/linmath/lmatrix4_src.h @@ -263,9 +263,9 @@ PUBLISHED: FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LMatrix4) &other) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; - EXTENSION(INLINE_LINMATH string __repr__() const); + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; + EXTENSION(INLINE_LINMATH std::string __repr__() const); INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen) const; void generate_hash(ChecksumHashGenerator &hashgen, FLOATTYPE scale) const; @@ -363,7 +363,7 @@ private: }; -INLINE ostream &operator << (ostream &out, const FLOATNAME(LMatrix4) &mat) { +INLINE std::ostream &operator << (std::ostream &out, const FLOATNAME(LMatrix4) &mat) { mat.output(out); return out; } diff --git a/panda/src/linmath/lpoint2_ext_src.I b/panda/src/linmath/lpoint2_ext_src.I index 371017955d..acfa098501 100644 --- a/panda/src/linmath/lpoint2_ext_src.I +++ b/panda/src/linmath/lpoint2_ext_src.I @@ -14,9 +14,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LPoint2" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ")"; @@ -27,7 +27,7 @@ __repr__() const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LPoint2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LPoint3); @@ -35,7 +35,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it != 'x' && *it != 'y') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -75,7 +75,7 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { // Upcall to LVecBase2. return invoke_extension(_this).__setattr__(self, attr_name, assign); } diff --git a/panda/src/linmath/lpoint2_ext_src.h b/panda/src/linmath/lpoint2_ext_src.h index 78fa18cfa9..27eadd1bdf 100644 --- a/panda/src/linmath/lpoint2_ext_src.h +++ b/panda/src/linmath/lpoint2_ext_src.h @@ -18,9 +18,9 @@ template<> class Extension : public ExtensionBase { public: - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; }; #include "lpoint2_ext_src.I" diff --git a/panda/src/linmath/lpoint2_src.h b/panda/src/linmath/lpoint2_src.h index fef5c791f9..070fc13086 100644 --- a/panda/src/linmath/lpoint2_src.h +++ b/panda/src/linmath/lpoint2_src.h @@ -22,8 +22,8 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE fill_value); INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE x, FLOATTYPE y); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH static const FLOATNAME(LPoint2) &zero(); INLINE_LINMATH static const FLOATNAME(LPoint2) &unit_x(); @@ -51,7 +51,7 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LPoint2) project(const FLOATNAME(LVecBase2) &onto) const; #endif - EXTENSION(INLINE_LINMATH string __repr__() const); + EXTENSION(INLINE_LINMATH std::string __repr__() const); public: static TypeHandle get_class_type() { diff --git a/panda/src/linmath/lpoint3_ext_src.I b/panda/src/linmath/lpoint3_ext_src.I index e695988177..95cb1dbdd3 100644 --- a/panda/src/linmath/lpoint3_ext_src.I +++ b/panda/src/linmath/lpoint3_ext_src.I @@ -14,9 +14,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LPoint3" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ", " @@ -28,7 +28,7 @@ __repr__() const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LPoint2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LPoint3); @@ -36,7 +36,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'x' || *it > 'z') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -76,7 +76,7 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { // Upcall to LVecBase2. return invoke_extension(_this).__setattr__(self, attr_name, assign); } diff --git a/panda/src/linmath/lpoint3_ext_src.h b/panda/src/linmath/lpoint3_ext_src.h index f5aa413ec8..3c820d3a45 100644 --- a/panda/src/linmath/lpoint3_ext_src.h +++ b/panda/src/linmath/lpoint3_ext_src.h @@ -18,9 +18,9 @@ template<> class Extension : public ExtensionBase { public: - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; }; #include "lpoint3_ext_src.I" diff --git a/panda/src/linmath/lpoint3_src.h b/panda/src/linmath/lpoint3_src.h index 5089e81c9e..3510aa329e 100644 --- a/panda/src/linmath/lpoint3_src.h +++ b/panda/src/linmath/lpoint3_src.h @@ -26,8 +26,8 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z); INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase2) ©, FLOATTYPE z); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH static const FLOATNAME(LPoint3) &zero(); INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_x(); @@ -74,7 +74,7 @@ PUBLISHED: FLOATTYPE up, CoordinateSystem cs = CS_default); - EXTENSION(INLINE_LINMATH string __repr__() const); + EXTENSION(INLINE_LINMATH std::string __repr__() const); public: static TypeHandle get_class_type() { diff --git a/panda/src/linmath/lpoint4_ext_src.I b/panda/src/linmath/lpoint4_ext_src.I index bef1b1d012..e4101b5ed9 100644 --- a/panda/src/linmath/lpoint4_ext_src.I +++ b/panda/src/linmath/lpoint4_ext_src.I @@ -14,9 +14,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LPoint4" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ", " @@ -29,7 +29,7 @@ __repr__() const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LPoint2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LPoint3); @@ -37,7 +37,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'w' || *it > 'z') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -81,7 +81,7 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { // Upcall to LVecBase4. return invoke_extension(_this).__setattr__(self, attr_name, assign); } diff --git a/panda/src/linmath/lpoint4_ext_src.h b/panda/src/linmath/lpoint4_ext_src.h index 88ae845ed4..82c9ea62f1 100644 --- a/panda/src/linmath/lpoint4_ext_src.h +++ b/panda/src/linmath/lpoint4_ext_src.h @@ -18,9 +18,9 @@ template<> class Extension : public ExtensionBase { public: - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; }; #include "lpoint4_ext_src.I" diff --git a/panda/src/linmath/lpoint4_src.h b/panda/src/linmath/lpoint4_src.h index 1eda6fa4fe..7a9902f55d 100644 --- a/panda/src/linmath/lpoint4_src.h +++ b/panda/src/linmath/lpoint4_src.h @@ -22,8 +22,8 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LPoint4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w); INLINE_LINMATH FLOATNAME(LPoint4)(const FLOATNAME(LVecBase3) ©, FLOATTYPE w); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH static const FLOATNAME(LPoint4) &zero(); INLINE_LINMATH static const FLOATNAME(LPoint4) &unit_x(); @@ -59,7 +59,7 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LPoint4) project(const FLOATNAME(LVecBase4) &onto) const; #endif - EXTENSION(INLINE_LINMATH string __repr__() const); + EXTENSION(INLINE_LINMATH std::string __repr__() const); public: static TypeHandle get_class_type() { diff --git a/panda/src/linmath/lquaternion_src.I b/panda/src/linmath/lquaternion_src.I index 05f1d46bec..eb464d07f1 100644 --- a/panda/src/linmath/lquaternion_src.I +++ b/panda/src/linmath/lquaternion_src.I @@ -231,7 +231,7 @@ almost_same_direction(const FLOATNAME(LQuaternion) &other, * */ INLINE_LINMATH void FLOATNAME(LQuaternion):: -output(ostream& os) const { +output(std::ostream& os) const { os << MAYBE_ZERO(_v(0)) << " + " << MAYBE_ZERO(_v(1)) << "i + " << MAYBE_ZERO(_v(2)) << "j + " diff --git a/panda/src/linmath/lquaternion_src.h b/panda/src/linmath/lquaternion_src.h index 00ba2a934f..52bbc6fff7 100644 --- a/panda/src/linmath/lquaternion_src.h +++ b/panda/src/linmath/lquaternion_src.h @@ -68,7 +68,7 @@ PUBLISHED: INLINE_LINMATH bool almost_same_direction( const FLOATNAME(LQuaternion) &other, FLOATTYPE threshold) const; - INLINE_LINMATH void output(ostream&) const; + INLINE_LINMATH void output(std::ostream&) const; void extract_to_matrix(FLOATNAME(LMatrix3) &m) const; void extract_to_matrix(FLOATNAME(LMatrix4) &m) const; @@ -127,7 +127,7 @@ private: }; -INLINE ostream& operator<<(ostream& os, const FLOATNAME(LQuaternion)& q) { +INLINE std::ostream& operator<<(std::ostream& os, const FLOATNAME(LQuaternion)& q) { q.output(os); return os; } diff --git a/panda/src/linmath/lvecBase2_ext_src.I b/panda/src/linmath/lvecBase2_ext_src.I index 3e0a35fff4..c76cb6649f 100644 --- a/panda/src/linmath/lvecBase2_ext_src.I +++ b/panda/src/linmath/lvecBase2_ext_src.I @@ -27,9 +27,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LVecBase2" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ")"; @@ -69,7 +69,7 @@ __reduce__(PyObject *self) const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVecBase2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVecBase3); @@ -77,7 +77,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it != 'x' && *it != 'y') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -117,10 +117,10 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { #ifndef NDEBUG // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it != 'x' && *it != 'y') { Dtool_Raise_AttributeError(self, attr_name.c_str()); return -1; @@ -189,7 +189,7 @@ __setattr__(PyObject *self, const string &attr_name, PyObject *assign) { // Loop through the components in the attribute name, and assign the // floating-point value to every one of them. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { _this->_v((*it) - 'x') = value; } } diff --git a/panda/src/linmath/lvecBase2_ext_src.h b/panda/src/linmath/lvecBase2_ext_src.h index 3d6efe4831..9abffe5859 100644 --- a/panda/src/linmath/lvecBase2_ext_src.h +++ b/panda/src/linmath/lvecBase2_ext_src.h @@ -19,9 +19,9 @@ template<> class Extension : public ExtensionBase { public: INLINE_LINMATH PyObject *__reduce__(PyObject *self) const; - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; INLINE_LINMATH FLOATNAME(LVecBase2) __pow__(FLOATTYPE exponent) const; INLINE_LINMATH PyObject *__ipow__(PyObject *self, FLOATTYPE exponent); diff --git a/panda/src/linmath/lvecBase2_src.I b/panda/src/linmath/lvecBase2_src.I index 401e2e346a..1ef2c133a7 100644 --- a/panda/src/linmath/lvecBase2_src.I +++ b/panda/src/linmath/lvecBase2_src.I @@ -631,7 +631,7 @@ almost_equal(const FLOATNAME(LVecBase2) &other) const { * */ INLINE_LINMATH void FLOATNAME(LVecBase2):: -output(ostream &out) const { +output(std::ostream &out) const { out << MAYBE_ZERO(_v(0)) << " " << MAYBE_ZERO(_v(1)); } diff --git a/panda/src/linmath/lvecBase2_src.h b/panda/src/linmath/lvecBase2_src.h index 5d35293544..c868f90d60 100644 --- a/panda/src/linmath/lvecBase2_src.h +++ b/panda/src/linmath/lvecBase2_src.h @@ -45,8 +45,8 @@ PUBLISHED: INLINE_LINMATH static const FLOATNAME(LVecBase2) &unit_y(); EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH FLOATTYPE operator [](int i) const; INLINE_LINMATH FLOATTYPE &operator [](int i); @@ -143,8 +143,8 @@ PUBLISHED: FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase2) &other) const; - INLINE_LINMATH void output(ostream &out) const; - EXTENSION(INLINE_LINMATH string __repr__() const); + INLINE_LINMATH void output(std::ostream &out) const; + EXTENSION(INLINE_LINMATH std::string __repr__() const); INLINE_LINMATH void write_datagram_fixed(Datagram &destination) const; INLINE_LINMATH void read_datagram_fixed(DatagramIterator &source); @@ -180,7 +180,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const FLOATNAME(LVecBase2) &vec) { +INLINE std::ostream &operator << (std::ostream &out, const FLOATNAME(LVecBase2) &vec) { vec.output(out); return out; } diff --git a/panda/src/linmath/lvecBase3_ext_src.I b/panda/src/linmath/lvecBase3_ext_src.I index 871928da2f..ba163ec637 100644 --- a/panda/src/linmath/lvecBase3_ext_src.I +++ b/panda/src/linmath/lvecBase3_ext_src.I @@ -27,9 +27,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LVecBase3" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ", " @@ -70,7 +70,7 @@ __reduce__(PyObject *self) const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVecBase2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVecBase3); @@ -78,7 +78,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'x' || *it > 'z') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -118,10 +118,10 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { #ifndef NDEBUG // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'x' || *it > 'z') { Dtool_Raise_AttributeError(self, attr_name.c_str()); return -1; @@ -190,7 +190,7 @@ __setattr__(PyObject *self, const string &attr_name, PyObject *assign) { // Loop through the components in the attribute name, and assign the // floating-point value to every one of them. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { _this->_v((*it) - 'x') = value; } } diff --git a/panda/src/linmath/lvecBase3_ext_src.h b/panda/src/linmath/lvecBase3_ext_src.h index e88a28790b..4f91322f23 100644 --- a/panda/src/linmath/lvecBase3_ext_src.h +++ b/panda/src/linmath/lvecBase3_ext_src.h @@ -19,9 +19,9 @@ template<> class Extension : public ExtensionBase { public: INLINE_LINMATH PyObject *__reduce__(PyObject *self) const; - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; INLINE_LINMATH FLOATNAME(LVecBase3) __pow__(FLOATTYPE exponent) const; INLINE_LINMATH PyObject *__ipow__(PyObject *self, FLOATTYPE exponent); diff --git a/panda/src/linmath/lvecBase3_src.I b/panda/src/linmath/lvecBase3_src.I index eeaea584d5..b34b783faf 100644 --- a/panda/src/linmath/lvecBase3_src.I +++ b/panda/src/linmath/lvecBase3_src.I @@ -795,7 +795,7 @@ almost_equal(const FLOATNAME(LVecBase3) &other) const { * */ INLINE_LINMATH void FLOATNAME(LVecBase3):: -output(ostream &out) const { +output(std::ostream &out) const { out << MAYBE_ZERO(_v(0)) << " " << MAYBE_ZERO(_v(1)) << " " << MAYBE_ZERO(_v(2)); diff --git a/panda/src/linmath/lvecBase3_src.h b/panda/src/linmath/lvecBase3_src.h index 5def855cdd..3536615aeb 100644 --- a/panda/src/linmath/lvecBase3_src.h +++ b/panda/src/linmath/lvecBase3_src.h @@ -47,8 +47,8 @@ PUBLISHED: INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_z(); EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH FLOATTYPE operator [](int i) const; INLINE_LINMATH FLOATTYPE &operator [](int i); @@ -164,8 +164,8 @@ PUBLISHED: FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase3) &other) const; - INLINE_LINMATH void output(ostream &out) const; - EXTENSION(INLINE_LINMATH string __repr__() const); + INLINE_LINMATH void output(std::ostream &out) const; + EXTENSION(INLINE_LINMATH std::string __repr__() const); INLINE_LINMATH void write_datagram_fixed(Datagram &destination) const; INLINE_LINMATH void read_datagram_fixed(DatagramIterator &source); @@ -199,7 +199,7 @@ private: }; -INLINE ostream &operator << (ostream &out, const FLOATNAME(LVecBase3) &vec) { +INLINE std::ostream &operator << (std::ostream &out, const FLOATNAME(LVecBase3) &vec) { vec.output(out); return out; }; diff --git a/panda/src/linmath/lvecBase4_ext_src.I b/panda/src/linmath/lvecBase4_ext_src.I index cab78609a3..78d359c315 100644 --- a/panda/src/linmath/lvecBase4_ext_src.I +++ b/panda/src/linmath/lvecBase4_ext_src.I @@ -27,9 +27,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LVecBase4" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ", " @@ -71,7 +71,7 @@ __reduce__(PyObject *self) const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVecBase2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVecBase3); @@ -79,7 +79,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'w' || *it > 'z') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -123,10 +123,10 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { #ifndef NDEBUG // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'w' || *it > 'z') { Dtool_Raise_AttributeError(self, attr_name.c_str()); return -1; @@ -196,7 +196,7 @@ __setattr__(PyObject *self, const string &attr_name, PyObject *assign) { // Loop through the components in the attribute name, and assign the // floating-point value to every one of them. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { _this->_v(((*it) == 'w') ? 3 : (*it) - 'x') = value; } } diff --git a/panda/src/linmath/lvecBase4_ext_src.h b/panda/src/linmath/lvecBase4_ext_src.h index b7a916fd60..9d7d837c89 100644 --- a/panda/src/linmath/lvecBase4_ext_src.h +++ b/panda/src/linmath/lvecBase4_ext_src.h @@ -19,9 +19,9 @@ template<> class Extension : public ExtensionBase { public: INLINE_LINMATH PyObject *__reduce__(PyObject *self) const; - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; INLINE_LINMATH FLOATNAME(LVecBase4) __pow__(FLOATTYPE exponent) const; INLINE_LINMATH PyObject *__ipow__(PyObject *self, FLOATTYPE exponent); diff --git a/panda/src/linmath/lvecBase4_src.I b/panda/src/linmath/lvecBase4_src.I index bdf7e917b6..9cf554454b 100644 --- a/panda/src/linmath/lvecBase4_src.I +++ b/panda/src/linmath/lvecBase4_src.I @@ -799,7 +799,7 @@ almost_equal(const FLOATNAME(LVecBase4) &other) const { * */ INLINE_LINMATH void FLOATNAME(LVecBase4):: -output(ostream &out) const { +output(std::ostream &out) const { out << MAYBE_ZERO(_v(0)) << " " << MAYBE_ZERO(_v(1)) << " " << MAYBE_ZERO(_v(2)) << " " diff --git a/panda/src/linmath/lvecBase4_src.h b/panda/src/linmath/lvecBase4_src.h index b76d89a7ae..b634791d91 100644 --- a/panda/src/linmath/lvecBase4_src.h +++ b/panda/src/linmath/lvecBase4_src.h @@ -57,8 +57,8 @@ PUBLISHED: INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_w(); EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH FLOATTYPE operator [](int i) const; INLINE_LINMATH FLOATTYPE &operator [](int i); @@ -170,8 +170,8 @@ PUBLISHED: FLOATTYPE threshold) const; INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase4) &other) const; - INLINE_LINMATH void output(ostream &out) const; - EXTENSION(INLINE_LINMATH string __repr__() const); + INLINE_LINMATH void output(std::ostream &out) const; + EXTENSION(INLINE_LINMATH std::string __repr__() const); INLINE_LINMATH void write_datagram_fixed(Datagram &destination) const; INLINE_LINMATH void read_datagram_fixed(DatagramIterator &source); @@ -261,7 +261,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const FLOATNAME(LVecBase4) &vec) { +INLINE std::ostream &operator << (std::ostream &out, const FLOATNAME(LVecBase4) &vec) { vec.output(out); return out; } diff --git a/panda/src/linmath/lvector2_ext_src.I b/panda/src/linmath/lvector2_ext_src.I index dd4dc5e95e..0d9aaa0258 100644 --- a/panda/src/linmath/lvector2_ext_src.I +++ b/panda/src/linmath/lvector2_ext_src.I @@ -14,9 +14,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LVector2" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ")"; @@ -27,7 +27,7 @@ __repr__() const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVector2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVector3); @@ -35,7 +35,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it != 'x' && *it != 'y') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -75,7 +75,7 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { // Upcall to LVecBase2. return invoke_extension(_this).__setattr__(self, attr_name, assign); } diff --git a/panda/src/linmath/lvector2_ext_src.h b/panda/src/linmath/lvector2_ext_src.h index fb16cbda9d..0028c73431 100644 --- a/panda/src/linmath/lvector2_ext_src.h +++ b/panda/src/linmath/lvector2_ext_src.h @@ -18,9 +18,9 @@ template<> class Extension : public ExtensionBase { public: - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; }; #include "lvector2_ext_src.I" diff --git a/panda/src/linmath/lvector2_src.h b/panda/src/linmath/lvector2_src.h index 9b6020e00a..1454205985 100644 --- a/panda/src/linmath/lvector2_src.h +++ b/panda/src/linmath/lvector2_src.h @@ -22,8 +22,8 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE fill_value); INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE x, FLOATTYPE y); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH static const FLOATNAME(LVector2) &zero(); INLINE_LINMATH static const FLOATNAME(LVector2) &unit_x(); @@ -47,7 +47,7 @@ PUBLISHED: INLINE_LINMATH FLOATTYPE signed_angle_deg(const FLOATNAME(LVector2) &other) const; #endif - EXTENSION(INLINE_LINMATH string __repr__() const); + EXTENSION(INLINE_LINMATH std::string __repr__() const); public: static TypeHandle get_class_type() { diff --git a/panda/src/linmath/lvector3_ext_src.I b/panda/src/linmath/lvector3_ext_src.I index 155c2a013a..ee620ba30a 100644 --- a/panda/src/linmath/lvector3_ext_src.I +++ b/panda/src/linmath/lvector3_ext_src.I @@ -14,9 +14,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LVector3" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ", " @@ -28,7 +28,7 @@ __repr__() const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVector2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVector3); @@ -36,7 +36,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'x' || *it > 'z') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -76,7 +76,7 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { // Upcall to LVecBase3. return invoke_extension(_this).__setattr__(self, attr_name, assign); } diff --git a/panda/src/linmath/lvector3_ext_src.h b/panda/src/linmath/lvector3_ext_src.h index 4283e61d36..577382dcd8 100644 --- a/panda/src/linmath/lvector3_ext_src.h +++ b/panda/src/linmath/lvector3_ext_src.h @@ -18,9 +18,9 @@ template<> class Extension : public ExtensionBase { public: - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; }; #include "lvector3_ext_src.I" diff --git a/panda/src/linmath/lvector3_src.I b/panda/src/linmath/lvector3_src.I index 3e2404f272..3313e6e45f 100644 --- a/panda/src/linmath/lvector3_src.I +++ b/panda/src/linmath/lvector3_src.I @@ -183,10 +183,10 @@ angle_rad(const FLOATNAME(LVector3) &other) const { // poorly as dot(other) approaches 1.0. if (dot(other) < 0.0f) { FLOATTYPE a = ((*this)+other).length() / 2.0f; - return MathNumbers::cpi((FLOATTYPE)0.0f) - 2.0f * casin(min(a, (FLOATTYPE)1.0)); + return MathNumbers::cpi((FLOATTYPE)0.0f) - 2.0f * casin(std::min(a, (FLOATTYPE)1.0)); } else { FLOATTYPE a = ((*this)-other).length() / 2.0f; - return 2.0f * casin(min(a, (FLOATTYPE)1.0)); + return 2.0f * casin(std::min(a, (FLOATTYPE)1.0)); } } diff --git a/panda/src/linmath/lvector3_src.h b/panda/src/linmath/lvector3_src.h index 777a064ffd..1052e5cee8 100644 --- a/panda/src/linmath/lvector3_src.h +++ b/panda/src/linmath/lvector3_src.h @@ -26,8 +26,8 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVector3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z); INLINE_LINMATH FLOATNAME(LVector3)(const FLOATNAME(LVecBase2) ©, FLOATTYPE z); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH static const FLOATNAME(LVector3) &zero(); INLINE_LINMATH static const FLOATNAME(LVector3) &unit_x(); @@ -85,7 +85,7 @@ PUBLISHED: INLINE_LINMATH static FLOATNAME(LVector3) rfu(FLOATTYPE right, FLOATTYPE fwd,FLOATTYPE up, CoordinateSystem cs = CS_default); - EXTENSION(INLINE_LINMATH string __repr__() const); + EXTENSION(INLINE_LINMATH std::string __repr__() const); public: static TypeHandle get_class_type() { diff --git a/panda/src/linmath/lvector4_ext_src.I b/panda/src/linmath/lvector4_ext_src.I index a188d6c4a2..6d4f7743b6 100644 --- a/panda/src/linmath/lvector4_ext_src.I +++ b/panda/src/linmath/lvector4_ext_src.I @@ -14,9 +14,9 @@ /** * */ -INLINE_LINMATH string Extension:: +INLINE_LINMATH std::string Extension:: __repr__() const { - ostringstream out; + std::ostringstream out; out << "LVector4" << FLOATTOKEN << "(" << MAYBE_ZERO(_this->_v(0)) << ", " << MAYBE_ZERO(_this->_v(1)) << ", " @@ -29,7 +29,7 @@ __repr__() const { * This is used to implement swizzle masks. */ INLINE_LINMATH PyObject *Extension:: -__getattr__(PyObject *self, const string &attr_name) const { +__getattr__(PyObject *self, const std::string &attr_name) const { #ifndef CPPPARSER extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVector2); extern struct Dtool_PyTypedObject FLOATNAME(Dtool_LVector3); @@ -37,7 +37,7 @@ __getattr__(PyObject *self, const string &attr_name) const { #endif // Validate the attribute name. - for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { + for (std::string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) { if (*it < 'w' || *it > 'z') { return Dtool_Raise_AttributeError(self, attr_name.c_str()); } @@ -81,7 +81,7 @@ __getattr__(PyObject *self, const string &attr_name) const { * This is used to implement write masks. */ INLINE_LINMATH int Extension:: -__setattr__(PyObject *self, const string &attr_name, PyObject *assign) { +__setattr__(PyObject *self, const std::string &attr_name, PyObject *assign) { // Upcall to LVecBase4. return invoke_extension(_this).__setattr__(self, attr_name, assign); } diff --git a/panda/src/linmath/lvector4_ext_src.h b/panda/src/linmath/lvector4_ext_src.h index 0cc68bca17..4aebf7c1e3 100644 --- a/panda/src/linmath/lvector4_ext_src.h +++ b/panda/src/linmath/lvector4_ext_src.h @@ -18,9 +18,9 @@ template<> class Extension : public ExtensionBase { public: - INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const; - INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign); - INLINE_LINMATH string __repr__() const; + INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const; + INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign); + INLINE_LINMATH std::string __repr__() const; }; #include "lvector4_ext_src.I" diff --git a/panda/src/linmath/lvector4_src.h b/panda/src/linmath/lvector4_src.h index 93f821b08b..cc04c5bbdf 100644 --- a/panda/src/linmath/lvector4_src.h +++ b/panda/src/linmath/lvector4_src.h @@ -22,8 +22,8 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVector4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w); INLINE_LINMATH FLOATNAME(LVector4)(const FLOATNAME(LVecBase3) ©, FLOATTYPE w); - EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const string &attr_name) const); - EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const string &attr_name, PyObject *assign)); + EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const); + EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign)); INLINE_LINMATH static const FLOATNAME(LVector4) &zero(); INLINE_LINMATH static const FLOATNAME(LVector4) &unit_x(); @@ -53,7 +53,7 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVector4) project(const FLOATNAME(LVecBase4) &onto) const; #endif - EXTENSION(INLINE_LINMATH string __repr__() const); + EXTENSION(INLINE_LINMATH std::string __repr__() const); public: static TypeHandle get_class_type() { diff --git a/panda/src/mathutil/boundingBox.h b/panda/src/mathutil/boundingBox.h index 2ba4b273e1..8826008ff5 100644 --- a/panda/src/mathutil/boundingBox.h +++ b/panda/src/mathutil/boundingBox.h @@ -42,7 +42,7 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: diff --git a/panda/src/mathutil/boundingHexahedron.h b/panda/src/mathutil/boundingHexahedron.h index 40851a219f..ac87135509 100644 --- a/panda/src/mathutil/boundingHexahedron.h +++ b/panda/src/mathutil/boundingHexahedron.h @@ -51,8 +51,8 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; PUBLISHED: INLINE_MATHUTIL int get_num_points() const; diff --git a/panda/src/mathutil/boundingLine.h b/panda/src/mathutil/boundingLine.h index 15e5f43417..e1dff97177 100644 --- a/panda/src/mathutil/boundingLine.h +++ b/panda/src/mathutil/boundingLine.h @@ -40,7 +40,7 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE_MATHUTIL const LPoint3 &get_point_a() const; diff --git a/panda/src/mathutil/boundingPlane.h b/panda/src/mathutil/boundingPlane.h index aff1ebe36b..82e02870a0 100644 --- a/panda/src/mathutil/boundingPlane.h +++ b/panda/src/mathutil/boundingPlane.h @@ -37,7 +37,7 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE_MATHUTIL const LPlane &get_plane() const; diff --git a/panda/src/mathutil/boundingSphere.h b/panda/src/mathutil/boundingSphere.h index 09027e3b8c..8c105daa01 100644 --- a/panda/src/mathutil/boundingSphere.h +++ b/panda/src/mathutil/boundingSphere.h @@ -38,7 +38,7 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE_MATHUTIL LPoint3 get_center() const; diff --git a/panda/src/mathutil/boundingVolume.I b/panda/src/mathutil/boundingVolume.I index 2778e886ba..1b5daf418b 100644 --- a/panda/src/mathutil/boundingVolume.I +++ b/panda/src/mathutil/boundingVolume.I @@ -94,7 +94,7 @@ contains(const BoundingVolume *vol) const { return vol->contains_other(this); } -INLINE_MATHUTIL ostream &operator << (ostream &out, const BoundingVolume &bound) { +INLINE_MATHUTIL std::ostream &operator << (std::ostream &out, const BoundingVolume &bound) { bound.output(out); return out; } diff --git a/panda/src/mathutil/boundingVolume.h b/panda/src/mathutil/boundingVolume.h index df904145ad..67bde45839 100644 --- a/panda/src/mathutil/boundingVolume.h +++ b/panda/src/mathutil/boundingVolume.h @@ -92,8 +92,8 @@ PUBLISHED: INLINE_MATHUTIL int contains(const BoundingVolume *vol) const; - virtual void output(ostream &out) const=0; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const=0; + virtual void write(std::ostream &out, int indent_level = 0) const; // This enum is used to control the automatic generation of bounding // volumes. @@ -115,7 +115,7 @@ public: virtual const BoundingLine *as_bounding_line() const; virtual const BoundingPlane *as_bounding_plane() const; - static BoundsType string_bounds_type(const string &str); + static BoundsType string_bounds_type(const std::string &str); protected: enum Flags { @@ -203,11 +203,11 @@ private: friend class IntersectionBoundingVolume; }; -INLINE_MATHUTIL ostream &operator << (ostream &out, const BoundingVolume &bound); +INLINE_MATHUTIL std::ostream &operator << (std::ostream &out, const BoundingVolume &bound); #include "boundingVolume.I" -EXPCL_PANDA_MATHUTIL ostream &operator << (ostream &out, BoundingVolume::BoundsType type); -EXPCL_PANDA_MATHUTIL istream &operator >> (istream &in, BoundingVolume::BoundsType &type); +EXPCL_PANDA_MATHUTIL std::ostream &operator << (std::ostream &out, BoundingVolume::BoundsType type); +EXPCL_PANDA_MATHUTIL std::istream &operator >> (std::istream &in, BoundingVolume::BoundsType &type); #endif diff --git a/panda/src/mathutil/intersectionBoundingVolume.h b/panda/src/mathutil/intersectionBoundingVolume.h index 74e750acb9..1869c92131 100644 --- a/panda/src/mathutil/intersectionBoundingVolume.h +++ b/panda/src/mathutil/intersectionBoundingVolume.h @@ -40,8 +40,8 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; PUBLISHED: INLINE_MATHUTIL int get_num_components() const; diff --git a/panda/src/mathutil/omniBoundingVolume.h b/panda/src/mathutil/omniBoundingVolume.h index b124de5767..631c514bd5 100644 --- a/panda/src/mathutil/omniBoundingVolume.h +++ b/panda/src/mathutil/omniBoundingVolume.h @@ -31,7 +31,7 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual bool extend_other(BoundingVolume *other) const; diff --git a/panda/src/mathutil/parabola_src.h b/panda/src/mathutil/parabola_src.h index 742f0c5450..8eaec14744 100644 --- a/panda/src/mathutil/parabola_src.h +++ b/panda/src/mathutil/parabola_src.h @@ -35,8 +35,8 @@ PUBLISHED: INLINE_MATHUTIL FLOATNAME(LPoint3) calc_point(FLOATTYPE t) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; void write_datagram_fixed(Datagram &destination) const; void read_datagram_fixed(DatagramIterator &source); @@ -47,8 +47,8 @@ private: FLOATNAME(LVecBase3) _a, _b, _c; }; -inline ostream & -operator << (ostream &out, const FLOATNAME(LParabola) &p) { +inline std::ostream & +operator << (std::ostream &out, const FLOATNAME(LParabola) &p) { p.output(out); return out; } diff --git a/panda/src/mathutil/plane_src.I b/panda/src/mathutil/plane_src.I index 373d256e31..f357b34e60 100644 --- a/panda/src/mathutil/plane_src.I +++ b/panda/src/mathutil/plane_src.I @@ -202,8 +202,8 @@ intersects_line(FLOATTYPE &t, return true; } -INLINE_MATHUTIL ostream & -operator << (ostream &out, const FLOATNAME(LPlane) &p) { +INLINE_MATHUTIL std::ostream & +operator << (std::ostream &out, const FLOATNAME(LPlane) &p) { p.output(out); return out; } diff --git a/panda/src/mathutil/plane_src.h b/panda/src/mathutil/plane_src.h index 2e0d7aa0f6..c3301aa641 100644 --- a/panda/src/mathutil/plane_src.h +++ b/panda/src/mathutil/plane_src.h @@ -56,11 +56,11 @@ PUBLISHED: bool intersects_parabola(FLOATTYPE &t1, FLOATTYPE &t2, const FLOATNAME(LParabola) ¶bola) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; }; -INLINE_MATHUTIL ostream & -operator << (ostream &out, const FLOATNAME(LPlane) &p); +INLINE_MATHUTIL std::ostream & +operator << (std::ostream &out, const FLOATNAME(LPlane) &p); #include "plane_src.I" diff --git a/panda/src/mathutil/unionBoundingVolume.h b/panda/src/mathutil/unionBoundingVolume.h index 4af835eae7..a18f6b3926 100644 --- a/panda/src/mathutil/unionBoundingVolume.h +++ b/panda/src/mathutil/unionBoundingVolume.h @@ -39,8 +39,8 @@ public: virtual LPoint3 get_approx_center() const; virtual void xform(const LMatrix4 &mat); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; PUBLISHED: INLINE_MATHUTIL int get_num_components() const; diff --git a/panda/src/movies/flacAudioCursor.h b/panda/src/movies/flacAudioCursor.h index edae05a674..55d59d5488 100644 --- a/panda/src/movies/flacAudioCursor.h +++ b/panda/src/movies/flacAudioCursor.h @@ -30,7 +30,7 @@ class FlacAudio; */ class EXPCL_PANDA_MOVIES FlacAudioCursor : public MovieAudioCursor { PUBLISHED: - explicit FlacAudioCursor(FlacAudio *src, istream *stream); + explicit FlacAudioCursor(FlacAudio *src, std::istream *stream); virtual ~FlacAudioCursor(); virtual void seek(double offset); diff --git a/panda/src/movies/movieAudio.h b/panda/src/movies/movieAudio.h index 5e04f474eb..cce8eb3465 100644 --- a/panda/src/movies/movieAudio.h +++ b/panda/src/movies/movieAudio.h @@ -25,7 +25,7 @@ class MovieAudioCursor; // Non-release build: #define movies_debug(msg) \ if (movies_cat.is_debug()) { \ - movies_cat->debug() << msg << endl; \ + movies_cat->debug() << msg << std::endl; \ } else {} #else //][ // Release build: @@ -43,7 +43,7 @@ class MovieAudioCursor; */ class EXPCL_PANDA_MOVIES MovieAudio : public TypedWritableReferenceCount, public Namable { PUBLISHED: - MovieAudio(const string &name = "Blank Audio"); + MovieAudio(const std::string &name = "Blank Audio"); virtual ~MovieAudio(); virtual PT(MovieAudioCursor) open(); static PT(MovieAudio) get(const Filename &name); diff --git a/panda/src/movies/movieAudioCursor.h b/panda/src/movies/movieAudioCursor.h index 8d49c26ccf..b2d5d9bebe 100644 --- a/panda/src/movies/movieAudioCursor.h +++ b/panda/src/movies/movieAudioCursor.h @@ -48,7 +48,7 @@ PUBLISHED: virtual int ready() const; virtual void seek(double offset); void read_samples(int n, Datagram *dg); - string read_samples(int n); + std::string read_samples(int n); public: virtual void read_samples(int n, int16_t *data); diff --git a/panda/src/movies/movieTypeRegistry.h b/panda/src/movies/movieTypeRegistry.h index 0ebe467ffb..ee5fc14da2 100644 --- a/panda/src/movies/movieTypeRegistry.h +++ b/panda/src/movies/movieTypeRegistry.h @@ -28,26 +28,26 @@ class EXPCL_PANDA_MOVIES MovieTypeRegistry { public: typedef PT(MovieAudio) (*MakeAudioFunc)(const Filename&); PT(MovieAudio) make_audio(const Filename &name); - void register_audio_type(MakeAudioFunc func, const string &extensions); + void register_audio_type(MakeAudioFunc func, const std::string &extensions); void load_audio_types(); typedef PT(MovieVideo) (*MakeVideoFunc)(const Filename&); PT(MovieVideo) make_video(const Filename &name); - void register_video_type(MakeVideoFunc func, const string &extensions); + void register_video_type(MakeVideoFunc func, const std::string &extensions); void load_video_types(); - void load_movie_library(const string &name); + void load_movie_library(const std::string &name); INLINE static MovieTypeRegistry *get_global_ptr(); private: static MovieTypeRegistry *_global_ptr; - pmap _audio_type_registry; - pmap _deferred_audio_types; + pmap _audio_type_registry; + pmap _deferred_audio_types; - pmap _video_type_registry; - pmap _deferred_video_types; + pmap _video_type_registry; + pmap _deferred_video_types; }; #include "movieTypeRegistry.I" diff --git a/panda/src/movies/movieVideo.h b/panda/src/movies/movieVideo.h index 4573495aa3..1e7da6288e 100644 --- a/panda/src/movies/movieVideo.h +++ b/panda/src/movies/movieVideo.h @@ -37,7 +37,7 @@ class BamReader; */ class EXPCL_PANDA_MOVIES MovieVideo : public TypedWritableReferenceCount, public Namable { PUBLISHED: - MovieVideo(const string &name = "Blank Video"); + MovieVideo(const std::string &name = "Blank Video"); virtual ~MovieVideo(); virtual PT(MovieVideoCursor) open(); static PT(MovieVideo) get(const Filename &name); diff --git a/panda/src/movies/opusAudioCursor.h b/panda/src/movies/opusAudioCursor.h index 51916fbc29..1a3dfa035b 100644 --- a/panda/src/movies/opusAudioCursor.h +++ b/panda/src/movies/opusAudioCursor.h @@ -31,7 +31,7 @@ class OpusAudio; */ class EXPCL_PANDA_MOVIES OpusAudioCursor : public MovieAudioCursor { PUBLISHED: - explicit OpusAudioCursor(OpusAudio *src, istream *stream); + explicit OpusAudioCursor(OpusAudio *src, std::istream *stream); virtual ~OpusAudioCursor(); virtual void seek(double offset); @@ -49,8 +49,8 @@ protected: int _bytes_per_sample; bool _is_float; - streampos _data_start; - streampos _data_pos; + std::streampos _data_start; + std::streampos _data_pos; size_t _data_size; public: diff --git a/panda/src/movies/userDataAudio.h b/panda/src/movies/userDataAudio.h index 0f56ea492f..c37831b17b 100644 --- a/panda/src/movies/userDataAudio.h +++ b/panda/src/movies/userDataAudio.h @@ -37,7 +37,7 @@ class EXPCL_PANDA_MOVIES UserDataAudio : public MovieAudio { void append(int16_t *data, int n); void append(DatagramIterator *src, int len=0x40000000); - void append(const string &str); + void append(const std::string &str); void done(); // A promise not to write any more samples. private: diff --git a/panda/src/movies/vorbisAudioCursor.h b/panda/src/movies/vorbisAudioCursor.h index 4a9bb79847..d194cb0c23 100644 --- a/panda/src/movies/vorbisAudioCursor.h +++ b/panda/src/movies/vorbisAudioCursor.h @@ -30,7 +30,7 @@ class VorbisAudio; */ class EXPCL_PANDA_MOVIES VorbisAudioCursor : public MovieAudioCursor { PUBLISHED: - explicit VorbisAudioCursor(VorbisAudio *src, istream *stream); + explicit VorbisAudioCursor(VorbisAudio *src, std::istream *stream); virtual ~VorbisAudioCursor(); virtual void seek(double offset); @@ -57,8 +57,8 @@ protected: int _bytes_per_sample; bool _is_float; - streampos _data_start; - streampos _data_pos; + std::streampos _data_start; + std::streampos _data_pos; size_t _data_size; public: diff --git a/panda/src/movies/wavAudioCursor.h b/panda/src/movies/wavAudioCursor.h index 2f37f37f4e..21133b1c62 100644 --- a/panda/src/movies/wavAudioCursor.h +++ b/panda/src/movies/wavAudioCursor.h @@ -26,7 +26,7 @@ class WavAudio; */ class EXPCL_PANDA_MOVIES WavAudioCursor : public MovieAudioCursor { PUBLISHED: - explicit WavAudioCursor(WavAudio *src, istream *stream); + explicit WavAudioCursor(WavAudio *src, std::istream *stream); virtual ~WavAudioCursor(); virtual void seek(double offset); @@ -46,7 +46,7 @@ protected: F_extensible = 0xfffe, }; - istream *_stream; + std::istream *_stream; StreamReader _reader; Format _format; @@ -54,8 +54,8 @@ protected: int _block_align; int _bytes_per_sample; - streampos _data_start; - streampos _data_pos; + std::streampos _data_start; + std::streampos _data_pos; size_t _data_size; public: diff --git a/panda/src/nativenet/socket_udp.h b/panda/src/nativenet/socket_udp.h index 58c410dd97..5f7b02c49e 100644 --- a/panda/src/nativenet/socket_udp.h +++ b/panda/src/nativenet/socket_udp.h @@ -31,11 +31,11 @@ PUBLISHED: public: inline bool Send(const char *data, int len); PUBLISHED: - inline bool Send(const string &data); + inline bool Send(const std::string &data); public: inline bool SendTo(const char *data, int len, const Socket_Address &address); PUBLISHED: - inline bool SendTo(const string &data, const Socket_Address &address); + inline bool SendTo(const std::string &data, const Socket_Address &address); inline bool SetToBroadCast(); public: @@ -96,7 +96,7 @@ Send(const char *data, int len) { * Send data to connected address */ inline bool Socket_UDP:: -Send(const string &data) { +Send(const std::string &data) { return Send(data.data(), data.size()); } @@ -112,7 +112,7 @@ SendTo(const char *data, int len, const Socket_Address &address) { * Send data to specified address */ inline bool Socket_UDP:: -SendTo(const string &data, const Socket_Address &address) { +SendTo(const std::string &data, const Socket_Address &address) { return SendTo(data.data(), data.size(), address); } diff --git a/panda/src/nativenet/socket_udp_outgoing.h b/panda/src/nativenet/socket_udp_outgoing.h index 3d1c9bb688..f8acaaccc2 100644 --- a/panda/src/nativenet/socket_udp_outgoing.h +++ b/panda/src/nativenet/socket_udp_outgoing.h @@ -16,13 +16,13 @@ PUBLISHED: public: inline bool Send(const char *data, int len); PUBLISHED: - inline bool Send(const string &data); + inline bool Send(const std::string &data); // use this interface for a none tagreted UDP connection inline bool InitNoAddress(); public: inline bool SendTo(const char *data, int len, const Socket_Address &address); PUBLISHED: - inline bool SendTo(const string &data, const Socket_Address &address); + inline bool SendTo(const std::string &data, const Socket_Address &address); inline bool SetToBroadCast(); public: @@ -98,7 +98,7 @@ Send(const char *data, int len) { * Send data to connected address */ inline bool Socket_UDP_Outgoing:: -Send(const string &data) { +Send(const std::string &data) { return Send(data.data(), data.size()); } @@ -114,7 +114,7 @@ SendTo(const char *data, int len, const Socket_Address &address) { * Send data to specified address */ inline bool Socket_UDP_Outgoing:: -SendTo(const string &data, const Socket_Address &address) { +SendTo(const std::string &data, const Socket_Address &address) { return SendTo(data.data(), data.size(), address); } diff --git a/panda/src/net/config_net.h b/panda/src/net/config_net.h index e039f6bd2a..a80faa1642 100644 --- a/panda/src/net/config_net.h +++ b/panda/src/net/config_net.h @@ -31,7 +31,7 @@ extern int get_net_max_response_queue(); extern bool get_net_error_abort(); extern double get_net_max_poll_cycle(); extern double get_net_max_block(); -extern string make_thread_name(const string &thread_name, int thread_index); +extern std::string make_thread_name(const std::string &thread_name, int thread_index); extern ConfigVariableInt net_max_read_per_epoch; extern ConfigVariableInt net_max_write_per_epoch; diff --git a/panda/src/net/connection.h b/panda/src/net/connection.h index bac0c8def0..6a7c44a744 100644 --- a/panda/src/net/connection.h +++ b/panda/src/net/connection.h @@ -68,7 +68,7 @@ private: bool _collect_tcp; double _collect_tcp_interval; double _queued_data_start; - string _queued_data; + std::string _queued_data; int _queued_count; friend class ConnectionWriter; diff --git a/panda/src/net/connectionListener.h b/panda/src/net/connectionListener.h index 9ec42ab456..7251dafe27 100644 --- a/panda/src/net/connectionListener.h +++ b/panda/src/net/connectionListener.h @@ -31,7 +31,7 @@ class NetAddress; class EXPCL_PANDA_NET ConnectionListener : public ConnectionReader { PUBLISHED: ConnectionListener(ConnectionManager *manager, int num_threads, - const string &thread_name = string()); + const std::string &thread_name = std::string()); protected: virtual void receive_datagram(const NetDatagram &datagram); diff --git a/panda/src/net/connectionManager.h b/panda/src/net/connectionManager.h index 1b00268d6c..a3a6f862c1 100644 --- a/panda/src/net/connectionManager.h +++ b/panda/src/net/connectionManager.h @@ -44,27 +44,27 @@ PUBLISHED: virtual ~ConnectionManager(); PT(Connection) open_UDP_connection(uint16_t port = 0); - PT(Connection) open_UDP_connection(const string &hostname, uint16_t port, bool for_broadcast = false); + PT(Connection) open_UDP_connection(const std::string &hostname, uint16_t port, bool for_broadcast = false); BLOCKING PT(Connection) open_TCP_server_rendezvous(uint16_t port, int backlog); - BLOCKING PT(Connection) open_TCP_server_rendezvous(const string &hostname, + BLOCKING PT(Connection) open_TCP_server_rendezvous(const std::string &hostname, uint16_t port, int backlog); BLOCKING PT(Connection) open_TCP_server_rendezvous(const NetAddress &address, int backlog); BLOCKING PT(Connection) open_TCP_client_connection(const NetAddress &address, int timeout_ms); - BLOCKING PT(Connection) open_TCP_client_connection(const string &hostname, + BLOCKING PT(Connection) open_TCP_client_connection(const std::string &hostname, uint16_t port, int timeout_ms); bool close_connection(const PT(Connection) &connection); BLOCKING bool wait_for_readers(double timeout); - static string get_host_name(); + static std::string get_host_name(); class EXPCL_PANDA_NET Interface { PUBLISHED: - const string &get_name() const { return _name; } - const string &get_mac_address() const { return _mac_address; } + const std::string &get_name() const { return _name; } + const std::string &get_mac_address() const { return _mac_address; } bool has_ip() const { return (_flags & F_has_ip) != 0; } const NetAddress &get_ip() const { return _ip; } bool has_netmask() const { return (_flags & F_has_netmask) != 0; } @@ -74,20 +74,20 @@ PUBLISHED: bool has_p2p() const { return (_flags & F_has_p2p) != 0; } const NetAddress &get_p2p() const { return _p2p; } - void output(ostream &out) const; + void output(std::ostream &out) const; public: Interface() { _flags = 0; } - void set_name(const string &name) { _name = name; } - void set_mac_address(const string &mac_address) { _mac_address = mac_address; } + void set_name(const std::string &name) { _name = name; } + void set_mac_address(const std::string &mac_address) { _mac_address = mac_address; } void set_ip(const NetAddress &ip) { _ip = ip; _flags |= F_has_ip; } void set_netmask(const NetAddress &ip) { _netmask = ip; _flags |= F_has_netmask; } void set_broadcast(const NetAddress &ip) { _broadcast = ip; _flags |= F_has_broadcast; } void set_p2p(const NetAddress &ip) { _p2p = ip; _flags |= F_has_p2p; } private: - string _name; - string _mac_address; + std::string _name; + std::string _mac_address; NetAddress _ip; NetAddress _netmask; @@ -122,7 +122,7 @@ protected: void add_writer(ConnectionWriter *writer); void remove_writer(ConnectionWriter *writer); - string format_mac_address(const unsigned char *data, size_t data_size); + std::string format_mac_address(const unsigned char *data, size_t data_size); typedef phash_set< PT(Connection) > Connections; typedef phash_set Readers; @@ -143,7 +143,7 @@ private: friend class Connection; }; -INLINE ostream &operator << (ostream &out, const ConnectionManager::Interface &iface) { +INLINE std::ostream &operator << (std::ostream &out, const ConnectionManager::Interface &iface) { iface.output(out); return out; } diff --git a/panda/src/net/connectionReader.h b/panda/src/net/connectionReader.h index fb9542df4a..a1a8bdf33a 100644 --- a/panda/src/net/connectionReader.h +++ b/panda/src/net/connectionReader.h @@ -61,7 +61,7 @@ PUBLISHED: // new call to PR_Poll(). explicit ConnectionReader(ConnectionManager *manager, int num_threads, - const string &thread_name = string()); + const std::string &thread_name = std::string()); virtual ~ConnectionReader(); bool add_connection(Connection *connection); @@ -135,7 +135,7 @@ private: class ReaderThread : public Thread { public: - ReaderThread(ConnectionReader *reader, const string &thread_name, + ReaderThread(ConnectionReader *reader, const std::string &thread_name, int thread_index); virtual void thread_main(); diff --git a/panda/src/net/connectionWriter.h b/panda/src/net/connectionWriter.h index 58a0300ef6..578cc260f8 100644 --- a/panda/src/net/connectionWriter.h +++ b/panda/src/net/connectionWriter.h @@ -35,7 +35,7 @@ class NetAddress; class EXPCL_PANDA_NET ConnectionWriter { PUBLISHED: explicit ConnectionWriter(ConnectionManager *manager, int num_threads, - const string &thread_name = string()); + const std::string &thread_name = std::string()); ~ConnectionWriter(); void set_max_queue_size(int max_size); @@ -83,7 +83,7 @@ private: class WriterThread : public Thread { public: - WriterThread(ConnectionWriter *writer, const string &thread_name, + WriterThread(ConnectionWriter *writer, const std::string &thread_name, int thread_index); virtual void thread_main(); diff --git a/panda/src/net/datagramTCPHeader.I b/panda/src/net/datagramTCPHeader.I index 1aa2cf99c8..8f7d263cff 100644 --- a/panda/src/net/datagramTCPHeader.I +++ b/panda/src/net/datagramTCPHeader.I @@ -15,7 +15,7 @@ * Returns a pointer to a block of data of length datagram_tcp_header_size, * which can be written to the network as the header information. */ -INLINE string DatagramTCPHeader:: +INLINE std::string DatagramTCPHeader:: get_header() const { return _header.get_message(); } diff --git a/panda/src/net/datagramTCPHeader.h b/panda/src/net/datagramTCPHeader.h index 51f489e3ed..3e0485ac81 100644 --- a/panda/src/net/datagramTCPHeader.h +++ b/panda/src/net/datagramTCPHeader.h @@ -38,7 +38,7 @@ public: DatagramTCPHeader(const void *data, int header_size); int get_datagram_size(int header_size) const; - INLINE string get_header() const; + INLINE std::string get_header() const; bool verify_datagram(const NetDatagram &datagram, int header_size) const; diff --git a/panda/src/net/datagramUDPHeader.I b/panda/src/net/datagramUDPHeader.I index 85ada55054..ff60db084a 100644 --- a/panda/src/net/datagramUDPHeader.I +++ b/panda/src/net/datagramUDPHeader.I @@ -24,7 +24,7 @@ get_datagram_checksum() const { * Returns a pointer to a block of data of length datagram_udp_header_size, * which can be written to the network as the header information. */ -INLINE string DatagramUDPHeader:: +INLINE std::string DatagramUDPHeader:: get_header() const { return _header.get_message(); } diff --git a/panda/src/net/datagramUDPHeader.h b/panda/src/net/datagramUDPHeader.h index e8ee0b8b1a..12d690fd53 100644 --- a/panda/src/net/datagramUDPHeader.h +++ b/panda/src/net/datagramUDPHeader.h @@ -37,7 +37,7 @@ public: DatagramUDPHeader(const void *data); INLINE int get_datagram_checksum() const; - INLINE string get_header() const; + INLINE std::string get_header() const; bool verify_datagram(const NetDatagram &datagram) const; diff --git a/panda/src/net/datagram_ui.h b/panda/src/net/datagram_ui.h index 6f0e6c4cba..3e705d3698 100644 --- a/panda/src/net/datagram_ui.h +++ b/panda/src/net/datagram_ui.h @@ -26,7 +26,7 @@ #include "netDatagram.h" -istream &operator >> (istream &in, NetDatagram &datagram); -ostream &operator << (ostream &out, const NetDatagram &datagram); +std::istream &operator >> (std::istream &in, NetDatagram &datagram); +std::ostream &operator << (std::ostream &out, const NetDatagram &datagram); #endif diff --git a/panda/src/net/netAddress.h b/panda/src/net/netAddress.h index d6b15b307e..dcb5e41fb3 100644 --- a/panda/src/net/netAddress.h +++ b/panda/src/net/netAddress.h @@ -30,20 +30,20 @@ PUBLISHED: bool set_any(int port); bool set_localhost(int port); bool set_broadcast(int port); - bool set_host(const string &hostname, int port); + bool set_host(const std::string &hostname, int port); void clear(); int get_port() const; void set_port(int port); - string get_ip_string() const; + std::string get_ip_string() const; bool is_any() const; uint32_t get_ip() const; uint8_t get_ip_component(int n) const; const Socket_Address &get_addr() const; - void output(ostream &out) const; + void output(std::ostream &out) const; size_t get_hash() const; bool operator == (const NetAddress &other) const; @@ -53,7 +53,7 @@ private: Socket_Address _addr; }; -INLINE ostream &operator << (ostream &out, const NetAddress &addr) { +INLINE std::ostream &operator << (std::ostream &out, const NetAddress &addr) { addr.output(out); return out; } diff --git a/panda/src/ode/odeBody.h b/panda/src/ode/odeBody.h index dd68389abd..8e27dd8802 100644 --- a/panda/src/ode/odeBody.h +++ b/panda/src/ode/odeBody.h @@ -143,7 +143,7 @@ PUBLISHED: INLINE void set_gravity_mode(int mode); INLINE int get_gravity_mode() const; - virtual void write(ostream &out = cout, unsigned int indent=0) const; + virtual void write(std::ostream &out = std::cout, unsigned int indent=0) const; operator bool () const; INLINE int compare_to(const OdeBody &other) const; diff --git a/panda/src/ode/odeGeom.h b/panda/src/ode/odeGeom.h index 27d62965cb..1d6c69651f 100644 --- a/panda/src/ode/odeGeom.h +++ b/panda/src/ode/odeGeom.h @@ -116,7 +116,7 @@ PUBLISHED: OdeSpace get_space() const; EXTENSION(INLINE PyObject *get_converted_space() const); - virtual void write(ostream &out = cout, unsigned int indent=0) const; + virtual void write(std::ostream &out = std::cout, unsigned int indent=0) const; operator bool () const; INLINE int compare_to(const OdeGeom &other) const; diff --git a/panda/src/ode/odeJoint.h b/panda/src/ode/odeJoint.h index ae9c23a2be..eda2a98b96 100644 --- a/panda/src/ode/odeJoint.h +++ b/panda/src/ode/odeJoint.h @@ -88,7 +88,7 @@ PUBLISHED: void attach_body(const OdeBody &body, int index); void detach(); - virtual void write(ostream &out = cout, unsigned int indent=0) const; + virtual void write(std::ostream &out = std::cout, unsigned int indent=0) const; INLINE int compare_to(const OdeJoint &other) const; INLINE bool operator == (const OdeJoint &other) const; operator bool () const; diff --git a/panda/src/ode/odeMass.h b/panda/src/ode/odeMass.h index bd2ee5a167..4320ac281a 100644 --- a/panda/src/ode/odeMass.h +++ b/panda/src/ode/odeMass.h @@ -66,7 +66,7 @@ PUBLISHED: INLINE LPoint3f get_center() const; INLINE LMatrix3f get_inertial_tensor() const; - virtual void write(ostream &out = cout, unsigned int indent=0) const; + virtual void write(std::ostream &out = std::cout, unsigned int indent=0) const; public: dMass* get_mass_ptr(); diff --git a/panda/src/ode/odeSpace.I b/panda/src/ode/odeSpace.I index d4c60779d9..93fc719e40 100644 --- a/panda/src/ode/odeSpace.I +++ b/panda/src/ode/odeSpace.I @@ -103,11 +103,11 @@ is_enabled() { } INLINE void OdeSpace:: -set_collision_event(const string &event_name) { +set_collision_event(const std::string &event_name) { _collision_event = event_name; } -INLINE string OdeSpace:: +INLINE std::string OdeSpace:: get_collision_event() { return _collision_event; } diff --git a/panda/src/ode/odeSpace.h b/panda/src/ode/odeSpace.h index 928defe8b6..c4888d70f6 100644 --- a/panda/src/ode/odeSpace.h +++ b/panda/src/ode/odeSpace.h @@ -75,7 +75,7 @@ PUBLISHED: INLINE OdeSpace get_space() const; - virtual void write(ostream &out = cout, unsigned int indent=0) const; + virtual void write(std::ostream &out = std::cout, unsigned int indent=0) const; operator bool () const; OdeSimpleSpace convert_to_simple_space() const; @@ -97,8 +97,8 @@ PUBLISHED: int get_collide_id(dGeomID o1); int get_collide_id(OdeGeom& geom); - INLINE void set_collision_event(const string &event_name); - INLINE string get_collision_event(); + INLINE void set_collision_event(const std::string &event_name); + INLINE std::string get_collision_event(); public: static void auto_callback(void*, dGeomID, dGeomID); @@ -108,7 +108,7 @@ public: static OdeSpace* _static_auto_collide_space; static dJointGroupID _static_auto_collide_joint_group; static int contactCount; - string _collision_event; + std::string _collision_event; protected: dSpaceID _id; diff --git a/panda/src/ode/odeTriMeshData.h b/panda/src/ode/odeTriMeshData.h index e8b46fad73..efdda31c78 100644 --- a/panda/src/ode/odeTriMeshData.h +++ b/panda/src/ode/odeTriMeshData.h @@ -38,7 +38,7 @@ public: static PT(OdeTriMeshData) get_data(dGeomID id); static void unlink_data(dGeomID id); static void remove_data(OdeTriMeshData *data); - static void print_data(const string &marker); + static void print_data(const std::string &marker); private: typedef pmap TriMeshDataMap; @@ -59,8 +59,8 @@ PUBLISHED: // data_id); INLINE void get_buffer(unsigned char** buf, int* buf_len) // const; INLINE void set_buffer(unsigned char* buf); INLINE void update(); - virtual void write(ostream &out = cout, unsigned int indent=0) const; - void write_faces(ostream &out) const; + virtual void write(std::ostream &out = std::cout, unsigned int indent=0) const; + void write_faces(std::ostream &out) const; public: INLINE void build_single(const void* vertices, int vertex_stride, int vertex_count, \ diff --git a/panda/src/osxdisplay/osxGraphicsBuffer.h b/panda/src/osxdisplay/osxGraphicsBuffer.h index a2ff19f76a..7ea83d1c4c 100644 --- a/panda/src/osxdisplay/osxGraphicsBuffer.h +++ b/panda/src/osxdisplay/osxGraphicsBuffer.h @@ -27,7 +27,7 @@ class osxGraphicsBuffer : public GraphicsBuffer { public: osxGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/osxdisplay/osxGraphicsPipe.h b/panda/src/osxdisplay/osxGraphicsPipe.h index 018d1bb0b7..02cc60576c 100644 --- a/panda/src/osxdisplay/osxGraphicsPipe.h +++ b/panda/src/osxdisplay/osxGraphicsPipe.h @@ -29,7 +29,7 @@ public: osxGraphicsPipe(); virtual ~osxGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); virtual PreferredWindowThread get_preferred_window_thread() const; @@ -39,7 +39,7 @@ private: static void release_data(void *info, const void *data, size_t size); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/osxdisplay/osxGraphicsWindow.h b/panda/src/osxdisplay/osxGraphicsWindow.h index 431f366da1..b797cc10f4 100644 --- a/panda/src/osxdisplay/osxGraphicsWindow.h +++ b/panda/src/osxdisplay/osxGraphicsWindow.h @@ -23,7 +23,7 @@ #include #define HACK_SCREEN_HASH_CONTEXT true -OSStatus report_agl_error(const string &comment); +OSStatus report_agl_error(const std::string &comment); /** * An interface to the osx/ system for managing GL windows under X. @@ -31,7 +31,7 @@ OSStatus report_agl_error(const string &comment); class osxGraphicsWindow : public GraphicsWindow { public: osxGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/parametrics/curveFitter.I b/panda/src/parametrics/curveFitter.I index 24c4874338..57e645cd08 100644 --- a/panda/src/parametrics/curveFitter.I +++ b/panda/src/parametrics/curveFitter.I @@ -28,7 +28,7 @@ DataPoint() : * */ INLINE void CurveFitter::DataPoint:: -output(ostream &out) const { +output(std::ostream &out) const { out << "Time " << _t << " xyz " << _xyz << " hpr " << _hpr << " tan " << _tangent; } diff --git a/panda/src/parametrics/curveFitter.h b/panda/src/parametrics/curveFitter.h index a07fd532a4..0e63525ab8 100644 --- a/panda/src/parametrics/curveFitter.h +++ b/panda/src/parametrics/curveFitter.h @@ -56,14 +56,14 @@ PUBLISHED: PT(ParametricCurveCollection) make_hermite() const; PT(ParametricCurveCollection) make_nurbs() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; public: class DataPoint { public: INLINE DataPoint(); - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; INLINE bool operator < (const DataPoint &other) const; PN_stdfloat _t; @@ -91,12 +91,12 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const CurveFitter::DataPoint &dp) { +INLINE std::ostream &operator << (std::ostream &out, const CurveFitter::DataPoint &dp) { dp.output(out); return out; } -INLINE ostream &operator << (ostream &out, const CurveFitter &cf) { +INLINE std::ostream &operator << (std::ostream &out, const CurveFitter &cf) { cf.output(out); return out; } diff --git a/panda/src/parametrics/hermiteCurve.h b/panda/src/parametrics/hermiteCurve.h index 5a3d350b82..eb991090cc 100644 --- a/panda/src/parametrics/hermiteCurve.h +++ b/panda/src/parametrics/hermiteCurve.h @@ -57,9 +57,9 @@ public: void set_in(const LVecBase3 &in); void set_out(const LVecBase3 &out); void set_type(int type); - void set_name(const string &name); + void set_name(const std::string &name); - void format_egg(ostream &out, int indent, int num_dimensions, + void format_egg(std::ostream &out, int indent, int num_dimensions, bool show_in, bool show_out, PN_stdfloat scale_in, PN_stdfloat scale_out) const; @@ -68,7 +68,7 @@ public: LVecBase3 _p, _in, _out; int _type; - string _name; + std::string _name; }; /** @@ -122,10 +122,10 @@ PUBLISHED: const LVecBase3 &get_cv_out(int n) const; void get_cv_out(int n, LVecBase3 &v) const; PN_stdfloat get_cv_tstart(int n) const; - string get_cv_name(int n) const; + std::string get_cv_name(int n) const; - virtual void output(ostream &out) const; - void write_cv(ostream &out, int n) const; + virtual void output(std::ostream &out) const; + void write_cv(std::ostream &out, int n) const; public: @@ -140,8 +140,8 @@ public: int rtype3, PN_stdfloat t3, const LVecBase4 &v3); protected: - virtual bool format_egg(ostream &out, const string &name, - const string &curve_type, int indent_level) const; + virtual bool format_egg(std::ostream &out, const std::string &name, + const std::string &curve_type, int indent_level) const; void invalidate_cv(int n, bool redo_all); int find_cv(PN_stdfloat t); diff --git a/panda/src/parametrics/nurbsBasisVector.I b/panda/src/parametrics/nurbsBasisVector.I index d7b207b38a..3628d7564b 100644 --- a/panda/src/parametrics/nurbsBasisVector.I +++ b/panda/src/parametrics/nurbsBasisVector.I @@ -110,5 +110,5 @@ scale_t(int segment, PN_stdfloat t) const { PN_stdfloat from = _segments[segment]._from; PN_stdfloat to = _segments[segment]._to; t = (t - from) / (to - from); - return min(max(t, (PN_stdfloat)0.0), (PN_stdfloat)1.0); + return std::min(std::max(t, (PN_stdfloat)0.0), (PN_stdfloat)1.0); } diff --git a/panda/src/parametrics/nurbsCurve.h b/panda/src/parametrics/nurbsCurve.h index 689717e47a..990d5dee59 100644 --- a/panda/src/parametrics/nurbsCurve.h +++ b/panda/src/parametrics/nurbsCurve.h @@ -85,12 +85,12 @@ public: virtual NurbsCurveInterface *get_nurbs_interface(); virtual bool convert_to_nurbs(ParametricCurve *nc) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: virtual int append_cv_impl(const LVecBase4 &v); - virtual bool format_egg(ostream &out, const string &name, - const string &curve_type, int indent_level) const; + virtual bool format_egg(std::ostream &out, const std::string &name, + const std::string &curve_type, int indent_level) const; int find_cv(PN_stdfloat t); diff --git a/panda/src/parametrics/nurbsCurveEvaluator.I b/panda/src/parametrics/nurbsCurveEvaluator.I index a85ecaad69..9f4f793702 100644 --- a/panda/src/parametrics/nurbsCurveEvaluator.I +++ b/panda/src/parametrics/nurbsCurveEvaluator.I @@ -117,7 +117,7 @@ set_vertex_space(int i, const NodePath &space) { * node relative to the rel_to NodePath when the curve is evaluated. */ INLINE void NurbsCurveEvaluator:: -set_vertex_space(int i, const string &space) { +set_vertex_space(int i, const std::string &space) { nassertv(i >= 0 && i < (int)_vertices.size()); _vertices[i].set_space(space); } @@ -175,8 +175,8 @@ get_num_segments() const { return _basis.get_num_segments(); } -INLINE ostream & -operator << (ostream &out, const NurbsCurveEvaluator &n) { +INLINE std::ostream & +operator << (std::ostream &out, const NurbsCurveEvaluator &n) { n.output(out); return out; } diff --git a/panda/src/parametrics/nurbsCurveEvaluator.h b/panda/src/parametrics/nurbsCurveEvaluator.h index 86e3a79996..1a4192242d 100644 --- a/panda/src/parametrics/nurbsCurveEvaluator.h +++ b/panda/src/parametrics/nurbsCurveEvaluator.h @@ -54,7 +54,7 @@ PUBLISHED: MAKE_SEQ(get_vertices, get_num_vertices, get_vertex); INLINE void set_vertex_space(int i, const NodePath &space); - INLINE void set_vertex_space(int i, const string &space); + INLINE void set_vertex_space(int i, const std::string &space); NodePath get_vertex_space(int i, const NodePath &rel_to) const; INLINE void set_extended_vertex(int i, int d, PN_stdfloat value); @@ -74,7 +74,7 @@ PUBLISHED: PT(NurbsCurveResult) evaluate(const NodePath &rel_to, const LMatrix4 &mat) const; - void output(ostream &out) const; + void output(std::ostream &out) const; public: typedef epvector Vert4Array; @@ -99,7 +99,7 @@ private: NurbsBasisVector _basis; }; -INLINE ostream &operator << (ostream &out, const NurbsCurveEvaluator &n); +INLINE std::ostream &operator << (std::ostream &out, const NurbsCurveEvaluator &n); #include "nurbsCurveEvaluator.I" diff --git a/panda/src/parametrics/nurbsCurveInterface.h b/panda/src/parametrics/nurbsCurveInterface.h index ef09c78275..e37a24d07e 100644 --- a/panda/src/parametrics/nurbsCurveInterface.h +++ b/panda/src/parametrics/nurbsCurveInterface.h @@ -61,14 +61,14 @@ PUBLISHED: MAKE_SEQ(get_cvs, get_num_cvs, get_cv); MAKE_SEQ(get_knots, get_num_knots, get_knot); - void write_cv(ostream &out, int n) const; + void write_cv(std::ostream &out, int n) const; protected: virtual int append_cv_impl(const LVecBase4 &v)=0; - void write(ostream &out, int indent_level) const; - bool format_egg(ostream &out, const string &name, - const string &curve_type, int indent_level) const; + void write(std::ostream &out, int indent_level) const; + bool format_egg(std::ostream &out, const std::string &name, + const std::string &curve_type, int indent_level) const; bool convert_to_nurbs(ParametricCurve *nc) const; diff --git a/panda/src/parametrics/nurbsSurfaceEvaluator.I b/panda/src/parametrics/nurbsSurfaceEvaluator.I index c00408dd5f..26c0f9c0e0 100644 --- a/panda/src/parametrics/nurbsSurfaceEvaluator.I +++ b/panda/src/parametrics/nurbsSurfaceEvaluator.I @@ -155,7 +155,7 @@ set_vertex_space(int ui, int vi, const NodePath &space) { * node relative to the rel_to NodePath when the surface is evaluated. */ INLINE void NurbsSurfaceEvaluator:: -set_vertex_space(int ui, int vi, const string &space) { +set_vertex_space(int ui, int vi, const std::string &space) { nassertv(ui >= 0 && ui < _num_u_vertices && vi >= 0 && vi < _num_v_vertices); vert(ui, vi).set_space(space); @@ -255,8 +255,8 @@ vert(int ui, int vi) const { return _vertices[ui * _num_v_vertices + vi]; } -INLINE ostream & -operator << (ostream &out, const NurbsSurfaceEvaluator &n) { +INLINE std::ostream & +operator << (std::ostream &out, const NurbsSurfaceEvaluator &n) { n.output(out); return out; } diff --git a/panda/src/parametrics/nurbsSurfaceEvaluator.h b/panda/src/parametrics/nurbsSurfaceEvaluator.h index a2f468d716..ced1013016 100644 --- a/panda/src/parametrics/nurbsSurfaceEvaluator.h +++ b/panda/src/parametrics/nurbsSurfaceEvaluator.h @@ -52,7 +52,7 @@ PUBLISHED: INLINE LVecBase4 get_vertex(int ui, int vi, const NodePath &rel_to) const; INLINE void set_vertex_space(int ui, int vi, const NodePath &space); - INLINE void set_vertex_space(int ui, int vi, const string &space); + INLINE void set_vertex_space(int ui, int vi, const std::string &space); NodePath get_vertex_space(int ui, int vi, const NodePath &rel_to) const; INLINE void set_extended_vertex(int ui, int vi, int d, PN_stdfloat value); @@ -77,7 +77,7 @@ PUBLISHED: PT(NurbsSurfaceResult) evaluate(const NodePath &rel_to = NodePath()) const; - void output(ostream &out) const; + void output(std::ostream &out) const; MAKE_PROPERTY(u_order, get_u_order, set_u_order); MAKE_PROPERTY(v_order, get_v_order, set_v_order); @@ -119,7 +119,7 @@ private: NurbsBasisVector _v_basis; }; -INLINE ostream &operator << (ostream &out, const NurbsSurfaceEvaluator &n); +INLINE std::ostream &operator << (std::ostream &out, const NurbsSurfaceEvaluator &n); #include "nurbsSurfaceEvaluator.I" diff --git a/panda/src/parametrics/nurbsVertex.I b/panda/src/parametrics/nurbsVertex.I index cd6c344ac9..75a23a59e1 100644 --- a/panda/src/parametrics/nurbsVertex.I +++ b/panda/src/parametrics/nurbsVertex.I @@ -69,14 +69,14 @@ get_vertex() const { INLINE void NurbsVertex:: set_space(const NodePath &space) { _space = space; - _space_path = string(); + _space_path = std::string(); } /** * Sets the space of this vertex as a relative path from the rel_to node. */ INLINE void NurbsVertex:: -set_space(const string &space) { +set_space(const std::string &space) { _space = NodePath(); _space_path = space; } diff --git a/panda/src/parametrics/nurbsVertex.h b/panda/src/parametrics/nurbsVertex.h index 7369f3a1e6..751b36f335 100644 --- a/panda/src/parametrics/nurbsVertex.h +++ b/panda/src/parametrics/nurbsVertex.h @@ -40,7 +40,7 @@ public: INLINE const LVecBase4 &get_vertex() const; INLINE void set_space(const NodePath &space); - INLINE void set_space(const string &space); + INLINE void set_space(const std::string &space); INLINE NodePath get_space(const NodePath &rel_to) const; void set_extended_vertex(int d, PN_stdfloat value); @@ -49,7 +49,7 @@ public: private: LVecBase4 _vertex; NodePath _space; - string _space_path; + std::string _space_path; typedef pmap Extended; Extended _extended; }; diff --git a/panda/src/parametrics/parametricCurve.h b/panda/src/parametrics/parametricCurve.h index aa4dfc8f2d..0cb5d7fb9d 100644 --- a/panda/src/parametrics/parametricCurve.h +++ b/panda/src/parametrics/parametricCurve.h @@ -93,7 +93,7 @@ PUBLISHED: virtual bool stitch(const ParametricCurve *a, const ParametricCurve *b); bool write_egg(Filename filename, CoordinateSystem cs = CS_default); - bool write_egg(ostream &out, const Filename &filename, CoordinateSystem cs); + bool write_egg(std::ostream &out, const Filename &filename, CoordinateSystem cs); public: struct BezierSeg { @@ -117,8 +117,8 @@ protected: void invalidate(PN_stdfloat t1, PN_stdfloat t2); void invalidate_all(); - virtual bool format_egg(ostream &out, const string &name, - const string &curve_type, int indent_level) const; + virtual bool format_egg(std::ostream &out, const std::string &name, + const std::string &curve_type, int indent_level) const; private: PN_stdfloat r_calc_length(PN_stdfloat t1, PN_stdfloat t2, diff --git a/panda/src/parametrics/parametricCurveCollection.I b/panda/src/parametrics/parametricCurveCollection.I index ba4cf949a0..711b43b67b 100644 --- a/panda/src/parametrics/parametricCurveCollection.I +++ b/panda/src/parametrics/parametricCurveCollection.I @@ -42,7 +42,7 @@ get_curve(int index) const { */ INLINE void ParametricCurveCollection:: add_curve(ParametricCurve *curve, int index) { - insert_curve(max(index, 0), curve); + insert_curve(std::max(index, 0), curve); } /** diff --git a/panda/src/parametrics/parametricCurveCollection.h b/panda/src/parametrics/parametricCurveCollection.h index 44e588dd89..18a79c5dc8 100644 --- a/panda/src/parametrics/parametricCurveCollection.h +++ b/panda/src/parametrics/parametricCurveCollection.h @@ -91,11 +91,11 @@ PUBLISHED: bool stitch(const ParametricCurveCollection *a, const ParametricCurveCollection *b); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; bool write_egg(Filename filename, CoordinateSystem cs = CS_default); - bool write_egg(ostream &out, const Filename &filename, CoordinateSystem cs); + bool write_egg(std::ostream &out, const Filename &filename, CoordinateSystem cs); public: int r_add_curves(PandaNode *node); @@ -115,8 +115,8 @@ private: DrawerList _drawers; }; -INLINE ostream & -operator << (ostream &out, const ParametricCurveCollection &col) { +INLINE std::ostream & +operator << (std::ostream &out, const ParametricCurveCollection &col) { col.output(out); return out; } diff --git a/panda/src/parametrics/ropeNode.h b/panda/src/parametrics/ropeNode.h index 063070c802..e4647e304d 100644 --- a/panda/src/parametrics/ropeNode.h +++ b/panda/src/parametrics/ropeNode.h @@ -33,13 +33,13 @@ class GeomVertexData; */ class EXPCL_PANDA_PARAMETRICS RopeNode : public PandaNode { PUBLISHED: - explicit RopeNode(const string &name); + explicit RopeNode(const std::string &name); protected: RopeNode(const RopeNode ©); public: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual PandaNode *make_copy() const; diff --git a/panda/src/parametrics/sheetNode.h b/panda/src/parametrics/sheetNode.h index 29374955a7..97a8d80a71 100644 --- a/panda/src/parametrics/sheetNode.h +++ b/panda/src/parametrics/sheetNode.h @@ -31,13 +31,13 @@ */ class EXPCL_PANDA_PARAMETRICS SheetNode : public PandaNode { PUBLISHED: - explicit SheetNode(const string &name); + explicit SheetNode(const std::string &name); protected: SheetNode(const SheetNode ©); public: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual PandaNode *make_copy() const; diff --git a/panda/src/particlesystem/arcEmitter.h b/panda/src/particlesystem/arcEmitter.h index 1d5a69b644..ce95891b3e 100644 --- a/panda/src/particlesystem/arcEmitter.h +++ b/panda/src/particlesystem/arcEmitter.h @@ -34,8 +34,8 @@ PUBLISHED: INLINE PN_stdfloat get_start_angle(); INLINE PN_stdfloat get_end_angle(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: // our emitter limits diff --git a/panda/src/particlesystem/baseParticle.h b/panda/src/particlesystem/baseParticle.h index e152536269..edc14ca0f1 100644 --- a/panda/src/particlesystem/baseParticle.h +++ b/panda/src/particlesystem/baseParticle.h @@ -48,8 +48,8 @@ public: // from PhysicsObject virtual PhysicsObject *make_copy() const = 0; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: BaseParticle(PN_stdfloat lifespan = 1.0f, bool alive = false); diff --git a/panda/src/particlesystem/baseParticleEmitter.h b/panda/src/particlesystem/baseParticleEmitter.h index af16f43274..aad4d1ad17 100644 --- a/panda/src/particlesystem/baseParticleEmitter.h +++ b/panda/src/particlesystem/baseParticleEmitter.h @@ -49,8 +49,8 @@ PUBLISHED: INLINE LVector3 get_explicit_launch_vector() const; INLINE LPoint3 get_radiate_origin() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: BaseParticleEmitter(); diff --git a/panda/src/particlesystem/baseParticleFactory.h b/panda/src/particlesystem/baseParticleFactory.h index bdb7fd6a8c..47073862f2 100644 --- a/panda/src/particlesystem/baseParticleFactory.h +++ b/panda/src/particlesystem/baseParticleFactory.h @@ -47,8 +47,8 @@ PUBLISHED: void populate_particle(BaseParticle* bp); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: BaseParticleFactory(); diff --git a/panda/src/particlesystem/baseParticleRenderer.I b/panda/src/particlesystem/baseParticleRenderer.I index 38d8cf8bbb..7da2037edd 100644 --- a/panda/src/particlesystem/baseParticleRenderer.I +++ b/panda/src/particlesystem/baseParticleRenderer.I @@ -97,7 +97,7 @@ get_cur_alpha(BaseParticle* bp) { return bp->get_parameterized_age(); case PR_ALPHA_IN_OUT: - return 2.0 * min(bp->get_parameterized_age(), + return 2.0 * std::min(bp->get_parameterized_age(), 1.0f - bp->get_parameterized_age()); case PR_ALPHA_USER: diff --git a/panda/src/particlesystem/baseParticleRenderer.h b/panda/src/particlesystem/baseParticleRenderer.h index 81926f3a74..bab215567a 100644 --- a/panda/src/particlesystem/baseParticleRenderer.h +++ b/panda/src/particlesystem/baseParticleRenderer.h @@ -62,8 +62,8 @@ PUBLISHED: void set_ignore_scale(bool ignore_scale); INLINE bool get_ignore_scale() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; public: virtual BaseParticleRenderer *make_copy() = 0; diff --git a/panda/src/particlesystem/boxEmitter.h b/panda/src/particlesystem/boxEmitter.h index e9ffbe070c..830e7827af 100644 --- a/panda/src/particlesystem/boxEmitter.h +++ b/panda/src/particlesystem/boxEmitter.h @@ -33,8 +33,8 @@ PUBLISHED: INLINE LPoint3 get_min_bound() const; INLINE LPoint3 get_max_bound() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: LPoint3 _vmin; diff --git a/panda/src/particlesystem/colorInterpolationManager.I b/panda/src/particlesystem/colorInterpolationManager.I index e9b087605f..399476ab2d 100644 --- a/panda/src/particlesystem/colorInterpolationManager.I +++ b/panda/src/particlesystem/colorInterpolationManager.I @@ -239,14 +239,14 @@ get_segment(const int seg_id) { * time. */ -INLINE string ColorInterpolationManager:: +INLINE std::string ColorInterpolationManager:: get_segment_id_list() { pvector::iterator iter; - ostringstream output; + std::ostringstream output; for(iter = _i_segs.begin();iter != _i_segs.end();++iter) output << (*iter)->get_id() << " "; - string str = output.str(); + std::string str = output.str(); return str.substr(0, str.length()-1); } diff --git a/panda/src/particlesystem/colorInterpolationManager.h b/panda/src/particlesystem/colorInterpolationManager.h index 6c01d95b24..917694bee7 100644 --- a/panda/src/particlesystem/colorInterpolationManager.h +++ b/panda/src/particlesystem/colorInterpolationManager.h @@ -280,7 +280,7 @@ ColorInterpolationManager(); INLINE void set_default_color(const LColor &c); INLINE ColorInterpolationSegment* get_segment(const int seg_id); - INLINE string get_segment_id_list(); + INLINE std::string get_segment_id_list(); void clear_segment(const int seg_id); void clear_to_initial(); diff --git a/panda/src/particlesystem/discEmitter.h b/panda/src/particlesystem/discEmitter.h index 2d5c8c1367..0ce8bf9d70 100644 --- a/panda/src/particlesystem/discEmitter.h +++ b/panda/src/particlesystem/discEmitter.h @@ -41,8 +41,8 @@ PUBLISHED: INLINE PN_stdfloat get_inner_magnitude() const; INLINE bool get_cubic_lerping() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _radius; diff --git a/panda/src/particlesystem/geomParticleRenderer.h b/panda/src/particlesystem/geomParticleRenderer.h index 1e4fccf320..f80322a5bd 100644 --- a/panda/src/particlesystem/geomParticleRenderer.h +++ b/panda/src/particlesystem/geomParticleRenderer.h @@ -57,9 +57,9 @@ PUBLISHED: public: virtual BaseParticleRenderer *make_copy(); - virtual void output(ostream &out) const; - virtual void write_linear_forces(ostream &out, int indent=0) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write_linear_forces(std::ostream &out, int indent=0) const; + virtual void write(std::ostream &out, int indent=0) const; private: PT(PandaNode) _geom_node; diff --git a/panda/src/particlesystem/lineEmitter.h b/panda/src/particlesystem/lineEmitter.h index 8d1d5f9afa..0b5a832563 100644 --- a/panda/src/particlesystem/lineEmitter.h +++ b/panda/src/particlesystem/lineEmitter.h @@ -33,8 +33,8 @@ PUBLISHED: INLINE LPoint3 get_endpoint1() const; INLINE LPoint3 get_endpoint2() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: LPoint3 _endpoint1; diff --git a/panda/src/particlesystem/lineParticleRenderer.h b/panda/src/particlesystem/lineParticleRenderer.h index ae37a833d5..86dcc5973c 100644 --- a/panda/src/particlesystem/lineParticleRenderer.h +++ b/panda/src/particlesystem/lineParticleRenderer.h @@ -51,8 +51,8 @@ PUBLISHED: INLINE void set_line_scale_factor(PN_stdfloat sf); INLINE PN_stdfloat get_line_scale_factor() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: LColor _head_color; diff --git a/panda/src/particlesystem/orientedParticle.h b/panda/src/particlesystem/orientedParticle.h index 5bdfd88351..0f021fed8d 100644 --- a/panda/src/particlesystem/orientedParticle.h +++ b/panda/src/particlesystem/orientedParticle.h @@ -35,8 +35,8 @@ public: virtual void update(); virtual void die(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; }; #include "orientedParticle.I" diff --git a/panda/src/particlesystem/orientedParticleFactory.h b/panda/src/particlesystem/orientedParticleFactory.h index 5258d7e256..a38d5e2ec0 100644 --- a/panda/src/particlesystem/orientedParticleFactory.h +++ b/panda/src/particlesystem/orientedParticleFactory.h @@ -32,8 +32,8 @@ PUBLISHED: INLINE LOrientation get_initial_orientation() const; INLINE LOrientation get_final_orientation() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: virtual void populate_child_particle(BaseParticle *bp) const; diff --git a/panda/src/particlesystem/particleSystem.h b/panda/src/particlesystem/particleSystem.h index e2689cf361..9c453b1b50 100644 --- a/panda/src/particlesystem/particleSystem.h +++ b/panda/src/particlesystem/particleSystem.h @@ -104,10 +104,10 @@ PUBLISHED: INLINE void soft_start(PN_stdfloat br = 0.0); void update(PN_stdfloat dt); - virtual void output(ostream &out) const; - virtual void write_free_particle_fifo(ostream &out, int indent=0) const; - virtual void write_spawn_templates(ostream &out, int indent=0) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write_free_particle_fifo(std::ostream &out, int indent=0) const; + virtual void write_spawn_templates(std::ostream &out, int indent=0) const; + virtual void write(std::ostream &out, int indent=0) const; private: #ifdef PSSANITYCHECK diff --git a/panda/src/particlesystem/particleSystemManager.h b/panda/src/particlesystem/particleSystemManager.h index 1b03fdbc06..b083076e8a 100644 --- a/panda/src/particlesystem/particleSystemManager.h +++ b/panda/src/particlesystem/particleSystemManager.h @@ -39,9 +39,9 @@ PUBLISHED: void do_particles(PN_stdfloat dt); void do_particles(PN_stdfloat dt, ParticleSystem * ps, bool do_render = true); - virtual void output(ostream &out) const; - virtual void write_ps_list(ostream &out, int indent=0) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write_ps_list(std::ostream &out, int indent=0) const; + virtual void write(std::ostream &out, int indent=0) const; private: plist< PT(ParticleSystem) > _ps_list; diff --git a/panda/src/particlesystem/pointEmitter.h b/panda/src/particlesystem/pointEmitter.h index 145dff2344..fd59ea1aea 100644 --- a/panda/src/particlesystem/pointEmitter.h +++ b/panda/src/particlesystem/pointEmitter.h @@ -30,8 +30,8 @@ PUBLISHED: INLINE void set_location(const LPoint3& p); INLINE LPoint3 get_location() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: LPoint3 _location; diff --git a/panda/src/particlesystem/pointParticle.h b/panda/src/particlesystem/pointParticle.h index f9fe566a40..44e067edaf 100644 --- a/panda/src/particlesystem/pointParticle.h +++ b/panda/src/particlesystem/pointParticle.h @@ -32,8 +32,8 @@ public: virtual PhysicsObject *make_copy() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; }; #endif // POINTPARTICLE_H diff --git a/panda/src/particlesystem/pointParticleFactory.h b/panda/src/particlesystem/pointParticleFactory.h index 0ce2b6e232..acaccf835e 100644 --- a/panda/src/particlesystem/pointParticleFactory.h +++ b/panda/src/particlesystem/pointParticleFactory.h @@ -26,8 +26,8 @@ PUBLISHED: PointParticleFactory(const PointParticleFactory ©); virtual ~PointParticleFactory(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: virtual BaseParticle *alloc_particle() const; diff --git a/panda/src/particlesystem/pointParticleRenderer.h b/panda/src/particlesystem/pointParticleRenderer.h index 3f7ed52612..114cbb0e93 100644 --- a/panda/src/particlesystem/pointParticleRenderer.h +++ b/panda/src/particlesystem/pointParticleRenderer.h @@ -64,8 +64,8 @@ PUBLISHED: INLINE PointParticleBlendType get_blend_type() const; INLINE ParticleRendererBlendMethod get_blend_method() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: LColor _start_color; diff --git a/panda/src/particlesystem/rectangleEmitter.h b/panda/src/particlesystem/rectangleEmitter.h index ecd95728e1..7805d3b619 100644 --- a/panda/src/particlesystem/rectangleEmitter.h +++ b/panda/src/particlesystem/rectangleEmitter.h @@ -33,8 +33,8 @@ PUBLISHED: INLINE LPoint2 get_min_bound() const; INLINE LPoint2 get_max_bound() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: LPoint2 _vmin; diff --git a/panda/src/particlesystem/ringEmitter.h b/panda/src/particlesystem/ringEmitter.h index 0278e8ac97..7bc9516148 100644 --- a/panda/src/particlesystem/ringEmitter.h +++ b/panda/src/particlesystem/ringEmitter.h @@ -37,8 +37,8 @@ PUBLISHED: INLINE PN_stdfloat get_radius_spread() const; INLINE int get_uniform_emission() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: PN_stdfloat _radius; diff --git a/panda/src/particlesystem/sparkleParticleRenderer.h b/panda/src/particlesystem/sparkleParticleRenderer.h index 367dd0029d..040d4a5315 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.h +++ b/panda/src/particlesystem/sparkleParticleRenderer.h @@ -65,8 +65,8 @@ PUBLISHED: INLINE PN_stdfloat get_death_radius() const; INLINE SparkleParticleLifeScale get_life_scale() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: LColor _center_color; diff --git a/panda/src/particlesystem/sphereSurfaceEmitter.h b/panda/src/particlesystem/sphereSurfaceEmitter.h index 50a5dda839..e5f9cebaae 100644 --- a/panda/src/particlesystem/sphereSurfaceEmitter.h +++ b/panda/src/particlesystem/sphereSurfaceEmitter.h @@ -30,8 +30,8 @@ PUBLISHED: INLINE void set_radius(PN_stdfloat r); INLINE PN_stdfloat get_radius() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _radius; diff --git a/panda/src/particlesystem/sphereVolumeEmitter.h b/panda/src/particlesystem/sphereVolumeEmitter.h index 29d49b92a9..14981b1b50 100644 --- a/panda/src/particlesystem/sphereVolumeEmitter.h +++ b/panda/src/particlesystem/sphereVolumeEmitter.h @@ -30,8 +30,8 @@ PUBLISHED: INLINE void set_radius(PN_stdfloat r); INLINE PN_stdfloat get_radius() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _radius; diff --git a/panda/src/particlesystem/spriteParticleRenderer.h b/panda/src/particlesystem/spriteParticleRenderer.h index ecb9f579fd..c26f0ee7c1 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.h +++ b/panda/src/particlesystem/spriteParticleRenderer.h @@ -75,12 +75,12 @@ PUBLISHED: ST_from_node, }; - void set_source_info(const string &tex) { + void set_source_info(const std::string &tex) { _source_type = ST_texture; _source_tex = tex; } - void set_source_info(const string &model, const string &node) { + void set_source_info(const std::string &model, const std::string &node) { _source_type = ST_from_node; _source_model = model; _source_node = node; @@ -90,15 +90,15 @@ PUBLISHED: return _source_type; } - string get_tex_source() const { + std::string get_tex_source() const { return _source_tex; } - string get_model_source() const { + std::string get_model_source() const { return _source_model; } - string get_node_source() const { + std::string get_node_source() const { return _source_node; } @@ -145,7 +145,7 @@ private: pvector< PT(Texture) > textures; pvector< LTexCoord > ll,ur; SourceType _source_type; - string _source_tex,_source_model,_source_node; + std::string _source_tex,_source_model,_source_node; }; /** @@ -162,9 +162,9 @@ public: PUBLISHED: void set_from_node(const NodePath &node_path, bool size_from_texels = false); - void set_from_node(const NodePath &node_path, const string &model, const string &node, bool size_from_texels = false); + void set_from_node(const NodePath &node_path, const std::string &model, const std::string &node, bool size_from_texels = false); void add_from_node(const NodePath &node_path, bool size_from_texels = false, bool resize = false); - void add_from_node(const NodePath &node_path, const string &model, const string &node, bool size_from_texels = false, bool resize = false); + void add_from_node(const NodePath &node_path, const std::string &model, const std::string &node, bool size_from_texels = false, bool resize = false); INLINE void set_texture(Texture *tex, PN_stdfloat texels_per_unit = 1.0f); INLINE void add_texture(Texture *tex, PN_stdfloat texels_per_unit = 1.0f, bool resize = false); @@ -217,8 +217,8 @@ PUBLISHED: INLINE PN_stdfloat get_animate_frames_rate() const; INLINE int get_animate_frames_index() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: pvector< pvector< PT(Geom) > > _sprite_primitive; diff --git a/panda/src/particlesystem/tangentRingEmitter.h b/panda/src/particlesystem/tangentRingEmitter.h index 0bea13ee17..7100b7ee80 100644 --- a/panda/src/particlesystem/tangentRingEmitter.h +++ b/panda/src/particlesystem/tangentRingEmitter.h @@ -34,8 +34,8 @@ PUBLISHED: INLINE PN_stdfloat get_radius() const; INLINE PN_stdfloat get_radius_spread() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _radius; diff --git a/panda/src/particlesystem/zSpinParticle.h b/panda/src/particlesystem/zSpinParticle.h index 302aedc5d9..ad867d7269 100644 --- a/panda/src/particlesystem/zSpinParticle.h +++ b/panda/src/particlesystem/zSpinParticle.h @@ -50,8 +50,8 @@ public: INLINE void enable_angular_velocity(bool bEnabled); INLINE bool get_angular_velocity_enabled() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _initial_angle; diff --git a/panda/src/particlesystem/zSpinParticleFactory.h b/panda/src/particlesystem/zSpinParticleFactory.h index ca6aa5b8d8..2ef6819069 100644 --- a/panda/src/particlesystem/zSpinParticleFactory.h +++ b/panda/src/particlesystem/zSpinParticleFactory.h @@ -44,8 +44,8 @@ PUBLISHED: INLINE void enable_angular_velocity(bool bEnabled); INLINE bool get_angular_velocity_enabled() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _initial_angle; diff --git a/panda/src/pgraph/accumulatedAttribs.h b/panda/src/pgraph/accumulatedAttribs.h index d71da61111..3d7680cb9a 100644 --- a/panda/src/pgraph/accumulatedAttribs.h +++ b/panda/src/pgraph/accumulatedAttribs.h @@ -33,7 +33,7 @@ public: AccumulatedAttribs(const AccumulatedAttribs ©); void operator = (const AccumulatedAttribs ©); - void write(ostream &out, int attrib_types, int indent_level) const; + void write(std::ostream &out, int attrib_types, int indent_level) const; void collect(PandaNode *node, int attrib_types); CPT(RenderState) collect(const RenderState *state, int attrib_types); diff --git a/panda/src/pgraph/alphaTestAttrib.h b/panda/src/pgraph/alphaTestAttrib.h index d9aae7ec5b..96225fe902 100644 --- a/panda/src/pgraph/alphaTestAttrib.h +++ b/panda/src/pgraph/alphaTestAttrib.h @@ -41,7 +41,7 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/antialiasAttrib.h b/panda/src/pgraph/antialiasAttrib.h index af149af5f6..454210516d 100644 --- a/panda/src/pgraph/antialiasAttrib.h +++ b/panda/src/pgraph/antialiasAttrib.h @@ -58,7 +58,7 @@ PUBLISHED: MAKE_PROPERTY(mode_quality, get_mode_quality); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/attribNodeRegistry.I b/panda/src/pgraph/attribNodeRegistry.I index b78c9bd78e..04a540466b 100644 --- a/panda/src/pgraph/attribNodeRegistry.I +++ b/panda/src/pgraph/attribNodeRegistry.I @@ -37,7 +37,7 @@ Entry(const NodePath &node) : * */ INLINE AttribNodeRegistry::Entry:: -Entry(TypeHandle type, const string &name) : +Entry(TypeHandle type, const std::string &name) : _type(type), _name(name) { diff --git a/panda/src/pgraph/attribNodeRegistry.h b/panda/src/pgraph/attribNodeRegistry.h index 46170e1ea9..51efa8ead0 100644 --- a/panda/src/pgraph/attribNodeRegistry.h +++ b/panda/src/pgraph/attribNodeRegistry.h @@ -43,15 +43,15 @@ PUBLISHED: NodePath get_node(int n) const; MAKE_SEQ(get_nodes, get_num_nodes, get_node); TypeHandle get_node_type(int n) const; - string get_node_name(int n) const; + std::string get_node_name(int n) const; int find_node(const NodePath &attrib_node) const; - int find_node(TypeHandle type, const string &name) const; + int find_node(TypeHandle type, const std::string &name) const; void remove_node(int n); void clear(); - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; INLINE static AttribNodeRegistry *get_global_ptr(); @@ -61,11 +61,11 @@ private: class Entry { public: INLINE Entry(const NodePath &node); - INLINE Entry(TypeHandle type, const string &name); + INLINE Entry(TypeHandle type, const std::string &name); INLINE bool operator < (const Entry &other) const; TypeHandle _type; - string _name; + std::string _name; NodePath _node; }; diff --git a/panda/src/pgraph/audioVolumeAttrib.h b/panda/src/pgraph/audioVolumeAttrib.h index abf1216130..564db9748e 100644 --- a/panda/src/pgraph/audioVolumeAttrib.h +++ b/panda/src/pgraph/audioVolumeAttrib.h @@ -44,7 +44,7 @@ PUBLISHED: MAKE_PROPERTY2(volume, has_volume, get_volume); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/auxBitplaneAttrib.h b/panda/src/pgraph/auxBitplaneAttrib.h index 26ce021110..6283b09587 100644 --- a/panda/src/pgraph/auxBitplaneAttrib.h +++ b/panda/src/pgraph/auxBitplaneAttrib.h @@ -67,7 +67,7 @@ PUBLISHED: MAKE_PROPERTY(outputs, get_outputs); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/auxSceneData.I b/panda/src/pgraph/auxSceneData.I index e80d5f6469..f2e7912cfc 100644 --- a/panda/src/pgraph/auxSceneData.I +++ b/panda/src/pgraph/auxSceneData.I @@ -68,8 +68,8 @@ get_expiration_time() const { return _last_render_time + _duration; } -INLINE ostream & -operator << (ostream &out, const AuxSceneData &data) { +INLINE std::ostream & +operator << (std::ostream &out, const AuxSceneData &data) { data.output(out); return out; } diff --git a/panda/src/pgraph/auxSceneData.h b/panda/src/pgraph/auxSceneData.h index ec117bdc17..90741dde05 100644 --- a/panda/src/pgraph/auxSceneData.h +++ b/panda/src/pgraph/auxSceneData.h @@ -41,8 +41,8 @@ PUBLISHED: INLINE double get_expiration_time() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: double _duration; @@ -66,7 +66,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const AuxSceneData &data); +INLINE std::ostream &operator << (std::ostream &out, const AuxSceneData &data); #include "auxSceneData.I" diff --git a/panda/src/pgraph/bamFile.h b/panda/src/pgraph/bamFile.h index e96581729e..a244ab3fa3 100644 --- a/panda/src/pgraph/bamFile.h +++ b/panda/src/pgraph/bamFile.h @@ -44,7 +44,7 @@ PUBLISHED: ~BamFile(); bool open_read(const Filename &bam_filename, bool report_errors = true); - bool open_read(istream &in, const string &bam_filename = "stream", + bool open_read(std::istream &in, const std::string &bam_filename = "stream", bool report_errors = true); TypedWritable *read_object(); @@ -55,7 +55,7 @@ PUBLISHED: PT(PandaNode) read_node(bool report_errors = true); bool open_write(const Filename &bam_filename, bool report_errors = true); - bool open_write(ostream &out, const string &bam_filename = "stream", + bool open_write(std::ostream &out, const std::string &bam_filename = "stream", bool report_errors = true); bool write_object(const TypedWritable *object); @@ -82,10 +82,10 @@ PUBLISHED: MAKE_PROPERTY(writer, get_writer); private: - bool continue_open_read(const string &bam_filename, bool report_errors); - bool continue_open_write(const string &bam_filename, bool report_errors); + bool continue_open_read(const std::string &bam_filename, bool report_errors); + bool continue_open_write(const std::string &bam_filename, bool report_errors); - string _bam_filename; + std::string _bam_filename; DatagramInputFile _din; DatagramOutputFile _dout; BamReader *_reader; diff --git a/panda/src/pgraph/billboardEffect.h b/panda/src/pgraph/billboardEffect.h index 284182ba91..f83ecc5323 100644 --- a/panda/src/pgraph/billboardEffect.h +++ b/panda/src/pgraph/billboardEffect.h @@ -50,7 +50,7 @@ PUBLISHED: public: virtual bool safe_to_transform() const; virtual CPT(TransformState) prepare_flatten_transform(const TransformState *net_transform) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool has_cull_callback() const; virtual void cull_callback(CullTraverser *trav, CullTraverserData &data, diff --git a/panda/src/pgraph/cacheStats.h b/panda/src/pgraph/cacheStats.h index 12707c4bf0..5658a0472f 100644 --- a/panda/src/pgraph/cacheStats.h +++ b/panda/src/pgraph/cacheStats.h @@ -27,7 +27,7 @@ public: constexpr CacheStats() = default; void init(); void reset(double now); - void write(ostream &out, const char *name) const; + void write(std::ostream &out, const char *name) const; INLINE void maybe_report(const char *name); INLINE void inc_hits(); diff --git a/panda/src/pgraph/camera.I b/panda/src/pgraph/camera.I index 0cfcd6277d..1ab7bc2e41 100644 --- a/panda/src/pgraph/camera.I +++ b/panda/src/pgraph/camera.I @@ -180,14 +180,14 @@ get_initial_state() const { * the value of the tag (as specified to set_tag_state()). */ INLINE void Camera:: -set_tag_state_key(const string &tag_state_key) { +set_tag_state_key(const std::string &tag_state_key) { _tag_state_key = tag_state_key; } /** * Returns the tag key as set by a previous call to set_tag_state_key(). */ -INLINE const string &Camera:: +INLINE const std::string &Camera:: get_tag_state_key() const { return _tag_state_key; } diff --git a/panda/src/pgraph/camera.h b/panda/src/pgraph/camera.h index 84b33bf55b..9182f4415c 100644 --- a/panda/src/pgraph/camera.h +++ b/panda/src/pgraph/camera.h @@ -34,7 +34,7 @@ class DisplayRegion; */ class EXPCL_PANDA_PGRAPH Camera : public LensNode { PUBLISHED: - explicit Camera(const string &name, Lens *lens = new PerspectiveLens()); + explicit Camera(const std::string &name, Lens *lens = new PerspectiveLens()); Camera(const Camera ©); public: @@ -78,26 +78,26 @@ PUBLISHED: INLINE CPT(RenderState) get_initial_state() const; MAKE_PROPERTY(initial_state, get_initial_state, set_initial_state); - INLINE void set_tag_state_key(const string &tag_state_key); - INLINE const string &get_tag_state_key() const; + INLINE void set_tag_state_key(const std::string &tag_state_key); + INLINE const std::string &get_tag_state_key() const; MAKE_PROPERTY(tag_state_key, get_tag_state_key, set_tag_state_key); INLINE void set_lod_scale(PN_stdfloat value); INLINE PN_stdfloat get_lod_scale() const; MAKE_PROPERTY(lod_scale, get_lod_scale, set_lod_scale); - void set_tag_state(const string &tag_state, const RenderState *state); - void clear_tag_state(const string &tag_state); + void set_tag_state(const std::string &tag_state, const RenderState *state); + void clear_tag_state(const std::string &tag_state); void clear_tag_states(); - bool has_tag_state(const string &tag_state) const; - CPT(RenderState) get_tag_state(const string &tag_state) const; + bool has_tag_state(const std::string &tag_state) const; + CPT(RenderState) get_tag_state(const std::string &tag_state) const; MAKE_MAP_PROPERTY(tag_states, has_tag_state, get_tag_state, set_tag_state, clear_tag_state); void set_aux_scene_data(const NodePath &node_path, AuxSceneData *data); bool clear_aux_scene_data(const NodePath &node_path); AuxSceneData *get_aux_scene_data(const NodePath &node_path) const; - void list_aux_scene_data(ostream &out) const; + void list_aux_scene_data(std::ostream &out) const; int cleanup_aux_scene_data(Thread *current_thread = Thread::get_current_thread()); MAKE_MAP_PROPERTY(aux_scene_data, get_aux_scene_data, get_aux_scene_data, set_aux_scene_data, clear_aux_scene_data); @@ -119,9 +119,9 @@ private: DisplayRegions _display_regions; CPT(RenderState) _initial_state; - string _tag_state_key; + std::string _tag_state_key; - typedef pmap TagStates; + typedef pmap TagStates; TagStates _tag_states; typedef pmap AuxData; diff --git a/panda/src/pgraph/clipPlaneAttrib.h b/panda/src/pgraph/clipPlaneAttrib.h index b59bb34f9b..511ea34b01 100644 --- a/panda/src/pgraph/clipPlaneAttrib.h +++ b/panda/src/pgraph/clipPlaneAttrib.h @@ -91,7 +91,7 @@ PUBLISHED: public: CPT(RenderAttrib) compose_off(const RenderAttrib *other) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/colorAttrib.h b/panda/src/pgraph/colorAttrib.h index df8c1b84ce..a92543c855 100644 --- a/panda/src/pgraph/colorAttrib.h +++ b/panda/src/pgraph/colorAttrib.h @@ -47,7 +47,7 @@ PUBLISHED: MAKE_PROPERTY(color, get_color); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/colorBlendAttrib.h b/panda/src/pgraph/colorBlendAttrib.h index 641633561c..87b680425f 100644 --- a/panda/src/pgraph/colorBlendAttrib.h +++ b/panda/src/pgraph/colorBlendAttrib.h @@ -116,7 +116,7 @@ PUBLISHED: MAKE_PROPERTY(color, get_color); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; @@ -168,8 +168,8 @@ private: static int _attrib_slot; }; -EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, ColorBlendAttrib::Mode mode); -EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, ColorBlendAttrib::Operand operand); +EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, ColorBlendAttrib::Mode mode); +EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, ColorBlendAttrib::Operand operand); #include "colorBlendAttrib.I" diff --git a/panda/src/pgraph/colorScaleAttrib.h b/panda/src/pgraph/colorScaleAttrib.h index e8dded108b..918bbe9874 100644 --- a/panda/src/pgraph/colorScaleAttrib.h +++ b/panda/src/pgraph/colorScaleAttrib.h @@ -48,7 +48,7 @@ PUBLISHED: public: virtual bool lower_attrib_can_override() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/colorWriteAttrib.h b/panda/src/pgraph/colorWriteAttrib.h index a426a01659..02d4fd2ca9 100644 --- a/panda/src/pgraph/colorWriteAttrib.h +++ b/panda/src/pgraph/colorWriteAttrib.h @@ -52,7 +52,7 @@ PUBLISHED: MAKE_PROPERTY(channels, get_channels); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/compassEffect.h b/panda/src/pgraph/compassEffect.h index 6600820bb1..adba81f9e6 100644 --- a/panda/src/pgraph/compassEffect.h +++ b/panda/src/pgraph/compassEffect.h @@ -68,7 +68,7 @@ PUBLISHED: public: virtual bool safe_to_transform() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool has_cull_callback() const; virtual void cull_callback(CullTraverser *trav, CullTraverserData &data, diff --git a/panda/src/pgraph/cullBin.I b/panda/src/pgraph/cullBin.I index 12f18c6e37..28f7b6542e 100644 --- a/panda/src/pgraph/cullBin.I +++ b/panda/src/pgraph/cullBin.I @@ -28,7 +28,7 @@ CullBin(const CullBin ©) : * */ INLINE CullBin:: -CullBin(const string &name, CullBin::BinType bin_type, +CullBin(const std::string &name, CullBin::BinType bin_type, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector) : _name(name), @@ -42,7 +42,7 @@ CullBin(const string &name, CullBin::BinType bin_type, /** * */ -INLINE const string &CullBin:: +INLINE const std::string &CullBin:: get_name() const { return _name; } diff --git a/panda/src/pgraph/cullBin.h b/panda/src/pgraph/cullBin.h index 3f9615cccb..e3a2ccca55 100644 --- a/panda/src/pgraph/cullBin.h +++ b/panda/src/pgraph/cullBin.h @@ -41,12 +41,12 @@ class EXPCL_PANDA_PGRAPH CullBin : public TypedReferenceCount, public CullBinEnu protected: INLINE CullBin(const CullBin ©); public: - INLINE CullBin(const string &name, BinType bin_type, + INLINE CullBin(const std::string &name, BinType bin_type, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); virtual ~CullBin(); - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE BinType get_bin_type() const; virtual PT(CullBin) make_next() const; @@ -69,7 +69,7 @@ private: void check_flash_color(); protected: - string _name; + std::string _name; BinType _bin_type; GraphicsStateGuardianBase *_gsg; diff --git a/panda/src/pgraph/cullBinAttrib.I b/panda/src/pgraph/cullBinAttrib.I index 945d3244ca..5c5a3714cd 100644 --- a/panda/src/pgraph/cullBinAttrib.I +++ b/panda/src/pgraph/cullBinAttrib.I @@ -23,7 +23,7 @@ CullBinAttrib() { * Returns the name of the bin this attribute specifies. If this is the empty * string, it refers to the default bin. */ -INLINE const string &CullBinAttrib:: +INLINE const std::string &CullBinAttrib:: get_bin_name() const { return _bin_name; } diff --git a/panda/src/pgraph/cullBinAttrib.h b/panda/src/pgraph/cullBinAttrib.h index b3590ac1c5..1104f21af7 100644 --- a/panda/src/pgraph/cullBinAttrib.h +++ b/panda/src/pgraph/cullBinAttrib.h @@ -29,10 +29,10 @@ private: INLINE CullBinAttrib(); PUBLISHED: - static CPT(RenderAttrib) make(const string &bin_name, int draw_order); + static CPT(RenderAttrib) make(const std::string &bin_name, int draw_order); static CPT(RenderAttrib) make_default(); - INLINE const string &get_bin_name() const; + INLINE const std::string &get_bin_name() const; INLINE int get_draw_order() const; PUBLISHED: @@ -40,14 +40,14 @@ PUBLISHED: MAKE_PROPERTY(draw_order, get_draw_order); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; private: - string _bin_name; + std::string _bin_name; int _draw_order; PUBLISHED: diff --git a/panda/src/pgraph/cullBinManager.I b/panda/src/pgraph/cullBinManager.I index 603622ba2f..cea6cc12b1 100644 --- a/panda/src/pgraph/cullBinManager.I +++ b/panda/src/pgraph/cullBinManager.I @@ -63,10 +63,10 @@ get_bin(int n) const { * was retrieved by get_bin() or find_bin()). The bin's name may not be * changed during the life of the bin. */ -INLINE string CullBinManager:: +INLINE std::string CullBinManager:: get_bin_name(int bin_index) const { - nassertr(bin_index >= 0 && bin_index < (int)_bin_definitions.size(), string()); - nassertr(_bin_definitions[bin_index]._in_use, string()); + nassertr(bin_index >= 0 && bin_index < (int)_bin_definitions.size(), std::string()); + nassertr(_bin_definitions[bin_index]._in_use, std::string()); return _bin_definitions[bin_index]._name; } @@ -85,7 +85,7 @@ get_bin_type(int bin_index) const { * Returns the type of the bin with the indicated name. */ INLINE CullBinManager::BinType CullBinManager:: -get_bin_type(const string &name) const { +get_bin_type(const std::string &name) const { int bin_index = find_bin(name); nassertr(bin_index != -1, BT_invalid); return get_bin_type(bin_index); @@ -112,7 +112,7 @@ set_bin_type(int bin_index, CullBinManager::BinType type) { * frame, depending on the bin type. */ INLINE void CullBinManager:: -set_bin_type(const string &name, CullBinManager::BinType type) { +set_bin_type(const std::string &name, CullBinManager::BinType type) { int bin_index = find_bin(name); nassertv(bin_index != -1); set_bin_type(bin_index, type); @@ -139,7 +139,7 @@ get_bin_sort(int bin_index) const { * may be changed from time to time to reorder the bins. */ INLINE int CullBinManager:: -get_bin_sort(const string &name) const { +get_bin_sort(const std::string &name) const { int bin_index = find_bin(name); nassertr(bin_index != -1, 0); return get_bin_sort(bin_index); @@ -167,7 +167,7 @@ set_bin_sort(int bin_index, int sort) { * may be changed from time to time to reorder the bins. */ INLINE void CullBinManager:: -set_bin_sort(const string &name, int sort) { +set_bin_sort(const std::string &name, int sort) { int bin_index = find_bin(name); nassertv(bin_index != -1); set_bin_sort(bin_index, sort); @@ -192,7 +192,7 @@ get_bin_active(int bin_index) const { * When a bin is marked inactive, all geometry assigned to it is not rendered. */ INLINE bool CullBinManager:: -get_bin_active(const string &name) const { +get_bin_active(const std::string &name) const { int bin_index = find_bin(name); nassertr(bin_index != -1, false); return get_bin_active(bin_index); @@ -217,7 +217,7 @@ set_bin_active(int bin_index, bool active) { * When a bin is marked inactive, all geometry assigned to it is not rendered. */ INLINE void CullBinManager:: -set_bin_active(const string &name, bool active) { +set_bin_active(const std::string &name, bool active) { int bin_index = find_bin(name); nassertv(bin_index != -1); set_bin_active(bin_index, active); diff --git a/panda/src/pgraph/cullBinManager.h b/panda/src/pgraph/cullBinManager.h index 79ac5d9749..1bc203ab84 100644 --- a/panda/src/pgraph/cullBinManager.h +++ b/panda/src/pgraph/cullBinManager.h @@ -39,30 +39,30 @@ protected: PUBLISHED: typedef CullBin::BinType BinType; - int add_bin(const string &name, BinType type, int sort); + int add_bin(const std::string &name, BinType type, int sort); void remove_bin(int bin_index); INLINE int get_num_bins() const; INLINE int get_bin(int n) const; MAKE_SEQ(get_bins, get_num_bins, get_bin); - int find_bin(const string &name) const; + int find_bin(const std::string &name) const; - INLINE string get_bin_name(int bin_index) const; + INLINE std::string get_bin_name(int bin_index) const; INLINE BinType get_bin_type(int bin_index) const; - INLINE BinType get_bin_type(const string &name) const; + INLINE BinType get_bin_type(const std::string &name) const; INLINE void set_bin_type(int bin_index, BinType type); - INLINE void set_bin_type(const string &name, BinType type); + INLINE void set_bin_type(const std::string &name, BinType type); INLINE int get_bin_sort(int bin_index) const; - INLINE int get_bin_sort(const string &name) const; + INLINE int get_bin_sort(const std::string &name) const; INLINE void set_bin_sort(int bin_index, int sort); - INLINE void set_bin_sort(const string &name, int sort); + INLINE void set_bin_sort(const std::string &name, int sort); INLINE bool get_bin_active(int bin_index) const; - INLINE bool get_bin_active(const string &name) const; + INLINE bool get_bin_active(const std::string &name) const; INLINE void set_bin_active(int bin_index, bool active); - INLINE void set_bin_active(const string &name, bool active); + INLINE void set_bin_active(const std::string &name, bool active); #ifndef NDEBUG INLINE bool get_bin_flash_active(int bin_index) const; @@ -71,7 +71,7 @@ PUBLISHED: INLINE void set_bin_flash_color(int bin_index, const LColor &color); #endif - void write(ostream &out) const; + void write(std::ostream &out) const; INLINE static CullBinManager *get_global_ptr(); @@ -83,7 +83,7 @@ public: // This defines the factory interface for defining constructors to bin types // (the implementations are in the cull directory, not here in pgraph, so we // can't call the constructors directly). - typedef CullBin *BinConstructor(const string &name, + typedef CullBin *BinConstructor(const std::string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector); @@ -92,7 +92,7 @@ public: private: void do_sort_bins(); void setup_initial_bins(); - static BinType parse_bin_type(const string &bin_type); + static BinType parse_bin_type(const std::string &bin_type); class EXPCL_PANDA_PGRAPH BinDefinition { public: @@ -101,7 +101,7 @@ private: bool _flash_active; #endif bool _in_use; - string _name; + std::string _name; BinType _type; int _sort; bool _active; @@ -116,7 +116,7 @@ private: CullBinManager *_manager; }; - typedef pmap BinsByName; + typedef pmap BinsByName; BinsByName _bins_by_name; typedef vector_int SortedBins; @@ -131,8 +131,8 @@ private: friend class SortBins; }; -EXPCL_PANDA_PGRAPH ostream & -operator << (ostream &out, CullBinManager::BinType bin_type); +EXPCL_PANDA_PGRAPH std::ostream & +operator << (std::ostream &out, CullBinManager::BinType bin_type); #include "cullBinManager.I" diff --git a/panda/src/pgraph/cullFaceAttrib.h b/panda/src/pgraph/cullFaceAttrib.h index 1ed0450db2..def2216976 100644 --- a/panda/src/pgraph/cullFaceAttrib.h +++ b/panda/src/pgraph/cullFaceAttrib.h @@ -50,7 +50,7 @@ PUBLISHED: MAKE_PROPERTY(effective_mode, get_effective_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/cullPlanes.h b/panda/src/pgraph/cullPlanes.h index 4b29fb7794..9480854853 100644 --- a/panda/src/pgraph/cullPlanes.h +++ b/panda/src/pgraph/cullPlanes.h @@ -64,7 +64,7 @@ public: CPT(CullPlanes) remove_plane(const NodePath &clip_plane) const; CPT(CullPlanes) remove_occluder(const NodePath &occluder) const; - void write(ostream &out) const; + void write(std::ostream &out) const; private: typedef pmap Planes; diff --git a/panda/src/pgraph/cullTraverser.I b/panda/src/pgraph/cullTraverser.I index 137d8105b1..bb7bb35e36 100644 --- a/panda/src/pgraph/cullTraverser.I +++ b/panda/src/pgraph/cullTraverser.I @@ -49,7 +49,7 @@ has_tag_state_key() const { * Returns the tag state key that has been specified for the scene's camera, * if any. */ -INLINE const string &CullTraverser:: +INLINE const std::string &CullTraverser:: get_tag_state_key() const { return _tag_state_key; } diff --git a/panda/src/pgraph/cullTraverser.h b/panda/src/pgraph/cullTraverser.h index c137ecbbbf..b8ecbe084b 100644 --- a/panda/src/pgraph/cullTraverser.h +++ b/panda/src/pgraph/cullTraverser.h @@ -55,7 +55,7 @@ PUBLISHED: bool dr_incomplete_render); INLINE SceneSetup *get_scene() const; INLINE bool has_tag_state_key() const; - INLINE const string &get_tag_state_key() const; + INLINE const std::string &get_tag_state_key() const; INLINE void set_camera_mask(const DrawMask &camera_mask); INLINE const DrawMask &get_camera_mask() const; @@ -115,7 +115,7 @@ private: PT(SceneSetup) _scene_setup; DrawMask _camera_mask; bool _has_tag_state_key; - string _tag_state_key; + std::string _tag_state_key; CPT(RenderState) _initial_state; PT(GeometricBoundingVolume) _view_frustum; CullHandler *_cull_handler; diff --git a/panda/src/pgraph/cullableObject.I b/panda/src/pgraph/cullableObject.I index 96564a4088..51c0c8d80a 100644 --- a/panda/src/pgraph/cullableObject.I +++ b/panda/src/pgraph/cullableObject.I @@ -28,9 +28,9 @@ CullableObject() { INLINE CullableObject:: CullableObject(CPT(Geom) geom, CPT(RenderState) state, CPT(TransformState) internal_transform) : - _geom(move(geom)), - _state(move(state)), - _internal_transform(move(internal_transform)) + _geom(std::move(geom)), + _state(std::move(state)), + _internal_transform(std::move(internal_transform)) { #ifdef DO_MEMORY_USAGE MemoryUsage::record_pointer(this, get_class_type()); diff --git a/panda/src/pgraph/cullableObject.h b/panda/src/pgraph/cullableObject.h index b02d7c79be..efde2dba5e 100644 --- a/panda/src/pgraph/cullableObject.h +++ b/panda/src/pgraph/cullableObject.h @@ -65,7 +65,7 @@ public: public: ALLOC_DELETED_CHAIN(CullableObject); - void output(ostream &out) const; + void output(std::ostream &out) const; public: CPT(Geom) _geom; @@ -127,7 +127,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const CullableObject &object) { +INLINE std::ostream &operator << (std::ostream &out, const CullableObject &object) { object.output(out); return out; } diff --git a/panda/src/pgraph/depthOffsetAttrib.h b/panda/src/pgraph/depthOffsetAttrib.h index 9ae6a6ce6f..54fef347d5 100644 --- a/panda/src/pgraph/depthOffsetAttrib.h +++ b/panda/src/pgraph/depthOffsetAttrib.h @@ -66,7 +66,7 @@ PUBLISHED: MAKE_PROPERTY(max_value, get_max_value); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/depthTestAttrib.h b/panda/src/pgraph/depthTestAttrib.h index 2dfa4763e1..f4d6c52352 100644 --- a/panda/src/pgraph/depthTestAttrib.h +++ b/panda/src/pgraph/depthTestAttrib.h @@ -37,7 +37,7 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/depthWriteAttrib.h b/panda/src/pgraph/depthWriteAttrib.h index d1cdbdc98f..50e31e764d 100644 --- a/panda/src/pgraph/depthWriteAttrib.h +++ b/panda/src/pgraph/depthWriteAttrib.h @@ -43,7 +43,7 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/findApproxLevelEntry.h b/panda/src/pgraph/findApproxLevelEntry.h index 48c8663869..a5c3758bd9 100644 --- a/panda/src/pgraph/findApproxLevelEntry.h +++ b/panda/src/pgraph/findApproxLevelEntry.h @@ -47,8 +47,8 @@ public: int increment) const; INLINE bool is_solution(int increment) const; - void output(ostream &out) const; - void write_level(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write_level(std::ostream &out, int indent_level) const; // _node_path represents the most recent node that we have previously // accepted as being a partial solution. @@ -73,8 +73,8 @@ private: static TypeHandle _type_handle; }; -INLINE ostream & -operator << (ostream &out, const FindApproxLevelEntry &entry) { +INLINE std::ostream & +operator << (std::ostream &out, const FindApproxLevelEntry &entry) { entry.output(out); return out; } diff --git a/panda/src/pgraph/findApproxPath.I b/panda/src/pgraph/findApproxPath.I index 616766a3ea..d8b9ea20c4 100644 --- a/panda/src/pgraph/findApproxPath.I +++ b/panda/src/pgraph/findApproxPath.I @@ -93,7 +93,7 @@ case_insensitive() const { * Formats the nth component of the path to the indicated output stream. */ INLINE void FindApproxPath:: -output_component(ostream &out, int index) const { +output_component(std::ostream &out, int index) const { nassertv(index >= 0 && index < (int)_path.size()); out << _path[index]; } diff --git a/panda/src/pgraph/findApproxPath.h b/panda/src/pgraph/findApproxPath.h index 7b0d138d94..fe3ac5d765 100644 --- a/panda/src/pgraph/findApproxPath.h +++ b/panda/src/pgraph/findApproxPath.h @@ -32,16 +32,16 @@ class FindApproxPath { public: INLINE FindApproxPath(); - bool add_string(const string &str_path); - bool add_flags(const string &str_flags); - bool add_component(string str_component); + bool add_string(const std::string &str_path); + bool add_flags(const std::string &str_flags); + bool add_component(std::string str_component); - void add_match_name(const string &name, int flags); - void add_match_name_glob(const string &glob, int flags); + void add_match_name(const std::string &name, int flags); + void add_match_name_glob(const std::string &glob, int flags); void add_match_exact_type(TypeHandle type, int flags); void add_match_inexact_type(TypeHandle type, int flags); - void add_match_tag(const string &key, int flags); - void add_match_tag_value(const string &key, const string &value, int flags); + void add_match_tag(const std::string &key, int flags); + void add_match_tag_value(const std::string &key, const std::string &value, int flags); void add_match_one(int flags); void add_match_many(int flags); @@ -56,8 +56,8 @@ public: INLINE bool return_stashed() const; INLINE bool case_insensitive() const; - void output(ostream &out) const; - INLINE void output_component(ostream &out, int index) const; + void output(std::ostream &out) const; + INLINE void output_component(std::ostream &out, int index) const; #if !defined(WIN32_VC) && !defined(WIN64_VC) // Visual C++ won't let us define the ostream operator functions for these @@ -83,10 +83,10 @@ private: class Component { public: bool matches(PandaNode *node) const; - void output(ostream &out) const; + void output(std::ostream &out) const; ComponentType _type; - string _name; + std::string _name; GlobPattern _glob; TypeHandle _type_handle; PandaNode *_pointer; @@ -100,21 +100,21 @@ private: bool _return_stashed; bool _case_insensitive; -friend ostream &operator << (ostream &, FindApproxPath::ComponentType); -friend INLINE ostream &operator << (ostream &, const FindApproxPath::Component &); +friend std::ostream &operator << (std::ostream &, FindApproxPath::ComponentType); +friend INLINE std::ostream &operator << (std::ostream &, const FindApproxPath::Component &); }; -ostream & -operator << (ostream &out, FindApproxPath::ComponentType type); +std::ostream & +operator << (std::ostream &out, FindApproxPath::ComponentType type); -INLINE ostream & -operator << (ostream &out, const FindApproxPath::Component &component) { +INLINE std::ostream & +operator << (std::ostream &out, const FindApproxPath::Component &component) { component.output(out); return out; } -INLINE ostream & -operator << (ostream &out, const FindApproxPath &path) { +INLINE std::ostream & +operator << (std::ostream &out, const FindApproxPath &path) { path.output(out); return out; } diff --git a/panda/src/pgraph/fog.h b/panda/src/pgraph/fog.h index 3eb75603ba..5788df409f 100644 --- a/panda/src/pgraph/fog.h +++ b/panda/src/pgraph/fog.h @@ -40,7 +40,7 @@ class TransformState; */ class EXPCL_PANDA_PGRAPH Fog : public PandaNode { PUBLISHED: - explicit Fog(const string &name); + explicit Fog(const std::string &name); protected: Fog(const Fog ©); @@ -85,7 +85,7 @@ PUBLISHED: INLINE void set_exp_density(PN_stdfloat exp_density); MAKE_PROPERTY(exp_density, get_exp_density, set_exp_density); - void output(ostream &out) const; + void output(std::ostream &out) const; public: void adjust_to_camera(const TransformState *camera_transform); @@ -132,9 +132,9 @@ private: static TypeHandle _type_handle; }; -EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, Fog::Mode mode); +EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, Fog::Mode mode); -INLINE ostream &operator << (ostream &out, const Fog &fog) { +INLINE std::ostream &operator << (std::ostream &out, const Fog &fog) { fog.output(out); return out; } diff --git a/panda/src/pgraph/fogAttrib.h b/panda/src/pgraph/fogAttrib.h index 7f659b6336..8dac86fd6a 100644 --- a/panda/src/pgraph/fogAttrib.h +++ b/panda/src/pgraph/fogAttrib.h @@ -38,7 +38,7 @@ PUBLISHED: MAKE_PROPERTY(fog, get_fog); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/geomDrawCallbackData.h b/panda/src/pgraph/geomDrawCallbackData.h index 7e45f9eef2..87e9fbc401 100644 --- a/panda/src/pgraph/geomDrawCallbackData.h +++ b/panda/src/pgraph/geomDrawCallbackData.h @@ -31,7 +31,7 @@ public: GraphicsStateGuardianBase *gsg, bool force); PUBLISHED: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE CullableObject *get_object() const; INLINE GraphicsStateGuardianBase *get_gsg() const; diff --git a/panda/src/pgraph/geomNode.I b/panda/src/pgraph/geomNode.I index 91c197d1d3..5b86d95155 100644 --- a/panda/src/pgraph/geomNode.I +++ b/panda/src/pgraph/geomNode.I @@ -142,7 +142,7 @@ get_default_collide_mask() { */ INLINE void GeomNode:: count_name(GeomNode::NameCount &name_count, const InternalName *name) { - pair result = + std::pair result = name_count.insert(NameCount::value_type(name, 1)); if (!result.second) { (*result.first).second++; diff --git a/panda/src/pgraph/geomNode.h b/panda/src/pgraph/geomNode.h index 0b5bccd492..1402d07b5a 100644 --- a/panda/src/pgraph/geomNode.h +++ b/panda/src/pgraph/geomNode.h @@ -33,7 +33,7 @@ class GraphicsStateGuardianBase; */ class EXPCL_PANDA_PGRAPH GeomNode : public PandaNode { PUBLISHED: - explicit GeomNode(const string &name); + explicit GeomNode(const std::string &name); protected: GeomNode(const GeomNode ©); @@ -85,14 +85,14 @@ PUBLISHED: void decompose(); void unify(int max_indices, bool preserve_order); - void write_geoms(ostream &out, int indent_level) const; - void write_verbose(ostream &out, int indent_level) const; + void write_geoms(std::ostream &out, int indent_level) const; + void write_verbose(std::ostream &out, int indent_level) const; INLINE static CollideMask get_default_collide_mask(); MAKE_PROPERTY(default_collide_mask, get_default_collide_mask); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool is_geom_node() const; diff --git a/panda/src/pgraph/geomTransformer.h b/panda/src/pgraph/geomTransformer.h index e20732764f..120a4ca5f8 100644 --- a/panda/src/pgraph/geomTransformer.h +++ b/panda/src/pgraph/geomTransformer.h @@ -194,7 +194,7 @@ private: public: INLINE bool operator < (const NewCollectedKey &other) const; - string _name; + std::string _name; CPT(GeomVertexFormat) _format; Geom::UsageHint _usage_hint; Geom::AnimationType _animation_type; @@ -222,7 +222,7 @@ private: int apply_collect_changes(); CPT(GeomVertexFormat) _new_format; - string _vdata_name; + std::string _vdata_name; GeomEnums::UsageHint _usage_hint; SourceDatas _source_datas; SourceGeoms _source_geoms; diff --git a/panda/src/pgraph/internalNameCollection.h b/panda/src/pgraph/internalNameCollection.h index 0c024cfaed..c409e35022 100644 --- a/panda/src/pgraph/internalNameCollection.h +++ b/panda/src/pgraph/internalNameCollection.h @@ -44,15 +44,15 @@ PUBLISHED: INLINE void operator += (const InternalNameCollection &other); INLINE InternalNameCollection operator + (const InternalNameCollection &other) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef PTA(CPT(InternalName)) InternalNames; InternalNames _names; }; -INLINE ostream &operator << (ostream &out, const InternalNameCollection &col) { +INLINE std::ostream &operator << (std::ostream &out, const InternalNameCollection &col) { col.output(out); return out; } diff --git a/panda/src/pgraph/lensNode.h b/panda/src/pgraph/lensNode.h index 9e1dd9fb00..acc4c483be 100644 --- a/panda/src/pgraph/lensNode.h +++ b/panda/src/pgraph/lensNode.h @@ -28,13 +28,13 @@ */ class EXPCL_PANDA_PGRAPH LensNode : public PandaNode { PUBLISHED: - explicit LensNode(const string &name, Lens *lens = nullptr); + explicit LensNode(const std::string &name, Lens *lens = nullptr); protected: LensNode(const LensNode ©); public: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual void xform(const LMatrix4 &mat); virtual PandaNode *make_copy() const; diff --git a/panda/src/pgraph/light.h b/panda/src/pgraph/light.h index ee6e906356..8cea78067d 100644 --- a/panda/src/pgraph/light.h +++ b/panda/src/pgraph/light.h @@ -67,8 +67,8 @@ public: virtual void attrib_ref(); virtual void attrib_unref(); - virtual void output(ostream &out) const=0; - virtual void write(ostream &out, int indent_level) const=0; + virtual void output(std::ostream &out) const=0; + virtual void write(std::ostream &out, int indent_level) const=0; virtual void bind(GraphicsStateGuardianBase *gsg, const NodePath &light, int light_id)=0; @@ -151,7 +151,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const Light &light) { +INLINE std::ostream &operator << (std::ostream &out, const Light &light) { light.output(out); return out; } diff --git a/panda/src/pgraph/lightAttrib.h b/panda/src/pgraph/lightAttrib.h index 8d8b87bfb6..4872ebc623 100644 --- a/panda/src/pgraph/lightAttrib.h +++ b/panda/src/pgraph/lightAttrib.h @@ -95,8 +95,8 @@ PUBLISHED: MAKE_SEQ_PROPERTY(off_lights, get_num_off_lights, get_off_light); public: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/lightRampAttrib.h b/panda/src/pgraph/lightRampAttrib.h index 65a894e582..d6859676bf 100644 --- a/panda/src/pgraph/lightRampAttrib.h +++ b/panda/src/pgraph/lightRampAttrib.h @@ -56,7 +56,7 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/loader.I b/panda/src/pgraph/loader.I index eddac45376..8ca4fc8f50 100644 --- a/panda/src/pgraph/loader.I +++ b/panda/src/pgraph/loader.I @@ -109,14 +109,14 @@ get_task_manager() const { * is the initial name of the Loader object. */ INLINE void Loader:: -set_task_chain(const string &task_chain) { +set_task_chain(const std::string &task_chain) { _task_chain = task_chain; } /** * Returns the task chain that is used for asynchronous loads. */ -INLINE const string &Loader:: +INLINE const std::string &Loader:: get_task_chain() const { return _task_chain; } diff --git a/panda/src/pgraph/loader.h b/panda/src/pgraph/loader.h index 46de9ff8eb..9758151ec1 100644 --- a/panda/src/pgraph/loader.h +++ b/panda/src/pgraph/loader.h @@ -70,12 +70,12 @@ PUBLISHED: Files _files; }; - explicit Loader(const string &name = "loader"); + explicit Loader(const std::string &name = "loader"); INLINE void set_task_manager(AsyncTaskManager *task_manager); INLINE AsyncTaskManager *get_task_manager() const; - INLINE void set_task_chain(const string &task_chain); - INLINE const string &get_task_chain() const; + INLINE void set_task_chain(const std::string &task_chain); + INLINE const std::string &get_task_chain() const; BLOCKING INLINE void stop_threads(); INLINE bool remove(AsyncTask *task); @@ -94,9 +94,9 @@ PUBLISHED: PandaNode *node); INLINE void save_async(AsyncTask *request); - BLOCKING PT(PandaNode) load_bam_stream(istream &in); + BLOCKING PT(PandaNode) load_bam_stream(std::istream &in); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE static Loader *get_global_ptr(); @@ -113,7 +113,7 @@ private: static void make_global_ptr(); PT(AsyncTaskManager) _task_manager; - string _task_chain; + std::string _task_chain; static void load_file_types(); static bool _file_types_loaded; diff --git a/panda/src/pgraph/loaderFileType.h b/panda/src/pgraph/loaderFileType.h index af1c21e2e7..fe2dcbfd2c 100644 --- a/panda/src/pgraph/loaderFileType.h +++ b/panda/src/pgraph/loaderFileType.h @@ -38,9 +38,9 @@ public: virtual ~LoaderFileType(); PUBLISHED: - virtual string get_name() const=0; - virtual string get_extension() const=0; - virtual string get_additional_extensions() const; + virtual std::string get_name() const=0; + virtual std::string get_extension() const=0; + virtual std::string get_additional_extensions() const; virtual bool supports_compressed() const; virtual bool get_allow_disk_cache(const LoaderOptions &options) const; diff --git a/panda/src/pgraph/loaderFileTypeBam.h b/panda/src/pgraph/loaderFileTypeBam.h index 11c5687229..3a42508709 100644 --- a/panda/src/pgraph/loaderFileTypeBam.h +++ b/panda/src/pgraph/loaderFileTypeBam.h @@ -25,8 +25,8 @@ class EXPCL_PANDA_PGRAPH LoaderFileTypeBam : public LoaderFileType { public: LoaderFileTypeBam(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool supports_load() const; diff --git a/panda/src/pgraph/loaderFileTypeRegistry.h b/panda/src/pgraph/loaderFileTypeRegistry.h index 6fedc09406..1cc1cd8f6f 100644 --- a/panda/src/pgraph/loaderFileTypeRegistry.h +++ b/panda/src/pgraph/loaderFileTypeRegistry.h @@ -33,30 +33,30 @@ public: ~LoaderFileTypeRegistry(); void register_type(LoaderFileType *type); - void register_deferred_type(const string &extension, const string &library); + void register_deferred_type(const std::string &extension, const std::string &library); PUBLISHED: int get_num_types() const; LoaderFileType *get_type(int n) const; MAKE_SEQ(get_types, get_num_types, get_type); MAKE_SEQ_PROPERTY(types, get_num_types, get_type); - LoaderFileType *get_type_from_extension(const string &extension); + LoaderFileType *get_type_from_extension(const std::string &extension); - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; static LoaderFileTypeRegistry *get_global_ptr(); private: - void record_extension(const string &extension, LoaderFileType *type); + void record_extension(const std::string &extension, LoaderFileType *type); private: typedef pvector Types; Types _types; - typedef pmap Extensions; + typedef pmap Extensions; Extensions _extensions; - typedef pmap DeferredTypes; + typedef pmap DeferredTypes; DeferredTypes _deferred_types; static LoaderFileTypeRegistry *_global_ptr; diff --git a/panda/src/pgraph/logicOpAttrib.h b/panda/src/pgraph/logicOpAttrib.h index 99ab79d029..f5bd2ce5d9 100644 --- a/panda/src/pgraph/logicOpAttrib.h +++ b/panda/src/pgraph/logicOpAttrib.h @@ -59,7 +59,7 @@ PUBLISHED: MAKE_PROPERTY(operation, get_operation); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; @@ -105,7 +105,7 @@ private: static int _attrib_slot; }; -EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, LogicOpAttrib::Operation op); +EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, LogicOpAttrib::Operation op); #include "logicOpAttrib.I" diff --git a/panda/src/pgraph/materialAttrib.h b/panda/src/pgraph/materialAttrib.h index 88c4a4363d..0e65498d70 100644 --- a/panda/src/pgraph/materialAttrib.h +++ b/panda/src/pgraph/materialAttrib.h @@ -40,7 +40,7 @@ PUBLISHED: MAKE_PROPERTY(material, get_material); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/materialCollection.h b/panda/src/pgraph/materialCollection.h index 97bfcd71a1..1dc46aeca2 100644 --- a/panda/src/pgraph/materialCollection.h +++ b/panda/src/pgraph/materialCollection.h @@ -36,7 +36,7 @@ PUBLISHED: bool has_material(Material *material) const; void clear(); - Material *find_material(const string &name) const; + Material *find_material(const std::string &name) const; int get_num_materials() const; Material *get_material(int index) const; @@ -45,15 +45,15 @@ PUBLISHED: INLINE void operator += (const MaterialCollection &other); INLINE MaterialCollection operator + (const MaterialCollection &other) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef PTA(PT(Material)) Materials; Materials _materials; }; -INLINE ostream &operator << (ostream &out, const MaterialCollection &col) { +INLINE std::ostream &operator << (std::ostream &out, const MaterialCollection &col) { col.output(out); return out; } diff --git a/panda/src/pgraph/modelLoadRequest.h b/panda/src/pgraph/modelLoadRequest.h index e743623fa3..f99dc7c38d 100644 --- a/panda/src/pgraph/modelLoadRequest.h +++ b/panda/src/pgraph/modelLoadRequest.h @@ -34,7 +34,7 @@ public: ALLOC_DELETED_CHAIN(ModelLoadRequest); PUBLISHED: - explicit ModelLoadRequest(const string &name, + explicit ModelLoadRequest(const std::string &name, const Filename &filename, const LoaderOptions &options, Loader *loader); diff --git a/panda/src/pgraph/modelNode.I b/panda/src/pgraph/modelNode.I index da0f61b0d4..929bedd6fc 100644 --- a/panda/src/pgraph/modelNode.I +++ b/panda/src/pgraph/modelNode.I @@ -15,7 +15,7 @@ * */ INLINE ModelNode:: -ModelNode(const string &name) : +ModelNode(const std::string &name) : PandaNode(name) { _preserve_transform = PT_none; diff --git a/panda/src/pgraph/modelNode.h b/panda/src/pgraph/modelNode.h index 177f1cffb6..c57d98476c 100644 --- a/panda/src/pgraph/modelNode.h +++ b/panda/src/pgraph/modelNode.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_PGRAPH ModelNode : public PandaNode { PUBLISHED: - explicit INLINE ModelNode(const string &name); + explicit INLINE ModelNode(const std::string &name); protected: INLINE ModelNode(const ModelNode ©); diff --git a/panda/src/pgraph/modelPool.I b/panda/src/pgraph/modelPool.I index f52be7de00..717c3eedba 100644 --- a/panda/src/pgraph/modelPool.I +++ b/panda/src/pgraph/modelPool.I @@ -130,7 +130,7 @@ garbage_collect() { * Lists the contents of the model pool to the indicated output stream. */ INLINE void ModelPool:: -list_contents(ostream &out) { +list_contents(std::ostream &out) { get_ptr()->ns_list_contents(out); } @@ -139,7 +139,7 @@ list_contents(ostream &out) { */ INLINE void ModelPool:: list_contents() { - get_ptr()->ns_list_contents(cout); + get_ptr()->ns_list_contents(std::cout); } /** diff --git a/panda/src/pgraph/modelPool.h b/panda/src/pgraph/modelPool.h index 34eefba0b5..8e0476c682 100644 --- a/panda/src/pgraph/modelPool.h +++ b/panda/src/pgraph/modelPool.h @@ -57,9 +57,9 @@ PUBLISHED: INLINE static int garbage_collect(); - INLINE static void list_contents(ostream &out); + INLINE static void list_contents(std::ostream &out); INLINE static void list_contents(); - static void write(ostream &out); + static void write(std::ostream &out); private: INLINE ModelPool(); @@ -76,7 +76,7 @@ private: void ns_release_all_models(); int ns_garbage_collect(); - void ns_list_contents(ostream &out) const; + void ns_list_contents(std::ostream &out) const; static ModelPool *get_ptr(); diff --git a/panda/src/pgraph/modelRoot.I b/panda/src/pgraph/modelRoot.I index df1bedaf7b..4478702a28 100644 --- a/panda/src/pgraph/modelRoot.I +++ b/panda/src/pgraph/modelRoot.I @@ -15,7 +15,7 @@ * */ INLINE ModelRoot:: -ModelRoot(const string &name) : +ModelRoot(const std::string &name) : ModelNode(name), _fullpath(name), _timestamp(0), diff --git a/panda/src/pgraph/modelRoot.h b/panda/src/pgraph/modelRoot.h index 7895dcab85..c73363c108 100644 --- a/panda/src/pgraph/modelRoot.h +++ b/panda/src/pgraph/modelRoot.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDA_PGRAPH ModelRoot : public ModelNode { PUBLISHED: - INLINE explicit ModelRoot(const string &name); + INLINE explicit ModelRoot(const std::string &name); INLINE explicit ModelRoot(const Filename &fullpath, time_t timestamp); INLINE int get_model_ref_count() const; diff --git a/panda/src/pgraph/modelSaveRequest.h b/panda/src/pgraph/modelSaveRequest.h index 7bbe1e331d..f15225e159 100644 --- a/panda/src/pgraph/modelSaveRequest.h +++ b/panda/src/pgraph/modelSaveRequest.h @@ -33,7 +33,7 @@ public: ALLOC_DELETED_CHAIN(ModelSaveRequest); PUBLISHED: - explicit ModelSaveRequest(const string &name, + explicit ModelSaveRequest(const std::string &name, const Filename &filename, const LoaderOptions &options, PandaNode *node, Loader *loader); diff --git a/panda/src/pgraph/nodePath.I b/panda/src/pgraph/nodePath.I index 641ab1c2b7..5b7e80f7b7 100644 --- a/panda/src/pgraph/nodePath.I +++ b/panda/src/pgraph/nodePath.I @@ -26,7 +26,7 @@ NodePath() : * PandaNode is created with the indicated name. */ INLINE NodePath:: -NodePath(const string &top_node_name, Thread *current_thread) : +NodePath(const std::string &top_node_name, Thread *current_thread) : _error_type(ET_ok) { PandaNode *top_node = new PandaNode(top_node_name); @@ -95,7 +95,7 @@ operator = (const NodePath ©) { */ INLINE NodePath:: NodePath(NodePath &&from) noexcept : - _head(move(from._head)), + _head(std::move(from._head)), _backup_key(from._backup_key), _error_type(from._error_type) { @@ -106,7 +106,7 @@ NodePath(NodePath &&from) noexcept : */ INLINE void NodePath:: operator = (NodePath &&from) noexcept { - _head = move(from._head); + _head = std::move(from._head); _backup_key = from._backup_key; _error_type = from._error_type; } @@ -386,7 +386,7 @@ get_parent(Thread *current_thread) const { * returning a new NodePath that references it. */ INLINE NodePath NodePath:: -attach_new_node(const string &name, int sort, Thread *current_thread) const { +attach_new_node(const std::string &name, int sort, Thread *current_thread) const { nassertr(verify_complete(current_thread), NodePath::fail()); return attach_new_node(new PandaNode(name), sort, current_thread); @@ -404,7 +404,7 @@ ls() const { * Lists the hierarchy at and below the referenced node. */ INLINE void NodePath:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { if (is_empty()) { out << "(empty)\n"; } else { @@ -1078,7 +1078,7 @@ get_sa() const { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_float &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1086,7 +1086,7 @@ set_shader_input(CPT_InternalName id, const PTA_float &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_double &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1094,7 +1094,7 @@ set_shader_input(CPT_InternalName id, const PTA_double &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_int &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1102,7 +1102,7 @@ set_shader_input(CPT_InternalName id, const PTA_int &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LVecBase4 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1110,7 +1110,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase4 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LVecBase3 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } @@ -1119,7 +1119,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase3 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LVecBase2 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1127,7 +1127,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase2 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LVecBase4 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1135,7 +1135,7 @@ set_shader_input(CPT_InternalName id, const LVecBase4 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LVecBase3 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1143,7 +1143,7 @@ set_shader_input(CPT_InternalName id, const LVecBase3 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LVecBase2 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1151,7 +1151,7 @@ set_shader_input(CPT_InternalName id, const LVecBase2 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LVecBase4i &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1159,7 +1159,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase4i &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LVecBase3i &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } @@ -1168,7 +1168,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase3i &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LVecBase2i &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1176,7 +1176,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase2i &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LVecBase4i &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1184,7 +1184,7 @@ set_shader_input(CPT_InternalName id, const LVecBase4i &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LVecBase3i &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1192,7 +1192,7 @@ set_shader_input(CPT_InternalName id, const LVecBase3i &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LVecBase2i &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1200,7 +1200,7 @@ set_shader_input(CPT_InternalName id, const LVecBase2i &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LMatrix4 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1208,7 +1208,7 @@ set_shader_input(CPT_InternalName id, const PTA_LMatrix4 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const PTA_LMatrix3 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1216,7 +1216,7 @@ set_shader_input(CPT_InternalName id, const PTA_LMatrix3 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LMatrix4 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1224,7 +1224,7 @@ set_shader_input(CPT_InternalName id, const LMatrix4 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const LMatrix3 &v, int priority) { - set_shader_input(ShaderInput(move(id), v, priority)); + set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -1232,7 +1232,7 @@ set_shader_input(CPT_InternalName id, const LMatrix3 &v, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, Texture *tex, int priority) { - set_shader_input(ShaderInput(move(id), tex, priority)); + set_shader_input(ShaderInput(std::move(id), tex, priority)); } /** @@ -1240,7 +1240,7 @@ set_shader_input(CPT_InternalName id, Texture *tex, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, Texture *tex, const SamplerState &sampler, int priority) { - set_shader_input(ShaderInput(move(id), tex, sampler, priority)); + set_shader_input(ShaderInput(std::move(id), tex, sampler, priority)); } /** @@ -1248,7 +1248,7 @@ set_shader_input(CPT_InternalName id, Texture *tex, const SamplerState &sampler, */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, Texture *tex, bool read, bool write, int z, int n, int priority) { - set_shader_input(ShaderInput(move(id), tex, read, write, z, n, priority)); + set_shader_input(ShaderInput(std::move(id), tex, read, write, z, n, priority)); } /** @@ -1256,7 +1256,7 @@ set_shader_input(CPT_InternalName id, Texture *tex, bool read, bool write, int z */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, ShaderBuffer *buf, int priority) { - set_shader_input(ShaderInput(move(id), buf, priority)); + set_shader_input(ShaderInput(std::move(id), buf, priority)); } /** @@ -1264,7 +1264,7 @@ set_shader_input(CPT_InternalName id, ShaderBuffer *buf, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, const NodePath &np, int priority) { - set_shader_input(ShaderInput(move(id), np, priority)); + set_shader_input(ShaderInput(std::move(id), np, priority)); } /** @@ -1272,7 +1272,7 @@ set_shader_input(CPT_InternalName id, const NodePath &np, int priority) { */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, int n1, int n2, int n3, int n4, int priority) { - set_shader_input(ShaderInput(move(id), LVecBase4i(n1, n2, n3, n4), priority)); + set_shader_input(ShaderInput(std::move(id), LVecBase4i(n1, n2, n3, n4), priority)); } /** @@ -1280,7 +1280,7 @@ set_shader_input(CPT_InternalName id, int n1, int n2, int n3, int n4, int priori */ INLINE void NodePath:: set_shader_input(CPT_InternalName id, PN_stdfloat n1, PN_stdfloat n2, PN_stdfloat n3, PN_stdfloat n4, int priority) { - set_shader_input(ShaderInput(move(id), LVecBase4(n1, n2, n3, n4), priority)); + set_shader_input(ShaderInput(std::move(id), LVecBase4(n1, n2, n3, n4), priority)); } /** @@ -1733,7 +1733,7 @@ clear_project_texture(TextureStage *stage) { * string for the default texture coordinate set. */ INLINE bool NodePath:: -has_texcoord(const string &texcoord_name) const { +has_texcoord(const std::string &texcoord_name) const { return has_vertex_column(InternalName::get_texcoord_name(texcoord_name)); } @@ -1986,7 +1986,7 @@ clear_model_nodes() { * of any one key's value. */ INLINE void NodePath:: -set_tag(const string &key, const string &value) { +set_tag(const std::string &key, const std::string &value) { nassertv_always(!is_empty()); node()->set_tag(key, value); } @@ -1996,12 +1996,12 @@ set_tag(const string &key, const string &value) { * the particular key, if any. If no value has been previously set, returns * the empty string. See also get_net_tag(). */ -INLINE string NodePath:: -get_tag(const string &key) const { +INLINE std::string NodePath:: +get_tag(const std::string &key) const { // An empty NodePath quietly returns no tags. This makes get_net_tag() // easier to implement. if (is_empty()) { - return string(); + return std::string(); } return node()->get_tag(key); } @@ -2024,7 +2024,7 @@ get_tag_keys(vector_string &keys) const { * set. See also has_net_tag(). */ INLINE bool NodePath:: -has_tag(const string &key) const { +has_tag(const std::string &key) const { // An empty NodePath quietly has no tags. This makes has_net_tag() easier // to implement. if (is_empty()) { @@ -2038,7 +2038,7 @@ has_tag(const string &key) const { * call to clear_tag(), has_tag() will return false for the indicated key. */ INLINE void NodePath:: -clear_tag(const string &key) { +clear_tag(const std::string &key) { nassertv_always(!is_empty()); node()->clear_tag(key); } @@ -2049,8 +2049,8 @@ clear_tag(const string &key) { * indicated key on any ancestor node, returns the empty string. See also * get_tag(). */ -INLINE string NodePath:: -get_net_tag(const string &key) const { +INLINE std::string NodePath:: +get_net_tag(const std::string &key) const { return find_net_tag(key).get_tag(key); } @@ -2059,7 +2059,7 @@ get_net_tag(const string &key) const { * any ancestor node, or false otherwise. See also has_tag(). */ INLINE bool NodePath:: -has_net_tag(const string &key) const { +has_net_tag(const std::string &key) const { return !find_net_tag(key).is_empty(); } @@ -2079,7 +2079,7 @@ list_tags() const { * Changes the name of the referenced node. */ INLINE void NodePath:: -set_name(const string &name) { +set_name(const std::string &name) { nassertv_always(!is_empty()); node()->set_name(name); } @@ -2087,9 +2087,9 @@ set_name(const string &name) { /** * Returns the name of the referenced node. */ -INLINE string NodePath:: +INLINE std::string NodePath:: get_name() const { - nassertr_always(!is_empty(), string()); + nassertr_always(!is_empty(), std::string()); return node()->get_name(); } @@ -2111,7 +2111,7 @@ encode_to_bam_stream() const { } -INLINE ostream &operator << (ostream &out, const NodePath &node_path) { +INLINE std::ostream &operator << (std::ostream &out, const NodePath &node_path) { node_path.output(out); return out; } diff --git a/panda/src/pgraph/nodePath.h b/panda/src/pgraph/nodePath.h index f932b48efc..cf159972c5 100644 --- a/panda/src/pgraph/nodePath.h +++ b/panda/src/pgraph/nodePath.h @@ -170,7 +170,7 @@ PUBLISHED: }; INLINE NodePath(); - INLINE explicit NodePath(const string &top_node_name, Thread *current_thread = Thread::get_current_thread()); + INLINE explicit NodePath(const std::string &top_node_name, Thread *current_thread = Thread::get_current_thread()); INLINE explicit NodePath(PandaNode *node, Thread *current_thread = Thread::get_current_thread()); INLINE static NodePath any_path(PandaNode *node, Thread *current_thread = Thread::get_current_thread()); explicit NodePath(const NodePath &parent, PandaNode *child_node, @@ -244,9 +244,9 @@ PUBLISHED: MAKE_PROPERTY2(parent, has_parent, get_parent); MAKE_PROPERTY(sort, get_sort); - NodePath find(const string &path) const; + NodePath find(const std::string &path) const; NodePath find_path_to(PandaNode *node) const; - NodePathCollection find_all_matches(const string &path) const; + NodePathCollection find_all_matches(const std::string &path) const; NodePathCollection find_all_paths_to(PandaNode *node) const; // Methods that actually move nodes around in the scene graph. The optional @@ -262,26 +262,26 @@ PUBLISHED: Thread *current_thread = Thread::get_current_thread()); NodePath instance_to(const NodePath &other, int sort = 0, Thread *current_thread = Thread::get_current_thread()) const; - NodePath instance_under_node(const NodePath &other, const string &name, + NodePath instance_under_node(const NodePath &other, const std::string &name, int sort = 0, Thread *current_thread = Thread::get_current_thread()) const; NodePath copy_to(const NodePath &other, int sort = 0, Thread *current_thread = Thread::get_current_thread()) const; NodePath attach_new_node(PandaNode *node, int sort = 0, Thread *current_thread = Thread::get_current_thread()) const; - INLINE NodePath attach_new_node(const string &name, int sort = 0, + INLINE NodePath attach_new_node(const std::string &name, int sort = 0, Thread *current_thread = Thread::get_current_thread()) const; void remove_node(Thread *current_thread = Thread::get_current_thread()); void detach_node(Thread *current_thread = Thread::get_current_thread()); // Handy ways to look at what's there, and other miscellaneous operations. - void output(ostream &out) const; + void output(std::ostream &out) const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level = 0) const; + INLINE void ls(std::ostream &out, int indent_level = 0) const; INLINE void reverse_ls() const; - int reverse_ls(ostream &out, int indent_level = 0) const; + int reverse_ls(std::ostream &out, int indent_level = 0) const; // Aggregate transform and state information. const RenderState *get_state(Thread *current_thread = Thread::get_current_thread()) const; @@ -600,10 +600,10 @@ PUBLISHED: void clear_occluder(const NodePath &occluder); bool has_occluder(const NodePath &occluder) const; - void set_bin(const string &bin_name, int draw_order, int priority = 0); + void set_bin(const std::string &bin_name, int draw_order, int priority = 0); void clear_bin(); bool has_bin() const; - string get_bin_name() const; + std::string get_bin_name() const; int get_bin_draw_order() const; void set_texture(Texture *tex, int priority = 0); @@ -743,28 +743,28 @@ PUBLISHED: void project_texture(TextureStage *stage, Texture *tex, const NodePath &projector); INLINE void clear_project_texture(TextureStage *stage); - INLINE bool has_texcoord(const string &texcoord_name) const; + INLINE bool has_texcoord(const std::string &texcoord_name) const; bool has_vertex_column(const InternalName *name) const; InternalNameCollection find_all_vertex_columns() const; - InternalNameCollection find_all_vertex_columns(const string &name) const; + InternalNameCollection find_all_vertex_columns(const std::string &name) const; InternalNameCollection find_all_texcoords() const; - InternalNameCollection find_all_texcoords(const string &name) const; + InternalNameCollection find_all_texcoords(const std::string &name) const; - Texture *find_texture(const string &name) const; + Texture *find_texture(const std::string &name) const; Texture *find_texture(TextureStage *stage) const; TextureCollection find_all_textures() const; - TextureCollection find_all_textures(const string &name) const; + TextureCollection find_all_textures(const std::string &name) const; TextureCollection find_all_textures(TextureStage *stage) const; - TextureStage *find_texture_stage(const string &name) const; + TextureStage *find_texture_stage(const std::string &name) const; TextureStageCollection find_all_texture_stages() const; - TextureStageCollection find_all_texture_stages(const string &name) const; + TextureStageCollection find_all_texture_stages(const std::string &name) const; void unify_texture_stages(TextureStage *stage); - Material *find_material(const string &name) const; + Material *find_material(const std::string &name) const; MaterialCollection find_all_materials() const; - MaterialCollection find_all_materials(const string &name) const; + MaterialCollection find_all_materials(const std::string &name) const; void set_material(Material *tex, int priority = 0); void set_material_off(int priority = 0); @@ -895,7 +895,7 @@ PUBLISHED: void hide_bounds(); PT(BoundingVolume) get_bounds(Thread *current_thread = Thread::get_current_thread()) const; void force_recompute_bounds(); - void write_bounds(ostream &out) const; + void write_bounds(std::ostream &out) const; bool calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point, const NodePath &other = NodePath(), Thread *current_thread = Thread::get_current_thread()) const; @@ -910,14 +910,14 @@ PUBLISHED: void apply_texture_colors(); INLINE int clear_model_nodes(); - INLINE void set_tag(const string &key, const string &value); - INLINE string get_tag(const string &key) const; + INLINE void set_tag(const std::string &key, const std::string &value); + INLINE std::string get_tag(const std::string &key) const; INLINE void get_tag_keys(vector_string &keys) const; - INLINE bool has_tag(const string &key) const; - INLINE void clear_tag(const string &key); - INLINE string get_net_tag(const string &key) const; - INLINE bool has_net_tag(const string &key) const; - NodePath find_net_tag(const string &key) const; + INLINE bool has_tag(const std::string &key) const; + INLINE void clear_tag(const std::string &key); + INLINE std::string get_net_tag(const std::string &key) const; + INLINE bool has_net_tag(const std::string &key) const; + NodePath find_net_tag(const std::string &key) const; MAKE_MAP_PROPERTY(net_tags, has_net_tag, get_net_tag); @@ -940,12 +940,12 @@ PUBLISHED: INLINE void list_tags() const; - INLINE void set_name(const string &name); - INLINE string get_name() const; + INLINE void set_name(const std::string &name); + INLINE std::string get_name() const; MAKE_PROPERTY(name, get_name, set_name); BLOCKING bool write_bam_file(const Filename &filename) const; - BLOCKING bool write_bam_stream(ostream &out) const; + BLOCKING bool write_bam_stream(std::ostream &out) const; INLINE vector_uchar encode_to_bam_stream() const; bool encode_to_bam_stream(vector_uchar &data, BamWriter *writer = nullptr) const; @@ -971,7 +971,7 @@ private: int n, Thread *current_thread) const; void find_matches(NodePathCollection &result, - const string &approx_path_str, + const std::string &approx_path_str, int max_matches) const; void find_matches(NodePathCollection &result, FindApproxPath &approx_path, @@ -1047,7 +1047,7 @@ private: friend class CullTraverserData; }; -INLINE ostream &operator << (ostream &out, const NodePath &node_path); +INLINE std::ostream &operator << (std::ostream &out, const NodePath &node_path); #include "nodePath.I" diff --git a/panda/src/pgraph/nodePathCollection.h b/panda/src/pgraph/nodePathCollection.h index 7535a28718..64a16d63c3 100644 --- a/panda/src/pgraph/nodePathCollection.h +++ b/panda/src/pgraph/nodePathCollection.h @@ -56,9 +56,9 @@ PUBLISHED: // Handy operations on many NodePaths at once. INLINE void ls() const; - void ls(ostream &out, int indent_level = 0) const; + void ls(std::ostream &out, int indent_level = 0) const; - NodePathCollection find_all_matches(const string &path) const; + NodePathCollection find_all_matches(const std::string &path) const; void reparent_to(const NodePath &other); void wrt_reparent_to(const NodePath &other); @@ -95,8 +95,8 @@ PUBLISHED: void set_attrib(const RenderAttrib *attrib, int priority = 0); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef PTA(NodePath) NodePaths; @@ -106,7 +106,7 @@ private: typedef pmap StateMap; }; -INLINE ostream &operator << (ostream &out, const NodePathCollection &col) { +INLINE std::ostream &operator << (std::ostream &out, const NodePathCollection &col) { col.output(out); return out; } diff --git a/panda/src/pgraph/nodePathComponent.I b/panda/src/pgraph/nodePathComponent.I index 00b8d6d19d..0a14e1ddd0 100644 --- a/panda/src/pgraph/nodePathComponent.I +++ b/panda/src/pgraph/nodePathComponent.I @@ -67,7 +67,7 @@ get_next(int pipeline_stage, Thread *current_thread) const { return cdata->_next; } -INLINE ostream &operator << (ostream &out, const NodePathComponent &comp) { +INLINE std::ostream &operator << (std::ostream &out, const NodePathComponent &comp) { comp.output(out); return out; } diff --git a/panda/src/pgraph/nodePathComponent.h b/panda/src/pgraph/nodePathComponent.h index b6957ffd9a..37b30c9562 100644 --- a/panda/src/pgraph/nodePathComponent.h +++ b/panda/src/pgraph/nodePathComponent.h @@ -62,7 +62,7 @@ public: bool fix_length(int pipeline_stage, Thread *current_thread); - void output(ostream &out) const; + void output(std::ostream &out) const; private: void set_next(NodePathComponent *next, int pipeline_stage, Thread *current_thread); @@ -131,7 +131,7 @@ private: template<> INLINE void PointerToBase::update_type(To *ptr) {} -INLINE ostream &operator << (ostream &out, const NodePathComponent &comp); +INLINE std::ostream &operator << (std::ostream &out, const NodePathComponent &comp); #include "nodePathComponent.I" diff --git a/panda/src/pgraph/occluderEffect.h b/panda/src/pgraph/occluderEffect.h index af2230832f..befdcee8e0 100644 --- a/panda/src/pgraph/occluderEffect.h +++ b/panda/src/pgraph/occluderEffect.h @@ -48,7 +48,7 @@ PUBLISHED: CPT(RenderEffect) remove_on_occluder(const NodePath &occluder) const; public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderEffect *other) const; diff --git a/panda/src/pgraph/occluderNode.h b/panda/src/pgraph/occluderNode.h index 0bc4381f4d..ebc5db9bc3 100644 --- a/panda/src/pgraph/occluderNode.h +++ b/panda/src/pgraph/occluderNode.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_PGRAPH OccluderNode : public PandaNode { PUBLISHED: - explicit OccluderNode(const string &name); + explicit OccluderNode(const std::string &name); protected: OccluderNode(const OccluderNode ©); @@ -44,7 +44,7 @@ public: virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data); virtual bool is_renderable() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE void set_double_sided(bool value); diff --git a/panda/src/pgraph/pandaNode.I b/panda/src/pgraph/pandaNode.I index fcd02ae429..8cbea5c871 100644 --- a/panda/src/pgraph/pandaNode.I +++ b/panda/src/pgraph/pandaNode.I @@ -345,14 +345,14 @@ has_dirty_prev_transform() const { * the particular key, if any. If no value has been previously set, returns * the empty string. */ -INLINE string PandaNode:: -get_tag(const string &key, Thread *current_thread) const { +INLINE std::string PandaNode:: +get_tag(const std::string &key, Thread *current_thread) const { CDReader cdata(_cycler, current_thread); int index = cdata->_tag_data.find(key); if (index >= 0) { return cdata->_tag_data.get_data((size_t)index); } else { - return string(); + return std::string(); } } @@ -362,7 +362,7 @@ get_tag(const string &key, Thread *current_thread) const { * set. */ INLINE bool PandaNode:: -has_tag(const string &key, Thread *current_thread) const { +has_tag(const std::string &key, Thread *current_thread) const { CDReader cdata(_cycler, current_thread); return cdata->_tag_data.find(key) >= 0; } @@ -379,7 +379,7 @@ get_num_tags() const { /** * Returns the key of the nth tag applied to this node. */ -INLINE string PandaNode:: +INLINE std::string PandaNode:: get_tag_key(size_t i) const { CDReader cdata(_cycler); return cdata->_tag_data.get_key(i); @@ -410,7 +410,7 @@ has_tags() const { * Lists all the nodes at and below the current path hierarchically. */ INLINE void PandaNode:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { r_list_descendants(out, indent_level); } @@ -934,7 +934,7 @@ operator = (const PandaNode::Children ©) { */ INLINE PandaNode::Children:: Children(PandaNode::Children &&from) noexcept : - _down(move(from._down)) + _down(std::move(from._down)) { } @@ -943,7 +943,7 @@ Children(PandaNode::Children &&from) noexcept : */ INLINE void PandaNode::Children:: operator = (PandaNode::Children &&from) noexcept { - _down = move(from._down); + _down = std::move(from._down); } /** @@ -1456,13 +1456,13 @@ get_prev_transform() const { * the particular key, if any. If no value has been previously set, returns * the empty string. */ -INLINE string PandaNodePipelineReader:: -get_tag(const string &key) const { +INLINE std::string PandaNodePipelineReader:: +get_tag(const std::string &key) const { int index = _cdata->_tag_data.find(key); if (index >= 0) { return _cdata->_tag_data.get_data((size_t)index); } else { - return string(); + return std::string(); } } @@ -1472,7 +1472,7 @@ get_tag(const string &key) const { * set. */ INLINE bool PandaNodePipelineReader:: -has_tag(const string &key) const { +has_tag(const std::string &key) const { return _cdata->_tag_data.find(key) >= 0; } diff --git a/panda/src/pgraph/pandaNode.h b/panda/src/pgraph/pandaNode.h index f5cc0fee78..4011680178 100644 --- a/panda/src/pgraph/pandaNode.h +++ b/panda/src/pgraph/pandaNode.h @@ -64,7 +64,7 @@ class GraphicsStateGuardianBase; class EXPCL_PANDA_PGRAPH PandaNode : public TypedWritableReferenceCount, public Namable, public LinkedListNode { PUBLISHED: - explicit PandaNode(const string &name); + explicit PandaNode(const std::string &name); virtual ~PandaNode(); // published so that characters can be combined. virtual PandaNode *combine_with(PandaNode *other); @@ -189,19 +189,19 @@ PUBLISHED: static void reset_all_prev_transform(Thread *current_thread = Thread::get_current_thread()); MAKE_PROPERTY(prev_transform, get_prev_transform); - void set_tag(const string &key, const string &value, + void set_tag(const std::string &key, const std::string &value, Thread *current_thread = Thread::get_current_thread()); - INLINE string get_tag(const string &key, + INLINE std::string get_tag(const std::string &key, Thread *current_thread = Thread::get_current_thread()) const; - INLINE bool has_tag(const string &key, + INLINE bool has_tag(const std::string &key, Thread *current_thread = Thread::get_current_thread()) const; - void clear_tag(const string &key, + void clear_tag(const std::string &key, Thread *current_thread = Thread::get_current_thread()); public: void get_tag_keys(vector_string &keys) const; INLINE size_t get_num_tags() const; - INLINE string get_tag_key(size_t i) const; + INLINE std::string get_tag_key(size_t i) const; PUBLISHED: MAKE_MAP_PROPERTY(tags, has_tag, get_tag, set_tag, clear_tag); @@ -221,7 +221,7 @@ PUBLISHED: INLINE bool has_tags() const; void copy_tags(PandaNode *other); - void list_tags(ostream &out, const string &separator = "\n") const; + void list_tags(std::ostream &out, const std::string &separator = "\n") const; int compare_tags(const PandaNode *other) const; @@ -272,10 +272,10 @@ PUBLISHED: bool is_scene_root() const; bool is_under_scene_root() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; - INLINE void ls(ostream &out, int indent_level) const; + INLINE void ls(std::ostream &out, int indent_level) const; // A node has three bounding volumes: an "external" bounding volume that // represents the node and all of its children, an "internal" bounding @@ -437,7 +437,7 @@ private: static void new_connection(PandaNode *parent_node, PandaNode *child_node, int pipeline_stage, Thread *current_thread); void fix_path_lengths(int pipeline_stage, Thread *current_thread); - void r_list_descendants(ostream &out, int indent_level) const; + void r_list_descendants(std::ostream &out, int indent_level) const; INLINE void do_set_dirty_prev_transform(); INLINE void do_clear_dirty_prev_transform(); @@ -520,7 +520,7 @@ private: // This is used to maintain a table of keyed data on each node, for the // user's purposes. - typedef SimpleHashMap TagData; + typedef SimpleHashMap TagData; // This is actually implemented in pandaNode_ext.h, but defined here so // that we can destruct it from the C++ side. Note that it isn't cycled, @@ -647,13 +647,13 @@ private: BamWriter *manager, Datagram &dg) const; void update_up_list(const Up &up_list, BamWriter *manager) const; void update_down_list(const Down &down_list, BamWriter *manager) const; - int complete_up_list(Up &up_list, const string &tag, + int complete_up_list(Up &up_list, const std::string &tag, TypedWritable **p_list, BamReader *manager); - int complete_down_list(Down &down_list, const string &tag, + int complete_down_list(Down &down_list, const std::string &tag, TypedWritable **p_list, BamReader *manager); - void fillin_up_list(Up &up_list, const string &tag, + void fillin_up_list(Up &up_list, const std::string &tag, DatagramIterator &scan, BamReader *manager); - void fillin_down_list(Down &down_list, const string &tag, + void fillin_down_list(Down &down_list, const std::string &tag, DatagramIterator &scan, BamReader *manager); INLINE CPT(Down) get_down() const; @@ -879,8 +879,8 @@ public: INLINE const TransformState *get_transform() const; INLINE const TransformState *get_prev_transform() const; - INLINE string get_tag(const string &key) const; - INLINE bool has_tag(const string &key) const; + INLINE std::string get_tag(const std::string &key) const; + INLINE bool has_tag(const std::string &key) const; INLINE CollideMask get_net_collide_mask() const; INLINE const RenderAttrib *get_off_clip_planes() const; @@ -916,7 +916,7 @@ private: template<> INLINE void PointerToBase::update_type(To *ptr) {} -INLINE ostream &operator << (ostream &out, const PandaNode &node) { +INLINE std::ostream &operator << (std::ostream &out, const PandaNode &node) { node.output(out); return out; } diff --git a/panda/src/pgraph/paramNodePath.h b/panda/src/pgraph/paramNodePath.h index dae621443f..bd0967d5f8 100644 --- a/panda/src/pgraph/paramNodePath.h +++ b/panda/src/pgraph/paramNodePath.h @@ -32,7 +32,7 @@ PUBLISHED: INLINE virtual TypeHandle get_value_type() const; INLINE const NodePath &get_value() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: NodePath _node_path; diff --git a/panda/src/pgraph/planeNode.h b/panda/src/pgraph/planeNode.h index 463fc39b22..2b58225abd 100644 --- a/panda/src/pgraph/planeNode.h +++ b/panda/src/pgraph/planeNode.h @@ -35,12 +35,12 @@ */ class EXPCL_PANDA_PGRAPH PlaneNode : public PandaNode { PUBLISHED: - explicit PlaneNode(const string &name, const LPlane &plane = LPlane()); + explicit PlaneNode(const std::string &name, const LPlane &plane = LPlane()); protected: PlaneNode(const PlaneNode ©); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual PandaNode *make_copy() const; virtual void xform(const LMatrix4 &mat); diff --git a/panda/src/pgraph/polylightEffect.h b/panda/src/pgraph/polylightEffect.h index 418ac2f5db..7416938acd 100644 --- a/panda/src/pgraph/polylightEffect.h +++ b/panda/src/pgraph/polylightEffect.h @@ -70,7 +70,7 @@ public: // CPT(RenderAttrib) do_poly_light(const NodePath &root, const // CullTraverserData *data, const TransformState *node_transform) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: ContribType _contribution_type; @@ -101,6 +101,6 @@ private: #include "polylightEffect.I" -ostream &operator << (ostream &out, PolylightEffect::ContribType ct); +std::ostream &operator << (std::ostream &out, PolylightEffect::ContribType ct); #endif diff --git a/panda/src/pgraph/polylightNode.h b/panda/src/pgraph/polylightNode.h index cb01427e58..e5caf30735 100644 --- a/panda/src/pgraph/polylightNode.h +++ b/panda/src/pgraph/polylightNode.h @@ -52,7 +52,7 @@ PUBLISHED: AQUADRATIC, }; - explicit PolylightNode(const string &name); + explicit PolylightNode(const std::string &name); INLINE void enable(); INLINE void disable(); INLINE void set_pos(const LPoint3 &position); @@ -120,7 +120,7 @@ private: public: static void register_with_read_factory(); virtual void write_datagram(BamWriter *manager, Datagram &dg); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: static TypedWritable *make_from_bam(const FactoryParams ¶ms); diff --git a/panda/src/pgraph/portalClipper.I b/panda/src/pgraph/portalClipper.I index 221119feb5..6dd31056e2 100644 --- a/panda/src/pgraph/portalClipper.I +++ b/panda/src/pgraph/portalClipper.I @@ -161,7 +161,7 @@ is_whole_portal_in_view(const LMatrix4 &cmat) { int result = _reduced_frustum->contains(gbv); - portal_cat.spam() << "1st level test if portal: " << *_reduced_frustum << " is in view " << result << endl; + portal_cat.spam() << "1st level test if portal: " << *_reduced_frustum << " is in view " << result << std::endl; return (result != 0); } diff --git a/panda/src/pgraph/portalNode.h b/panda/src/pgraph/portalNode.h index fefe5b6bdb..de78847dab 100644 --- a/panda/src/pgraph/portalNode.h +++ b/panda/src/pgraph/portalNode.h @@ -29,8 +29,8 @@ */ class EXPCL_PANDA_PGRAPH PortalNode : public PandaNode { PUBLISHED: - explicit PortalNode(const string &name); - explicit PortalNode(const string &name, LPoint3 pos, PN_stdfloat scale=10.0); + explicit PortalNode(const std::string &name); + explicit PortalNode(const std::string &name, LPoint3 pos, PN_stdfloat scale=10.0); protected: PortalNode(const PortalNode ©); @@ -47,7 +47,7 @@ public: virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data); virtual bool is_renderable() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE void set_portal_mask(PortalMask mask); diff --git a/panda/src/pgraph/renderAttrib.h b/panda/src/pgraph/renderAttrib.h index 514a90b7d4..98b9de315c 100644 --- a/panda/src/pgraph/renderAttrib.h +++ b/panda/src/pgraph/renderAttrib.h @@ -74,11 +74,11 @@ PUBLISHED: virtual bool unref() const final; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; static int get_num_attribs(); - static void list_attribs(ostream &out); + static void list_attribs(std::ostream &out); static int garbage_collect(); static bool validate_attribs(); @@ -170,7 +170,7 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - void output_comparefunc(ostream &out, PandaCompareFunc fn) const; + void output_comparefunc(std::ostream &out, PandaCompareFunc fn) const; public: INLINE static int register_slot(TypeHandle type_handle, int sort, @@ -226,7 +226,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const RenderAttrib &attrib) { +INLINE std::ostream &operator << (std::ostream &out, const RenderAttrib &attrib) { attrib.output(out); return out; } diff --git a/panda/src/pgraph/renderEffect.h b/panda/src/pgraph/renderEffect.h index 65a9942fa7..f3d3f8bd93 100644 --- a/panda/src/pgraph/renderEffect.h +++ b/panda/src/pgraph/renderEffect.h @@ -73,11 +73,11 @@ public: PUBLISHED: INLINE int compare_to(const RenderEffect &other) const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; static int get_num_effects(); - static void list_effects(ostream &out); + static void list_effects(std::ostream &out); static bool validate_effects(); protected: @@ -118,7 +118,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const RenderEffect &effect) { +INLINE std::ostream &operator << (std::ostream &out, const RenderEffect &effect) { effect.output(out); return out; } diff --git a/panda/src/pgraph/renderEffects.h b/panda/src/pgraph/renderEffects.h index 7a8f18aed3..404a402975 100644 --- a/panda/src/pgraph/renderEffects.h +++ b/panda/src/pgraph/renderEffects.h @@ -85,11 +85,11 @@ PUBLISHED: virtual bool unref() const; - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; static int get_num_states(); - static void list_states(ostream &out); + static void list_states(std::ostream &out); static bool validate_states(); public: @@ -197,7 +197,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const RenderEffects &state) { +INLINE std::ostream &operator << (std::ostream &out, const RenderEffects &state) { state.output(out); return out; } diff --git a/panda/src/pgraph/renderModeAttrib.h b/panda/src/pgraph/renderModeAttrib.h index 21a32ee5de..9684ee5176 100644 --- a/panda/src/pgraph/renderModeAttrib.h +++ b/panda/src/pgraph/renderModeAttrib.h @@ -72,7 +72,7 @@ PUBLISHED: MAKE_PROPERTY(wireframe_color, get_wireframe_color); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/renderState.h b/panda/src/pgraph/renderState.h index 053f8cc365..ab59a6648d 100644 --- a/panda/src/pgraph/renderState.h +++ b/panda/src/pgraph/renderState.h @@ -131,8 +131,8 @@ PUBLISHED: EXTENSION(PyObject *get_composition_cache() const); EXTENSION(PyObject *get_invert_composition_cache() const); - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; static int get_max_priority(); @@ -141,8 +141,8 @@ PUBLISHED: static int clear_cache(); static void clear_munger_cache(); static int garbage_collect(); - static void list_cycles(ostream &out); - static void list_states(ostream &out); + static void list_cycles(std::ostream &out); + static void list_states(std::ostream &out); static bool validate_states(); EXTENSION(static PyObject *get_states()); @@ -373,7 +373,7 @@ private: template<> INLINE void PointerToBase::update_type(To *ptr) {} -INLINE ostream &operator << (ostream &out, const RenderState &state) { +INLINE std::ostream &operator << (std::ostream &out, const RenderState &state) { state.output(out); return out; } diff --git a/panda/src/pgraph/rescaleNormalAttrib.h b/panda/src/pgraph/rescaleNormalAttrib.h index 589f5351cc..7f87219285 100644 --- a/panda/src/pgraph/rescaleNormalAttrib.h +++ b/panda/src/pgraph/rescaleNormalAttrib.h @@ -52,7 +52,7 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; @@ -97,8 +97,8 @@ private: static int _attrib_slot; }; -EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, RescaleNormalAttrib::Mode mode); -EXPCL_PANDA_PGRAPH istream &operator >> (istream &in, RescaleNormalAttrib::Mode &mode); +EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, RescaleNormalAttrib::Mode mode); +EXPCL_PANDA_PGRAPH std::istream &operator >> (std::istream &in, RescaleNormalAttrib::Mode &mode); #include "rescaleNormalAttrib.I" diff --git a/panda/src/pgraph/scissorAttrib.h b/panda/src/pgraph/scissorAttrib.h index 9ea128e765..c7c3ff3c4e 100644 --- a/panda/src/pgraph/scissorAttrib.h +++ b/panda/src/pgraph/scissorAttrib.h @@ -51,7 +51,7 @@ PUBLISHED: MAKE_PROPERTY(frame, get_frame); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/scissorEffect.h b/panda/src/pgraph/scissorEffect.h index 4ac2e9a87d..aec8084917 100644 --- a/panda/src/pgraph/scissorEffect.h +++ b/panda/src/pgraph/scissorEffect.h @@ -60,7 +60,7 @@ PUBLISHED: public: virtual CPT(RenderEffect) xform(const LMatrix4 &mat) const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool has_cull_callback() const; virtual void cull_callback(CullTraverser *trav, CullTraverserData &data, diff --git a/panda/src/pgraph/shadeModelAttrib.h b/panda/src/pgraph/shadeModelAttrib.h index 8f8cd8a570..c5e0819141 100644 --- a/panda/src/pgraph/shadeModelAttrib.h +++ b/panda/src/pgraph/shadeModelAttrib.h @@ -42,7 +42,7 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/shaderAttrib.I b/panda/src/pgraph/shaderAttrib.I index baea58607f..fccfb98569 100644 --- a/panda/src/pgraph/shaderAttrib.I +++ b/panda/src/pgraph/shaderAttrib.I @@ -110,7 +110,7 @@ has_shader_input(CPT_InternalName id) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const PTA_float &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -118,7 +118,7 @@ set_shader_input(CPT_InternalName id, const PTA_float &v, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const PTA_double &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -126,7 +126,7 @@ set_shader_input(CPT_InternalName id, const PTA_double &v, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const PTA_LVecBase4 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -134,7 +134,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase4 &v, int priority) cons */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const PTA_LVecBase3 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } @@ -143,7 +143,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase3 &v, int priority) cons */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const PTA_LVecBase2 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -151,7 +151,7 @@ set_shader_input(CPT_InternalName id, const PTA_LVecBase2 &v, int priority) cons */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const LVecBase4 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -159,7 +159,7 @@ set_shader_input(CPT_InternalName id, const LVecBase4 &v, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const LVecBase3 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -167,7 +167,7 @@ set_shader_input(CPT_InternalName id, const LVecBase3 &v, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const LVecBase2 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -175,7 +175,7 @@ set_shader_input(CPT_InternalName id, const LVecBase2 &v, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const PTA_LMatrix4 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -183,7 +183,7 @@ set_shader_input(CPT_InternalName id, const PTA_LMatrix4 &v, int priority) const */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const PTA_LMatrix3 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -191,7 +191,7 @@ set_shader_input(CPT_InternalName id, const PTA_LMatrix3 &v, int priority) const */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const LMatrix4 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -199,7 +199,7 @@ set_shader_input(CPT_InternalName id, const LMatrix4 &v, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const LMatrix3 &v, int priority) const { - return set_shader_input(ShaderInput(move(id), v, priority)); + return set_shader_input(ShaderInput(std::move(id), v, priority)); } /** @@ -207,7 +207,7 @@ set_shader_input(CPT_InternalName id, const LMatrix3 &v, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, Texture *tex, int priority) const { - return set_shader_input(ShaderInput(move(id), tex, priority)); + return set_shader_input(ShaderInput(std::move(id), tex, priority)); } /** @@ -215,7 +215,7 @@ set_shader_input(CPT_InternalName id, Texture *tex, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, const NodePath &np, int priority) const { - return set_shader_input(ShaderInput(move(id), np, priority)); + return set_shader_input(ShaderInput(std::move(id), np, priority)); } /** @@ -223,7 +223,7 @@ set_shader_input(CPT_InternalName id, const NodePath &np, int priority) const { */ INLINE CPT(RenderAttrib) ShaderAttrib:: set_shader_input(CPT_InternalName id, double n1, double n2, double n3, double n4, int priority) const { - return set_shader_input(ShaderInput(move(id), LVecBase4((PN_stdfloat)n1, (PN_stdfloat)n2, (PN_stdfloat)n3, (PN_stdfloat)n4), priority)); + return set_shader_input(ShaderInput(std::move(id), LVecBase4((PN_stdfloat)n1, (PN_stdfloat)n2, (PN_stdfloat)n3, (PN_stdfloat)n4), priority)); } INLINE bool ShaderAttrib:: diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index 33af01fc99..6cd04c6d99 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -102,7 +102,7 @@ PUBLISHED: CPT(RenderAttrib) clear_flag(int flag) const; CPT(RenderAttrib) clear_shader_input(const InternalName *id) const; - CPT(RenderAttrib) clear_shader_input(const string &id) const; + CPT(RenderAttrib) clear_shader_input(const std::string &id) const; CPT(RenderAttrib) clear_all_shader_inputs() const; @@ -111,7 +111,7 @@ PUBLISHED: const Shader *get_shader() const; const ShaderInput &get_shader_input(const InternalName *id) const; - const ShaderInput &get_shader_input(const string &id) const; + const ShaderInput &get_shader_input(const std::string &id) const; const NodePath &get_shader_input_nodepath(const InternalName *id) const; LVecBase4 get_shader_input_vector(InternalName *id) const; @@ -127,7 +127,7 @@ PUBLISHED: MAKE_PROPERTY(instance_count, get_instance_count); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/shaderPool.I b/panda/src/pgraph/shaderPool.I index 074a24e147..03a07d448d 100644 --- a/panda/src/pgraph/shaderPool.I +++ b/panda/src/pgraph/shaderPool.I @@ -84,7 +84,7 @@ garbage_collect() { * Lists the contents of the shader pool to the indicated output stream. */ INLINE void ShaderPool:: -list_contents(ostream &out) { +list_contents(std::ostream &out) { get_ptr()->ns_list_contents(out); } diff --git a/panda/src/pgraph/shaderPool.h b/panda/src/pgraph/shaderPool.h index ca9ee694fc..def32ab2d6 100644 --- a/panda/src/pgraph/shaderPool.h +++ b/panda/src/pgraph/shaderPool.h @@ -36,8 +36,8 @@ PUBLISHED: INLINE static int garbage_collect(); - INLINE static void list_contents(ostream &out); - static void write(ostream &out); + INLINE static void list_contents(std::ostream &out); + static void write(std::ostream &out); private: INLINE ShaderPool(); @@ -48,7 +48,7 @@ private: void ns_release_shader(const Filename &orig_filename); void ns_release_all_shaders(); int ns_garbage_collect(); - void ns_list_contents(ostream &out) const; + void ns_list_contents(std::ostream &out) const; void resolve_filename(Filename &new_filename, const Filename &orig_filename); diff --git a/panda/src/pgraph/stencilAttrib.h b/panda/src/pgraph/stencilAttrib.h index 6b0b773581..6382bc3cd3 100644 --- a/panda/src/pgraph/stencilAttrib.h +++ b/panda/src/pgraph/stencilAttrib.h @@ -139,7 +139,7 @@ PUBLISHED: public: static const char *stencil_render_state_name_array [SRS_total]; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/texGenAttrib.h b/panda/src/pgraph/texGenAttrib.h index b9e1cd273a..0bd9e463e8 100644 --- a/panda/src/pgraph/texGenAttrib.h +++ b/panda/src/pgraph/texGenAttrib.h @@ -61,7 +61,7 @@ PUBLISHED: INLINE int get_geom_rendering(int geom_rendering) const; public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; @@ -79,7 +79,7 @@ private: INLINE ModeDef(); INLINE int compare_to(const ModeDef &other) const; Mode _mode; - string _source_name; + std::string _source_name; NodePath _light; LTexCoord3 _constant_value; }; diff --git a/panda/src/pgraph/texMatrixAttrib.h b/panda/src/pgraph/texMatrixAttrib.h index f68238cf9f..28034a5afa 100644 --- a/panda/src/pgraph/texMatrixAttrib.h +++ b/panda/src/pgraph/texMatrixAttrib.h @@ -60,7 +60,7 @@ PUBLISHED: INLINE int get_geom_rendering(int geom_rendering) const; public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/texProjectorEffect.h b/panda/src/pgraph/texProjectorEffect.h index faf70caf82..40418b60af 100644 --- a/panda/src/pgraph/texProjectorEffect.h +++ b/panda/src/pgraph/texProjectorEffect.h @@ -68,7 +68,7 @@ PUBLISHED: int get_lens_index(TextureStage *stage) const; public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool has_cull_callback() const; virtual void cull_callback(CullTraverser *trav, CullTraverserData &data, diff --git a/panda/src/pgraph/textureAttrib.h b/panda/src/pgraph/textureAttrib.h index 0938df8d96..908e4c50af 100644 --- a/panda/src/pgraph/textureAttrib.h +++ b/panda/src/pgraph/textureAttrib.h @@ -94,7 +94,7 @@ public: CPT(TextureAttrib) filter_to_max(int max_texture_stages) const; virtual bool lower_attrib_can_override() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool has_cull_callback() const; virtual bool cull_callback(CullTraverser *trav, const CullTraverserData &data) const; diff --git a/panda/src/pgraph/textureStageCollection.h b/panda/src/pgraph/textureStageCollection.h index 002447decc..d29a5c222d 100644 --- a/panda/src/pgraph/textureStageCollection.h +++ b/panda/src/pgraph/textureStageCollection.h @@ -36,7 +36,7 @@ PUBLISHED: bool has_texture_stage(TextureStage *texture_stage) const; void clear(); - TextureStage *find_texture_stage(const string &name) const; + TextureStage *find_texture_stage(const std::string &name) const; int get_num_texture_stages() const; TextureStage *get_texture_stage(int index) const; @@ -48,8 +48,8 @@ PUBLISHED: void sort(); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: typedef PTA(PT(TextureStage)) TextureStages; @@ -62,7 +62,7 @@ private: }; -INLINE ostream &operator << (ostream &out, const TextureStageCollection &col) { +INLINE std::ostream &operator << (std::ostream &out, const TextureStageCollection &col) { col.output(out); return out; } diff --git a/panda/src/pgraph/transformState.h b/panda/src/pgraph/transformState.h index e204402489..75b4fedb0e 100644 --- a/panda/src/pgraph/transformState.h +++ b/panda/src/pgraph/transformState.h @@ -194,16 +194,16 @@ PUBLISHED: EXTENSION(PyObject *get_composition_cache() const); EXTENSION(PyObject *get_invert_composition_cache() const); - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; - void write_composition_cache(ostream &out, int indent_level) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; + void write_composition_cache(std::ostream &out, int indent_level) const; static int get_num_states(); static int get_num_unused_states(); static int clear_cache(); static int garbage_collect(); - static void list_cycles(ostream &out); - static void list_states(ostream &out); + static void list_cycles(std::ostream &out); + static void list_states(std::ostream &out); static bool validate_states(); EXTENSION(static PyObject *get_states()); EXTENSION(static PyObject *get_unused_states()); @@ -407,7 +407,7 @@ private: template<> INLINE void PointerToBase::update_type(To *ptr) {} -INLINE ostream &operator << (ostream &out, const TransformState &state) { +INLINE std::ostream &operator << (std::ostream &out, const TransformState &state) { state.output(out); return out; } diff --git a/panda/src/pgraph/transparencyAttrib.h b/panda/src/pgraph/transparencyAttrib.h index 75af58c64e..4021697596 100644 --- a/panda/src/pgraph/transparencyAttrib.h +++ b/panda/src/pgraph/transparencyAttrib.h @@ -54,7 +54,7 @@ PUBLISHED: MAKE_PROPERTY(mode, get_mode); public: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual int compare_to_impl(const RenderAttrib *other) const; diff --git a/panda/src/pgraph/weakNodePath.I b/panda/src/pgraph/weakNodePath.I index 8191821b12..c2d4b0a523 100644 --- a/panda/src/pgraph/weakNodePath.I +++ b/panda/src/pgraph/weakNodePath.I @@ -221,7 +221,7 @@ get_key() const { return _backup_key; } -INLINE ostream &operator << (ostream &out, const WeakNodePath &node_path) { +INLINE std::ostream &operator << (std::ostream &out, const WeakNodePath &node_path) { node_path.output(out); return out; } diff --git a/panda/src/pgraph/weakNodePath.h b/panda/src/pgraph/weakNodePath.h index dc82431023..1137c8f46b 100644 --- a/panda/src/pgraph/weakNodePath.h +++ b/panda/src/pgraph/weakNodePath.h @@ -59,7 +59,7 @@ PUBLISHED: INLINE int get_key() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: WPT(NodePathComponent) _head; @@ -68,7 +68,7 @@ private: friend class NodePath; }; -INLINE ostream &operator << (ostream &out, const WeakNodePath &node_path); +INLINE std::ostream &operator << (std::ostream &out, const WeakNodePath &node_path); #include "weakNodePath.I" diff --git a/panda/src/pgraph/workingNodePath.I b/panda/src/pgraph/workingNodePath.I index ad5c80ba18..1b545c29b8 100644 --- a/panda/src/pgraph/workingNodePath.I +++ b/panda/src/pgraph/workingNodePath.I @@ -90,8 +90,8 @@ node() const { return _node; } -INLINE ostream & -operator << (ostream &out, const WorkingNodePath &node_path) { +INLINE std::ostream & +operator << (std::ostream &out, const WorkingNodePath &node_path) { node_path.output(out); return out; } diff --git a/panda/src/pgraph/workingNodePath.h b/panda/src/pgraph/workingNodePath.h index fefcb6b687..9e698897f5 100644 --- a/panda/src/pgraph/workingNodePath.h +++ b/panda/src/pgraph/workingNodePath.h @@ -53,7 +53,7 @@ public: int get_num_nodes() const; PandaNode *get_node(int index) const; - void output(ostream &out) const; + void output(std::ostream &out) const; PUBLISHED: MAKE_PROPERTY(valid, is_valid); @@ -71,7 +71,7 @@ private: PT(PandaNode) _node; }; -INLINE ostream &operator << (ostream &out, const WorkingNodePath &node_path); +INLINE std::ostream &operator << (std::ostream &out, const WorkingNodePath &node_path); #include "workingNodePath.I" diff --git a/panda/src/pgraphnodes/ambientLight.h b/panda/src/pgraphnodes/ambientLight.h index 959a2d1485..6c9d494b0c 100644 --- a/panda/src/pgraphnodes/ambientLight.h +++ b/panda/src/pgraphnodes/ambientLight.h @@ -25,14 +25,14 @@ */ class EXPCL_PANDA_PGRAPHNODES AmbientLight : public LightNode { PUBLISHED: - explicit AmbientLight(const string &name); + explicit AmbientLight(const std::string &name); protected: AmbientLight(const AmbientLight ©); public: virtual PandaNode *make_copy() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; virtual bool is_ambient_light() const final; PUBLISHED: @@ -68,7 +68,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const AmbientLight &light) { +INLINE std::ostream &operator << (std::ostream &out, const AmbientLight &light) { light.output(out); return out; } diff --git a/panda/src/pgraphnodes/callbackNode.h b/panda/src/pgraphnodes/callbackNode.h index ba2baec389..0a4d101903 100644 --- a/panda/src/pgraphnodes/callbackNode.h +++ b/panda/src/pgraphnodes/callbackNode.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGRAPHNODES CallbackNode : public PandaNode { PUBLISHED: - explicit CallbackNode(const string &name); + explicit CallbackNode(const std::string &name); INLINE void set_cull_callback(CallbackObject *object); INLINE void clear_cull_callback(); @@ -47,7 +47,7 @@ public: virtual bool is_renderable() const; virtual void add_for_draw(CullTraverser *trav, CullTraverserData &data); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: class EXPCL_PANDA_PGRAPHNODES CData : public CycleData { diff --git a/panda/src/pgraphnodes/computeNode.h b/panda/src/pgraphnodes/computeNode.h index 83f7297216..475aca2355 100644 --- a/panda/src/pgraphnodes/computeNode.h +++ b/panda/src/pgraphnodes/computeNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDA_PGRAPHNODES ComputeNode : public PandaNode { PUBLISHED: - explicit ComputeNode(const string &name); + explicit ComputeNode(const std::string &name); INLINE void add_dispatch(const LVecBase3i &num_groups); INLINE void add_dispatch(int num_groups_x, int num_groups_y, int num_groups_z); @@ -50,7 +50,7 @@ public: virtual bool is_renderable() const; virtual void add_for_draw(CullTraverser *trav, CullTraverserData &data); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; public: class EXPCL_PANDA_PGRAPHNODES Dispatcher : public CallbackObject { diff --git a/panda/src/pgraphnodes/directionalLight.h b/panda/src/pgraphnodes/directionalLight.h index c78f76f81e..f5453399ef 100644 --- a/panda/src/pgraphnodes/directionalLight.h +++ b/panda/src/pgraphnodes/directionalLight.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES DirectionalLight : public LightLensNode { PUBLISHED: - explicit DirectionalLight(const string &name); + explicit DirectionalLight(const std::string &name); protected: DirectionalLight(const DirectionalLight ©); @@ -32,7 +32,7 @@ protected: public: virtual PandaNode *make_copy() const; virtual void xform(const LMatrix4 &mat); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; virtual bool get_vector_to_light(LVector3 &result, const LPoint3 &from_object_point, @@ -106,7 +106,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const DirectionalLight &light) { +INLINE std::ostream &operator << (std::ostream &out, const DirectionalLight &light) { light.output(out); return out; } diff --git a/panda/src/pgraphnodes/fadeLodNode.I b/panda/src/pgraphnodes/fadeLodNode.I index 41f7d79299..0b2b02cd94 100644 --- a/panda/src/pgraphnodes/fadeLodNode.I +++ b/panda/src/pgraphnodes/fadeLodNode.I @@ -32,7 +32,7 @@ get_fade_time() const { * Returns the cull bin that is assigned to the fading part of the geometry * during a transition. */ -INLINE const string &FadeLODNode:: +INLINE const std::string &FadeLODNode:: get_fade_bin_name() const { return _fade_bin_name; } diff --git a/panda/src/pgraphnodes/fadeLodNode.h b/panda/src/pgraphnodes/fadeLodNode.h index 728cc8f8e6..7f748ace4e 100644 --- a/panda/src/pgraphnodes/fadeLodNode.h +++ b/panda/src/pgraphnodes/fadeLodNode.h @@ -23,22 +23,22 @@ */ class EXPCL_PANDA_PGRAPHNODES FadeLODNode : public LODNode { PUBLISHED: - explicit FadeLODNode(const string &name); + explicit FadeLODNode(const std::string &name); protected: FadeLODNode(const FadeLODNode ©); public: virtual PandaNode *make_copy() const; virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: INLINE void set_fade_time(PN_stdfloat t); INLINE PN_stdfloat get_fade_time() const; MAKE_PROPERTY(fade_time, get_fade_time, set_fade_time); - void set_fade_bin(const string &name, int draw_order); - INLINE const string &get_fade_bin_name() const; + void set_fade_bin(const std::string &name, int draw_order); + INLINE const std::string &get_fade_bin_name() const; INLINE int get_fade_bin_draw_order() const; MAKE_PROPERTY(fade_bin_name, get_fade_bin_name); MAKE_PROPERTY(fade_bin_draw_order, get_fade_bin_draw_order); @@ -56,7 +56,7 @@ private: private: PN_stdfloat _fade_time; - string _fade_bin_name; + std::string _fade_bin_name; int _fade_bin_draw_order; int _fade_state_override; diff --git a/panda/src/pgraphnodes/fadeLodNodeData.h b/panda/src/pgraphnodes/fadeLodNodeData.h index 7d629d060e..206a08bbe4 100644 --- a/panda/src/pgraphnodes/fadeLodNodeData.h +++ b/panda/src/pgraphnodes/fadeLodNodeData.h @@ -34,7 +34,7 @@ public: int _fade_out; int _fade_in; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; public: static TypeHandle get_class_type() { diff --git a/panda/src/pgraphnodes/lightLensNode.h b/panda/src/pgraphnodes/lightLensNode.h index 03c1342927..4398f02bfd 100644 --- a/panda/src/pgraphnodes/lightLensNode.h +++ b/panda/src/pgraphnodes/lightLensNode.h @@ -32,7 +32,7 @@ class GraphicsStateGuardian; */ class EXPCL_PANDA_PGRAPHNODES LightLensNode : public Light, public Camera { PUBLISHED: - explicit LightLensNode(const string &name, Lens *lens = new PerspectiveLens()); + explicit LightLensNode(const std::string &name, Lens *lens = new PerspectiveLens()); virtual ~LightLensNode(); INLINE bool has_specular_color() const; @@ -82,8 +82,8 @@ public: PUBLISHED: // We have to explicitly publish these because they resolve the multiple // inheritance. - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual void write_datagram(BamWriter *manager, Datagram &dg); @@ -113,7 +113,7 @@ private: friend class GraphicsStateGuardian; }; -INLINE ostream &operator << (ostream &out, const LightLensNode &light) { +INLINE std::ostream &operator << (std::ostream &out, const LightLensNode &light) { light.output(out); return out; } diff --git a/panda/src/pgraphnodes/lightNode.h b/panda/src/pgraphnodes/lightNode.h index 9e9187ebe0..a3b85a8d90 100644 --- a/panda/src/pgraphnodes/lightNode.h +++ b/panda/src/pgraphnodes/lightNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDA_PGRAPHNODES LightNode : public Light, public PandaNode { PUBLISHED: - explicit LightNode(const string &name); + explicit LightNode(const std::string &name); protected: LightNode(const LightNode ©); @@ -38,8 +38,8 @@ public: PUBLISHED: // We have to explicitly publish these because they resolve the multiple // inheritance. - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual void write_datagram(BamWriter *manager, Datagram &dg); @@ -67,7 +67,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const LightNode &light) { +INLINE std::ostream &operator << (std::ostream &out, const LightNode &light) { light.output(out); return out; } diff --git a/panda/src/pgraphnodes/lodNode.I b/panda/src/pgraphnodes/lodNode.I index 3a042c2aa5..92398e35fe 100644 --- a/panda/src/pgraphnodes/lodNode.I +++ b/panda/src/pgraphnodes/lodNode.I @@ -15,7 +15,7 @@ * */ INLINE LODNode:: -LODNode(const string &name) : +LODNode(const std::string &name) : PandaNode(name) { set_cull_callback(); diff --git a/panda/src/pgraphnodes/lodNode.h b/panda/src/pgraphnodes/lodNode.h index 7258ebe447..c82e066ffc 100644 --- a/panda/src/pgraphnodes/lodNode.h +++ b/panda/src/pgraphnodes/lodNode.h @@ -27,9 +27,9 @@ */ class EXPCL_PANDA_PGRAPHNODES LODNode : public PandaNode { PUBLISHED: - INLINE explicit LODNode(const string &name); + INLINE explicit LODNode(const std::string &name); - static PT(LODNode) make_default_lod(const string &name); + static PT(LODNode) make_default_lod(const std::string &name); protected: INLINE LODNode(const LODNode ©); @@ -40,7 +40,7 @@ public: virtual void xform(const LMatrix4 &mat); virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual bool is_lod_node() const; diff --git a/panda/src/pgraphnodes/lodNodeType.h b/panda/src/pgraphnodes/lodNodeType.h index bc1964d519..507ade03cf 100644 --- a/panda/src/pgraphnodes/lodNodeType.h +++ b/panda/src/pgraphnodes/lodNodeType.h @@ -25,7 +25,7 @@ enum LODNodeType { END_PUBLISH -EXPCL_PANDA_PGRAPH ostream &operator << (ostream &out, LODNodeType lnt); -EXPCL_PANDA_PGRAPH istream &operator >> (istream &in, LODNodeType &cs); +EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, LODNodeType lnt); +EXPCL_PANDA_PGRAPH std::istream &operator >> (std::istream &in, LODNodeType &cs); #endif diff --git a/panda/src/pgraphnodes/nodeCullCallbackData.h b/panda/src/pgraphnodes/nodeCullCallbackData.h index add737d3d6..f78acb86cb 100644 --- a/panda/src/pgraphnodes/nodeCullCallbackData.h +++ b/panda/src/pgraphnodes/nodeCullCallbackData.h @@ -28,7 +28,7 @@ public: INLINE NodeCullCallbackData(CullTraverser *trav, CullTraverserData &data); PUBLISHED: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; INLINE CullTraverser *get_trav() const; INLINE CullTraverserData &get_data() const; diff --git a/panda/src/pgraphnodes/pointLight.h b/panda/src/pgraphnodes/pointLight.h index bb37237883..d54efc04ba 100644 --- a/panda/src/pgraphnodes/pointLight.h +++ b/panda/src/pgraphnodes/pointLight.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES PointLight : public LightLensNode { PUBLISHED: - explicit PointLight(const string &name); + explicit PointLight(const std::string &name); protected: PointLight(const PointLight ©); @@ -32,7 +32,7 @@ protected: public: virtual PandaNode *make_copy() const; virtual void xform(const LMatrix4 &mat); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; virtual bool get_vector_to_light(LVector3 &result, const LPoint3 &from_object_point, @@ -113,7 +113,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const PointLight &light) { +INLINE std::ostream &operator << (std::ostream &out, const PointLight &light) { light.output(out); return out; } diff --git a/panda/src/pgraphnodes/rectangleLight.h b/panda/src/pgraphnodes/rectangleLight.h index b6a4e173c1..9fafe875d6 100644 --- a/panda/src/pgraphnodes/rectangleLight.h +++ b/panda/src/pgraphnodes/rectangleLight.h @@ -25,14 +25,14 @@ */ class EXPCL_PANDA_PGRAPHNODES RectangleLight : public LightLensNode { PUBLISHED: - explicit RectangleLight(const string &name); + explicit RectangleLight(const std::string &name); protected: RectangleLight(const RectangleLight ©); public: virtual PandaNode *make_copy() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; PUBLISHED: INLINE const LColor &get_specular_color() const final; diff --git a/panda/src/pgraphnodes/sceneGraphAnalyzer.h b/panda/src/pgraphnodes/sceneGraphAnalyzer.h index 68ca0d14df..a56d34f41c 100644 --- a/panda/src/pgraphnodes/sceneGraphAnalyzer.h +++ b/panda/src/pgraphnodes/sceneGraphAnalyzer.h @@ -52,7 +52,7 @@ PUBLISHED: void clear(); void add_node(PandaNode *node); - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; INLINE int get_num_nodes() const; INLINE int get_num_instances() const; diff --git a/panda/src/pgraphnodes/selectiveChildNode.I b/panda/src/pgraphnodes/selectiveChildNode.I index a7b886d61a..beafc0669d 100644 --- a/panda/src/pgraphnodes/selectiveChildNode.I +++ b/panda/src/pgraphnodes/selectiveChildNode.I @@ -15,7 +15,7 @@ * */ INLINE SelectiveChildNode:: -SelectiveChildNode(const string &name) : +SelectiveChildNode(const std::string &name) : PandaNode(name), _selected_child(0) { diff --git a/panda/src/pgraphnodes/selectiveChildNode.h b/panda/src/pgraphnodes/selectiveChildNode.h index 76720aa933..29b0d4581a 100644 --- a/panda/src/pgraphnodes/selectiveChildNode.h +++ b/panda/src/pgraphnodes/selectiveChildNode.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SelectiveChildNode : public PandaNode { PUBLISHED: - INLINE explicit SelectiveChildNode(const string &name); + INLINE explicit SelectiveChildNode(const std::string &name); protected: INLINE SelectiveChildNode(const SelectiveChildNode ©); diff --git a/panda/src/pgraphnodes/sequenceNode.I b/panda/src/pgraphnodes/sequenceNode.I index 823a19ea4c..68fb10120e 100644 --- a/panda/src/pgraphnodes/sequenceNode.I +++ b/panda/src/pgraphnodes/sequenceNode.I @@ -15,7 +15,7 @@ * */ INLINE SequenceNode:: -SequenceNode(const string &name) : +SequenceNode(const std::string &name) : SelectiveChildNode(name) { set_cull_callback(); diff --git a/panda/src/pgraphnodes/sequenceNode.h b/panda/src/pgraphnodes/sequenceNode.h index ce05b792f2..db511dd4ae 100644 --- a/panda/src/pgraphnodes/sequenceNode.h +++ b/panda/src/pgraphnodes/sequenceNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SequenceNode : public SelectiveChildNode, public AnimInterface { PUBLISHED: - INLINE explicit SequenceNode(const string &name); + INLINE explicit SequenceNode(const std::string &name); protected: SequenceNode(const SequenceNode ©); @@ -45,7 +45,7 @@ public: virtual bool has_single_child_visibility() const; virtual int get_visible_child() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; public: static void register_with_read_factory(); diff --git a/panda/src/pgraphnodes/shaderGenerator.h b/panda/src/pgraphnodes/shaderGenerator.h index 66077c4af8..a3d37c4ad9 100644 --- a/panda/src/pgraphnodes/shaderGenerator.h +++ b/panda/src/pgraphnodes/shaderGenerator.h @@ -168,9 +168,9 @@ protected: void analyze_renderstate(ShaderKey &key, const RenderState *rs); - static string combine_mode_as_string(const ShaderKey::TextureInfo &info, + static std::string combine_mode_as_string(const ShaderKey::TextureInfo &info, TextureStage::CombineMode c_mode, bool alpha, short texindex); - static string combine_source_as_string(const ShaderKey::TextureInfo &info, + static std::string combine_source_as_string(const ShaderKey::TextureInfo &info, short num, bool alpha, short texindex); static const char *texture_type_as_string(Texture::TextureType ttype); diff --git a/panda/src/pgraphnodes/sphereLight.h b/panda/src/pgraphnodes/sphereLight.h index 7efddb9b50..d4b1fb1c32 100644 --- a/panda/src/pgraphnodes/sphereLight.h +++ b/panda/src/pgraphnodes/sphereLight.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SphereLight : public PointLight { PUBLISHED: - explicit SphereLight(const string &name); + explicit SphereLight(const std::string &name); protected: SphereLight(const SphereLight ©); @@ -33,7 +33,7 @@ protected: public: virtual PandaNode *make_copy() const; virtual void xform(const LMatrix4 &mat); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; PUBLISHED: INLINE PN_stdfloat get_radius() const; diff --git a/panda/src/pgraphnodes/spotlight.h b/panda/src/pgraphnodes/spotlight.h index d1e56a88b3..a529f1479e 100644 --- a/panda/src/pgraphnodes/spotlight.h +++ b/panda/src/pgraphnodes/spotlight.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_PGRAPHNODES Spotlight : public LightLensNode { PUBLISHED: - Spotlight(const string &name); + Spotlight(const std::string &name); protected: Spotlight(const Spotlight ©); @@ -39,7 +39,7 @@ protected: public: virtual PandaNode *make_copy() const; virtual void xform(const LMatrix4 &mat); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; virtual bool get_vector_to_light(LVector3 &result, const LPoint3 &from_object_point, @@ -127,7 +127,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const Spotlight &light) { +INLINE std::ostream &operator << (std::ostream &out, const Spotlight &light) { light.output(out); return out; } diff --git a/panda/src/pgraphnodes/switchNode.I b/panda/src/pgraphnodes/switchNode.I index 451ec655df..b7943210dc 100644 --- a/panda/src/pgraphnodes/switchNode.I +++ b/panda/src/pgraphnodes/switchNode.I @@ -32,7 +32,7 @@ CData(const SwitchNode::CData ©) : * */ INLINE SwitchNode:: -SwitchNode(const string &name) : +SwitchNode(const std::string &name) : SelectiveChildNode(name) { set_cull_callback(); diff --git a/panda/src/pgraphnodes/switchNode.h b/panda/src/pgraphnodes/switchNode.h index b2fefd7750..2df989cbd7 100644 --- a/panda/src/pgraphnodes/switchNode.h +++ b/panda/src/pgraphnodes/switchNode.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SwitchNode : public SelectiveChildNode { PUBLISHED: - INLINE explicit SwitchNode(const string &name); + INLINE explicit SwitchNode(const std::string &name); public: SwitchNode(const SwitchNode ©); diff --git a/panda/src/pgraphnodes/uvScrollNode.I b/panda/src/pgraphnodes/uvScrollNode.I index 3fb849edc9..893f76e2cc 100644 --- a/panda/src/pgraphnodes/uvScrollNode.I +++ b/panda/src/pgraphnodes/uvScrollNode.I @@ -15,7 +15,7 @@ * */ INLINE UvScrollNode:: -UvScrollNode(const string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed) : +UvScrollNode(const std::string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed) : PandaNode(name), _u_speed(u_speed), _v_speed(v_speed), @@ -30,7 +30,7 @@ UvScrollNode(const string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_st * */ INLINE UvScrollNode:: -UvScrollNode(const string &name) : +UvScrollNode(const std::string &name) : PandaNode(name), _u_speed(0), _v_speed(0), diff --git a/panda/src/pgraphnodes/uvScrollNode.h b/panda/src/pgraphnodes/uvScrollNode.h index 10dff152b7..ac4c29b643 100644 --- a/panda/src/pgraphnodes/uvScrollNode.h +++ b/panda/src/pgraphnodes/uvScrollNode.h @@ -25,8 +25,8 @@ */ class EXPCL_PANDA_PGRAPH UvScrollNode : public PandaNode { PUBLISHED: - INLINE explicit UvScrollNode(const string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed); - INLINE explicit UvScrollNode(const string &name); + INLINE explicit UvScrollNode(const std::string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed); + INLINE explicit UvScrollNode(const std::string &name); protected: INLINE UvScrollNode(const UvScrollNode ©); diff --git a/panda/src/pgui/pgButton.I b/panda/src/pgui/pgButton.I index ab7f44f503..a4939634fe 100644 --- a/panda/src/pgui/pgButton.I +++ b/panda/src/pgui/pgButton.I @@ -61,7 +61,7 @@ setup(const NodePath &ready, const NodePath &depressed, * PGButtons. The click event is the concatenation of this string followed by * get_id(). */ -INLINE string PGButton:: +INLINE std::string PGButton:: get_click_prefix() { return "click-"; } @@ -70,7 +70,7 @@ get_click_prefix() { * Returns the event name that will be thrown when the button is clicked * normally. */ -INLINE string PGButton:: +INLINE std::string PGButton:: get_click_event(const ButtonHandle &button) const { LightReMutexHolder holder(_lock); return get_click_prefix() + button.get_name() + "-" + get_id(); diff --git a/panda/src/pgui/pgButton.h b/panda/src/pgui/pgButton.h index ece2359762..3405f5b5d1 100644 --- a/panda/src/pgui/pgButton.h +++ b/panda/src/pgui/pgButton.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_PGUI PGButton : public PGItem { PUBLISHED: - explicit PGButton(const string &name); + explicit PGButton(const std::string &name); virtual ~PGButton(); protected: @@ -55,7 +55,7 @@ PUBLISHED: S_inactive }; - void setup(const string &label, PN_stdfloat bevel = 0.1f); + void setup(const std::string &label, PN_stdfloat bevel = 0.1f); INLINE void setup(const NodePath &ready); INLINE void setup(const NodePath &ready, const NodePath &depressed); INLINE void setup(const NodePath &ready, const NodePath &depressed, @@ -71,8 +71,8 @@ PUBLISHED: INLINE bool is_button_down(); - INLINE static string get_click_prefix(); - INLINE string get_click_event(const ButtonHandle &button) const; + INLINE static std::string get_click_prefix(); + INLINE std::string get_click_event(const ButtonHandle &button) const; MAKE_PROPERTY(click_prefix, get_click_prefix); private: diff --git a/panda/src/pgui/pgEntry.I b/panda/src/pgui/pgEntry.I index 2e15320b8f..7f76e3ef63 100644 --- a/panda/src/pgui/pgEntry.I +++ b/panda/src/pgui/pgEntry.I @@ -20,7 +20,7 @@ * truncated (see set_max_width(), etc.). */ INLINE bool PGEntry:: -set_text(const string &text) { +set_text(const std::string &text) { LightReMutexHolder holder(_lock); TextNode *text_node = get_text_def(S_focus); nassertr(text_node != nullptr, false); @@ -34,11 +34,11 @@ set_text(const string &text) { * This uses the Unicode encoding currently specified for the "focus" * TextNode; therefore, the TextNode must exist before calling get_text(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_plain_text() const { LightReMutexHolder holder(_lock); TextNode *text_node = get_text_def(S_focus); - nassertr(text_node != nullptr, string()); + nassertr(text_node != nullptr, std::string()); return text_node->encode_wtext(get_plain_wtext()); } @@ -47,11 +47,11 @@ get_plain_text() const { * Unicode encoding currently specified for the "focus" TextNode; therefore, * the TextNode must exist before calling get_text(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_text() const { LightReMutexHolder holder(_lock); TextNode *text_node = get_text_def(S_focus); - nassertr(text_node != nullptr, string()); + nassertr(text_node != nullptr, std::string()); return text_node->encode_wtext(get_wtext()); } @@ -350,7 +350,7 @@ get_overflow_mode() const { * candidate string that the user can actively scroll through. */ INLINE void PGEntry:: -set_candidate_active(const string &candidate_active) { +set_candidate_active(const std::string &candidate_active) { LightReMutexHolder holder(_lock); _candidate_active = candidate_active; } @@ -358,7 +358,7 @@ set_candidate_active(const string &candidate_active) { /** * See set_candidate_active(). */ -INLINE const string &PGEntry:: +INLINE const std::string &PGEntry:: get_candidate_active() const { LightReMutexHolder holder(_lock); return _candidate_active; @@ -377,7 +377,7 @@ get_candidate_active() const { * candidate string that the user is not actively scrolling through. */ INLINE void PGEntry:: -set_candidate_inactive(const string &candidate_inactive) { +set_candidate_inactive(const std::string &candidate_inactive) { LightReMutexHolder holder(_lock); _candidate_inactive = candidate_inactive; } @@ -385,7 +385,7 @@ set_candidate_inactive(const string &candidate_inactive) { /** * See set_candidate_inactive(). */ -INLINE const string &PGEntry:: +INLINE const std::string &PGEntry:: get_candidate_inactive() const { LightReMutexHolder holder(_lock); return _candidate_inactive; @@ -396,7 +396,7 @@ get_candidate_inactive() const { * PGEntries. The accept event is the concatenation of this string followed * by get_id(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_accept_prefix() { return "accept-"; } @@ -406,7 +406,7 @@ get_accept_prefix() { * PGEntries. This event is the concatenation of this string followed by * get_id(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_accept_failed_prefix() { return "acceptfailed-"; } @@ -416,7 +416,7 @@ get_accept_failed_prefix() { * PGEntries. The overflow event is the concatenation of this string followed * by get_id(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_overflow_prefix() { return "overflow-"; } @@ -425,7 +425,7 @@ get_overflow_prefix() { * Returns the prefix that is used to define the type event for all PGEntries. * The type event is the concatenation of this string followed by get_id(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_type_prefix() { return "type-"; } @@ -435,7 +435,7 @@ get_type_prefix() { * PGEntries. The erase event is the concatenation of this string followed by * get_id(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_erase_prefix() { return "erase-"; } @@ -445,7 +445,7 @@ get_erase_prefix() { * PGEntries. The cursor event is the concatenation of this string followed * by get_id(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_cursormove_prefix() { return "cursormove-"; } @@ -454,7 +454,7 @@ get_cursormove_prefix() { * Returns the event name that will be thrown when the entry is accepted * normally. */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_accept_event(const ButtonHandle &button) const { return get_accept_prefix() + button.get_name() + "-" + get_id(); } @@ -463,7 +463,7 @@ get_accept_event(const ButtonHandle &button) const { * Returns the event name that will be thrown when the entry cannot accept an * input */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_accept_failed_event(const ButtonHandle &button) const { return get_accept_failed_prefix() + button.get_name() + "-" + get_id(); } @@ -473,7 +473,7 @@ get_accept_failed_event(const ButtonHandle &button) const { * to be entered into the PGEntry, exceeding either the limit set via * set_max_chars() or via set_max_width(). */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_overflow_event() const { return get_overflow_prefix() + get_id(); } @@ -482,7 +482,7 @@ get_overflow_event() const { * Returns the event name that will be thrown whenever the user extends the * text by typing. */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_type_event() const { return get_type_prefix() + get_id(); } @@ -491,7 +491,7 @@ get_type_event() const { * Returns the event name that will be thrown whenever the user erases * characters in the text. */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_erase_event() const { return get_erase_prefix() + get_id(); } @@ -499,7 +499,7 @@ get_erase_event() const { /** * Returns the event name that will be thrown whenever the cursor moves */ -INLINE string PGEntry:: +INLINE std::string PGEntry:: get_cursormove_event() const { return get_cursormove_prefix() + get_id(); } @@ -511,14 +511,14 @@ get_cursormove_event() const { * truncated (see set_max_width(), etc.). */ INLINE bool PGEntry:: -set_wtext(const wstring &wtext) { +set_wtext(const std::wstring &wtext) { LightReMutexHolder holder(_lock); bool ret = _text.set_wtext(wtext); if (_obscure_mode) { - ret = _obscure_text.set_wtext(wstring(_text.get_num_characters(), '*')); + ret = _obscure_text.set_wtext(std::wstring(_text.get_num_characters(), '*')); } _text_geom_stale = true; - set_cursor_position(min(_cursor_position, _text.get_num_characters())); + set_cursor_position(std::min(_cursor_position, _text.get_num_characters())); return ret; } @@ -526,7 +526,7 @@ set_wtext(const wstring &wtext) { * Returns the text currently displayed within the entry, without any embedded * properties characters. */ -INLINE wstring PGEntry:: +INLINE std::wstring PGEntry:: get_plain_wtext() const { LightReMutexHolder holder(_lock); return _text.get_plain_wtext(); @@ -535,7 +535,7 @@ get_plain_wtext() const { /** * Returns the text currently displayed within the entry. */ -INLINE wstring PGEntry:: +INLINE std::wstring PGEntry:: get_wtext() const { LightReMutexHolder holder(_lock); return _text.get_wtext(); diff --git a/panda/src/pgui/pgEntry.h b/panda/src/pgui/pgEntry.h index 88fd5aaa89..825562aa82 100644 --- a/panda/src/pgui/pgEntry.h +++ b/panda/src/pgui/pgEntry.h @@ -36,7 +36,7 @@ */ class EXPCL_PANDA_PGUI PGEntry : public PGItem { PUBLISHED: - explicit PGEntry(const string &name); + explicit PGEntry(const std::string &name); virtual ~PGEntry(); protected: @@ -68,9 +68,9 @@ PUBLISHED: void setup(PN_stdfloat width, int num_lines); void setup_minimal(PN_stdfloat width, int num_lines); - INLINE bool set_text(const string &text); - INLINE string get_plain_text() const; - INLINE string get_text() const; + INLINE bool set_text(const std::string &text); + INLINE std::string get_plain_text() const; + INLINE std::string get_text() const; INLINE int get_num_characters() const; INLINE wchar_t get_character(int n) const; @@ -105,11 +105,11 @@ PUBLISHED: INLINE void set_overflow_mode(bool flag); INLINE bool get_overflow_mode() const; - INLINE void set_candidate_active(const string &candidate_active); - INLINE const string &get_candidate_active() const; + INLINE void set_candidate_active(const std::string &candidate_active); + INLINE const std::string &get_candidate_active() const; - INLINE void set_candidate_inactive(const string &candidate_inactive); - INLINE const string &get_candidate_inactive() const; + INLINE void set_candidate_inactive(const std::string &candidate_inactive); + INLINE const std::string &get_candidate_inactive() const; void set_text_def(int state, TextNode *node); TextNode *get_text_def(int state) const; @@ -117,24 +117,24 @@ PUBLISHED: virtual void set_active(bool active); virtual void set_focus(bool focus); - INLINE static string get_accept_prefix(); - INLINE static string get_accept_failed_prefix(); - INLINE static string get_overflow_prefix(); - INLINE static string get_type_prefix(); - INLINE static string get_erase_prefix(); - INLINE static string get_cursormove_prefix(); + INLINE static std::string get_accept_prefix(); + INLINE static std::string get_accept_failed_prefix(); + INLINE static std::string get_overflow_prefix(); + INLINE static std::string get_type_prefix(); + INLINE static std::string get_erase_prefix(); + INLINE static std::string get_cursormove_prefix(); - INLINE string get_accept_event(const ButtonHandle &button) const; - INLINE string get_accept_failed_event(const ButtonHandle &button) const; - INLINE string get_overflow_event() const; - INLINE string get_type_event() const; - INLINE string get_erase_event() const; - INLINE string get_cursormove_event() const; + INLINE std::string get_accept_event(const ButtonHandle &button) const; + INLINE std::string get_accept_failed_event(const ButtonHandle &button) const; + INLINE std::string get_overflow_event() const; + INLINE std::string get_type_event() const; + INLINE std::string get_erase_event() const; + INLINE std::string get_cursormove_event() const; - INLINE bool set_wtext(const wstring &wtext); - INLINE wstring get_plain_wtext() const; - INLINE wstring get_wtext() const; + INLINE bool set_wtext(const std::wstring &wtext); + INLINE std::wstring get_plain_wtext() const; + INLINE std::wstring get_wtext() const; INLINE void set_accept_enabled(bool enabled); bool is_wtext() const; @@ -152,7 +152,7 @@ private: bool _cursor_stale; bool _cursor_visible; - wstring _candidate_wtext; + std::wstring _candidate_wtext; size_t _candidate_highlight_start; size_t _candidate_highlight_end; size_t _candidate_cursor_pos; @@ -163,8 +163,8 @@ private: bool _accept_enabled; - string _candidate_active; - string _candidate_inactive; + std::string _candidate_active; + std::string _candidate_inactive; typedef pvector< PT(TextNode) > TextDefs; TextDefs _text_defs; diff --git a/panda/src/pgui/pgFrameStyle.I b/panda/src/pgui/pgFrameStyle.I index 2882d73935..8a5f31250a 100644 --- a/panda/src/pgui/pgFrameStyle.I +++ b/panda/src/pgui/pgFrameStyle.I @@ -222,8 +222,8 @@ get_visible_scale() const { /** * */ -INLINE ostream & -operator << (ostream &out, const PGFrameStyle &pfs) { +INLINE std::ostream & +operator << (std::ostream &out, const PGFrameStyle &pfs) { pfs.output(out); return out; } diff --git a/panda/src/pgui/pgFrameStyle.h b/panda/src/pgui/pgFrameStyle.h index 107b217192..19283c962f 100644 --- a/panda/src/pgui/pgFrameStyle.h +++ b/panda/src/pgui/pgFrameStyle.h @@ -70,7 +70,7 @@ PUBLISHED: LVecBase4 get_internal_frame(const LVecBase4 &frame) const; - void output(ostream &out) const; + void output(std::ostream &out) const; public: bool xform(const LMatrix4 &mat); @@ -92,8 +92,8 @@ private: LVecBase2 _visible_scale; }; -INLINE ostream &operator << (ostream &out, const PGFrameStyle &pfs); -ostream &operator << (ostream &out, PGFrameStyle::Type type); +INLINE std::ostream &operator << (std::ostream &out, const PGFrameStyle &pfs); +std::ostream &operator << (std::ostream &out, PGFrameStyle::Type type); #include "pgFrameStyle.I" diff --git a/panda/src/pgui/pgItem.I b/panda/src/pgui/pgItem.I index ce2c9f0532..f60e4a256c 100644 --- a/panda/src/pgui/pgItem.I +++ b/panda/src/pgui/pgItem.I @@ -15,7 +15,7 @@ * */ INLINE void PGItem:: -set_name(const string &name) { +set_name(const std::string &name) { Namable::set_name(name); _lock.set_name(name); } @@ -207,7 +207,7 @@ get_suppress_flags() const { * the region created with the MouseWatcher, and will thus be used to generate * event names. */ -INLINE const string &PGItem:: +INLINE const std::string &PGItem:: get_id() const { LightReMutexHolder holder(_lock); return _region->get_name(); @@ -222,7 +222,7 @@ get_id() const { * decide to redefine the ID to be something possibly more meaningful. */ INLINE void PGItem:: -set_id(const string &id) { +set_id(const std::string &id) { LightReMutexHolder holder(_lock); _region->set_name(id); } @@ -231,7 +231,7 @@ set_id(const string &id) { * Returns the prefix that is used to define the enter event for all PGItems. * The enter event is the concatenation of this string followed by get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_enter_prefix() { return "enter-"; } @@ -240,7 +240,7 @@ get_enter_prefix() { * Returns the prefix that is used to define the exit event for all PGItems. * The exit event is the concatenation of this string followed by get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_exit_prefix() { return "exit-"; } @@ -249,7 +249,7 @@ get_exit_prefix() { * Returns the prefix that is used to define the within event for all PGItems. * The within event is the concatenation of this string followed by get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_within_prefix() { return "within-"; } @@ -259,7 +259,7 @@ get_within_prefix() { * PGItems. The without event is the concatenation of this string followed by * get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_without_prefix() { return "without-"; } @@ -271,7 +271,7 @@ get_without_prefix() { * * Unlike most item events, this event is thrown with no parameters. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_focus_in_prefix() { return "fin-"; } @@ -283,7 +283,7 @@ get_focus_in_prefix() { * * Unlike most item events, this event is thrown with no parameters. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_focus_out_prefix() { return "fout-"; } @@ -293,7 +293,7 @@ get_focus_out_prefix() { * The press event is the concatenation of this string followed by a button * name, followed by a hyphen and get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_press_prefix() { return "press-"; } @@ -303,7 +303,7 @@ get_press_prefix() { * The repeat event is the concatenation of this string followed by a button * name, followed by a hyphen and get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_repeat_prefix() { return "repeat-"; } @@ -313,7 +313,7 @@ get_repeat_prefix() { * PGItems. The release event is the concatenation of this string followed by * a button name, followed by a hyphen and get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_release_prefix() { return "release-"; } @@ -323,7 +323,7 @@ get_release_prefix() { * PGItems. The keystroke event is the concatenation of this string followed * by a hyphen and get_id(). */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_keystroke_prefix() { return "keystroke-"; } @@ -332,7 +332,7 @@ get_keystroke_prefix() { * Returns the event name that will be thrown when the item is active and the * mouse enters its frame, but not any nested frames. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_enter_event() const { LightReMutexHolder holder(_lock); return get_enter_prefix() + get_id(); @@ -342,7 +342,7 @@ get_enter_event() const { * Returns the event name that will be thrown when the item is active and the * mouse exits its frame, or enters a nested frame. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_exit_event() const { LightReMutexHolder holder(_lock); return get_exit_prefix() + get_id(); @@ -354,7 +354,7 @@ get_exit_event() const { * enter_event in that the mouse is considered within the frame even if it is * also within a nested frame. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_within_event() const { LightReMutexHolder holder(_lock); return get_within_prefix() + get_id(); @@ -366,7 +366,7 @@ get_within_event() const { * different from the exit_event in that the mouse is considered within the * frame even if it is also within a nested frame. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_without_event() const { LightReMutexHolder holder(_lock); return get_without_prefix() + get_id(); @@ -376,7 +376,7 @@ get_without_event() const { * Returns the event name that will be thrown when the item gets the keyboard * focus. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_focus_in_event() const { LightReMutexHolder holder(_lock); return get_focus_in_prefix() + get_id(); @@ -386,7 +386,7 @@ get_focus_in_event() const { * Returns the event name that will be thrown when the item loses the keyboard * focus. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_focus_out_event() const { LightReMutexHolder holder(_lock); return get_focus_out_prefix() + get_id(); @@ -397,7 +397,7 @@ get_focus_out_event() const { * indicated mouse or keyboard button is depressed while the mouse is within * the frame. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_press_event(const ButtonHandle &button) const { LightReMutexHolder holder(_lock); return get_press_prefix() + button.get_name() + "-" + get_id(); @@ -408,7 +408,7 @@ get_press_event(const ButtonHandle &button) const { * indicated mouse or keyboard button is continuously held down while the * mouse is within the frame. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_repeat_event(const ButtonHandle &button) const { LightReMutexHolder holder(_lock); return get_repeat_prefix() + button.get_name() + "-" + get_id(); @@ -419,7 +419,7 @@ get_repeat_event(const ButtonHandle &button) const { * indicated mouse or keyboard button, formerly clicked down is within the * frame, is released. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_release_event(const ButtonHandle &button) const { LightReMutexHolder holder(_lock); return get_release_prefix() + button.get_name() + "-" + get_id(); @@ -429,7 +429,7 @@ get_release_event(const ButtonHandle &button) const { * Returns the event name that will be thrown when the item is active and any * key is pressed by the user. */ -INLINE string PGItem:: +INLINE std::string PGItem:: get_keystroke_event() const { LightReMutexHolder holder(_lock); return get_keystroke_prefix() + get_id(); diff --git a/panda/src/pgui/pgItem.h b/panda/src/pgui/pgItem.h index c39103154a..fc7f8ff6d4 100644 --- a/panda/src/pgui/pgItem.h +++ b/panda/src/pgui/pgItem.h @@ -52,10 +52,10 @@ class ScissorAttrib; */ class EXPCL_PANDA_PGUI PGItem : public PandaNode { PUBLISHED: - explicit PGItem(const string &name); + explicit PGItem(const std::string &name); virtual ~PGItem(); - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); protected: PGItem(const PGItem ©); @@ -137,38 +137,38 @@ PUBLISHED: PGFrameStyle get_frame_style(int state); void set_frame_style(int state, const PGFrameStyle &style); - INLINE const string &get_id() const; - INLINE void set_id(const string &id); + INLINE const std::string &get_id() const; + INLINE void set_id(const std::string &id); - INLINE static string get_enter_prefix(); - INLINE static string get_exit_prefix(); - INLINE static string get_within_prefix(); - INLINE static string get_without_prefix(); - INLINE static string get_focus_in_prefix(); - INLINE static string get_focus_out_prefix(); - INLINE static string get_press_prefix(); - INLINE static string get_repeat_prefix(); - INLINE static string get_release_prefix(); - INLINE static string get_keystroke_prefix(); + INLINE static std::string get_enter_prefix(); + INLINE static std::string get_exit_prefix(); + INLINE static std::string get_within_prefix(); + INLINE static std::string get_without_prefix(); + INLINE static std::string get_focus_in_prefix(); + INLINE static std::string get_focus_out_prefix(); + INLINE static std::string get_press_prefix(); + INLINE static std::string get_repeat_prefix(); + INLINE static std::string get_release_prefix(); + INLINE static std::string get_keystroke_prefix(); - INLINE string get_enter_event() const; - INLINE string get_exit_event() const; - INLINE string get_within_event() const; - INLINE string get_without_event() const; - INLINE string get_focus_in_event() const; - INLINE string get_focus_out_event() const; - INLINE string get_press_event(const ButtonHandle &button) const; - INLINE string get_repeat_event(const ButtonHandle &button) const; - INLINE string get_release_event(const ButtonHandle &button) const; - INLINE string get_keystroke_event() const; + INLINE std::string get_enter_event() const; + INLINE std::string get_exit_event() const; + INLINE std::string get_within_event() const; + INLINE std::string get_without_event() const; + INLINE std::string get_focus_in_event() const; + INLINE std::string get_focus_out_event() const; + INLINE std::string get_press_event(const ButtonHandle &button) const; + INLINE std::string get_repeat_event(const ButtonHandle &button) const; + INLINE std::string get_release_event(const ButtonHandle &button) const; + INLINE std::string get_keystroke_event() const; INLINE LMatrix4 get_frame_inv_xform() const; #ifdef HAVE_AUDIO - void set_sound(const string &event, AudioSound *sound); - void clear_sound(const string &event); - AudioSound *get_sound(const string &event) const; - bool has_sound(const string &event) const; + void set_sound(const std::string &event, AudioSound *sound); + void clear_sound(const std::string &event); + AudioSound *get_sound(const std::string &event) const; + bool has_sound(const std::string &event) const; #endif static TextNode *get_text_node(); @@ -177,7 +177,7 @@ PUBLISHED: INLINE static PGItem *get_focus_item(); protected: - void play_sound(const string &event); + void play_sound(const std::string &event); void reduce_region(LVecBase4 &clip, PGItem *obscurer) const; void reduce_region(LVecBase4 &frame, PN_stdfloat px, PN_stdfloat py) const; @@ -231,7 +231,7 @@ private: StateDefs _state_defs; #ifdef HAVE_AUDIO - typedef pmap Sounds; + typedef pmap Sounds; Sounds _sounds; #endif diff --git a/panda/src/pgui/pgMouseWatcherParameter.h b/panda/src/pgui/pgMouseWatcherParameter.h index 930d1d55c2..ff8c41cfba 100644 --- a/panda/src/pgui/pgMouseWatcherParameter.h +++ b/panda/src/pgui/pgMouseWatcherParameter.h @@ -37,7 +37,7 @@ public: virtual ~PGMouseWatcherParameter(); PUBLISHED: - void output(ostream &out) const; + void output(std::ostream &out) const; public: static TypeHandle get_class_type() { diff --git a/panda/src/pgui/pgScrollFrame.h b/panda/src/pgui/pgScrollFrame.h index c60a161a78..de01954e0d 100644 --- a/panda/src/pgui/pgScrollFrame.h +++ b/panda/src/pgui/pgScrollFrame.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_PGUI PGScrollFrame : public PGVirtualFrame, public PGSliderBarNotify { PUBLISHED: - explicit PGScrollFrame(const string &name = ""); + explicit PGScrollFrame(const std::string &name = ""); virtual ~PGScrollFrame(); protected: diff --git a/panda/src/pgui/pgSliderBar.I b/panda/src/pgui/pgSliderBar.I index 866dd1dec3..da5b97c153 100644 --- a/panda/src/pgui/pgSliderBar.I +++ b/panda/src/pgui/pgSliderBar.I @@ -360,7 +360,7 @@ get_right_button() const { * PGSliderBars. The adjust event is the concatenation of this string * followed by get_id(). */ -INLINE string PGSliderBar:: +INLINE std::string PGSliderBar:: get_adjust_prefix() { return "adjust-"; } @@ -369,7 +369,7 @@ get_adjust_prefix() { * Returns the event name that will be thrown when the slider bar value is * adjusted by the user or programmatically. */ -INLINE string PGSliderBar:: +INLINE std::string PGSliderBar:: get_adjust_event() const { LightReMutexHolder holder(_lock); return get_adjust_prefix() + get_id(); @@ -381,7 +381,7 @@ get_adjust_event() const { */ INLINE void PGSliderBar:: internal_set_ratio(PN_stdfloat ratio) { - _ratio = max(min(ratio, (PN_stdfloat)1.0), (PN_stdfloat)0.0); + _ratio = std::max(std::min(ratio, (PN_stdfloat)1.0), (PN_stdfloat)0.0); _needs_reposition = true; adjust(); } diff --git a/panda/src/pgui/pgSliderBar.h b/panda/src/pgui/pgSliderBar.h index c08a98e172..4049f9aa74 100644 --- a/panda/src/pgui/pgSliderBar.h +++ b/panda/src/pgui/pgSliderBar.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_PGUI PGSliderBar : public PGItem, public PGButtonNotify { PUBLISHED: - explicit PGSliderBar(const string &name = ""); + explicit PGSliderBar(const std::string &name = ""); virtual ~PGSliderBar(); protected: @@ -93,8 +93,8 @@ PUBLISHED: INLINE void clear_right_button(); INLINE PGButton *get_right_button() const; - INLINE static string get_adjust_prefix(); - INLINE string get_adjust_event() const; + INLINE static std::string get_adjust_prefix(); + INLINE std::string get_adjust_event() const; virtual void set_active(bool active); diff --git a/panda/src/pgui/pgTop.h b/panda/src/pgui/pgTop.h index 45376e99f5..1d5e739c8e 100644 --- a/panda/src/pgui/pgTop.h +++ b/panda/src/pgui/pgTop.h @@ -37,7 +37,7 @@ class PGMouseWatcherGroup; */ class EXPCL_PANDA_PGUI PGTop : public PandaNode { PUBLISHED: - explicit PGTop(const string &name); + explicit PGTop(const std::string &name); virtual ~PGTop(); protected: diff --git a/panda/src/pgui/pgVirtualFrame.h b/panda/src/pgui/pgVirtualFrame.h index d6505faaaa..c8aff4fca6 100644 --- a/panda/src/pgui/pgVirtualFrame.h +++ b/panda/src/pgui/pgVirtualFrame.h @@ -42,7 +42,7 @@ class TransformState; */ class EXPCL_PANDA_PGUI PGVirtualFrame : public PGItem { PUBLISHED: - explicit PGVirtualFrame(const string &name = ""); + explicit PGVirtualFrame(const std::string &name = ""); virtual ~PGVirtualFrame(); protected: diff --git a/panda/src/pgui/pgWaitBar.h b/panda/src/pgui/pgWaitBar.h index 92381870dd..9f8415d28c 100644 --- a/panda/src/pgui/pgWaitBar.h +++ b/panda/src/pgui/pgWaitBar.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGUI PGWaitBar : public PGItem { PUBLISHED: - explicit PGWaitBar(const string &name = ""); + explicit PGWaitBar(const std::string &name = ""); virtual ~PGWaitBar(); protected: diff --git a/panda/src/physics/actorNode.h b/panda/src/physics/actorNode.h index bfa4ffff66..17e704a3ce 100644 --- a/panda/src/physics/actorNode.h +++ b/panda/src/physics/actorNode.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAPHYSICS ActorNode : public PhysicalNode { PUBLISHED: - explicit ActorNode(const string &name = ""); + explicit ActorNode(const std::string &name = ""); ActorNode(const ActorNode ©); virtual ~ActorNode(); @@ -39,7 +39,7 @@ PUBLISHED: void update_transform(); void set_transform_limit(PN_stdfloat limit) { _transform_limit = limit; }; - virtual void write(ostream &out, int indent=0) const; + virtual void write(std::ostream &out, int indent=0) const; private: PhysicsObject *_mass_center; diff --git a/panda/src/physics/angularEulerIntegrator.h b/panda/src/physics/angularEulerIntegrator.h index 3e0790950c..aa9cc71a78 100644 --- a/panda/src/physics/angularEulerIntegrator.h +++ b/panda/src/physics/angularEulerIntegrator.h @@ -25,8 +25,8 @@ PUBLISHED: AngularEulerIntegrator(); virtual ~AngularEulerIntegrator(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: virtual void child_integrate(Physical *physical, diff --git a/panda/src/physics/angularForce.h b/panda/src/physics/angularForce.h index 8ee5974716..85d6b09a1a 100644 --- a/panda/src/physics/angularForce.h +++ b/panda/src/physics/angularForce.h @@ -27,8 +27,8 @@ PUBLISHED: LRotation get_quat(const PhysicsObject *po); virtual bool is_linear() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: AngularForce(); diff --git a/panda/src/physics/angularIntegrator.h b/panda/src/physics/angularIntegrator.h index 5ca3fd729a..0accd60014 100644 --- a/panda/src/physics/angularIntegrator.h +++ b/panda/src/physics/angularIntegrator.h @@ -31,8 +31,8 @@ public: PN_stdfloat dt); PUBLISHED: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: AngularIntegrator(); diff --git a/panda/src/physics/angularVectorForce.h b/panda/src/physics/angularVectorForce.h index f42c2f0c81..3560f67db0 100644 --- a/panda/src/physics/angularVectorForce.h +++ b/panda/src/physics/angularVectorForce.h @@ -31,8 +31,8 @@ PUBLISHED: INLINE void set_hpr(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r); INLINE LRotation get_local_quat() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: LRotation _fvec; diff --git a/panda/src/physics/baseForce.h b/panda/src/physics/baseForce.h index 90d510013b..9d046596a3 100644 --- a/panda/src/physics/baseForce.h +++ b/panda/src/physics/baseForce.h @@ -37,8 +37,8 @@ PUBLISHED: INLINE ForceNode *get_force_node() const; INLINE NodePath get_force_node_path() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level=0) const; protected: BaseForce(bool active = true); diff --git a/panda/src/physics/baseIntegrator.h b/panda/src/physics/baseIntegrator.h index 9d134fa2ee..528f882021 100644 --- a/panda/src/physics/baseIntegrator.h +++ b/panda/src/physics/baseIntegrator.h @@ -40,12 +40,12 @@ public: virtual ~BaseIntegrator(); PUBLISHED: - virtual void output(ostream &out) const; - virtual void write_precomputed_linear_matrices(ostream &out, + virtual void output(std::ostream &out) const; + virtual void write_precomputed_linear_matrices(std::ostream &out, int indent=0) const; - virtual void write_precomputed_angular_matrices(ostream &out, + virtual void write_precomputed_angular_matrices(std::ostream &out, int indent=0) const; - virtual void write(ostream &out, int indent=0) const; + virtual void write(std::ostream &out, int indent=0) const; protected: BaseIntegrator(); diff --git a/panda/src/physics/config_physics.h b/panda/src/physics/config_physics.h index 5b7249d159..cfbbe5146b 100644 --- a/panda/src/physics/config_physics.h +++ b/panda/src/physics/config_physics.h @@ -32,22 +32,22 @@ extern EXPCL_PANDAPHYSICS void init_libphysics(); #define physics_spam(msg) \ if (physics_cat.is_spam()) { \ - physics_cat->spam() << msg << endl; \ + physics_cat->spam() << msg << std::endl; \ } else {} #define physics_debug(msg) \ if (physics_cat.is_debug()) { \ - physics_cat->debug() << msg << endl; \ + physics_cat->debug() << msg << std::endl; \ } else {} #define physics_info(msg) \ - physics_cat->info() << msg << endl + physics_cat->info() << msg << std::endl #define physics_warning(msg) \ - physics_cat->warning() << msg << endl + physics_cat->warning() << msg << std::endl #define physics_error(msg) \ - physics_cat->error() << msg << endl + physics_cat->error() << msg << std::endl #else //][ // Release build: #undef PHYSICS_DEBUG @@ -60,6 +60,6 @@ extern EXPCL_PANDAPHYSICS void init_libphysics(); #endif //] #define audio_error(msg) \ - audio_cat->error() << msg << endl + audio_cat->error() << msg << std::endl #endif // CONFIG_PHYSICS_H diff --git a/panda/src/physics/forceNode.h b/panda/src/physics/forceNode.h index 3c46ab3d6e..851b54259b 100644 --- a/panda/src/physics/forceNode.h +++ b/panda/src/physics/forceNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDAPHYSICS ForceNode : public PandaNode { PUBLISHED: - explicit ForceNode(const string &name); + explicit ForceNode(const std::string &name); INLINE void clear(); INLINE BaseForce *get_force(size_t index) const; INLINE size_t get_num_forces() const; @@ -41,9 +41,9 @@ PUBLISHED: MAKE_SEQ_PROPERTY(forces, get_num_forces, get_force, set_force, remove_force, insert_force); - virtual void output(ostream &out) const; - virtual void write_forces(ostream &out, int indent=0) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write_forces(std::ostream &out, int indent=0) const; + virtual void write(std::ostream &out, int indent=0) const; public: virtual ~ForceNode(); diff --git a/panda/src/physics/linearControlForce.h b/panda/src/physics/linearControlForce.h index b1a28a5405..e769abbaa8 100644 --- a/panda/src/physics/linearControlForce.h +++ b/panda/src/physics/linearControlForce.h @@ -38,8 +38,8 @@ PUBLISHED: INLINE LVector3 get_local_vector() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: CPT(PhysicsObject) _physics_object; diff --git a/panda/src/physics/linearCylinderVortexForce.h b/panda/src/physics/linearCylinderVortexForce.h index e04328580f..d41b4b638a 100644 --- a/panda/src/physics/linearCylinderVortexForce.h +++ b/panda/src/physics/linearCylinderVortexForce.h @@ -42,8 +42,8 @@ PUBLISHED: INLINE void set_length(PN_stdfloat length); INLINE PN_stdfloat get_length() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _radius; diff --git a/panda/src/physics/linearDistanceForce.h b/panda/src/physics/linearDistanceForce.h index 208fc38bfd..52f30411d4 100644 --- a/panda/src/physics/linearDistanceForce.h +++ b/panda/src/physics/linearDistanceForce.h @@ -39,8 +39,8 @@ PUBLISHED: INLINE PN_stdfloat get_scalar_term() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: LPoint3 _force_center; diff --git a/panda/src/physics/linearEulerIntegrator.h b/panda/src/physics/linearEulerIntegrator.h index 566c16d1d2..69c6d67649 100644 --- a/panda/src/physics/linearEulerIntegrator.h +++ b/panda/src/physics/linearEulerIntegrator.h @@ -25,8 +25,8 @@ PUBLISHED: LinearEulerIntegrator(); virtual ~LinearEulerIntegrator(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: virtual void child_integrate(Physical *physical, diff --git a/panda/src/physics/linearForce.h b/panda/src/physics/linearForce.h index b102b5f330..a3208d6e90 100644 --- a/panda/src/physics/linearForce.h +++ b/panda/src/physics/linearForce.h @@ -39,8 +39,8 @@ PUBLISHED: virtual bool is_linear() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: LinearForce(PN_stdfloat a, bool mass); diff --git a/panda/src/physics/linearFrictionForce.h b/panda/src/physics/linearFrictionForce.h index 6e58b6d332..7a3dd86bef 100644 --- a/panda/src/physics/linearFrictionForce.h +++ b/panda/src/physics/linearFrictionForce.h @@ -28,8 +28,8 @@ PUBLISHED: INLINE void set_coef(PN_stdfloat coef); INLINE PN_stdfloat get_coef() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: PN_stdfloat _coef; diff --git a/panda/src/physics/linearIntegrator.h b/panda/src/physics/linearIntegrator.h index 85d717677b..4d0eca841b 100644 --- a/panda/src/physics/linearIntegrator.h +++ b/panda/src/physics/linearIntegrator.h @@ -32,8 +32,8 @@ public: PN_stdfloat dt); PUBLISHED: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: LinearIntegrator(); diff --git a/panda/src/physics/linearJitterForce.h b/panda/src/physics/linearJitterForce.h index eba7b0c9ff..79dd49be85 100644 --- a/panda/src/physics/linearJitterForce.h +++ b/panda/src/physics/linearJitterForce.h @@ -26,8 +26,8 @@ PUBLISHED: LinearJitterForce(const LinearJitterForce ©); virtual ~LinearJitterForce(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: virtual LVector3 get_child_vector(const PhysicsObject *po); diff --git a/panda/src/physics/linearNoiseForce.h b/panda/src/physics/linearNoiseForce.h index 74b1ccd2d7..1fae5f1217 100644 --- a/panda/src/physics/linearNoiseForce.h +++ b/panda/src/physics/linearNoiseForce.h @@ -27,8 +27,8 @@ PUBLISHED: LinearNoiseForce(const LinearNoiseForce ©); virtual ~LinearNoiseForce(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; public: static ConfigVariableInt _random_seed; diff --git a/panda/src/physics/linearRandomForce.h b/panda/src/physics/linearRandomForce.h index ad440c034f..7f097ca53a 100644 --- a/panda/src/physics/linearRandomForce.h +++ b/panda/src/physics/linearRandomForce.h @@ -26,8 +26,8 @@ class EXPCL_PANDAPHYSICS LinearRandomForce : public LinearForce { PUBLISHED: virtual ~LinearRandomForce(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; protected: static PN_stdfloat bounded_rand(); diff --git a/panda/src/physics/linearSinkForce.h b/panda/src/physics/linearSinkForce.h index d8127049f1..235085b253 100644 --- a/panda/src/physics/linearSinkForce.h +++ b/panda/src/physics/linearSinkForce.h @@ -27,8 +27,8 @@ PUBLISHED: LinearSinkForce(const LinearSinkForce ©); virtual ~LinearSinkForce(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: virtual LVector3 get_child_vector(const PhysicsObject *po); diff --git a/panda/src/physics/linearSourceForce.h b/panda/src/physics/linearSourceForce.h index 7d757a032f..52af5ee9c6 100644 --- a/panda/src/physics/linearSourceForce.h +++ b/panda/src/physics/linearSourceForce.h @@ -27,8 +27,8 @@ PUBLISHED: LinearSourceForce(const LinearSourceForce ©); virtual ~LinearSourceForce(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: virtual LVector3 get_child_vector(const PhysicsObject *po); diff --git a/panda/src/physics/linearUserDefinedForce.h b/panda/src/physics/linearUserDefinedForce.h index 93051290c2..2908313095 100644 --- a/panda/src/physics/linearUserDefinedForce.h +++ b/panda/src/physics/linearUserDefinedForce.h @@ -28,8 +28,8 @@ PUBLISHED: INLINE void set_proc(LVector3 (*proc)(const PhysicsObject *)); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; private: LVector3 (*_proc)(const PhysicsObject *po); diff --git a/panda/src/physics/linearVectorForce.h b/panda/src/physics/linearVectorForce.h index c0a5cd2ea6..75d624cb64 100644 --- a/panda/src/physics/linearVectorForce.h +++ b/panda/src/physics/linearVectorForce.h @@ -33,8 +33,8 @@ PUBLISHED: INLINE LVector3 get_local_vector() const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent=0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent=0) const; public: INLINE LinearVectorForce& operator += (const LinearVectorForce &other); diff --git a/panda/src/physics/physical.h b/panda/src/physics/physical.h index 8a51e43e51..3ab30e9ee4 100644 --- a/panda/src/physics/physical.h +++ b/panda/src/physics/physical.h @@ -73,14 +73,14 @@ PUBLISHED: const PhysicsObjectCollection get_objects() const; - virtual void output(ostream &out = cout) const; + virtual void output(std::ostream &out = std::cout) const; virtual void write_physics_objects( - ostream &out = cout, int indent=0) const; + std::ostream &out = std::cout, int indent=0) const; virtual void write_linear_forces( - ostream &out = cout, int indent=0) const; + std::ostream &out = std::cout, int indent=0) const; virtual void write_angular_forces( - ostream &out = cout, int indent=0) const; - virtual void write(ostream &out = cout, int indent=0) const; + std::ostream &out = std::cout, int indent=0) const; + virtual void write(std::ostream &out = std::cout, int indent=0) const; public: INLINE const PhysicsObject::Vector &get_object_vector() const; diff --git a/panda/src/physics/physicalNode.h b/panda/src/physics/physicalNode.h index 42f6822dde..57ea5026f6 100644 --- a/panda/src/physics/physicalNode.h +++ b/panda/src/physics/physicalNode.h @@ -27,7 +27,7 @@ */ class EXPCL_PANDAPHYSICS PhysicalNode : public PandaNode { PUBLISHED: - explicit PhysicalNode(const string &name); + explicit PhysicalNode(const std::string &name); INLINE void clear(); INLINE Physical *get_physical(size_t index) const; INLINE size_t get_num_physicals() const; @@ -43,7 +43,7 @@ PUBLISHED: MAKE_SEQ_PROPERTY(physicals, get_num_physicals, get_physical, set_physical, remove_physical, insert_physical); - virtual void write(ostream &out, int indent=0) const; + virtual void write(std::ostream &out, int indent=0) const; public: virtual ~PhysicalNode(); diff --git a/panda/src/physics/physicsManager.I b/panda/src/physics/physicsManager.I index 3e4704a3ba..386d53d24c 100644 --- a/panda/src/physics/physicsManager.I +++ b/panda/src/physics/physicsManager.I @@ -44,10 +44,10 @@ add_linear_force(LinearForce *f) { */ INLINE void PhysicsManager:: attach_physicalnode(PhysicalNode *p) { - cerr<<"attach_physicalnode (aka attachPhysicalnode) has been" + std::cerr<<"attach_physicalnode (aka attachPhysicalnode) has been" <<"replaced with attach_physical_node (aka attachPhysicalNode)." <<" Please change the spelling of the function in your code." - <> (istream &in, PhysxEnums::PhysxUpAxis &axis); +EXPCL_PANDAPHYSX std::ostream &operator << (std::ostream &out, PhysxEnums::PhysxUpAxis axis); +EXPCL_PANDAPHYSX std::istream &operator >> (std::istream &in, PhysxEnums::PhysxUpAxis &axis); #endif diff --git a/panda/src/physx/physxFileStream.h b/panda/src/physx/physxFileStream.h index 5b7682c9e0..3e9f4752e9 100644 --- a/panda/src/physx/physxFileStream.h +++ b/panda/src/physx/physxFileStream.h @@ -51,7 +51,7 @@ private: // read PT(VirtualFile) _vf; - istream *_in; + std::istream *_in; }; #endif // PHYSXFILESTREAM_H diff --git a/panda/src/physx/physxForceField.I b/panda/src/physx/physxForceField.I index 8a1bf87034..01dbd645ef 100644 --- a/panda/src/physx/physxForceField.I +++ b/panda/src/physx/physxForceField.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxForceField:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " " << _name diff --git a/panda/src/physx/physxForceField.h b/panda/src/physx/physxForceField.h index ca9f068795..e1dbb85084 100644 --- a/panda/src/physx/physxForceField.h +++ b/panda/src/physx/physxForceField.h @@ -53,7 +53,7 @@ PUBLISHED: void release(); INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: INLINE NxForceField *ptr() const { return _ptr; }; @@ -63,7 +63,7 @@ public: private: NxForceField *_ptr; - string _name; + std::string _name; public: static TypeHandle get_class_type() { diff --git a/panda/src/physx/physxForceFieldDesc.h b/panda/src/physx/physxForceFieldDesc.h index accacf961e..f7974acd19 100644 --- a/panda/src/physx/physxForceFieldDesc.h +++ b/panda/src/physx/physxForceFieldDesc.h @@ -63,7 +63,7 @@ public: NxForceFieldLinearKernelDesc _kernel; private: - string _name; + std::string _name; }; #include "physxForceFieldDesc.I" diff --git a/panda/src/physx/physxForceFieldShape.I b/panda/src/physx/physxForceFieldShape.I index 1dd06f5fe8..a58a90136f 100644 --- a/panda/src/physx/physxForceFieldShape.I +++ b/panda/src/physx/physxForceFieldShape.I @@ -32,7 +32,7 @@ ls() const { * */ INLINE void PhysxForceFieldShape:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " " << _name diff --git a/panda/src/physx/physxForceFieldShape.h b/panda/src/physx/physxForceFieldShape.h index e9e47cf510..3e6a43fe20 100644 --- a/panda/src/physx/physxForceFieldShape.h +++ b/panda/src/physx/physxForceFieldShape.h @@ -45,7 +45,7 @@ PUBLISHED: LPoint3f get_pos() const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: static PhysxForceFieldShape *factory(NxShapeType shapeType); @@ -59,7 +59,7 @@ protected: INLINE PhysxForceFieldShape(); private: - string _name; + std::string _name; public: static TypeHandle get_class_type() { diff --git a/panda/src/physx/physxForceFieldShapeDesc.h b/panda/src/physx/physxForceFieldShapeDesc.h index 1071f9dddc..fd5ab6dc1c 100644 --- a/panda/src/physx/physxForceFieldShapeDesc.h +++ b/panda/src/physx/physxForceFieldShapeDesc.h @@ -41,7 +41,7 @@ public: virtual NxForceFieldShapeDesc *ptr() const = 0; private: - string _name; + std::string _name; protected: INLINE PhysxForceFieldShapeDesc(); diff --git a/panda/src/physx/physxForceFieldShapeGroup.I b/panda/src/physx/physxForceFieldShapeGroup.I index 324b56b396..7d65ae2d18 100644 --- a/panda/src/physx/physxForceFieldShapeGroup.I +++ b/panda/src/physx/physxForceFieldShapeGroup.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxForceFieldShapeGroup:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " " << _name diff --git a/panda/src/physx/physxForceFieldShapeGroup.h b/panda/src/physx/physxForceFieldShapeGroup.h index b03e34cfe9..c23b6de828 100644 --- a/panda/src/physx/physxForceFieldShapeGroup.h +++ b/panda/src/physx/physxForceFieldShapeGroup.h @@ -54,7 +54,7 @@ PUBLISHED: void release(); INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: INLINE NxForceFieldShapeGroup *ptr() const { return _ptr; }; @@ -66,7 +66,7 @@ public: private: NxForceFieldShapeGroup *_ptr; - string _name; + std::string _name; public: static TypeHandle get_class_type() { diff --git a/panda/src/physx/physxForceFieldShapeGroupDesc.h b/panda/src/physx/physxForceFieldShapeGroupDesc.h index 1f4a9a3206..fab6c8d0f5 100644 --- a/panda/src/physx/physxForceFieldShapeGroupDesc.h +++ b/panda/src/physx/physxForceFieldShapeGroupDesc.h @@ -45,7 +45,7 @@ public: NxForceFieldShapeGroupDesc _desc; private: - string _name; + std::string _name; }; #include "physxForceFieldShapeGroupDesc.I" diff --git a/panda/src/physx/physxGroupsMask.h b/panda/src/physx/physxGroupsMask.h index 2383a2675d..bd1bfb129b 100644 --- a/panda/src/physx/physxGroupsMask.h +++ b/panda/src/physx/physxGroupsMask.h @@ -32,7 +32,7 @@ PUBLISHED: void clear_bit(unsigned int idx); bool get_bit(unsigned int idx) const; - void output(ostream &out) const; + void output(std::ostream &out) const; static PhysxGroupsMask all_on(); static PhysxGroupsMask all_off(); @@ -54,7 +54,7 @@ public: NxGroupsMask _mask; }; -INLINE ostream &operator << (ostream &out, const PhysxGroupsMask &mask) { +INLINE std::ostream &operator << (std::ostream &out, const PhysxGroupsMask &mask) { mask.output(out); return out; } diff --git a/panda/src/physx/physxHeightField.I b/panda/src/physx/physxHeightField.I index e06fb3425e..1f71266a8f 100644 --- a/panda/src/physx/physxHeightField.I +++ b/panda/src/physx/physxHeightField.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxHeightField:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " (at 0x" << this << ")\n"; diff --git a/panda/src/physx/physxHeightField.h b/panda/src/physx/physxHeightField.h index 4449e09022..3741533d1b 100644 --- a/panda/src/physx/physxHeightField.h +++ b/panda/src/physx/physxHeightField.h @@ -49,7 +49,7 @@ PUBLISHED: float get_height(float x, float y) const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: INLINE PhysxHeightField(); diff --git a/panda/src/physx/physxJoint.I b/panda/src/physx/physxJoint.I index 1acb52d01d..663f2b3253 100644 --- a/panda/src/physx/physxJoint.I +++ b/panda/src/physx/physxJoint.I @@ -32,7 +32,7 @@ ls() const { * */ INLINE void PhysxJoint:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " " << _name diff --git a/panda/src/physx/physxJoint.h b/panda/src/physx/physxJoint.h index 25b623c2bc..adb536e2fb 100644 --- a/panda/src/physx/physxJoint.h +++ b/panda/src/physx/physxJoint.h @@ -55,7 +55,7 @@ PUBLISHED: bool get_use_acceleration_spring() const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: static PhysxJoint *factory(NxJointType shapeType); @@ -69,7 +69,7 @@ protected: INLINE PhysxJoint(); private: - string _name; + std::string _name; public: static TypeHandle get_class_type() { diff --git a/panda/src/physx/physxJointDesc.h b/panda/src/physx/physxJointDesc.h index 9f24e5a214..b123dd81e2 100644 --- a/panda/src/physx/physxJointDesc.h +++ b/panda/src/physx/physxJointDesc.h @@ -57,7 +57,7 @@ public: virtual NxJointDesc *ptr() const = 0; private: - string _name; + std::string _name; protected: INLINE PhysxJointDesc(); diff --git a/panda/src/physx/physxLinearInterpolationValues.h b/panda/src/physx/physxLinearInterpolationValues.h index 4770393e34..9bc5acb4d7 100644 --- a/panda/src/physx/physxLinearInterpolationValues.h +++ b/panda/src/physx/physxLinearInterpolationValues.h @@ -28,7 +28,7 @@ public: INLINE PhysxLinearInterpolationValues(); INLINE ~PhysxLinearInterpolationValues(); - void output(ostream &out) const; + void output(std::ostream &out) const; void clear(); void insert(float index, float value); @@ -45,7 +45,7 @@ private: MapType _map; }; -INLINE ostream &operator << (ostream &out, const PhysxLinearInterpolationValues &values) { +INLINE std::ostream &operator << (std::ostream &out, const PhysxLinearInterpolationValues &values) { values.output(out); return out; } diff --git a/panda/src/physx/physxManager.I b/panda/src/physx/physxManager.I index f6011a7e43..c1bc8a59c9 100644 --- a/panda/src/physx/physxManager.I +++ b/panda/src/physx/physxManager.I @@ -192,7 +192,7 @@ ls() const { * */ INLINE void PhysxManager:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << "PhysxManager\n"; diff --git a/panda/src/physx/physxManager.h b/panda/src/physx/physxManager.h index 430bebd24f..ed5f0b79d5 100644 --- a/panda/src/physx/physxManager.h +++ b/panda/src/physx/physxManager.h @@ -89,7 +89,7 @@ PUBLISHED: MAKE_SEQ(get_ccd_skeletons, get_num_ccd_skeletons, get_ccd_skeleton); INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: INLINE NxPhysicsSDK *get_sdk() const; diff --git a/panda/src/physx/physxMask.h b/panda/src/physx/physxMask.h index 5843d18939..9117d875bf 100644 --- a/panda/src/physx/physxMask.h +++ b/panda/src/physx/physxMask.h @@ -31,7 +31,7 @@ PUBLISHED: void clear_bit(unsigned int idx); bool get_bit(unsigned int idx) const; - void output(ostream &out) const; + void output(std::ostream &out) const; static PhysxMask all_on(); static PhysxMask all_off(); @@ -43,7 +43,7 @@ private: NxU32 _mask; }; -INLINE ostream &operator << (ostream &out, const PhysxMask &mask) { +INLINE std::ostream &operator << (std::ostream &out, const PhysxMask &mask) { mask.output(out); return out; } diff --git a/panda/src/physx/physxMaterial.I b/panda/src/physx/physxMaterial.I index 22500d8a35..7bc1f46db4 100644 --- a/panda/src/physx/physxMaterial.I +++ b/panda/src/physx/physxMaterial.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxMaterial:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " (at 0x" << this << ")\n"; diff --git a/panda/src/physx/physxMaterial.h b/panda/src/physx/physxMaterial.h index c6e6b4d2d2..efbeaae9f6 100644 --- a/panda/src/physx/physxMaterial.h +++ b/panda/src/physx/physxMaterial.h @@ -74,7 +74,7 @@ PUBLISHED: PhysxCombineMode get_restitution_combine_mode() const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; PUBLISHED: void release(); diff --git a/panda/src/physx/physxMeshPool.h b/panda/src/physx/physxMeshPool.h index 30bec8141b..b66d06df7c 100644 --- a/panda/src/physx/physxMeshPool.h +++ b/panda/src/physx/physxMeshPool.h @@ -50,7 +50,7 @@ PUBLISHED: static bool release_soft_body_mesh(PhysxSoftBodyMesh *mesh); static void list_contents(); - static void list_contents(ostream &out); + static void list_contents(std::ostream &out); private: static bool check_filename(const Filename &fn); diff --git a/panda/src/physx/physxObject.I b/panda/src/physx/physxObject.I index 844aefd182..b2331f23d1 100644 --- a/panda/src/physx/physxObject.I +++ b/panda/src/physx/physxObject.I @@ -50,11 +50,11 @@ has_python_tags() const { * */ INLINE void PhysxObject:: -set_python_tag(const string &key, PyObject *value) { +set_python_tag(const std::string &key, PyObject *value) { Py_XINCREF(value); - pair result; + std::pair result; result = _python_tag_data.insert(PythonTagData::value_type(key, value)); if (!result.second) { @@ -72,7 +72,7 @@ set_python_tag(const string &key, PyObject *value) { * */ INLINE PyObject *PhysxObject:: -get_python_tag(const string &key) const { +get_python_tag(const std::string &key) const { PythonTagData::const_iterator ti; ti = _python_tag_data.find(key); @@ -91,7 +91,7 @@ get_python_tag(const string &key) const { * */ INLINE bool PhysxObject:: -has_python_tag(const string &key) const { +has_python_tag(const std::string &key) const { PythonTagData::const_iterator ti; ti = _python_tag_data.find(key); @@ -102,7 +102,7 @@ has_python_tag(const string &key) const { * */ INLINE void PhysxObject:: -clear_python_tag(const string &key) { +clear_python_tag(const std::string &key) { PythonTagData::iterator ti; ti = _python_tag_data.find(key); diff --git a/panda/src/physx/physxObject.h b/panda/src/physx/physxObject.h index 717405736c..0a40cb66fb 100644 --- a/panda/src/physx/physxObject.h +++ b/panda/src/physx/physxObject.h @@ -29,16 +29,16 @@ class EXPCL_PANDAPHYSX PhysxObject : public TypedReferenceCount { #ifdef HAVE_PYTHON PUBLISHED: - INLINE void set_python_tag(const string &key, PyObject *value); - INLINE PyObject *get_python_tag(const string &key) const; - INLINE bool has_python_tag(const string &key) const; - INLINE void clear_python_tag(const string &key); + INLINE void set_python_tag(const std::string &key, PyObject *value); + INLINE PyObject *get_python_tag(const std::string &key) const; + INLINE bool has_python_tag(const std::string &key) const; + INLINE void clear_python_tag(const std::string &key); INLINE bool has_python_tags() const; #endif // HAVE_PYTHON PUBLISHED: virtual void ls() const = 0; - virtual void ls(ostream &out, int indent_level=0) const = 0; + virtual void ls(std::ostream &out, int indent_level=0) const = 0; protected: INLINE PhysxObject(); @@ -55,7 +55,7 @@ protected: #ifdef HAVE_PYTHON private: - typedef phash_map PythonTagData; + typedef phash_map PythonTagData; PythonTagData _python_tag_data; #endif // HAVE_PYTHON diff --git a/panda/src/physx/physxObjectCollection.I b/panda/src/physx/physxObjectCollection.I index 62270910f7..54137cec40 100644 --- a/panda/src/physx/physxObjectCollection.I +++ b/panda/src/physx/physxObjectCollection.I @@ -46,7 +46,7 @@ remove(PT(T) object) { } else { - physx_cat.warning() << "object not found in collection" << endl; + physx_cat.warning() << "object not found in collection" << std::endl; } } @@ -89,7 +89,7 @@ ls() const { */ template INLINE void PhysxObjectCollection:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { for (unsigned int i=0; i < size(); i++) { get(i)->ls(out, indent_level + 2); diff --git a/panda/src/physx/physxObjectCollection.h b/panda/src/physx/physxObjectCollection.h index ace4799e57..77521de8aa 100644 --- a/panda/src/physx/physxObjectCollection.h +++ b/panda/src/physx/physxObjectCollection.h @@ -32,7 +32,7 @@ public: INLINE T *operator [] (unsigned int index) const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; private: pvector _objects; diff --git a/panda/src/physx/physxScene.I b/panda/src/physx/physxScene.I index 9f9e2c5aa8..482ebf829f 100644 --- a/panda/src/physx/physxScene.I +++ b/panda/src/physx/physxScene.I @@ -42,7 +42,7 @@ ls() const { * */ INLINE void PhysxScene:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " (at 0x" << this << ")\n"; diff --git a/panda/src/physx/physxScene.h b/panda/src/physx/physxScene.h index ed3b39ff4e..f8bf2b302b 100644 --- a/panda/src/physx/physxScene.h +++ b/panda/src/physx/physxScene.h @@ -220,7 +220,7 @@ PUBLISHED: void release(); INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: INLINE NxScene *ptr() const { return _ptr; }; diff --git a/panda/src/physx/physxShape.I b/panda/src/physx/physxShape.I index 1aa796edab..110613ba2a 100644 --- a/panda/src/physx/physxShape.I +++ b/panda/src/physx/physxShape.I @@ -32,7 +32,7 @@ ls() const { * */ INLINE void PhysxShape:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " " << _name diff --git a/panda/src/physx/physxShape.h b/panda/src/physx/physxShape.h index 660eecc211..fbfe01d988 100644 --- a/panda/src/physx/physxShape.h +++ b/panda/src/physx/physxShape.h @@ -72,7 +72,7 @@ PUBLISHED: PhysxRaycastHit raycast(const PhysxRay &worldRay, bool firstHit, bool smoothNormal) const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: static PhysxShape *factory(NxShapeType shapeType); @@ -86,7 +86,7 @@ protected: INLINE PhysxShape(); private: - string _name; + std::string _name; PT(PhysxCcdSkeleton) _skel; public: diff --git a/panda/src/physx/physxShapeDesc.h b/panda/src/physx/physxShapeDesc.h index 6ae7452a79..0ef063fe22 100644 --- a/panda/src/physx/physxShapeDesc.h +++ b/panda/src/physx/physxShapeDesc.h @@ -59,7 +59,7 @@ public: virtual NxShapeDesc *ptr() const = 0; private: - string _name; + std::string _name; protected: INLINE PhysxShapeDesc(); diff --git a/panda/src/physx/physxSoftBody.I b/panda/src/physx/physxSoftBody.I index de1a958608..cba8af0499 100644 --- a/panda/src/physx/physxSoftBody.I +++ b/panda/src/physx/physxSoftBody.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxSoftBody:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " " << _name diff --git a/panda/src/physx/physxSoftBody.h b/panda/src/physx/physxSoftBody.h index 58020ed4a8..45416148c3 100644 --- a/panda/src/physx/physxSoftBody.h +++ b/panda/src/physx/physxSoftBody.h @@ -168,7 +168,7 @@ virtual void setForceFieldMaterial (NxForceFieldMaterial)=0 */ INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: void update(); @@ -185,7 +185,7 @@ public: private: NxSoftBody *_ptr; PT(PhysxSoftBodyNode) _node; - string _name; + std::string _name; public: static TypeHandle get_class_type() { diff --git a/panda/src/physx/physxSoftBodyDesc.h b/panda/src/physx/physxSoftBodyDesc.h index 550649a67f..10db3cabae 100644 --- a/panda/src/physx/physxSoftBodyDesc.h +++ b/panda/src/physx/physxSoftBodyDesc.h @@ -73,7 +73,7 @@ public: NxSoftBodyDesc _desc; private: - string _name; + std::string _name; }; #include "physxSoftBodyDesc.I" diff --git a/panda/src/physx/physxSoftBodyMesh.I b/panda/src/physx/physxSoftBodyMesh.I index fd2e3bfe26..314089dda6 100644 --- a/panda/src/physx/physxSoftBodyMesh.I +++ b/panda/src/physx/physxSoftBodyMesh.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxSoftBodyMesh:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " (at 0x" << this << ")\n"; diff --git a/panda/src/physx/physxSoftBodyMesh.h b/panda/src/physx/physxSoftBodyMesh.h index ad6615b39e..1284582285 100644 --- a/panda/src/physx/physxSoftBodyMesh.h +++ b/panda/src/physx/physxSoftBodyMesh.h @@ -31,7 +31,7 @@ PUBLISHED: void release(); INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: INLINE PhysxSoftBodyMesh(); diff --git a/panda/src/physx/physxTriangleMesh.I b/panda/src/physx/physxTriangleMesh.I index 3b983f3893..d4e6a6e994 100644 --- a/panda/src/physx/physxTriangleMesh.I +++ b/panda/src/physx/physxTriangleMesh.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxTriangleMesh:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " (at 0x" << this << ")\n"; diff --git a/panda/src/physx/physxTriangleMesh.h b/panda/src/physx/physxTriangleMesh.h index bf2ef86301..691e012a3f 100644 --- a/panda/src/physx/physxTriangleMesh.h +++ b/panda/src/physx/physxTriangleMesh.h @@ -31,7 +31,7 @@ PUBLISHED: void release(); INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; public: INLINE PhysxTriangleMesh(); diff --git a/panda/src/physx/physxVehicle.I b/panda/src/physx/physxVehicle.I index 3be65f3a92..ed095f7211 100644 --- a/panda/src/physx/physxVehicle.I +++ b/panda/src/physx/physxVehicle.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxVehicle:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " (at 0x" << this << ")\n"; diff --git a/panda/src/physx/physxVehicle.h b/panda/src/physx/physxVehicle.h index 78b358e667..15c3cb6bfa 100644 --- a/panda/src/physx/physxVehicle.h +++ b/panda/src/physx/physxVehicle.h @@ -41,7 +41,7 @@ PUBLISHED: //MAKE_SEQ(get_wheels, get_num_wheels, get_wheel); INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; private: diff --git a/panda/src/physx/physxWheel.I b/panda/src/physx/physxWheel.I index 71b43426fd..1aef97f663 100644 --- a/panda/src/physx/physxWheel.I +++ b/panda/src/physx/physxWheel.I @@ -40,7 +40,7 @@ ls() const { * */ INLINE void PhysxWheel:: -ls(ostream &out, int indent_level) const { +ls(std::ostream &out, int indent_level) const { indent(out, indent_level) << get_type().get_name() << " (at 0x" << this << ")\n"; diff --git a/panda/src/physx/physxWheel.h b/panda/src/physx/physxWheel.h index 84aa5a3acd..457962995c 100644 --- a/panda/src/physx/physxWheel.h +++ b/panda/src/physx/physxWheel.h @@ -40,7 +40,7 @@ PUBLISHED: //NodePath get_node_path() const; INLINE void ls() const; - INLINE void ls(ostream &out, int indent_level=0) const; + INLINE void ls(std::ostream &out, int indent_level=0) const; private: PT(PhysxWheelShape) _wheelShape; diff --git a/panda/src/pipeline/conditionVarDebug.h b/panda/src/pipeline/conditionVarDebug.h index b8243438c9..85da3fde2e 100644 --- a/panda/src/pipeline/conditionVarDebug.h +++ b/panda/src/pipeline/conditionVarDebug.h @@ -43,15 +43,15 @@ PUBLISHED: BLOCKING void wait(); BLOCKING void wait(double timeout); void notify(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: MutexDebug &_mutex; ConditionVarImpl _impl; }; -INLINE ostream & -operator << (ostream &out, const ConditionVarDebug &cv) { +INLINE std::ostream & +operator << (std::ostream &out, const ConditionVarDebug &cv) { cv.output(out); return out; } diff --git a/panda/src/pipeline/conditionVarDirect.h b/panda/src/pipeline/conditionVarDirect.h index 7315c0b0bb..2a8c9197cb 100644 --- a/panda/src/pipeline/conditionVarDirect.h +++ b/panda/src/pipeline/conditionVarDirect.h @@ -43,15 +43,15 @@ PUBLISHED: BLOCKING INLINE void wait(); BLOCKING INLINE void wait(double timeout); INLINE void notify(); - void output(ostream &out) const; + void output(std::ostream &out) const; private: MutexDirect &_mutex; ConditionVarImpl _impl; }; -INLINE ostream & -operator << (ostream &out, const ConditionVarDirect &cv) { +INLINE std::ostream & +operator << (std::ostream &out, const ConditionVarDirect &cv) { cv.output(out); return out; } diff --git a/panda/src/pipeline/conditionVarFullDebug.h b/panda/src/pipeline/conditionVarFullDebug.h index 696a57e2cf..cefb27cad7 100644 --- a/panda/src/pipeline/conditionVarFullDebug.h +++ b/panda/src/pipeline/conditionVarFullDebug.h @@ -44,15 +44,15 @@ PUBLISHED: BLOCKING void wait(double timeout); void notify(); void notify_all(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: MutexDebug &_mutex; ConditionVarFullImpl _impl; }; -INLINE ostream & -operator << (ostream &out, const ConditionVarFullDebug &cv) { +INLINE std::ostream & +operator << (std::ostream &out, const ConditionVarFullDebug &cv) { cv.output(out); return out; } diff --git a/panda/src/pipeline/conditionVarFullDirect.h b/panda/src/pipeline/conditionVarFullDirect.h index e2db984ab9..729185501b 100644 --- a/panda/src/pipeline/conditionVarFullDirect.h +++ b/panda/src/pipeline/conditionVarFullDirect.h @@ -44,15 +44,15 @@ PUBLISHED: BLOCKING INLINE void wait(double timeout); INLINE void notify(); INLINE void notify_all(); - void output(ostream &out) const; + void output(std::ostream &out) const; private: MutexDirect &_mutex; ConditionVarFullImpl _impl; }; -INLINE ostream & -operator << (ostream &out, const ConditionVarFullDirect &cv) { +INLINE std::ostream & +operator << (std::ostream &out, const ConditionVarFullDirect &cv) { cv.output(out); return out; } diff --git a/panda/src/pipeline/cycleData.h b/panda/src/pipeline/cycleData.h index 44c0a7b88c..bd28d4bc60 100644 --- a/panda/src/pipeline/cycleData.h +++ b/panda/src/pipeline/cycleData.h @@ -64,11 +64,11 @@ public: void *extra_data); virtual TypeHandle get_parent_type() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; }; -INLINE ostream & -operator << (ostream &out, const CycleData &cd) { +INLINE std::ostream & +operator << (std::ostream &out, const CycleData &cd) { cd.output(out); return out; } diff --git a/panda/src/pipeline/externalThread.h b/panda/src/pipeline/externalThread.h index aaff62ac18..0b6add95b1 100644 --- a/panda/src/pipeline/externalThread.h +++ b/panda/src/pipeline/externalThread.h @@ -24,7 +24,7 @@ class EXPCL_PANDA_PIPELINE ExternalThread : public Thread { private: ExternalThread(); - ExternalThread(const string &name, const string &sync_name); + ExternalThread(const std::string &name, const std::string &sync_name); virtual void thread_main(); PUBLISHED: diff --git a/panda/src/pipeline/genericThread.h b/panda/src/pipeline/genericThread.h index 3e07e6a7e1..6e6a6ade6a 100644 --- a/panda/src/pipeline/genericThread.h +++ b/panda/src/pipeline/genericThread.h @@ -25,8 +25,8 @@ class EXPCL_PANDA_PIPELINE GenericThread : public Thread { public: typedef void ThreadFunc(void *user_data); - GenericThread(const string &name, const string &sync_name); - GenericThread(const string &name, const string &sync_name, ThreadFunc *function, void *user_data); + GenericThread(const std::string &name, const std::string &sync_name); + GenericThread(const std::string &name, const std::string &sync_name, ThreadFunc *function, void *user_data); INLINE void set_function(ThreadFunc *function); INLINE ThreadFunc *get_function() const; diff --git a/panda/src/pipeline/lightMutex.I b/panda/src/pipeline/lightMutex.I index 4121d607e2..b76b743e34 100644 --- a/panda/src/pipeline/lightMutex.I +++ b/panda/src/pipeline/lightMutex.I @@ -16,7 +16,7 @@ */ INLINE LightMutex:: #ifdef DEBUG_THREADS -LightMutex() : MutexDebug(string(), false, true) +LightMutex() : MutexDebug(std::string(), false, true) #else LightMutex() #endif // DEBUG_THREADS @@ -28,7 +28,7 @@ LightMutex() */ INLINE LightMutex:: #ifdef DEBUG_THREADS -LightMutex(const char *name) : MutexDebug(string(name), false, true) +LightMutex(const char *name) : MutexDebug(std::string(name), false, true) #else LightMutex(const char *) #endif // DEBUG_THREADS @@ -40,9 +40,9 @@ LightMutex(const char *) */ INLINE LightMutex:: #ifdef DEBUG_THREADS -LightMutex(const string &name) : MutexDebug(name, false, true) +LightMutex(const std::string &name) : MutexDebug(name, false, true) #else -LightMutex(const string &) +LightMutex(const std::string &) #endif // DEBUG_THREADS { } diff --git a/panda/src/pipeline/lightMutex.h b/panda/src/pipeline/lightMutex.h index 4e2d1fa67b..4d8ae9a785 100644 --- a/panda/src/pipeline/lightMutex.h +++ b/panda/src/pipeline/lightMutex.h @@ -44,7 +44,7 @@ PUBLISHED: public: INLINE explicit LightMutex(const char *name); PUBLISHED: - INLINE explicit LightMutex(const string &name); + INLINE explicit LightMutex(const std::string &name); LightMutex(const LightMutex ©) = delete; ~LightMutex() = default; diff --git a/panda/src/pipeline/lightMutexDirect.I b/panda/src/pipeline/lightMutexDirect.I index 041f388ce2..a43921ecfb 100644 --- a/panda/src/pipeline/lightMutexDirect.I +++ b/panda/src/pipeline/lightMutexDirect.I @@ -86,7 +86,7 @@ debug_is_locked() const { * The lightMutex name is only defined when compiling in DEBUG_THREADS mode. */ INLINE void LightMutexDirect:: -set_name(const string &) { +set_name(const std::string &) { } /** @@ -107,7 +107,7 @@ has_name() const { /** * The lightMutex name is only defined when compiling in DEBUG_THREADS mode. */ -INLINE string LightMutexDirect:: +INLINE std::string LightMutexDirect:: get_name() const { - return string(); + return std::string(); } diff --git a/panda/src/pipeline/lightMutexDirect.h b/panda/src/pipeline/lightMutexDirect.h index 78ffcce433..e72bd808fe 100644 --- a/panda/src/pipeline/lightMutexDirect.h +++ b/panda/src/pipeline/lightMutexDirect.h @@ -46,12 +46,12 @@ PUBLISHED: INLINE void release() const; INLINE bool debug_is_locked() const; - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); INLINE void clear_name(); INLINE bool has_name() const; - INLINE string get_name() const; + INLINE std::string get_name() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: #ifdef DO_PSTATS @@ -65,8 +65,8 @@ private: #endif // DO_PSTATS }; -INLINE ostream & -operator << (ostream &out, const LightMutexDirect &m) { +INLINE std::ostream & +operator << (std::ostream &out, const LightMutexDirect &m) { m.output(out); return out; } diff --git a/panda/src/pipeline/lightReMutex.I b/panda/src/pipeline/lightReMutex.I index c0cb459c87..bc27a5a711 100644 --- a/panda/src/pipeline/lightReMutex.I +++ b/panda/src/pipeline/lightReMutex.I @@ -16,7 +16,7 @@ */ INLINE LightReMutex:: #ifdef DEBUG_THREADS -LightReMutex() : MutexDebug(string(), true, true) +LightReMutex() : MutexDebug(std::string(), true, true) #else LightReMutex() #endif // DEBUG_THREADS @@ -28,7 +28,7 @@ LightReMutex() */ INLINE LightReMutex:: #ifdef DEBUG_THREADS -LightReMutex(const char *name) : MutexDebug(string(name), true, true) +LightReMutex(const char *name) : MutexDebug(std::string(name), true, true) #else LightReMutex(const char *) #endif // DEBUG_THREADS @@ -40,9 +40,9 @@ LightReMutex(const char *) */ INLINE LightReMutex:: #ifdef DEBUG_THREADS -LightReMutex(const string &name) : MutexDebug(name, true, true) +LightReMutex(const std::string &name) : MutexDebug(name, true, true) #else -LightReMutex(const string &) +LightReMutex(const std::string &) #endif // DEBUG_THREADS { } diff --git a/panda/src/pipeline/lightReMutex.h b/panda/src/pipeline/lightReMutex.h index 2fff13a1ee..b219d7d10c 100644 --- a/panda/src/pipeline/lightReMutex.h +++ b/panda/src/pipeline/lightReMutex.h @@ -35,7 +35,7 @@ PUBLISHED: public: INLINE explicit LightReMutex(const char *name); PUBLISHED: - INLINE explicit LightReMutex(const string &name); + INLINE explicit LightReMutex(const std::string &name); LightReMutex(const LightReMutex ©) = delete; ~LightReMutex() = default; diff --git a/panda/src/pipeline/lightReMutexDirect.I b/panda/src/pipeline/lightReMutexDirect.I index bdfe87059b..08bb0daa67 100644 --- a/panda/src/pipeline/lightReMutexDirect.I +++ b/panda/src/pipeline/lightReMutexDirect.I @@ -143,7 +143,7 @@ debug_is_locked() const { * The mutex name is only defined when compiling in DEBUG_THREADS mode. */ INLINE void LightReMutexDirect:: -set_name(const string &) { +set_name(const std::string &) { } /** @@ -164,7 +164,7 @@ has_name() const { /** * The mutex name is only defined when compiling in DEBUG_THREADS mode. */ -INLINE string LightReMutexDirect:: +INLINE std::string LightReMutexDirect:: get_name() const { - return string(); + return std::string(); } diff --git a/panda/src/pipeline/lightReMutexDirect.h b/panda/src/pipeline/lightReMutexDirect.h index 21f25c1c31..56371cc443 100644 --- a/panda/src/pipeline/lightReMutexDirect.h +++ b/panda/src/pipeline/lightReMutexDirect.h @@ -48,12 +48,12 @@ PUBLISHED: INLINE bool debug_is_locked() const; - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); INLINE void clear_name(); INLINE bool has_name() const; - INLINE string get_name() const; + INLINE std::string get_name() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: #ifdef HAVE_REMUTEXTRUEIMPL @@ -66,8 +66,8 @@ private: #endif // HAVE_REMUTEXIMPL }; -INLINE ostream & -operator << (ostream &out, const LightReMutexDirect &m) { +INLINE std::ostream & +operator << (std::ostream &out, const LightReMutexDirect &m) { m.output(out); return out; } diff --git a/panda/src/pipeline/mutexDebug.h b/panda/src/pipeline/mutexDebug.h index 4fc3e4eeaa..094f2eafc6 100644 --- a/panda/src/pipeline/mutexDebug.h +++ b/panda/src/pipeline/mutexDebug.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDA_PIPELINE MutexDebug : public Namable { protected: - MutexDebug(const string &name, bool allow_recursion, bool lightweight); + MutexDebug(const std::string &name, bool allow_recursion, bool lightweight); MutexDebug(const MutexDebug ©) = delete; virtual ~MutexDebug(); @@ -47,8 +47,8 @@ PUBLISHED: INLINE void release() const; INLINE bool debug_is_locked() const; - virtual void output(ostream &out) const; - void output_with_holder(ostream &out) const; + virtual void output(std::ostream &out) const; + void output_with_holder(std::ostream &out) const; typedef void VoidFunc(); @@ -86,8 +86,8 @@ private: friend class ConditionVarFullDebug; }; -INLINE ostream & -operator << (ostream &out, const MutexDebug &m) { +INLINE std::ostream & +operator << (std::ostream &out, const MutexDebug &m) { m.output(out); return out; } diff --git a/panda/src/pipeline/mutexDirect.I b/panda/src/pipeline/mutexDirect.I index e12442289c..71a26543a7 100644 --- a/panda/src/pipeline/mutexDirect.I +++ b/panda/src/pipeline/mutexDirect.I @@ -95,7 +95,7 @@ debug_is_locked() const { * The mutex name is only defined when compiling in DEBUG_THREADS mode. */ INLINE void MutexDirect:: -set_name(const string &) { +set_name(const std::string &) { } /** @@ -116,7 +116,7 @@ has_name() const { /** * The mutex name is only defined when compiling in DEBUG_THREADS mode. */ -INLINE string MutexDirect:: +INLINE std::string MutexDirect:: get_name() const { - return string(); + return std::string(); } diff --git a/panda/src/pipeline/mutexDirect.h b/panda/src/pipeline/mutexDirect.h index b288dc0648..068f5fc5c4 100644 --- a/panda/src/pipeline/mutexDirect.h +++ b/panda/src/pipeline/mutexDirect.h @@ -46,12 +46,12 @@ PUBLISHED: INLINE void release() const; INLINE bool debug_is_locked() const; - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); INLINE void clear_name(); INLINE bool has_name() const; - INLINE string get_name() const; + INLINE std::string get_name() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: mutable MutexTrueImpl _impl; @@ -60,8 +60,8 @@ private: friend class ConditionVarFullDirect; }; -INLINE ostream & -operator << (ostream &out, const MutexDirect &m) { +INLINE std::ostream & +operator << (std::ostream &out, const MutexDirect &m) { m.output(out); return out; } diff --git a/panda/src/pipeline/pipeline.I b/panda/src/pipeline/pipeline.I index 163612e5f2..2116a030e6 100644 --- a/panda/src/pipeline/pipeline.I +++ b/panda/src/pipeline/pipeline.I @@ -27,7 +27,7 @@ get_render_pipeline() { */ INLINE void Pipeline:: set_min_stages(int min_stages) { - set_num_stages(max(min_stages, get_num_stages())); + set_num_stages(std::max(min_stages, get_num_stages())); } /** diff --git a/panda/src/pipeline/pipeline.h b/panda/src/pipeline/pipeline.h index 1dbba9429f..c06bb2ffef 100644 --- a/panda/src/pipeline/pipeline.h +++ b/panda/src/pipeline/pipeline.h @@ -37,7 +37,7 @@ struct PipelineCyclerTrueImpl; */ class EXPCL_PANDA_PIPELINE Pipeline : public Namable { public: - Pipeline(const string &name, int num_stages); + Pipeline(const std::string &name, int num_stages); ~Pipeline(); INLINE static Pipeline *get_render_pipeline(); diff --git a/panda/src/pipeline/pipelineCycler.I b/panda/src/pipeline/pipelineCycler.I index 06c6c1e5dc..2cd818a747 100644 --- a/panda/src/pipeline/pipelineCycler.I +++ b/panda/src/pipeline/pipelineCycler.I @@ -31,7 +31,7 @@ PipelineCycler(Pipeline *pipeline) : template INLINE PipelineCycler:: PipelineCycler(CycleDataType &&initial_data, Pipeline *pipeline) : - PipelineCyclerBase(new CycleDataType(move(initial_data)), pipeline) + PipelineCyclerBase(new CycleDataType(std::move(initial_data)), pipeline) { } @@ -198,7 +198,7 @@ PipelineCycler(Pipeline *pipeline) : template INLINE PipelineCycler:: PipelineCycler(CycleDataType &&initial_data, Pipeline *pipeline) : - _typed_data(move(initial_data)), + _typed_data(std::move(initial_data)), PipelineCyclerBase(&_typed_data, pipeline) { } diff --git a/panda/src/pipeline/pipelineCyclerTrueImpl.h b/panda/src/pipeline/pipelineCyclerTrueImpl.h index 809fda99f4..12232f70d0 100644 --- a/panda/src/pipeline/pipelineCyclerTrueImpl.h +++ b/panda/src/pipeline/pipelineCyclerTrueImpl.h @@ -94,7 +94,7 @@ public: INLINE CyclerMutex(PipelineCyclerTrueImpl *cycler); #ifdef DEBUG_THREADS - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PipelineCyclerTrueImpl *_cycler; #endif // DEBUG_THREADS }; diff --git a/panda/src/pipeline/pmutex.I b/panda/src/pipeline/pmutex.I index 9a5ca4c926..e148ce22e3 100644 --- a/panda/src/pipeline/pmutex.I +++ b/panda/src/pipeline/pmutex.I @@ -16,7 +16,7 @@ */ INLINE Mutex:: #ifdef DEBUG_THREADS -Mutex() : MutexDebug(string(), false, false) +Mutex() : MutexDebug(std::string(), false, false) #else Mutex() #endif // DEBUG_THREADS @@ -28,7 +28,7 @@ Mutex() */ INLINE Mutex:: #ifdef DEBUG_THREADS -Mutex(const char *name) : MutexDebug(string(name), false, false) +Mutex(const char *name) : MutexDebug(std::string(name), false, false) #else Mutex(const char *) #endif // DEBUG_THREADS @@ -40,9 +40,9 @@ Mutex(const char *) */ INLINE Mutex:: #ifdef DEBUG_THREADS -Mutex(const string &name) : MutexDebug(name, false, false) +Mutex(const std::string &name) : MutexDebug(name, false, false) #else -Mutex(const string &) +Mutex(const std::string &) #endif // DEBUG_THREADS { } diff --git a/panda/src/pipeline/pmutex.h b/panda/src/pipeline/pmutex.h index bc547afab3..2a47b7dbac 100644 --- a/panda/src/pipeline/pmutex.h +++ b/panda/src/pipeline/pmutex.h @@ -43,7 +43,7 @@ PUBLISHED: public: INLINE Mutex(const char *name); PUBLISHED: - INLINE explicit Mutex(const string &name); + INLINE explicit Mutex(const std::string &name); Mutex(const Mutex ©) = delete; ~Mutex() = default; diff --git a/panda/src/pipeline/psemaphore.h b/panda/src/pipeline/psemaphore.h index 9c724a94c1..306992b5d9 100644 --- a/panda/src/pipeline/psemaphore.h +++ b/panda/src/pipeline/psemaphore.h @@ -41,7 +41,7 @@ PUBLISHED: INLINE int release(); INLINE int get_count() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: Mutex _lock; @@ -49,8 +49,8 @@ private: int _count; }; -INLINE ostream & -operator << (ostream &out, const Semaphore &sem) { +INLINE std::ostream & +operator << (std::ostream &out, const Semaphore &sem) { sem.output(out); return out; } diff --git a/panda/src/pipeline/pythonThread.h b/panda/src/pipeline/pythonThread.h index 66b7e45aa4..eb57351149 100644 --- a/panda/src/pipeline/pythonThread.h +++ b/panda/src/pipeline/pythonThread.h @@ -27,7 +27,7 @@ class PythonThread : public Thread { PUBLISHED: explicit PythonThread(PyObject *function, PyObject *args, - const string &name, const string &sync_name); + const std::string &name, const std::string &sync_name); virtual ~PythonThread(); BLOCKING PyObject *join(); diff --git a/panda/src/pipeline/reMutex.I b/panda/src/pipeline/reMutex.I index 361d3a1c85..af2ea3d59c 100644 --- a/panda/src/pipeline/reMutex.I +++ b/panda/src/pipeline/reMutex.I @@ -16,7 +16,7 @@ */ INLINE ReMutex:: #ifdef DEBUG_THREADS -ReMutex() : MutexDebug(string(), true, false) +ReMutex() : MutexDebug(std::string(), true, false) #else ReMutex() #endif // DEBUG_THREADS @@ -28,7 +28,7 @@ ReMutex() */ INLINE ReMutex:: #ifdef DEBUG_THREADS -ReMutex(const char *name) : MutexDebug(string(name), true, false) +ReMutex(const char *name) : MutexDebug(std::string(name), true, false) #else ReMutex(const char *) #endif // DEBUG_THREADS @@ -40,9 +40,9 @@ ReMutex(const char *) */ INLINE ReMutex:: #ifdef DEBUG_THREADS -ReMutex(const string &name) : MutexDebug(name, true, false) +ReMutex(const std::string &name) : MutexDebug(name, true, false) #else -ReMutex(const string &) +ReMutex(const std::string &) #endif // DEBUG_THREADS { } diff --git a/panda/src/pipeline/reMutex.h b/panda/src/pipeline/reMutex.h index 1597c2d7c4..bdf9031304 100644 --- a/panda/src/pipeline/reMutex.h +++ b/panda/src/pipeline/reMutex.h @@ -37,7 +37,7 @@ PUBLISHED: public: INLINE explicit ReMutex(const char *name); PUBLISHED: - INLINE explicit ReMutex(const string &name); + INLINE explicit ReMutex(const std::string &name); ReMutex(const ReMutex ©) = delete; ~ReMutex() = default; diff --git a/panda/src/pipeline/reMutexDirect.I b/panda/src/pipeline/reMutexDirect.I index 51b380ac57..0785473e7c 100644 --- a/panda/src/pipeline/reMutexDirect.I +++ b/panda/src/pipeline/reMutexDirect.I @@ -170,7 +170,7 @@ debug_is_locked() const { * The mutex name is only defined when compiling in DEBUG_THREADS mode. */ INLINE void ReMutexDirect:: -set_name(const string &) { +set_name(const std::string &) { } /** @@ -191,9 +191,9 @@ has_name() const { /** * The mutex name is only defined when compiling in DEBUG_THREADS mode. */ -INLINE string ReMutexDirect:: +INLINE std::string ReMutexDirect:: get_name() const { - return string(); + return std::string(); } #ifndef HAVE_REMUTEXTRUEIMPL diff --git a/panda/src/pipeline/reMutexDirect.h b/panda/src/pipeline/reMutexDirect.h index c47c4b02bd..b6f5215319 100644 --- a/panda/src/pipeline/reMutexDirect.h +++ b/panda/src/pipeline/reMutexDirect.h @@ -50,12 +50,12 @@ PUBLISHED: INLINE bool debug_is_locked() const; - INLINE void set_name(const string &name); + INLINE void set_name(const std::string &name); INLINE void clear_name(); INLINE bool has_name() const; - INLINE string get_name() const; + INLINE std::string get_name() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: #ifdef HAVE_REMUTEXTRUEIMPL @@ -80,8 +80,8 @@ private: friend class LightReMutexDirect; }; -INLINE ostream & -operator << (ostream &out, const ReMutexDirect &m) { +INLINE std::ostream & +operator << (std::ostream &out, const ReMutexDirect &m) { m.output(out); return out; } diff --git a/panda/src/pipeline/thread.I b/panda/src/pipeline/thread.I index d8c8503742..dc7001fd06 100644 --- a/panda/src/pipeline/thread.I +++ b/panda/src/pipeline/thread.I @@ -17,7 +17,7 @@ * the benefit of PStats; threads with the same sync name can be ticked all at * once via the thread_tick() call. */ -INLINE const string &Thread:: +INLINE const std::string &Thread:: get_sync_name() const { return _sync_name; } @@ -46,7 +46,7 @@ get_python_index() const { * Returns a string that is guaranteed to be unique to this thread, across all * processes on the machine, during at least the lifetime of this process. */ -INLINE string Thread:: +INLINE std::string Thread:: get_unique_id() const { return _impl.get_unique_id(); } @@ -75,7 +75,7 @@ get_pipeline_stage() const { */ INLINE void Thread:: set_min_pipeline_stage(int min_pipeline_stage) { - set_pipeline_stage(max(_pipeline_stage, min_pipeline_stage)); + set_pipeline_stage(std::max(_pipeline_stage, min_pipeline_stage)); } /** @@ -323,8 +323,8 @@ get_pstats_callback() const { return _pstats_callback; } -INLINE ostream & -operator << (ostream &out, const Thread &thread) { +INLINE std::ostream & +operator << (std::ostream &out, const Thread &thread) { thread.output(out); return out; } diff --git a/panda/src/pipeline/thread.h b/panda/src/pipeline/thread.h index 6749883fb6..69b878725a 100644 --- a/panda/src/pipeline/thread.h +++ b/panda/src/pipeline/thread.h @@ -45,7 +45,7 @@ class AsyncTask; */ class EXPCL_PANDA_PIPELINE Thread : public TypedReferenceCount, public Namable { protected: - Thread(const string &name, const string &sync_name); + Thread(const std::string &name, const std::string &sync_name); Thread(const Thread ©) = delete; PUBLISHED: @@ -57,13 +57,13 @@ protected: virtual void thread_main()=0; PUBLISHED: - static PT(Thread) bind_thread(const string &name, const string &sync_name); + static PT(Thread) bind_thread(const std::string &name, const std::string &sync_name); - INLINE const string &get_sync_name() const; + INLINE const std::string &get_sync_name() const; INLINE int get_pstats_index() const; INLINE int get_python_index() const; - INLINE string get_unique_id() const; + INLINE std::string get_unique_id() const; INLINE int get_pipeline_stage() const; void set_pipeline_stage(int pipeline_stage); @@ -81,9 +81,9 @@ PUBLISHED: BLOCKING INLINE static void force_yield(); BLOCKING INLINE static void consider_yield(); - virtual void output(ostream &out) const; - void output_blocker(ostream &out) const; - static void write_status(ostream &out); + virtual void output(std::ostream &out) const; + void output_blocker(std::ostream &out) const; + static void write_status(std::ostream &out); INLINE bool is_started() const; INLINE bool is_joinable() const; @@ -143,7 +143,7 @@ protected: bool _started; private: - string _sync_name; + std::string _sync_name; ThreadImpl _impl; int _pstats_index; int _pipeline_stage; @@ -194,7 +194,7 @@ private: friend class AsyncTask; }; -INLINE ostream &operator << (ostream &out, const Thread &thread); +INLINE std::ostream &operator << (std::ostream &out, const Thread &thread); #include "thread.I" diff --git a/panda/src/pipeline/threadDummyImpl.h b/panda/src/pipeline/threadDummyImpl.h index 1b2c46cd46..7721ca2d6c 100644 --- a/panda/src/pipeline/threadDummyImpl.h +++ b/panda/src/pipeline/threadDummyImpl.h @@ -45,7 +45,7 @@ public: INLINE void join(); INLINE void preempt(); - string get_unique_id() const; + std::string get_unique_id() const; INLINE static void prepare_for_exit(); diff --git a/panda/src/pipeline/threadPosixImpl.h b/panda/src/pipeline/threadPosixImpl.h index ee279c98dd..cdfd5eab8a 100644 --- a/panda/src/pipeline/threadPosixImpl.h +++ b/panda/src/pipeline/threadPosixImpl.h @@ -44,7 +44,7 @@ public: void join(); INLINE void preempt(); - string get_unique_id() const; + std::string get_unique_id() const; INLINE static void prepare_for_exit(); diff --git a/panda/src/pipeline/threadPriority.h b/panda/src/pipeline/threadPriority.h index 104b0dac3b..8d1379e98a 100644 --- a/panda/src/pipeline/threadPriority.h +++ b/panda/src/pipeline/threadPriority.h @@ -27,10 +27,10 @@ enum ThreadPriority { }; END_PUBLISH -EXPCL_PANDA_PIPELINE ostream & -operator << (ostream &out, ThreadPriority pri); -EXPCL_PANDA_PIPELINE istream & -operator >> (istream &in, ThreadPriority &pri); +EXPCL_PANDA_PIPELINE std::ostream & +operator << (std::ostream &out, ThreadPriority pri); +EXPCL_PANDA_PIPELINE std::istream & +operator >> (std::istream &in, ThreadPriority &pri); #endif diff --git a/panda/src/pipeline/threadSimpleImpl.I b/panda/src/pipeline/threadSimpleImpl.I index 41b31b2b14..001f3037d4 100644 --- a/panda/src/pipeline/threadSimpleImpl.I +++ b/panda/src/pipeline/threadSimpleImpl.I @@ -130,7 +130,7 @@ get_wake_time() const { * Writes a list of threads running and threads blocked. */ void ThreadSimpleImpl:: -write_status(ostream &out) { +write_status(std::ostream &out) { ThreadSimpleManager *manager = ThreadSimpleManager::get_global_ptr(); manager->write_status(out); } diff --git a/panda/src/pipeline/threadSimpleImpl.h b/panda/src/pipeline/threadSimpleImpl.h index aa2e4e7ab7..c552dd1357 100644 --- a/panda/src/pipeline/threadSimpleImpl.h +++ b/panda/src/pipeline/threadSimpleImpl.h @@ -54,7 +54,7 @@ public: void join(); void preempt(); - string get_unique_id() const; + std::string get_unique_id() const; static void prepare_for_exit(); @@ -75,7 +75,7 @@ public: INLINE double get_wake_time() const; - INLINE static void write_status(ostream &out); + INLINE static void write_status(std::ostream &out); private: static void st_begin_thread(void *data); diff --git a/panda/src/pipeline/threadSimpleManager.h b/panda/src/pipeline/threadSimpleManager.h index 364b59be8f..668c1451fe 100644 --- a/panda/src/pipeline/threadSimpleManager.h +++ b/panda/src/pipeline/threadSimpleManager.h @@ -78,7 +78,7 @@ public: double get_current_time() const; INLINE static ThreadSimpleManager *get_global_ptr(); - void write_status(ostream &out) const; + void write_status(std::ostream &out) const; private: static void init_pointers(); diff --git a/panda/src/pipeline/threadWin32Impl.h b/panda/src/pipeline/threadWin32Impl.h index 665e1be43c..69163230c9 100644 --- a/panda/src/pipeline/threadWin32Impl.h +++ b/panda/src/pipeline/threadWin32Impl.h @@ -39,7 +39,7 @@ public: void join(); INLINE void preempt(); - string get_unique_id() const; + std::string get_unique_id() const; INLINE static void prepare_for_exit(); diff --git a/panda/src/pnmimage/convert_srgb.I b/panda/src/pnmimage/convert_srgb.I index f49cc38203..27d6bbf802 100644 --- a/panda/src/pnmimage/convert_srgb.I +++ b/panda/src/pnmimage/convert_srgb.I @@ -44,8 +44,8 @@ INLINE unsigned char decode_sRGB_uchar(unsigned char val) { */ INLINE unsigned char decode_sRGB_uchar(float val) { return (val <= 0.04045f) - ? (unsigned char)(max(0.f, val) * (255.f / 12.92f) + 0.5f) - : (unsigned char)(cpow((min(val, 1.f) + 0.055f) * (1.f / 1.055f), 2.4f) * 255.f + 0.5f); + ? (unsigned char)(std::max(0.f, val) * (255.f / 12.92f) + 0.5f) + : (unsigned char)(cpow((std::min(val, 1.f) + 0.055f) * (1.f / 1.055f), 2.4f) * 255.f + 0.5f); } /** @@ -99,8 +99,8 @@ encode_sRGB_uchar(float val) { return encode_sRGB_uchar_sse2(val); #else return (val < 0.0031308f) - ? (unsigned char) (max(0.f, val) * 3294.6f + 0.5f) - : (unsigned char) (269.025f * cpow(min(val, 1.f), 0.41666f) - 13.525f); + ? (unsigned char) (std::max(0.f, val) * 3294.6f + 0.5f) + : (unsigned char) (269.025f * cpow(std::min(val, 1.f), 0.41666f) - 13.525f); #endif } diff --git a/panda/src/pnmimage/pfmFile.I b/panda/src/pnmimage/pfmFile.I index b8f63272f0..0ba12061ee 100644 --- a/panda/src/pnmimage/pfmFile.I +++ b/panda/src/pnmimage/pfmFile.I @@ -587,12 +587,12 @@ setup_sub_image(const PfmFile ©, int &xto, int &yto, yto = 0; } - x_size = min(x_size, copy.get_x_size() - xfrom); - y_size = min(y_size, copy.get_y_size() - yfrom); + x_size = std::min(x_size, copy.get_x_size() - xfrom); + y_size = std::min(y_size, copy.get_y_size() - yfrom); xmin = xto; ymin = yto; - xmax = min(xmin + x_size, get_x_size()); - ymax = min(ymin + y_size, get_y_size()); + xmax = std::min(xmin + x_size, get_x_size()); + ymax = std::min(ymin + y_size, get_y_size()); } diff --git a/panda/src/pnmimage/pfmFile.h b/panda/src/pnmimage/pfmFile.h index 74eda76bce..cb8dd3b309 100644 --- a/panda/src/pnmimage/pfmFile.h +++ b/panda/src/pnmimage/pfmFile.h @@ -38,10 +38,10 @@ PUBLISHED: void clear(int x_size, int y_size, int num_channels); BLOCKING bool read(const Filename &fullpath); - BLOCKING bool read(istream &in, const Filename &fullpath = Filename()); + BLOCKING bool read(std::istream &in, const Filename &fullpath = Filename()); BLOCKING bool read(PNMReader *reader); BLOCKING bool write(const Filename &fullpath); - BLOCKING bool write(ostream &out, const Filename &fullpath = Filename()); + BLOCKING bool write(std::ostream &out, const Filename &fullpath = Filename()); BLOCKING bool write(PNMWriter *writer); BLOCKING bool load(const PNMImage &pnmimage); @@ -168,7 +168,7 @@ PUBLISHED: INLINE void apply_exponent(float c0_exponent, float c1_exponent, float c2_exponent); void apply_exponent(float c0_exponent, float c1_exponent, float c2_exponent, float c3_exponent); - void output(ostream &out) const; + void output(std::ostream &out) const; #ifdef HAVE_PYTHON EXTENSION(PyObject *get_points() const); diff --git a/panda/src/pnmimage/pnmFileType.h b/panda/src/pnmimage/pnmFileType.h index 48e4a533fb..fbde4717a2 100644 --- a/panda/src/pnmimage/pnmFileType.h +++ b/panda/src/pnmimage/pnmFileType.h @@ -37,12 +37,12 @@ public: virtual ~PNMFileType(); PUBLISHED: - virtual string get_name() const=0; + virtual std::string get_name() const=0; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; + virtual std::string get_extension(int n) const; MAKE_SEQ(get_extensions, get_num_extensions, get_extension); - virtual string get_suggested_extension() const; + virtual std::string get_suggested_extension() const; MAKE_PROPERTY(name, get_name); MAKE_SEQ_PROPERTY(extensions, get_num_extensions, get_extension); @@ -50,11 +50,11 @@ PUBLISHED: public: virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); protected: static void init_pnm(); diff --git a/panda/src/pnmimage/pnmFileTypeRegistry.h b/panda/src/pnmimage/pnmFileTypeRegistry.h index 9c8702a961..ae4c6a7688 100644 --- a/panda/src/pnmimage/pnmFileTypeRegistry.h +++ b/panda/src/pnmimage/pnmFileTypeRegistry.h @@ -41,11 +41,11 @@ PUBLISHED: MAKE_SEQ(get_types, get_num_types, get_type); MAKE_SEQ_PROPERTY(types, get_num_types, get_type); - PNMFileType *get_type_from_extension(const string &filename) const; - PNMFileType *get_type_from_magic_number(const string &magic_number) const; + PNMFileType *get_type_from_extension(const std::string &filename) const; + PNMFileType *get_type_from_magic_number(const std::string &magic_number) const; PNMFileType *get_type_by_handle(TypeHandle handle) const; - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; static PNMFileTypeRegistry *get_global_ptr(); @@ -55,7 +55,7 @@ private: typedef pvector Types; Types _types; - typedef pmap Extensions; + typedef pmap Extensions; Extensions _extensions; typedef pmap Handles; diff --git a/panda/src/pnmimage/pnmImage.I b/panda/src/pnmimage/pnmImage.I index 21c6619ea8..fe589d3f9b 100644 --- a/panda/src/pnmimage/pnmImage.I +++ b/panda/src/pnmimage/pnmImage.I @@ -68,7 +68,7 @@ INLINE PNMImage:: */ INLINE xelval PNMImage:: clamp_val(int input_value) const { - return (xelval)min(max(0, input_value), (int)get_maxval()); + return (xelval)std::min(std::max(0, input_value), (int)get_maxval()); } /** @@ -80,7 +80,7 @@ to_val(float input_value) const { switch (_xel_encoding) { case XE_generic: case XE_generic_alpha: - return (int)(min(1.0f, max(0.0f, input_value)) * get_maxval() + 0.5f); + return (int)(std::min(1.0f, std::max(0.0f, input_value)) * get_maxval() + 0.5f); case XE_generic_sRGB: case XE_generic_sRGB_alpha: @@ -97,7 +97,7 @@ to_val(float input_value) const { case XE_scRGB: case XE_scRGB_alpha: - return min(max(0, (int)((8192 * input_value) + 4096.5f)), 65535); + return std::min(std::max(0, (int)((8192 * input_value) + 4096.5f)), 65535); default: return 0; @@ -559,9 +559,9 @@ set_xel(int x, int y, const LRGBColorf &value) { case XE_scRGB_alpha: { LRGBColorf scaled = value * 8192.f + 4096.5f; - col.r = min(max(0, (int)scaled[0]), 65535); - col.g = min(max(0, (int)scaled[1]), 65535); - col.b = min(max(0, (int)scaled[2]), 65535); + col.r = std::min(std::max(0, (int)scaled[0]), 65535); + col.g = std::min(std::max(0, (int)scaled[1]), 65535); + col.b = std::min(std::max(0, (int)scaled[2]), 65535); } break; } @@ -721,19 +721,19 @@ set_xel_a(int x, int y, const LColorf &value) { case XE_scRGB: { LColorf scaled = value * 8192.0f + 4096.5f; - col.r = min(max(0, (int)scaled[0]), 65535); - col.g = min(max(0, (int)scaled[1]), 65535); - col.b = min(max(0, (int)scaled[2]), 65535); + col.r = std::min(std::max(0, (int)scaled[0]), 65535); + col.g = std::min(std::max(0, (int)scaled[1]), 65535); + col.b = std::min(std::max(0, (int)scaled[2]), 65535); } break; case XE_scRGB_alpha: { LColorf scaled = value * 8192.0f + 4096.5f; - col.r = min(max(0, (int)scaled[0]), 65535); - col.g = min(max(0, (int)scaled[1]), 65535); - col.b = min(max(0, (int)scaled[2]), 65535); - alpha_row(y)[x] = min(max(0, (int)(value[3] * 65535 + 0.5f)), 65535); + col.r = std::min(std::max(0, (int)scaled[0]), 65535); + col.g = std::min(std::max(0, (int)scaled[1]), 65535); + col.b = std::min(std::max(0, (int)scaled[2]), 65535); + alpha_row(y)[x] = std::min(std::max(0, (int)(value[3] * 65535 + 0.5f)), 65535); } break; } @@ -1210,14 +1210,14 @@ setup_sub_image(const PNMImage ©, int &xto, int &yto, yto = 0; } - x_size = min(x_size, copy.get_x_size() - xfrom); - y_size = min(y_size, copy.get_y_size() - yfrom); + x_size = std::min(x_size, copy.get_x_size() - xfrom); + y_size = std::min(y_size, copy.get_y_size() - yfrom); xmin = xto; ymin = yto; - xmax = min(xmin + x_size, get_x_size()); - ymax = min(ymin + y_size, get_y_size()); + xmax = std::min(xmin + x_size, get_x_size()); + ymax = std::min(ymin + y_size, get_y_size()); } /** diff --git a/panda/src/pnmimage/pnmImage.h b/panda/src/pnmimage/pnmImage.h index 583d5edef2..494acb8029 100644 --- a/panda/src/pnmimage/pnmImage.h +++ b/panda/src/pnmimage/pnmImage.h @@ -102,13 +102,13 @@ PUBLISHED: BLOCKING bool read(const Filename &filename, PNMFileType *type = nullptr, bool report_unknown_type = true); - BLOCKING bool read(istream &data, const string &filename = string(), + BLOCKING bool read(std::istream &data, const std::string &filename = std::string(), PNMFileType *type = nullptr, bool report_unknown_type = true); BLOCKING bool read(PNMReader *reader); BLOCKING bool write(const Filename &filename, PNMFileType *type = nullptr) const; - BLOCKING bool write(ostream &data, const string &filename = string(), + BLOCKING bool write(std::ostream &data, const std::string &filename = std::string(), PNMFileType *type = nullptr) const; BLOCKING bool write(PNMWriter *writer) const; diff --git a/panda/src/pnmimage/pnmImageHeader.I b/panda/src/pnmimage/pnmImageHeader.I index 2801d4d89d..0e4adbaf11 100644 --- a/panda/src/pnmimage/pnmImageHeader.I +++ b/panda/src/pnmimage/pnmImageHeader.I @@ -166,7 +166,7 @@ get_size() const { /** * Gets the user comment from the file. */ -INLINE string PNMImageHeader:: +INLINE std::string PNMImageHeader:: get_comment() const { return _comment; } @@ -175,7 +175,7 @@ get_comment() const { * Writes a user comment string to the image (header). */ INLINE void PNMImageHeader:: -set_comment(const string& comment) { +set_comment(const std::string& comment) { _comment = comment; } diff --git a/panda/src/pnmimage/pnmImageHeader.h b/panda/src/pnmimage/pnmImageHeader.h index 6aeb40642d..162dd21784 100644 --- a/panda/src/pnmimage/pnmImageHeader.h +++ b/panda/src/pnmimage/pnmImageHeader.h @@ -75,8 +75,8 @@ PUBLISHED: INLINE LVecBase2i get_size() const; MAKE_PROPERTY(size, get_size); - INLINE string get_comment() const; - INLINE void set_comment(const string &comment); + INLINE std::string get_comment() const; + INLINE void set_comment(const std::string &comment); MAKE_PROPERTY(comment, get_comment, set_comment); INLINE bool has_type() const; @@ -86,28 +86,28 @@ PUBLISHED: BLOCKING bool read_header(const Filename &filename, PNMFileType *type = nullptr, bool report_unknown_type = true); - BLOCKING bool read_header(istream &data, const string &filename = string(), + BLOCKING bool read_header(std::istream &data, const std::string &filename = std::string(), PNMFileType *type = nullptr, bool report_unknown_type = true); PNMReader *make_reader(const Filename &filename, PNMFileType *type = nullptr, bool report_unknown_type = true) const; - PNMReader *make_reader(istream *file, bool owns_file = true, + PNMReader *make_reader(std::istream *file, bool owns_file = true, const Filename &filename = Filename(), - string magic_number = string(), + std::string magic_number = std::string(), PNMFileType *type = nullptr, bool report_unknown_type = true) const; PNMWriter *make_writer(const Filename &filename, PNMFileType *type = nullptr) const; - PNMWriter *make_writer(ostream *file, bool owns_file = true, + PNMWriter *make_writer(std::ostream *file, bool owns_file = true, const Filename &filename = Filename(), PNMFileType *type = nullptr) const; - static bool read_magic_number(istream *file, string &magic_number, + static bool read_magic_number(std::istream *file, std::string &magic_number, int num_bytes); - void output(ostream &out) const; + void output(std::ostream &out) const; // Contains a single pixel specification used in compute_histogram() and // make_histogram(). Note that pixels are stored by integer value, not by @@ -141,7 +141,7 @@ PUBLISHED: INLINE xelval operator [](int n) const; INLINE static int size(); - void output(ostream &out) const; + void output(std::ostream &out) const; public: xelval _red, _green, _blue, _alpha; @@ -173,7 +173,7 @@ PUBLISHED: INLINE int get_count(const PixelSpec &pixel) const; MAKE_SEQ(get_pixels, get_num_pixels, get_pixel); - void write(ostream &out) const; + void write(std::ostream &out) const; public: INLINE void swap(PixelCount &pixels, HistMap &hist_map); @@ -194,16 +194,16 @@ protected: int _num_channels; xelval _maxval; ColorSpace _color_space; - string _comment; + std::string _comment; PNMFileType *_type; }; -INLINE ostream &operator << (ostream &out, const PNMImageHeader &header) { +INLINE std::ostream &operator << (std::ostream &out, const PNMImageHeader &header) { header.output(out); return out; } -INLINE ostream &operator << (ostream &out, const PNMImageHeader::PixelSpec &pixel) { +INLINE std::ostream &operator << (std::ostream &out, const PNMImageHeader::PixelSpec &pixel) { pixel.output(out); return out; } diff --git a/panda/src/pnmimage/pnmReader.I b/panda/src/pnmimage/pnmReader.I index 3e1f5d8fff..b066a2d7c3 100644 --- a/panda/src/pnmimage/pnmReader.I +++ b/panda/src/pnmimage/pnmReader.I @@ -15,7 +15,7 @@ * */ INLINE PNMReader:: -PNMReader(PNMFileType *type, istream *file, bool owns_file) : +PNMReader(PNMFileType *type, std::istream *file, bool owns_file) : _type(type), _owns_file(owns_file), _file(file), diff --git a/panda/src/pnmimage/pnmReader.h b/panda/src/pnmimage/pnmReader.h index 833c531f29..14355ec43c 100644 --- a/panda/src/pnmimage/pnmReader.h +++ b/panda/src/pnmimage/pnmReader.h @@ -26,7 +26,7 @@ class PfmFile; */ class EXPCL_PANDA_PNMIMAGE PNMReader : public PNMImageHeader { protected: - INLINE PNMReader(PNMFileType *type, istream *file, bool owns_file); + INLINE PNMReader(PNMFileType *type, std::istream *file, bool owns_file); public: virtual ~PNMReader(); @@ -51,7 +51,7 @@ private: protected: PNMFileType *_type; bool _owns_file; - istream *_file; + std::istream *_file; bool _is_valid; int _read_x_size, _read_y_size; diff --git a/panda/src/pnmimage/pnmWriter.I b/panda/src/pnmimage/pnmWriter.I index f9686a5c44..fbc64f6b5f 100644 --- a/panda/src/pnmimage/pnmWriter.I +++ b/panda/src/pnmimage/pnmWriter.I @@ -15,7 +15,7 @@ * */ INLINE PNMWriter:: -PNMWriter(PNMFileType *type, ostream *file, bool owns_file) : +PNMWriter(PNMFileType *type, std::ostream *file, bool owns_file) : _type(type), _owns_file(owns_file), _file(file), diff --git a/panda/src/pnmimage/pnmWriter.h b/panda/src/pnmimage/pnmWriter.h index 062b89602f..1da578124e 100644 --- a/panda/src/pnmimage/pnmWriter.h +++ b/panda/src/pnmimage/pnmWriter.h @@ -26,7 +26,7 @@ class PfmFile; */ class EXPCL_PANDA_PNMIMAGE PNMWriter : public PNMImageHeader { protected: - INLINE PNMWriter(PNMFileType *type, ostream *file, bool owns_file); + INLINE PNMWriter(PNMFileType *type, std::ostream *file, bool owns_file); public: @@ -62,7 +62,7 @@ public: protected: PNMFileType *_type; bool _owns_file; - ostream *_file; + std::ostream *_file; bool _is_valid; }; diff --git a/panda/src/pnmimage/pnmbitio.h b/panda/src/pnmimage/pnmbitio.h index 4213d221b8..464b48617c 100644 --- a/panda/src/pnmimage/pnmbitio.h +++ b/panda/src/pnmimage/pnmbitio.h @@ -30,8 +30,8 @@ typedef struct bitstream *BITSTREAM; * Returns 0 on error. */ -extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(istream *f, const char *mode); -extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(ostream *f, const char *mode); +extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(std::istream *f, const char *mode); +extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(std::ostream *f, const char *mode); /* * pm_bitfini() - deallocate the given BITSTREAM. diff --git a/panda/src/pnmimage/pnmimage_base.h b/panda/src/pnmimage/pnmimage_base.h index e9c36416cc..a332d693dc 100644 --- a/panda/src/pnmimage/pnmimage_base.h +++ b/panda/src/pnmimage/pnmimage_base.h @@ -61,7 +61,7 @@ PUBLISHED: #ifdef HAVE_PYTHON static int size() { return 3; } - void output(ostream &out) { + void output(std::ostream &out) { out << "pixel(r=" << r << ", g=" << g << ", b=" << b << ")"; } #endif @@ -105,14 +105,14 @@ EXPCL_PANDA_PNMIMAGE int pm_bitstomaxval(int bits); EXPCL_PANDA_PNMIMAGE char *pm_allocrow(int cols, int size); EXPCL_PANDA_PNMIMAGE void pm_freerow(char *itrow); -EXPCL_PANDA_PNMIMAGE int pm_readbigshort(istream *in, short *sP); -EXPCL_PANDA_PNMIMAGE int pm_writebigshort(ostream *out, short s); -EXPCL_PANDA_PNMIMAGE int pm_readbiglong(istream *in, long *lP); -EXPCL_PANDA_PNMIMAGE int pm_writebiglong(ostream *out, long l); -EXPCL_PANDA_PNMIMAGE int pm_readlittleshort(istream *in, short *sP); -EXPCL_PANDA_PNMIMAGE int pm_writelittleshort(ostream *out, short s); -EXPCL_PANDA_PNMIMAGE int pm_readlittlelong(istream *in, long *lP); -EXPCL_PANDA_PNMIMAGE int pm_writelittlelong(ostream *out, long l); +EXPCL_PANDA_PNMIMAGE int pm_readbigshort(std::istream *in, short *sP); +EXPCL_PANDA_PNMIMAGE int pm_writebigshort(std::ostream *out, short s); +EXPCL_PANDA_PNMIMAGE int pm_readbiglong(std::istream *in, long *lP); +EXPCL_PANDA_PNMIMAGE int pm_writebiglong(std::ostream *out, long l); +EXPCL_PANDA_PNMIMAGE int pm_readlittleshort(std::istream *in, short *sP); +EXPCL_PANDA_PNMIMAGE int pm_writelittleshort(std::ostream *out, short s); +EXPCL_PANDA_PNMIMAGE int pm_readlittlelong(std::istream *in, long *lP); +EXPCL_PANDA_PNMIMAGE int pm_writelittlelong(std::ostream *out, long l); // These ratios are used to compute the brightness of a colored pixel; they diff --git a/panda/src/pnmimagetypes/config_pnmimagetypes.h b/panda/src/pnmimagetypes/config_pnmimagetypes.h index 95ed9224a5..75fb491143 100644 --- a/panda/src/pnmimagetypes/config_pnmimagetypes.h +++ b/panda/src/pnmimagetypes/config_pnmimagetypes.h @@ -46,8 +46,8 @@ enum SGIStorageType { SST_verbatim = STORAGE_VERBATIM, }; -EXPCL_PANDA_PNMIMAGETYPES ostream &operator << (ostream &out, SGIStorageType sst); -EXPCL_PANDA_PNMIMAGETYPES istream &operator >> (istream &in, SGIStorageType &sst); +EXPCL_PANDA_PNMIMAGETYPES std::ostream &operator << (std::ostream &out, SGIStorageType sst); +EXPCL_PANDA_PNMIMAGETYPES std::istream &operator >> (std::istream &in, SGIStorageType &sst); extern ConfigVariableEnum sgi_storage_type; extern ConfigVariableString sgi_imagename; @@ -68,8 +68,8 @@ enum IMGHeaderType { IHT_long, }; -EXPCL_PANDA_PNMIMAGETYPES ostream &operator << (ostream &out, IMGHeaderType iht); -EXPCL_PANDA_PNMIMAGETYPES istream &operator >> (istream &in, IMGHeaderType &iht); +EXPCL_PANDA_PNMIMAGETYPES std::ostream &operator << (std::ostream &out, IMGHeaderType iht); +EXPCL_PANDA_PNMIMAGETYPES std::istream &operator >> (std::istream &in, IMGHeaderType &iht); extern ConfigVariableEnum img_header_type; extern ConfigVariableInt img_size; diff --git a/panda/src/pnmimagetypes/pnmFileTypeBMP.h b/panda/src/pnmimagetypes/pnmFileTypeBMP.h index 731fc06477..6cd3e8e32f 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeBMP.h +++ b/panda/src/pnmimagetypes/pnmFileTypeBMP.h @@ -29,23 +29,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeBMP : public PNMFileType { public: PNMFileTypeBMP(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual int read_data(xel *array, xelval *alpha); @@ -65,7 +65,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual int write_data(xel *array, xelval *alpha); virtual bool supports_grayscale() const; diff --git a/panda/src/pnmimagetypes/pnmFileTypeEXR.h b/panda/src/pnmimagetypes/pnmFileTypeEXR.h index 58292d11a8..75a2b000e9 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeEXR.h +++ b/panda/src/pnmimagetypes/pnmFileTypeEXR.h @@ -40,23 +40,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeEXR : public PNMFileType { public: PNMFileTypeEXR(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual ~Reader(); virtual bool is_floating_point(); @@ -73,7 +73,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual bool supports_floating_point(); virtual bool supports_integer(); diff --git a/panda/src/pnmimagetypes/pnmFileTypeIMG.h b/panda/src/pnmimagetypes/pnmFileTypeIMG.h index 084caf4152..2c406dfa68 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeIMG.h +++ b/panda/src/pnmimagetypes/pnmFileTypeIMG.h @@ -29,20 +29,20 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeIMG : public PNMFileType { public: PNMFileTypeIMG(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual bool supports_read_row() const; virtual bool read_row(xel *array, xelval *alpha, int x_size, int y_size); @@ -50,7 +50,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual bool supports_write_row() const; virtual bool write_header(); diff --git a/panda/src/pnmimagetypes/pnmFileTypeJPG.h b/panda/src/pnmimagetypes/pnmFileTypeJPG.h index 591c7fe247..f851c6d226 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeJPG.h +++ b/panda/src/pnmimagetypes/pnmFileTypeJPG.h @@ -59,23 +59,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeJPG : public PNMFileType { public: PNMFileTypeJPG(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); ~Reader(); virtual void prepare_read(); @@ -94,7 +94,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual int write_data(xel *array, xelval *alpha); }; diff --git a/panda/src/pnmimagetypes/pnmFileTypePNG.h b/panda/src/pnmimagetypes/pnmFileTypePNG.h index 79b9fb1f73..3c1df88cbc 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePNG.h +++ b/panda/src/pnmimagetypes/pnmFileTypePNG.h @@ -32,23 +32,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypePNG : public PNMFileType { public: PNMFileTypePNG(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual ~Reader(); virtual int read_data(xel *array, xelval *alpha_data); @@ -72,7 +72,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual ~Writer(); virtual int write_data(xel *array, xelval *alpha); diff --git a/panda/src/pnmimagetypes/pnmFileTypePNM.h b/panda/src/pnmimagetypes/pnmFileTypePNM.h index 1f5bc4cc7d..1c65c19109 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePNM.h +++ b/panda/src/pnmimagetypes/pnmFileTypePNM.h @@ -29,23 +29,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypePNM : public PNMFileType { public: PNMFileTypePNM(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual bool supports_read_row() const; virtual bool read_row(xel *array, xelval *alpha, int x_size, int y_size); @@ -56,7 +56,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual bool supports_write_row() const; virtual bool write_header(); diff --git a/panda/src/pnmimagetypes/pnmFileTypePfm.h b/panda/src/pnmimagetypes/pnmFileTypePfm.h index cbc7bb4512..aa41adb1df 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePfm.h +++ b/panda/src/pnmimagetypes/pnmFileTypePfm.h @@ -29,23 +29,23 @@ class EXPCL_PANDA_PNMIMAGE PNMFileTypePfm : public PNMFileType { public: PNMFileTypePfm(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual bool is_floating_point(); virtual bool read_pfm(PfmFile &pfm); @@ -56,7 +56,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual bool supports_floating_point(); virtual bool supports_integer(); diff --git a/panda/src/pnmimagetypes/pnmFileTypeSGI.h b/panda/src/pnmimagetypes/pnmFileTypeSGI.h index 300ccfd777..ff026a3740 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSGI.h +++ b/panda/src/pnmimagetypes/pnmFileTypeSGI.h @@ -29,23 +29,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeSGI : public PNMFileType { public: PNMFileTypeSGI(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual ~Reader(); virtual bool supports_read_row() const; @@ -65,7 +65,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual ~Writer(); virtual bool supports_write_row() const; @@ -90,7 +90,7 @@ public: void write_rgb_header(const char *imagename); void write_table(); - void write_channels(ScanLine channel[], void (*put)(ostream *, short)); + void write_channels(ScanLine channel[], void (*put)(std::ostream *, short)); void build_scanline(ScanLine output[], xel *row_data, xelval *alpha_data); ScanElem *compress(ScanElem *temp, ScanLine &output); int rle_compress(ScanElem *inbuf, int size); diff --git a/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h b/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h index 9fffbbd42d..c6e6860621 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h +++ b/panda/src/pnmimagetypes/pnmFileTypeSoftImage.h @@ -29,23 +29,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeSoftImage : public PNMFileType { public: PNMFileTypeSoftImage(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual bool supports_read_row() const; virtual bool read_row(xel *array, xelval *alpha, int x_size, int y_size); @@ -57,7 +57,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual bool supports_write_row() const; virtual bool write_header(); diff --git a/panda/src/pnmimagetypes/pnmFileTypeStbImage.h b/panda/src/pnmimagetypes/pnmFileTypeStbImage.h index 08cf62e247..ce7d2d55ea 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeStbImage.h +++ b/panda/src/pnmimagetypes/pnmFileTypeStbImage.h @@ -31,16 +31,16 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeStbImage : public PNMFileType { public: PNMFileTypeStbImage(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; + virtual std::string get_extension(int n) const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); public: static void register_with_read_factory(); diff --git a/panda/src/pnmimagetypes/pnmFileTypeTGA.h b/panda/src/pnmimagetypes/pnmFileTypeTGA.h index 911ebb7c20..c50a09ed47 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeTGA.h +++ b/panda/src/pnmimagetypes/pnmFileTypeTGA.h @@ -34,30 +34,30 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeTGA : public PNMFileType { public: PNMFileTypeTGA(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual ~Reader(); virtual int read_data(xel *array, xelval *alpha); private: - void readtga ( istream* ifp, struct ImageHeader* tgaP, const string &magic_number ); - void get_map_entry ( istream* ifp, pixel* Value, int Size, + void readtga ( std::istream* ifp, struct ImageHeader* tgaP, const std::string &magic_number ); + void get_map_entry ( std::istream* ifp, pixel* Value, int Size, gray* Alpha); - void get_pixel ( istream* ifp, pixel* dest, int Size, gray* alpha_p); - unsigned char getbyte ( istream* ifp ); + void get_pixel ( std::istream* ifp, pixel* dest, int Size, gray* alpha_p); + unsigned char getbyte ( std::istream* ifp ); int rows, cols, rlencoded, mapped; struct ImageHeader *tga_head; @@ -72,7 +72,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual ~Writer(); virtual int write_data(xel *array, xelval *alpha); diff --git a/panda/src/pnmimagetypes/pnmFileTypeTIFF.h b/panda/src/pnmimagetypes/pnmFileTypeTIFF.h index 21466b2cd9..c61e4f53f1 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeTIFF.h +++ b/panda/src/pnmimagetypes/pnmFileTypeTIFF.h @@ -34,23 +34,23 @@ class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypeTIFF : public PNMFileType { public: PNMFileTypeTIFF(); - virtual string get_name() const; + virtual std::string get_name() const; virtual int get_num_extensions() const; - virtual string get_extension(int n) const; - virtual string get_suggested_extension() const; + virtual std::string get_extension(int n) const; + virtual std::string get_suggested_extension() const; virtual bool has_magic_number() const; - virtual bool matches_magic_number(const string &magic_number) const; + virtual bool matches_magic_number(const std::string &magic_number) const; - virtual PNMReader *make_reader(istream *file, bool owns_file = true, - const string &magic_number = string()); - virtual PNMWriter *make_writer(ostream *file, bool owns_file = true); + virtual PNMReader *make_reader(std::istream *file, bool owns_file = true, + const std::string &magic_number = std::string()); + virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true); public: class Reader : public PNMReader { public: - Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number); + Reader(PNMFileType *type, std::istream *file, bool owns_file, std::string magic_number); virtual ~Reader(); virtual bool is_floating_point(); @@ -77,7 +77,7 @@ public: class Writer : public PNMWriter { public: - Writer(PNMFileType *type, ostream *file, bool owns_file); + Writer(PNMFileType *type, std::ostream *file, bool owns_file); virtual bool supports_floating_point(); virtual bool supports_integer(); diff --git a/panda/src/pnmtext/freetypeFace.h b/panda/src/pnmtext/freetypeFace.h index 2070e5ca66..e8c0774eee 100644 --- a/panda/src/pnmtext/freetypeFace.h +++ b/panda/src/pnmtext/freetypeFace.h @@ -46,9 +46,9 @@ private: private: // This is provided as a permanent storage for the raw font data, if needed. - string _font_data; + std::string _font_data; - string _name; + std::string _name; FT_Face _face; int _char_size; int _dpi; diff --git a/panda/src/pnmtext/freetypeFont.h b/panda/src/pnmtext/freetypeFont.h index a33059f3d7..dc89b09218 100644 --- a/panda/src/pnmtext/freetypeFont.h +++ b/panda/src/pnmtext/freetypeFont.h @@ -85,7 +85,7 @@ PUBLISHED: MAKE_PROPERTY(winding_order, get_winding_order, set_winding_order); public: - static WindingOrder string_winding_order(const string &string); + static WindingOrder string_winding_order(const std::string &string); protected: INLINE FT_Face acquire_face() const; @@ -163,8 +163,8 @@ protected: #include "freetypeFont.I" -EXPCL_PANDA_PNMTEXT ostream &operator << (ostream &out, FreetypeFont::WindingOrder wo); -EXPCL_PANDA_PNMTEXT istream &operator >> (istream &in, FreetypeFont::WindingOrder &wo); +EXPCL_PANDA_PNMTEXT std::ostream &operator << (std::ostream &out, FreetypeFont::WindingOrder wo); +EXPCL_PANDA_PNMTEXT std::istream &operator >> (std::istream &in, FreetypeFont::WindingOrder &wo); #endif // HAVE_FREETYPE diff --git a/panda/src/pnmtext/pnmTextMaker.I b/panda/src/pnmtext/pnmTextMaker.I index c8cce09b52..96eb380976 100644 --- a/panda/src/pnmtext/pnmTextMaker.I +++ b/panda/src/pnmtext/pnmTextMaker.I @@ -122,7 +122,7 @@ get_distance_field_radius() const { * position; the return value is the total width in pixels. */ INLINE int PNMTextMaker:: -generate_into(const string &text, PNMImage &dest_image, int x, int y) { +generate_into(const std::string &text, PNMImage &dest_image, int x, int y) { TextEncoder encoder; encoder.set_text(text); return generate_into(encoder.get_wtext(), dest_image, x, y); @@ -132,7 +132,7 @@ generate_into(const string &text, PNMImage &dest_image, int x, int y) { * Returns the width in pixels of the indicated line of text. */ INLINE int PNMTextMaker:: -calc_width(const string &text) { +calc_width(const std::string &text) { TextEncoder encoder; encoder.set_text(text); return calc_width(encoder.get_wtext()); diff --git a/panda/src/pnmtext/pnmTextMaker.h b/panda/src/pnmtext/pnmTextMaker.h index 4ae8f04069..213298f81c 100644 --- a/panda/src/pnmtext/pnmTextMaker.h +++ b/panda/src/pnmtext/pnmTextMaker.h @@ -63,12 +63,12 @@ PUBLISHED: INLINE void set_distance_field_radius(int radius); INLINE int get_distance_field_radius() const; - INLINE int generate_into(const string &text, + INLINE int generate_into(const std::string &text, PNMImage &dest_image, int x, int y); - int generate_into(const wstring &text, + int generate_into(const std::wstring &text, PNMImage &dest_image, int x, int y); - INLINE int calc_width(const string &text); - int calc_width(const wstring &text); + INLINE int calc_width(const std::string &text); + int calc_width(const std::wstring &text); PNMTextGlyph *get_glyph(int character); diff --git a/panda/src/pstatclient/pStatClient.I b/panda/src/pstatclient/pStatClient.I index b13eb43401..452c165901 100644 --- a/panda/src/pstatclient/pStatClient.I +++ b/panda/src/pstatclient/pStatClient.I @@ -42,18 +42,18 @@ get_num_threads() const { /** * Returns the name of the indicated thread. */ -INLINE string PStatClient:: +INLINE std::string PStatClient:: get_thread_name(int index) const { - nassertr(index >= 0 && index < AtomicAdjust::get(_num_threads), string()); + nassertr(index >= 0 && index < AtomicAdjust::get(_num_threads), std::string()); return get_thread_ptr(index)->_name; } /** * Returns the sync_name of the indicated thread. */ -INLINE string PStatClient:: +INLINE std::string PStatClient:: get_thread_sync_name(int index) const { - nassertr(index >= 0 && index < AtomicAdjust::get(_num_threads), string()); + nassertr(index >= 0 && index < AtomicAdjust::get(_num_threads), std::string()); return get_thread_ptr(index)->_sync_name; } @@ -72,7 +72,7 @@ get_thread_object(int index) const { * true if successful, false on failure. */ INLINE bool PStatClient:: -connect(const string &hostname, int port) { +connect(const std::string &hostname, int port) { return get_global_pstats()->client_connect(hostname, port); } @@ -161,7 +161,7 @@ get_thread_ptr(int thread_index) const { * */ INLINE PStatClient::Collector:: -Collector(int parent_index, const string &name) : +Collector(int parent_index, const std::string &name) : _def(nullptr), _parent_index(parent_index), _name(name) @@ -179,7 +179,7 @@ get_parent_index() const { /** * */ -INLINE const string &PStatClient::Collector:: +INLINE const std::string &PStatClient::Collector:: get_name() const { return _name; } diff --git a/panda/src/pstatclient/pStatClient.h b/panda/src/pstatclient/pStatClient.h index 6fb41c4c3c..8ee255613b 100644 --- a/panda/src/pstatclient/pStatClient.h +++ b/panda/src/pstatclient/pStatClient.h @@ -56,8 +56,8 @@ public: ~PStatClient(); PUBLISHED: - void set_client_name(const string &name); - string get_client_name() const; + void set_client_name(const std::string &name); + std::string get_client_name() const; void set_max_rate(double rate); double get_max_rate() const; @@ -65,14 +65,14 @@ PUBLISHED: PStatCollector get_collector(int index) const; MAKE_SEQ(get_collectors, get_num_collectors, get_collector); INLINE PStatCollectorDef *get_collector_def(int index) const; - string get_collector_name(int index) const; - string get_collector_fullname(int index) const; + std::string get_collector_name(int index) const; + std::string get_collector_fullname(int index) const; INLINE int get_num_threads() const; PStatThread get_thread(int index) const; MAKE_SEQ(get_threads, get_num_threads, get_thread); - INLINE string get_thread_name(int index) const; - INLINE string get_thread_sync_name(int index) const; + INLINE std::string get_thread_name(int index) const; + INLINE std::string get_thread_sync_name(int index) const; INLINE PT(Thread) get_thread_object(int index) const; PStatThread get_main_thread() const; @@ -88,18 +88,18 @@ PUBLISHED: MAKE_PROPERTY(current_thread, get_current_thread); MAKE_PROPERTY(real_time, get_real_time); - INLINE static bool connect(const string &hostname = string(), int port = -1); + INLINE static bool connect(const std::string &hostname = std::string(), int port = -1); INLINE static void disconnect(); INLINE static bool is_connected(); INLINE static void resume_after_pause(); static void main_tick(); - static void thread_tick(const string &sync_name); + static void thread_tick(const std::string &sync_name); void client_main_tick(); - void client_thread_tick(const string &sync_name); - bool client_connect(string hostname, int port); + void client_thread_tick(const std::string &sync_name); + bool client_connect(std::string hostname, int port); void client_disconnect(); bool client_is_connected() const; @@ -113,12 +113,12 @@ private: INLINE const PStatClientImpl *get_impl() const; void make_impl() const; - PStatCollector make_collector_with_relname(int parent_index, string relname); - PStatCollector make_collector_with_name(int parent_index, const string &name); + PStatCollector make_collector_with_relname(int parent_index, std::string relname); + PStatCollector make_collector_with_name(int parent_index, const std::string &name); PStatThread do_get_current_thread() const; PStatThread make_thread(Thread *thread); PStatThread do_make_thread(Thread *thread); - PStatThread make_gpu_thread(const string &name); + PStatThread make_gpu_thread(const std::string &name); bool is_active(int collector_index, int thread_index) const; bool is_started(int collector_index, int thread_index) const; @@ -152,8 +152,8 @@ private: // This mutex protects everything in this class. ReMutex _lock; - typedef pmap ThingsByName; - typedef pmap MultiThingsByName; + typedef pmap ThingsByName; + typedef pmap MultiThingsByName; MultiThingsByName _threads_by_name, _threads_by_sync_name; // This is for the data that is per-collector, per-thread. A vector of @@ -171,9 +171,9 @@ private: // in PStatCollector and PStatCollectorDef is just fluff.) class Collector { public: - INLINE Collector(int parent_index, const string &name); + INLINE Collector(int parent_index, const std::string &name); INLINE int get_parent_index() const; - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE bool is_active() const; INLINE PStatCollectorDef *get_def(const PStatClient *client, int this_index) const; @@ -187,7 +187,7 @@ private: // This data is used to create the PStatCollectorDef when it is needed. int _parent_index; - string _name; + std::string _name; public: // Relations to other collectors. @@ -205,11 +205,11 @@ private: class InternalThread { public: InternalThread(Thread *thread); - InternalThread(const string &name, const string &sync_name = "Main"); + InternalThread(const std::string &name, const std::string &sync_name = "Main"); WPT(Thread) _thread; - string _name; - string _sync_name; + std::string _name; + std::string _sync_name; PStatFrameData _frame_data; bool _is_active; int _frame_number; @@ -266,13 +266,13 @@ public: ~PStatClient() { } PUBLISHED: - INLINE static bool connect(const string & = string(), int = -1) { return false; } + INLINE static bool connect(const std::string & = std::string(), int = -1) { return false; } INLINE static void disconnect() { } INLINE static bool is_connected() { return false; } INLINE static void resume_after_pause() { } INLINE static void main_tick() { } - INLINE static void thread_tick(const string &) { } + INLINE static void thread_tick(const std::string &) { } }; #endif // DO_PSTATS diff --git a/panda/src/pstatclient/pStatClientControlMessage.h b/panda/src/pstatclient/pStatClientControlMessage.h index b815f3f558..97e7dede98 100644 --- a/panda/src/pstatclient/pStatClientControlMessage.h +++ b/panda/src/pstatclient/pStatClientControlMessage.h @@ -45,8 +45,8 @@ public: Type _type; // Used for T_hello - string _client_hostname; - string _client_progname; + std::string _client_hostname; + std::string _client_progname; int _major_version; int _minor_version; @@ -55,7 +55,7 @@ public: // Used for T_define_threads int _first_thread_index; - pvector _names; + pvector _names; }; diff --git a/panda/src/pstatclient/pStatClientImpl.I b/panda/src/pstatclient/pStatClientImpl.I index 95f6f13740..8e38b9a486 100644 --- a/panda/src/pstatclient/pStatClientImpl.I +++ b/panda/src/pstatclient/pStatClientImpl.I @@ -16,14 +16,14 @@ * will presumably be written in the title bar or something. */ INLINE void PStatClientImpl:: -set_client_name(const string &name) { +set_client_name(const std::string &name) { _client_name = name; } /** * Retrieves the name of the client as set. */ -INLINE string PStatClientImpl:: +INLINE std::string PStatClientImpl:: get_client_name() const { return _client_name; } diff --git a/panda/src/pstatclient/pStatClientImpl.h b/panda/src/pstatclient/pStatClientImpl.h index 88327defb5..598a2e63e7 100644 --- a/panda/src/pstatclient/pStatClientImpl.h +++ b/panda/src/pstatclient/pStatClientImpl.h @@ -51,15 +51,15 @@ public: PStatClientImpl(PStatClient *client); ~PStatClientImpl(); - INLINE void set_client_name(const string &name); - INLINE string get_client_name() const; + INLINE void set_client_name(const std::string &name); + INLINE std::string get_client_name() const; INLINE void set_max_rate(double rate); INLINE double get_max_rate() const; INLINE double get_real_time() const; INLINE void client_main_tick(); - bool client_connect(string hostname, int port); + bool client_connect(std::string hostname, int port); void client_disconnect(); INLINE bool client_is_connected() const; @@ -79,7 +79,7 @@ private: double _last_frame; // Networking stuff - string get_hostname(); + std::string get_hostname(); void send_hello(); void report_new_collectors(); void report_new_threads(); @@ -103,8 +103,8 @@ private: int _collectors_reported; int _threads_reported; - string _hostname; - string _client_name; + std::string _hostname; + std::string _client_name; double _max_rate; double _tcp_count_factor; diff --git a/panda/src/pstatclient/pStatCollector.I b/panda/src/pstatclient/pStatCollector.I index 23a2cf6199..a729a22fa8 100644 --- a/panda/src/pstatclient/pStatCollector.I +++ b/panda/src/pstatclient/pStatCollector.I @@ -54,7 +54,7 @@ PStatCollector() : * register the collector with; otherwise, the global client is used. */ INLINE PStatCollector:: -PStatCollector(const string &name, PStatClient *client) : +PStatCollector(const std::string &name, PStatClient *client) : _level(0.0f) { if (client == nullptr) { @@ -80,7 +80,7 @@ PStatCollector(const string &name, PStatClient *client) : * collector on the same client as its parent. */ INLINE PStatCollector:: -PStatCollector(const PStatCollector &parent, const string &name) : +PStatCollector(const PStatCollector &parent, const std::string &name) : _level(0.0f) { nassertv(parent._client != nullptr); @@ -122,31 +122,31 @@ is_valid() const { * Returns the local name of this collector. This is the rightmost part of * the fullname, after the rightmost colon. */ -INLINE string PStatCollector:: +INLINE std::string PStatCollector:: get_name() const { if (_client != nullptr) { return _client->get_collector_name(_index); } - return string(); + return std::string(); } /** * Returns the full name of this collector. This includes the names of all * the collector's parents, concatenated together with colons. */ -INLINE string PStatCollector:: +INLINE std::string PStatCollector:: get_fullname() const { if (_client != nullptr) { return _client->get_collector_fullname(_index); } - return string(); + return std::string(); } /** * */ INLINE void PStatCollector:: -output(ostream &out) const { +output(std::ostream &out) const { out << "PStatCollector(\"" << get_fullname() << "\")"; } @@ -494,7 +494,7 @@ PStatCollector() * defined, meaning all these functions should compile to nothing. */ INLINE PStatCollector:: -PStatCollector(const string &, PStatClient *client) { +PStatCollector(const std::string &, PStatClient *client) { // We need this bogus comparison just to prevent the SGI compiler from // dumping core. It's perfectly meaningless. #ifdef mips @@ -509,7 +509,7 @@ PStatCollector(const string &, PStatClient *client) { * defined, meaning all these functions should compile to nothing. */ INLINE PStatCollector:: -PStatCollector(const PStatCollector &parent, const string &) { +PStatCollector(const PStatCollector &parent, const std::string &) { // We need this bogus comparison just to prevent the SGI compiler from // dumping core. It's perfectly meaningless. #ifdef mips diff --git a/panda/src/pstatclient/pStatCollector.h b/panda/src/pstatclient/pStatCollector.h index 3f96b79f41..a007faa61c 100644 --- a/panda/src/pstatclient/pStatCollector.h +++ b/panda/src/pstatclient/pStatCollector.h @@ -50,18 +50,18 @@ public: INLINE PStatCollector(); PUBLISHED: - INLINE explicit PStatCollector(const string &name, + INLINE explicit PStatCollector(const std::string &name, PStatClient *client = nullptr); INLINE explicit PStatCollector(const PStatCollector &parent, - const string &name); + const std::string &name); INLINE PStatCollector(const PStatCollector ©); INLINE void operator = (const PStatCollector ©); INLINE bool is_valid() const; - INLINE string get_name() const; - INLINE string get_fullname() const; - INLINE void output(ostream &out) const; + INLINE std::string get_name() const; + INLINE std::string get_fullname() const; + INLINE void output(std::ostream &out) const; INLINE bool is_active(); INLINE bool is_started(); @@ -110,10 +110,10 @@ public: INLINE PStatCollector(); PUBLISHED: - INLINE PStatCollector(const string &name, + INLINE PStatCollector(const std::string &name, PStatClient *client = nullptr); INLINE PStatCollector(const PStatCollector &parent, - const string &name); + const std::string &name); INLINE bool is_active() { return false; } INLINE bool is_started() { return false; } @@ -148,7 +148,7 @@ PUBLISHED: #include "pStatCollector.I" -inline ostream &operator << (ostream &out, const PStatCollector &pcol) { +inline std::ostream &operator << (std::ostream &out, const PStatCollector &pcol) { #ifdef DO_PSTATS pcol.output(out); #endif // DO_PSTATS diff --git a/panda/src/pstatclient/pStatCollectorDef.h b/panda/src/pstatclient/pStatCollectorDef.h index 79996677f2..443f72a088 100644 --- a/panda/src/pstatclient/pStatCollectorDef.h +++ b/panda/src/pstatclient/pStatCollectorDef.h @@ -29,7 +29,7 @@ class PStatClientVersion; class EXPCL_PANDA_PSTATCLIENT PStatCollectorDef { public: PStatCollectorDef(); - PStatCollectorDef(int index, const string &name); + PStatCollectorDef(int index, const std::string &name); void set_parent(const PStatCollectorDef &parent); void write_datagram(Datagram &destination) const; @@ -40,11 +40,11 @@ public: }; int _index; - string _name; + std::string _name; int _parent_index; ColorDef _suggested_color; int _sort; - string _level_units; + std::string _level_units; double _suggested_scale; double _factor; bool _is_active; diff --git a/panda/src/pstatclient/pStatServerControlMessage.h b/panda/src/pstatclient/pStatServerControlMessage.h index 332a850530..ffcf19e836 100644 --- a/panda/src/pstatclient/pStatServerControlMessage.h +++ b/panda/src/pstatclient/pStatServerControlMessage.h @@ -39,8 +39,8 @@ public: Type _type; // Used for T_hello - string _server_hostname; - string _server_progname; + std::string _server_hostname; + std::string _server_progname; int _udp_port; }; diff --git a/panda/src/putil/animInterface.I b/panda/src/putil/animInterface.I index c25e748cbb..3d09f34a00 100644 --- a/panda/src/putil/animInterface.I +++ b/panda/src/putil/animInterface.I @@ -266,8 +266,8 @@ get_frac() const { return get_full_fframe() - (double)get_full_frame(0); } -INLINE ostream & -operator << (ostream &out, const AnimInterface &ai) { +INLINE std::ostream & +operator << (std::ostream &out, const AnimInterface &ai) { ai.output(out); return out; } diff --git a/panda/src/putil/animInterface.h b/panda/src/putil/animInterface.h index 1c3b0ec6e5..80f2a3da9d 100644 --- a/panda/src/putil/animInterface.h +++ b/panda/src/putil/animInterface.h @@ -60,7 +60,7 @@ PUBLISHED: INLINE double get_full_fframe() const; INLINE bool is_playing() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; PUBLISHED: MAKE_PROPERTY(play_rate, get_play_rate, set_play_rate); @@ -113,7 +113,7 @@ private: double get_full_fframe() const; bool is_playing() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; void internal_set_rate(double frame_rate, double play_rate); double get_f() const; @@ -153,7 +153,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const AnimInterface &ai); +INLINE std::ostream &operator << (std::ostream &out, const AnimInterface &ai); #include "animInterface.I" diff --git a/panda/src/putil/autoTextureScale.h b/panda/src/putil/autoTextureScale.h index b51295881f..3c1e8b5fbe 100644 --- a/panda/src/putil/autoTextureScale.h +++ b/panda/src/putil/autoTextureScale.h @@ -26,7 +26,7 @@ enum AutoTextureScale { }; END_PUBLISH -EXPCL_PANDA_PUTIL ostream &operator << (ostream &out, AutoTextureScale ats); -EXPCL_PANDA_PUTIL istream &operator >> (istream &in, AutoTextureScale &ats); +EXPCL_PANDA_PUTIL std::ostream &operator << (std::ostream &out, AutoTextureScale ats); +EXPCL_PANDA_PUTIL std::istream &operator >> (std::istream &in, AutoTextureScale &ats); #endif diff --git a/panda/src/putil/bam.h b/panda/src/putil/bam.h index 2755f0f25d..ad7d000fd2 100644 --- a/panda/src/putil/bam.h +++ b/panda/src/putil/bam.h @@ -22,7 +22,7 @@ // The magic number for a BAM file. It includes a carriage return and newline // character to help detect files damaged due to faulty ASCIIBinary // conversion. -static const string _bam_header = string("pbj\0\n\r", 6); +static const std::string _bam_header = std::string("pbj\0\n\r", 6); static const unsigned short _bam_major_ver = 6; // Bumped to major version 2 on 2000-07-06 due to major changes in Character. diff --git a/panda/src/putil/bamCache.h b/panda/src/putil/bamCache.h index 9b533ce5c5..28b2335ff6 100644 --- a/panda/src/putil/bamCache.h +++ b/panda/src/putil/bamCache.h @@ -72,13 +72,13 @@ PUBLISHED: INLINE bool get_read_only() const; PT(BamCacheRecord) lookup(const Filename &source_filename, - const string &cache_extension); + const std::string &cache_extension); bool store(BamCacheRecord *record); void consider_flush_index(); void flush_index(); - void list_index(ostream &out, int indent_level = 0) const; + void list_index(std::ostream &out, int indent_level = 0) const; INLINE static BamCache *get_global_ptr(); INLINE static void consider_flush_global_index(); @@ -100,7 +100,7 @@ PUBLISHED: private: void read_index(); bool read_index_pathname(Filename &index_pathname, - string &index_ref_contents) const; + std::string &index_ref_contents) const; void merge_index(BamCacheIndex *new_index); void rebuild_index(); INLINE void mark_index_stale(); @@ -123,7 +123,7 @@ private: static PT(BamCacheRecord) do_read_record(const Filename &cache_pathname, bool read_data); - static string hash_filename(const string &filename); + static std::string hash_filename(const std::string &filename); static void make_global(); bool _active; @@ -141,7 +141,7 @@ private: time_t _index_stale_since; Filename _index_pathname; - string _index_ref_contents; + std::string _index_ref_contents; ReMutex _lock; }; diff --git a/panda/src/putil/bamCacheIndex.h b/panda/src/putil/bamCacheIndex.h index f7e8c2b7a5..d6f403bbf0 100644 --- a/panda/src/putil/bamCacheIndex.h +++ b/panda/src/putil/bamCacheIndex.h @@ -36,7 +36,7 @@ private: ~BamCacheIndex(); public: - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; private: void process_new_records(); @@ -50,7 +50,7 @@ private: typedef pmap Records; Records _records; - streamsize _cache_size; + std::streamsize _cache_size; // This structure is a temporary container. It is only filled in while // reading from a bam file. diff --git a/panda/src/putil/bamCacheRecord.h b/panda/src/putil/bamCacheRecord.h index 77bccf2fbf..39b3728dfa 100644 --- a/panda/src/putil/bamCacheRecord.h +++ b/panda/src/putil/bamCacheRecord.h @@ -76,8 +76,8 @@ PUBLISHED: MAKE_PROPERTY2(data, has_data, get_data, set_data, clear_data); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: // This class is used to sort BamCacheRecords by access time. @@ -86,19 +86,19 @@ private: INLINE bool operator () (const BamCacheRecord *a, const BamCacheRecord *b) const; }; - static string format_timestamp(time_t timestamp); + static std::string format_timestamp(time_t timestamp); Filename _source_pathname; Filename _cache_filename; time_t _recorded_time; - streamsize _record_size; // this is accurate only in the index file. + std::streamsize _record_size; // this is accurate only in the index file. time_t _source_timestamp; // Not record to the cache file. class DependentFile { public: Filename _pathname; time_t _timestamp; - streamsize _size; + std::streamsize _size; }; typedef pvector DependentFiles; @@ -145,7 +145,7 @@ private: friend class BamCacheRecord::SortByAccessTime; }; -INLINE ostream &operator << (ostream &out, const BamCacheRecord &record) { +INLINE std::ostream &operator << (std::ostream &out, const BamCacheRecord &record) { record.output(out); return out; } diff --git a/panda/src/putil/bamEnums.h b/panda/src/putil/bamEnums.h index c2cef20db8..1f5b481c9a 100644 --- a/panda/src/putil/bamEnums.h +++ b/panda/src/putil/bamEnums.h @@ -66,12 +66,12 @@ PUBLISHED: }; }; -EXPCL_PANDA_PUTIL ostream &operator << (ostream &out, BamEnums::BamEndian be); -EXPCL_PANDA_PUTIL istream &operator >> (istream &in, BamEnums::BamEndian &be); +EXPCL_PANDA_PUTIL std::ostream &operator << (std::ostream &out, BamEnums::BamEndian be); +EXPCL_PANDA_PUTIL std::istream &operator >> (std::istream &in, BamEnums::BamEndian &be); -EXPCL_PANDA_PUTIL ostream &operator << (ostream &out, BamEnums::BamObjectCode boc); +EXPCL_PANDA_PUTIL std::ostream &operator << (std::ostream &out, BamEnums::BamObjectCode boc); -EXPCL_PANDA_PUTIL ostream &operator << (ostream &out, BamEnums::BamTextureMode btm); -EXPCL_PANDA_PUTIL istream &operator >> (istream &in, BamEnums::BamTextureMode &btm); +EXPCL_PANDA_PUTIL std::ostream &operator << (std::ostream &out, BamEnums::BamTextureMode btm); +EXPCL_PANDA_PUTIL std::istream &operator >> (std::istream &in, BamEnums::BamTextureMode &btm); #endif diff --git a/panda/src/putil/bamReader.I b/panda/src/putil/bamReader.I index d660317a71..b0da184554 100644 --- a/panda/src/putil/bamReader.I +++ b/panda/src/putil/bamReader.I @@ -153,7 +153,7 @@ get_vfile() { * pointing to the first byte following the datagram returned after a call to * get_datagram(). */ -INLINE streampos BamReader:: +INLINE std::streampos BamReader:: get_file_pos() { nassertr(_source != nullptr, 0); return _source->get_file_pos(); diff --git a/panda/src/putil/bamReader.h b/panda/src/putil/bamReader.h index 46ec5fd56c..84312ac4a6 100644 --- a/panda/src/putil/bamReader.h +++ b/panda/src/putil/bamReader.h @@ -124,8 +124,8 @@ PUBLISHED: bool init(); class AuxData; - void set_aux_data(TypedWritable *obj, const string &name, AuxData *data); - AuxData *get_aux_data(TypedWritable *obj, const string &name) const; + void set_aux_data(TypedWritable *obj, const std::string &name, AuxData *data); + AuxData *get_aux_data(TypedWritable *obj, const std::string &name) const; INLINE const Filename &get_filename() const; @@ -172,11 +172,11 @@ public: void read_cdata(DatagramIterator &scan, PipelineCyclerBase &cycler, void *extra_data); - void set_int_tag(const string &tag, int value); - int get_int_tag(const string &tag) const; + void set_int_tag(const std::string &tag, int value); + int get_int_tag(const std::string &tag) const; - void set_aux_tag(const string &tag, BamReaderAuxData *value); - BamReaderAuxData *get_aux_tag(const string &tag) const; + void set_aux_tag(const std::string &tag, BamReaderAuxData *value); + BamReaderAuxData *get_aux_tag(const std::string &tag) const; void register_finalize(TypedWritable *whom); @@ -194,7 +194,7 @@ public: INLINE const FileReference *get_file(); INLINE VirtualFile *get_vfile(); - INLINE streampos get_file_pos(); + INLINE std::streampos get_file_pos(); public: INLINE static void register_factory(TypeHandle type, WritableFactory::CreateFunc *func, @@ -282,8 +282,8 @@ private: // which read_pointer() was called, so that we may call the appropriate // complete_pointers() later. typedef phash_map CyclerPointers; - typedef pmap IntTags; - typedef pmap AuxTags; + typedef pmap IntTags; + typedef pmap AuxTags; class PointerReference { public: vector_int _objects; @@ -328,7 +328,7 @@ private: static NewTypes _new_types; // This is used in support of set_aux_data() and get_aux_data(). - typedef pmap AuxDataNames; + typedef pmap AuxDataNames; typedef phash_map AuxDataTable; AuxDataTable _aux_data; diff --git a/panda/src/putil/bitArray.h b/panda/src/putil/bitArray.h index bb00dea0d7..0338747295 100644 --- a/panda/src/putil/bitArray.h +++ b/panda/src/putil/bitArray.h @@ -91,10 +91,10 @@ PUBLISHED: bool has_bits_in_common(const BitArray &other) const; INLINE void clear(); - void output(ostream &out) const; - void output_binary(ostream &out, int spaces_every = 4) const; - void output_hex(ostream &out, int spaces_every = 4) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void output_binary(std::ostream &out, int spaces_every = 4) const; + void output_hex(std::ostream &out, int spaces_every = 4) const; + void write(std::ostream &out, int indent_level = 0) const; INLINE bool operator == (const BitArray &other) const; INLINE bool operator != (const BitArray &other) const; @@ -156,8 +156,8 @@ private: #include "bitArray.I" -INLINE ostream & -operator << (ostream &out, const BitArray &array) { +INLINE std::ostream & +operator << (std::ostream &out, const BitArray &array) { array.output(out); return out; } diff --git a/panda/src/putil/bitMask.I b/panda/src/putil/bitMask.I index 49e72fc3e7..6bff1e70d4 100644 --- a/panda/src/putil/bitMask.I +++ b/panda/src/putil/bitMask.I @@ -402,7 +402,7 @@ clear() { */ template void BitMask:: -output(ostream &out) const { +output(std::ostream &out) const { if (num_bits >= 40) { output_hex(out); } else { @@ -415,7 +415,7 @@ output(ostream &out) const { */ template void BitMask:: -output_binary(ostream &out, int spaces_every) const { +output_binary(std::ostream &out, int spaces_every) const { for (int i = num_bits - 1; i >= 0; i--) { if (spaces_every != 0 && ((i % spaces_every) == spaces_every - 1)) { out << ' '; @@ -430,7 +430,7 @@ output_binary(ostream &out, int spaces_every) const { */ template void BitMask:: -output_hex(ostream &out, int spaces_every) const { +output_hex(std::ostream &out, int spaces_every) const { int num_digits = (num_bits + 3) / 4; for (int i = num_digits - 1; i >= 0; i--) { @@ -452,7 +452,7 @@ output_hex(ostream &out, int spaces_every) const { */ template void BitMask:: -write(ostream &out, int indent_level) const { +write(std::ostream &out, int indent_level) const { indent(out, indent_level) << *this << "\n"; } @@ -646,7 +646,7 @@ generate_hash(ChecksumHashGenerator &hashgen) const { */ template void BitMask:: -init_type(const string &name) { +init_type(const std::string &name) { register_type(_type_handle, name); } diff --git a/panda/src/putil/bitMask.h b/panda/src/putil/bitMask.h index 8eb73a2440..cb11fe10bf 100644 --- a/panda/src/putil/bitMask.h +++ b/panda/src/putil/bitMask.h @@ -78,10 +78,10 @@ PUBLISHED: INLINE bool has_bits_in_common(const BitMask &other) const; INLINE void clear(); - void output(ostream &out) const; - void output_binary(ostream &out, int spaces_every = 4) const; - void output_hex(ostream &out, int spaces_every = 4) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void output_binary(std::ostream &out, int spaces_every = 4) const; + void output_hex(std::ostream &out, int spaces_every = 4) const; + void write(std::ostream &out, int indent_level = 0) const; INLINE bool operator == (const BitMask &other) const; INLINE bool operator != (const BitMask &other) const; @@ -137,7 +137,7 @@ public: static TypeHandle get_class_type() { return _type_handle; } - static void init_type(const string &name); + static void init_type(const std::string &name); private: static TypeHandle _type_handle; @@ -146,7 +146,7 @@ private: #include "bitMask.I" template -INLINE ostream &operator << (ostream &out, const BitMask &bitmask) { +INLINE std::ostream &operator << (std::ostream &out, const BitMask &bitmask) { bitmask.output(out); return out; } diff --git a/panda/src/putil/buttonHandle.I b/panda/src/putil/buttonHandle.I index 2df12e8cd0..c45145dd40 100644 --- a/panda/src/putil/buttonHandle.I +++ b/panda/src/putil/buttonHandle.I @@ -133,7 +133,7 @@ get_index() const { * */ INLINE void ButtonHandle:: -output(ostream &out) const { +output(std::ostream &out) const { out << get_name(); } diff --git a/panda/src/putil/buttonHandle.h b/panda/src/putil/buttonHandle.h index 4ee27b01ae..ad43ad2a86 100644 --- a/panda/src/putil/buttonHandle.h +++ b/panda/src/putil/buttonHandle.h @@ -31,7 +31,7 @@ PUBLISHED: // previously by another static initializer! INLINE ButtonHandle() = default; constexpr ButtonHandle(int index); - ButtonHandle(const string &name); + ButtonHandle(const std::string &name); PUBLISHED: INLINE bool operator == (const ButtonHandle &other) const; @@ -43,7 +43,7 @@ PUBLISHED: INLINE int compare_to(const ButtonHandle &other) const; INLINE size_t get_hash() const; - string get_name() const; + std::string get_name() const; INLINE bool has_ascii_equivalent() const; INLINE char get_ascii_equivalent() const; @@ -52,7 +52,7 @@ PUBLISHED: INLINE bool matches(const ButtonHandle &other) const; constexpr int get_index() const; - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; INLINE static ButtonHandle none(); INLINE operator bool () const; @@ -83,7 +83,7 @@ friend class ButtonRegistry; // It's handy to be able to output a ButtonHandle directly, and see the button // name. -INLINE ostream &operator << (ostream &out, ButtonHandle button) { +INLINE std::ostream &operator << (std::ostream &out, ButtonHandle button) { button.output(out); return out; } diff --git a/panda/src/putil/buttonMap.I b/panda/src/putil/buttonMap.I index bd7e6e4012..49cb2f9931 100644 --- a/panda/src/putil/buttonMap.I +++ b/panda/src/putil/buttonMap.I @@ -40,7 +40,7 @@ get_mapped_button(size_t i) const { * Returns the label associated with the nth mapped button, meaning the button * that the nth raw button is mapped to. */ -INLINE const string &ButtonMap:: +INLINE const std::string &ButtonMap:: get_mapped_button_label(size_t i) const { return _buttons[i]->_label; } @@ -67,7 +67,7 @@ get_mapped_button(ButtonHandle raw) const { * given raw button. */ INLINE ButtonHandle ButtonMap:: -get_mapped_button(const string &raw_name) const { +get_mapped_button(const std::string &raw_name) const { ButtonHandle raw_button = ButtonRegistry::ptr()->find_button(raw_name); if (raw_button == ButtonHandle::none()) { return ButtonHandle::none(); @@ -84,12 +84,12 @@ get_mapped_button(const string &raw_name) const { * Note that this is not the same as get_mapped_button().get_name(), which * returns the name of the Panda event associated with the button. */ -INLINE const string &ButtonMap:: +INLINE const std::string &ButtonMap:: get_mapped_button_label(ButtonHandle raw) const { pmap::const_iterator it; it = _button_map.find(raw.get_index()); if (it == _button_map.end()) { - static const string empty = ""; + static const std::string empty = ""; return empty; } else { return it->second._label; @@ -104,11 +104,11 @@ get_mapped_button_label(ButtonHandle raw) const { * Note that this is not the same as get_mapped_button().get_name(), which * returns the name of the Panda event associated with the button. */ -INLINE const string &ButtonMap:: -get_mapped_button_label(const string &raw_name) const { +INLINE const std::string &ButtonMap:: +get_mapped_button_label(const std::string &raw_name) const { ButtonHandle raw_button = ButtonRegistry::ptr()->find_button(raw_name); if (raw_button == ButtonHandle::none()) { - static const string empty = ""; + static const std::string empty = ""; return empty; } else { return get_mapped_button_label(raw_button); diff --git a/panda/src/putil/buttonMap.h b/panda/src/putil/buttonMap.h index 1c375ad128..fca64c1146 100644 --- a/panda/src/putil/buttonMap.h +++ b/panda/src/putil/buttonMap.h @@ -32,24 +32,24 @@ PUBLISHED: INLINE size_t get_num_buttons() const; INLINE ButtonHandle get_raw_button(size_t i) const; INLINE ButtonHandle get_mapped_button(size_t i) const; - INLINE const string &get_mapped_button_label(size_t i) const; + INLINE const std::string &get_mapped_button_label(size_t i) const; INLINE ButtonHandle get_mapped_button(ButtonHandle raw) const; - INLINE ButtonHandle get_mapped_button(const string &raw_name) const; - INLINE const string &get_mapped_button_label(ButtonHandle raw) const; - INLINE const string &get_mapped_button_label(const string &raw_name) const; + INLINE ButtonHandle get_mapped_button(const std::string &raw_name) const; + INLINE const std::string &get_mapped_button_label(ButtonHandle raw) const; + INLINE const std::string &get_mapped_button_label(const std::string &raw_name) const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; public: - void map_button(ButtonHandle raw_button, ButtonHandle button, const string &label = ""); + void map_button(ButtonHandle raw_button, ButtonHandle button, const std::string &label = ""); private: struct ButtonNode { ButtonHandle _raw; ButtonHandle _mapped; - string _label; + std::string _label; }; pmap _button_map; diff --git a/panda/src/putil/buttonRegistry.I b/panda/src/putil/buttonRegistry.I index 8ce0b2f1ce..74fe89471c 100644 --- a/panda/src/putil/buttonRegistry.I +++ b/panda/src/putil/buttonRegistry.I @@ -17,7 +17,7 @@ * */ INLINE ButtonRegistry::RegistryNode:: -RegistryNode(ButtonHandle handle, ButtonHandle alias, const string &name) : +RegistryNode(ButtonHandle handle, ButtonHandle alias, const std::string &name) : _handle(handle), _alias(alias), _name(name) { } @@ -36,7 +36,7 @@ ptr() { /** * Returns the name of the indicated button. */ -INLINE string ButtonRegistry:: +INLINE std::string ButtonRegistry:: get_name(ButtonHandle button) const { RegistryNode *rnode = look_up(button); nassertr(rnode != nullptr, ""); diff --git a/panda/src/putil/buttonRegistry.h b/panda/src/putil/buttonRegistry.h index c57efbf089..19a315ae90 100644 --- a/panda/src/putil/buttonRegistry.h +++ b/panda/src/putil/buttonRegistry.h @@ -31,30 +31,30 @@ protected: class EXPCL_PANDA_PUTIL RegistryNode { public: INLINE RegistryNode(ButtonHandle handle, ButtonHandle alias, - const string &name); + const std::string &name); ButtonHandle _handle; ButtonHandle _alias; - string _name; + std::string _name; }; public: - bool register_button(ButtonHandle &button_handle, const string &name, + bool register_button(ButtonHandle &button_handle, const std::string &name, ButtonHandle alias = ButtonHandle::none(), char ascii_equivalent = '\0'); PUBLISHED: - ButtonHandle get_button(const string &name); - ButtonHandle find_button(const string &name); + ButtonHandle get_button(const std::string &name); + ButtonHandle find_button(const std::string &name); ButtonHandle find_ascii_button(char ascii_equivalent) const; - void write(ostream &out) const; + void write(std::ostream &out) const; // ptr() returns the pointer to the global ButtonRegistry object. INLINE static ButtonRegistry *ptr(); public: - INLINE string get_name(ButtonHandle button) const; + INLINE std::string get_name(ButtonHandle button) const; INLINE ButtonHandle get_alias(ButtonHandle button) const; private: @@ -69,7 +69,7 @@ private: typedef pvector HandleRegistry; HandleRegistry _handle_registry; - typedef pmap NameRegistry; + typedef pmap NameRegistry; NameRegistry _name_registry; static ButtonRegistry *_global_pointer; diff --git a/panda/src/putil/callbackData.h b/panda/src/putil/callbackData.h index 8380788e13..b1b084bdf9 100644 --- a/panda/src/putil/callbackData.h +++ b/panda/src/putil/callbackData.h @@ -31,7 +31,7 @@ protected: INLINE CallbackData(); PUBLISHED: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; virtual void upcall(); @@ -53,7 +53,7 @@ private: static TypeHandle _type_handle; }; -inline ostream &operator << (ostream &out, const CallbackData &cbd) { +inline std::ostream &operator << (std::ostream &out, const CallbackData &cbd) { cbd.output(out); return out; } diff --git a/panda/src/putil/callbackObject.h b/panda/src/putil/callbackObject.h index 320fb9c0ef..0702c704f5 100644 --- a/panda/src/putil/callbackObject.h +++ b/panda/src/putil/callbackObject.h @@ -32,7 +32,7 @@ public: ALLOC_DELETED_CHAIN(CallbackObject); PUBLISHED: - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; EXTENSION(static PT(CallbackObject) make(PyObject *function)); @@ -57,7 +57,7 @@ private: static TypeHandle _type_handle; }; -inline ostream &operator << (ostream &out, const CallbackObject &cbo) { +inline std::ostream &operator << (std::ostream &out, const CallbackObject &cbo) { cbo.output(out); return out; } diff --git a/panda/src/putil/clockObject.I b/panda/src/putil/clockObject.I index f8a0bbc02b..b2cb2975d1 100644 --- a/panda/src/putil/clockObject.I +++ b/panda/src/putil/clockObject.I @@ -110,7 +110,7 @@ INLINE double ClockObject:: get_dt(Thread *current_thread) const { CDReader cdata(_cycler, current_thread); if (_max_dt > 0.0) { - return min(_max_dt, cdata->_dt); + return std::min(_max_dt, cdata->_dt); } return cdata->_dt; } diff --git a/panda/src/putil/clockObject.h b/panda/src/putil/clockObject.h index bcea511f29..4e06ec2554 100644 --- a/panda/src/putil/clockObject.h +++ b/panda/src/putil/clockObject.h @@ -188,10 +188,10 @@ private: static TypeHandle _type_handle; }; -EXPCL_PANDA_PUTIL ostream & -operator << (ostream &out, ClockObject::Mode mode); -EXPCL_PANDA_PUTIL istream & -operator >> (istream &in, ClockObject::Mode &mode); +EXPCL_PANDA_PUTIL std::ostream & +operator << (std::ostream &out, ClockObject::Mode mode); +EXPCL_PANDA_PUTIL std::istream & +operator >> (std::istream &in, ClockObject::Mode &mode); #include "clockObject.I" diff --git a/panda/src/putil/colorSpace.h b/panda/src/putil/colorSpace.h index 97d70ad49f..9c9d237cc6 100644 --- a/panda/src/putil/colorSpace.h +++ b/panda/src/putil/colorSpace.h @@ -42,12 +42,12 @@ enum ColorSpace { CS_scRGB, }; -EXPCL_PANDA_PUTIL ColorSpace parse_color_space_string(const string &str); -EXPCL_PANDA_PUTIL string format_color_space(ColorSpace cs); +EXPCL_PANDA_PUTIL ColorSpace parse_color_space_string(const std::string &str); +EXPCL_PANDA_PUTIL std::string format_color_space(ColorSpace cs); END_PUBLISH -EXPCL_PANDA_PUTIL ostream &operator << (ostream &out, ColorSpace cs); -EXPCL_PANDA_PUTIL istream &operator >> (istream &in, ColorSpace &cs); +EXPCL_PANDA_PUTIL std::ostream &operator << (std::ostream &out, ColorSpace cs); +EXPCL_PANDA_PUTIL std::istream &operator >> (std::istream &in, ColorSpace &cs); #endif diff --git a/panda/src/putil/copyOnWriteObject.I b/panda/src/putil/copyOnWriteObject.I index dccb2ec385..bcf326d87c 100644 --- a/panda/src/putil/copyOnWriteObject.I +++ b/panda/src/putil/copyOnWriteObject.I @@ -130,9 +130,9 @@ void CopyOnWriteObj:: init_type() { #if defined(HAVE_RTTI) && !defined(__EDG__) // If we have RTTI, we can determine the name of the base type. - string base_name = typeid(Base).name(); + std::string base_name = typeid(Base).name(); #else - string base_name = "unknown"; + std::string base_name = "unknown"; #endif TypeHandle base_type = register_dynamic_type(base_name); @@ -190,9 +190,9 @@ void CopyOnWriteObj1:: init_type() { #if defined(HAVE_RTTI) && !defined(__EDG__) // If we have RTTI, we can determine the name of the base type. - string base_name = typeid(Base).name(); + std::string base_name = typeid(Base).name(); #else - string base_name = "unknown"; + std::string base_name = "unknown"; #endif TypeHandle base_type = register_dynamic_type(base_name); diff --git a/panda/src/putil/datagramBuffer.I b/panda/src/putil/datagramBuffer.I index 123642db9f..4ee99b8da0 100644 --- a/panda/src/putil/datagramBuffer.I +++ b/panda/src/putil/datagramBuffer.I @@ -26,7 +26,7 @@ DatagramBuffer() : */ INLINE DatagramBuffer:: DatagramBuffer(vector_uchar data) : - _data(move(data)), + _data(std::move(data)), _read_offset(0), _wrote_first_datagram(false), _read_first_datagram(false) { @@ -56,7 +56,7 @@ get_data() const { */ INLINE void DatagramBuffer:: set_data(vector_uchar data) { - _data = move(data); + _data = std::move(data); } /** diff --git a/panda/src/putil/datagramBuffer.h b/panda/src/putil/datagramBuffer.h index 8962ddbb2b..7990b36e71 100644 --- a/panda/src/putil/datagramBuffer.h +++ b/panda/src/putil/datagramBuffer.h @@ -35,11 +35,11 @@ PUBLISHED: INLINE void clear(); public: - bool write_header(const string &header); + bool write_header(const std::string &header); virtual bool put_datagram(const Datagram &data) override; virtual void flush() override; - bool read_header(string &header, size_t num_bytes); + bool read_header(std::string &header, size_t num_bytes); virtual bool get_datagram(Datagram &data) override; virtual bool is_eof() override; diff --git a/panda/src/putil/datagramInputFile.I b/panda/src/putil/datagramInputFile.I index 0c4ba21cc3..7f60129eb1 100644 --- a/panda/src/putil/datagramInputFile.I +++ b/panda/src/putil/datagramInputFile.I @@ -43,7 +43,7 @@ open(const Filename &filename) { /** * Returns the istream represented by the input file. */ -INLINE istream &DatagramInputFile:: +INLINE std::istream &DatagramInputFile:: get_stream() { static std::ifstream null_stream; nassertr(_in != nullptr, null_stream); diff --git a/panda/src/putil/datagramInputFile.h b/panda/src/putil/datagramInputFile.h index a8f8f67341..37fdf8bbe2 100644 --- a/panda/src/putil/datagramInputFile.h +++ b/panda/src/putil/datagramInputFile.h @@ -32,12 +32,12 @@ PUBLISHED: bool open(const FileReference *file); INLINE bool open(const Filename &filename); - bool open(istream &in, const Filename &filename = Filename()); - INLINE istream &get_stream(); + bool open(std::istream &in, const Filename &filename = Filename()); + INLINE std::istream &get_stream(); void close(); - bool read_header(string &header, size_t num_bytes); + bool read_header(std::string &header, size_t num_bytes); virtual bool get_datagram(Datagram &data); virtual bool save_datagram(SubfileInfo &info); virtual bool is_eof(); @@ -47,14 +47,14 @@ PUBLISHED: virtual time_t get_timestamp() const; virtual const FileReference *get_file(); virtual VirtualFile *get_vfile(); - virtual streampos get_file_pos(); + virtual std::streampos get_file_pos(); private: bool _read_first_datagram; bool _error; CPT(FileReference) _file; PT(VirtualFile) _vfile; - istream *_in; + std::istream *_in; bool _owns_in; Filename _filename; time_t _timestamp; diff --git a/panda/src/putil/datagramOutputFile.I b/panda/src/putil/datagramOutputFile.I index 5bfee6fc9c..56060c51cf 100644 --- a/panda/src/putil/datagramOutputFile.I +++ b/panda/src/putil/datagramOutputFile.I @@ -42,7 +42,7 @@ open(const Filename &filename) { /** * Returns the ostream represented by the output file. */ -INLINE ostream &DatagramOutputFile:: +INLINE std::ostream &DatagramOutputFile:: get_stream() { static std::ofstream null_stream; nassertr(_out != nullptr, null_stream); diff --git a/panda/src/putil/datagramOutputFile.h b/panda/src/putil/datagramOutputFile.h index c81dcdf986..17402850b0 100644 --- a/panda/src/putil/datagramOutputFile.h +++ b/panda/src/putil/datagramOutputFile.h @@ -34,11 +34,11 @@ PUBLISHED: bool open(const FileReference *file); INLINE bool open(const Filename &filename); - bool open(ostream &out, const Filename &filename = Filename()); + bool open(std::ostream &out, const Filename &filename = Filename()); void close(); - bool write_header(const string &header); + bool write_header(const std::string &header); virtual bool put_datagram(const Datagram &data); virtual bool copy_datagram(SubfileInfo &result, const Filename &filename); virtual bool copy_datagram(SubfileInfo &result, const SubfileInfo &source); @@ -48,9 +48,9 @@ PUBLISHED: public: virtual const Filename &get_filename(); virtual const FileReference *get_file(); - virtual streampos get_file_pos(); + virtual std::streampos get_file_pos(); - INLINE ostream &get_stream(); + INLINE std::ostream &get_stream(); PUBLISHED: MAKE_PROPERTY(stream, get_stream); @@ -60,7 +60,7 @@ private: bool _error; CPT(FileReference) _file; PT(VirtualFile) _vfile; - ostream *_out; + std::ostream *_out; bool _owns_out; Filename _filename; }; diff --git a/panda/src/putil/doubleBitMask.I b/panda/src/putil/doubleBitMask.I index d99f8d0da0..35ede588a4 100644 --- a/panda/src/putil/doubleBitMask.I +++ b/panda/src/putil/doubleBitMask.I @@ -442,7 +442,7 @@ clear() { */ template void DoubleBitMask:: -output(ostream &out) const { +output(std::ostream &out) const { output_hex(out); } @@ -452,7 +452,7 @@ output(ostream &out) const { */ template void DoubleBitMask:: -output_binary(ostream &out, int spaces_every) const { +output_binary(std::ostream &out, int spaces_every) const { _hi.output_binary(out); out << ' '; _lo.output_binary(out); @@ -464,7 +464,7 @@ output_binary(ostream &out, int spaces_every) const { */ template void DoubleBitMask:: -output_hex(ostream &out, int spaces_every) const { +output_hex(std::ostream &out, int spaces_every) const { _hi.output_hex(out); out << ' '; _lo.output_hex(out); @@ -476,7 +476,7 @@ output_hex(ostream &out, int spaces_every) const { */ template void DoubleBitMask:: -write(ostream &out, int indent_level) const { +write(std::ostream &out, int indent_level) const { indent(out, indent_level) << *this << "\n"; } @@ -663,7 +663,7 @@ generate_hash(ChecksumHashGenerator &hashgen) const { template void DoubleBitMask:: init_type() { - ostringstream str; + std::ostringstream str; str << "DoubleBitMask" << num_bits; register_type(_type_handle, str.str()); } diff --git a/panda/src/putil/doubleBitMask.h b/panda/src/putil/doubleBitMask.h index 2f1d1c5806..7ebc114f5f 100644 --- a/panda/src/putil/doubleBitMask.h +++ b/panda/src/putil/doubleBitMask.h @@ -76,10 +76,10 @@ PUBLISHED: INLINE bool has_bits_in_common(const DoubleBitMask &other) const; INLINE void clear(); - void output(ostream &out) const; - void output_binary(ostream &out, int spaces_every = 4) const; - void output_hex(ostream &out, int spaces_every = 4) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void output_binary(std::ostream &out, int spaces_every = 4) const; + void output_hex(std::ostream &out, int spaces_every = 4) const; + void write(std::ostream &out, int indent_level = 0) const; INLINE bool operator == (const DoubleBitMask &other) const; INLINE bool operator != (const DoubleBitMask &other) const; @@ -129,7 +129,7 @@ private: #include "doubleBitMask.I" template -INLINE ostream &operator << (ostream &out, const DoubleBitMask &doubleBitMask) { +INLINE std::ostream &operator << (std::ostream &out, const DoubleBitMask &doubleBitMask) { doubleBitMask.output(out); return out; } diff --git a/panda/src/putil/factory.I b/panda/src/putil/factory.I index 57d3fadff5..bfd170af40 100644 --- a/panda/src/putil/factory.I +++ b/panda/src/putil/factory.I @@ -34,7 +34,7 @@ make_instance(TypeHandle handle, const FactoryParams ¶ms) { */ template INLINE Type *Factory:: -make_instance(const string &type_name, const FactoryParams ¶ms) { +make_instance(const std::string &type_name, const FactoryParams ¶ms) { return (Type *)FactoryBase::make_instance(type_name, params); } @@ -60,7 +60,7 @@ make_instance_more_general(TypeHandle handle, const FactoryParams ¶ms) { */ template INLINE Type *Factory:: -make_instance_more_general(const string &type_name, +make_instance_more_general(const std::string &type_name, const FactoryParams ¶ms) { return (Type *)FactoryBase::make_instance_more_general(type_name, params); } diff --git a/panda/src/putil/factory.h b/panda/src/putil/factory.h index b7751feb30..03c1fb6f37 100644 --- a/panda/src/putil/factory.h +++ b/panda/src/putil/factory.h @@ -38,7 +38,7 @@ public: INLINE Type *make_instance(TypeHandle handle, const FactoryParams ¶ms = FactoryParams()); - INLINE Type *make_instance(const string &type_name, + INLINE Type *make_instance(const std::string &type_name, const FactoryParams ¶ms = FactoryParams()); INLINE Type * @@ -46,7 +46,7 @@ public: const FactoryParams ¶ms = FactoryParams()); INLINE Type * - make_instance_more_general(const string &type_name, + make_instance_more_general(const std::string &type_name, const FactoryParams ¶ms = FactoryParams()); INLINE void register_factory(TypeHandle handle, CreateFunc *func, diff --git a/panda/src/putil/factoryBase.I b/panda/src/putil/factoryBase.I index 199d3f8d5a..3d93306a4e 100644 --- a/panda/src/putil/factoryBase.I +++ b/panda/src/putil/factoryBase.I @@ -21,7 +21,7 @@ * desired type. It must be the name of some already-registered type. */ INLINE TypedObject *FactoryBase:: -make_instance(const string &type_name, const FactoryParams ¶ms) { +make_instance(const std::string &type_name, const FactoryParams ¶ms) { TypeHandle handle = TypeRegistry::ptr()->find_type(type_name); nassertr(handle != TypeHandle::none(), nullptr); @@ -39,7 +39,7 @@ make_instance(const string &type_name, const FactoryParams ¶ms) { * type. */ INLINE TypedObject *FactoryBase:: -make_instance_more_general(const string &type_name, +make_instance_more_general(const std::string &type_name, const FactoryParams ¶ms) { TypeHandle handle = TypeRegistry::ptr()->find_type(type_name); nassertr(handle != TypeHandle::none(), nullptr); diff --git a/panda/src/putil/factoryBase.h b/panda/src/putil/factoryBase.h index 73d0e8c6e5..7ef256f1a8 100644 --- a/panda/src/putil/factoryBase.h +++ b/panda/src/putil/factoryBase.h @@ -45,13 +45,13 @@ public: TypedObject *make_instance(TypeHandle handle, const FactoryParams ¶ms); - INLINE TypedObject *make_instance(const string &type_name, + INLINE TypedObject *make_instance(const std::string &type_name, const FactoryParams ¶ms); TypedObject *make_instance_more_general(TypeHandle handle, const FactoryParams ¶ms); - INLINE TypedObject *make_instance_more_general(const string &type_name, + INLINE TypedObject *make_instance_more_general(const std::string &type_name, const FactoryParams ¶ms); TypeHandle find_registered_type(TypeHandle handle); @@ -66,7 +66,7 @@ public: int get_num_preferred() const; TypeHandle get_preferred(int n) const; - void write_types(ostream &out, int indent_level = 0) const; + void write_types(std::ostream &out, int indent_level = 0) const; private: // These are private; we shouldn't be copy-constructing Factories. diff --git a/panda/src/putil/load_prc_file.h b/panda/src/putil/load_prc_file.h index b1711bcd6d..cf29e6c8a3 100644 --- a/panda/src/putil/load_prc_file.h +++ b/panda/src/putil/load_prc_file.h @@ -47,7 +47,7 @@ load_prc_file(const Filename &filename); * loaded prc files is listed. */ EXPCL_PANDA_PUTIL ConfigPage * -load_prc_file_data(const string &name, const string &data); +load_prc_file_data(const std::string &name, const std::string &data); /** * Unloads (and deletes) a ConfigPage that represents a prc file that was diff --git a/panda/src/putil/loaderOptions.h b/panda/src/putil/loaderOptions.h index 971353e723..c07fe798d8 100644 --- a/panda/src/putil/loaderOptions.h +++ b/panda/src/putil/loaderOptions.h @@ -68,20 +68,20 @@ PUBLISHED: MAKE_PROPERTY(auto_texture_scale, get_auto_texture_scale, set_auto_texture_scale); - void output(ostream &out) const; + void output(std::ostream &out) const; private: - void write_flag(ostream &out, string &sep, - const string &flag_name, int flag) const; - void write_texture_flag(ostream &out, string &sep, - const string &flag_name, int flag) const; + void write_flag(std::ostream &out, std::string &sep, + const std::string &flag_name, int flag) const; + void write_texture_flag(std::ostream &out, std::string &sep, + const std::string &flag_name, int flag) const; int _flags; int _texture_flags; int _texture_num_views; AutoTextureScale _auto_texture_scale; }; -INLINE ostream &operator << (ostream &out, const LoaderOptions &opts) { +INLINE std::ostream &operator << (std::ostream &out, const LoaderOptions &opts) { opts.output(out); return out; } diff --git a/panda/src/putil/modifierButtons.h b/panda/src/putil/modifierButtons.h index c95791b2a0..d879512514 100644 --- a/panda/src/putil/modifierButtons.h +++ b/panda/src/putil/modifierButtons.h @@ -61,10 +61,10 @@ PUBLISHED: INLINE bool is_down(int index) const; INLINE bool is_any_down() const; - string get_prefix() const; + std::string get_prefix() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; private: void modify_button_list(); @@ -74,7 +74,7 @@ private: BitmaskType _state; }; -INLINE ostream &operator << (ostream &out, const ModifierButtons &mb) { +INLINE std::ostream &operator << (std::ostream &out, const ModifierButtons &mb) { mb.output(out); return out; } diff --git a/panda/src/putil/mouseData.I b/panda/src/putil/mouseData.I index bdcf750af6..c0ab6997ef 100644 --- a/panda/src/putil/mouseData.I +++ b/panda/src/putil/mouseData.I @@ -67,7 +67,7 @@ get_in_window() const { } -INLINE ostream &operator << (ostream &out, const MouseData &md) { +INLINE std::ostream &operator << (std::ostream &out, const MouseData &md) { md.output(out); return out; } diff --git a/panda/src/putil/mouseData.h b/panda/src/putil/mouseData.h index 4fe2c81b4f..0d2a294568 100644 --- a/panda/src/putil/mouseData.h +++ b/panda/src/putil/mouseData.h @@ -32,7 +32,7 @@ PUBLISHED: INLINE double get_y() const; INLINE bool get_in_window() const; - void output(ostream &out) const; + void output(std::ostream &out) const; MAKE_PROPERTY(x, get_x); MAKE_PROPERTY(y, get_y); @@ -44,7 +44,7 @@ public: double _ypos; }; -INLINE ostream &operator << (ostream &out, const MouseData &md); +INLINE std::ostream &operator << (std::ostream &out, const MouseData &md); #include "mouseData.I" diff --git a/panda/src/putil/nameUniquifier.I b/panda/src/putil/nameUniquifier.I index 4ccfa1e0b0..760dad2dfc 100644 --- a/panda/src/putil/nameUniquifier.I +++ b/panda/src/putil/nameUniquifier.I @@ -24,8 +24,8 @@ * If the name is nonempty, the new name is the original name, followed by the * NameUniquifier's "separator" string, followed by a number. */ -INLINE string NameUniquifier:: -add_name(const string &name) { +INLINE std::string NameUniquifier:: +add_name(const std::string &name) { return add_name_body(name, name); } @@ -42,7 +42,7 @@ add_name(const string &name) { * If the prefix is nonempty, the new name is the prefix, followed by the * NameUniquifier's "separator" string, followed by a number. */ -INLINE string NameUniquifier:: -add_name(const string &name, const string &prefix) { +INLINE std::string NameUniquifier:: +add_name(const std::string &name, const std::string &prefix) { return add_name_body(name, prefix); } diff --git a/panda/src/putil/nameUniquifier.h b/panda/src/putil/nameUniquifier.h index 7b629771d2..1d3c3e2560 100644 --- a/panda/src/putil/nameUniquifier.h +++ b/panda/src/putil/nameUniquifier.h @@ -27,20 +27,20 @@ */ class EXPCL_PANDA_PUTIL NameUniquifier { public: - NameUniquifier(const string &separator = string(), - const string &empty = string()); + NameUniquifier(const std::string &separator = std::string(), + const std::string &empty = std::string()); ~NameUniquifier(); - INLINE string add_name(const string &name); - INLINE string add_name(const string &name, const string &prefix); + INLINE std::string add_name(const std::string &name); + INLINE std::string add_name(const std::string &name, const std::string &prefix); private: - string add_name_body(const string &name, const string &prefix); + std::string add_name_body(const std::string &name, const std::string &prefix); - typedef pset Names; + typedef pset Names; Names _names; - string _separator; - string _empty; + std::string _separator; + std::string _empty; int _counter; }; diff --git a/panda/src/putil/paramValue.I b/panda/src/putil/paramValue.I index 735e4f2ca4..0f44d4d54e 100644 --- a/panda/src/putil/paramValue.I +++ b/panda/src/putil/paramValue.I @@ -116,7 +116,7 @@ get_value() const { */ template INLINE void ParamValue:: -output(ostream &out) const { +output(std::ostream &out) const { out << _value; } diff --git a/panda/src/putil/paramValue.h b/panda/src/putil/paramValue.h index b17b2c9c37..ea3b8fcae5 100644 --- a/panda/src/putil/paramValue.h +++ b/panda/src/putil/paramValue.h @@ -35,7 +35,7 @@ public: PUBLISHED: virtual ~ParamValueBase(); INLINE virtual TypeHandle get_value_type() const; - virtual void output(ostream &out) const=0; + virtual void output(std::ostream &out) const=0; public: virtual TypeHandle get_type() const { @@ -69,7 +69,7 @@ PUBLISHED: MAKE_PROPERTY(value, get_value); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; private: PT(TypedReferenceCount) _value; @@ -114,7 +114,7 @@ PUBLISHED: MAKE_PROPERTY(value, get_value, set_value); - INLINE virtual void output(ostream &out) const; + INLINE virtual void output(std::ostream &out) const; private: Type _value; @@ -131,7 +131,7 @@ public: static TypeHandle get_class_type() { return _type_handle; } - static void init_type(const string &type_name = "UndefinedParamValue") { + static void init_type(const std::string &type_name = "UndefinedParamValue") { ParamValueBase::init_type(); _type_handle = register_dynamic_type (type_name, ParamValueBase::get_class_type()); @@ -172,8 +172,8 @@ EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ParamValue); EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ParamValue); -typedef ParamValue ParamString; -typedef ParamValue ParamWstring; +typedef ParamValue ParamString; +typedef ParamValue ParamWstring; typedef ParamValue ParamVecBase2d; typedef ParamValue ParamVecBase2f; diff --git a/panda/src/putil/simpleHashMap.I b/panda/src/putil/simpleHashMap.I index 2cc4e006df..2ac26a54f0 100644 --- a/panda/src/putil/simpleHashMap.I +++ b/panda/src/putil/simpleHashMap.I @@ -60,7 +60,7 @@ SimpleHashMap(SimpleHashMap &&from) noexcept : _deleted_chain(from._deleted_chain), _table_size(from._table_size), _num_entries(from._num_entries), - _comp(move(from._comp)) + _comp(std::move(from._comp)) { from._table = nullptr; from._deleted_chain = nullptr; @@ -115,7 +115,7 @@ operator = (SimpleHashMap &&from) noexcept { _deleted_chain = from._deleted_chain; _table_size = from._table_size; _num_entries = from._num_entries; - _comp = move(from._comp); + _comp = std::move(from._comp); from._table = nullptr; from._deleted_chain = nullptr; @@ -275,7 +275,7 @@ remove(const Key &key) { // Swap it with the last one, so that we don't get any gaps in the table // of entries. - _table[index] = move(_table[last]); + _table[index] = std::move(_table[last]); index_array[(size_t)other_slot] = index; } @@ -422,7 +422,7 @@ template INLINE void SimpleHashMap:: set_data(size_t n, Value &&data) { nassertv(n < _num_entries); - _table[n].set_data(move(data)); + _table[n].set_data(std::move(data)); } /** @@ -460,7 +460,7 @@ is_empty() const { */ template void SimpleHashMap:: -output(ostream &out) const { +output(std::ostream &out) const { out << "SimpleHashMap (" << _num_entries << " entries): ["; const int *index_array = get_index_array(); size_t num_slots = _table_size * sparsity; @@ -487,7 +487,7 @@ output(ostream &out) const { */ template void SimpleHashMap:: -write(ostream &out) const { +write(std::ostream &out) const { output(out); out << "\n"; for (size_t i = 0; i < _num_entries; ++i) { @@ -731,7 +731,7 @@ resize_table(size_t new_size) { // have to reorder these, fortunately. Hopefully, a smart compiler will // optimize this to a memcpy. for (size_t i = 0; i < _num_entries; ++i) { - new(&_table[i]) TableEntry(move(old_table[i])); + new(&_table[i]) TableEntry(std::move(old_table[i])); old_table[i].~TableEntry(); } diff --git a/panda/src/putil/simpleHashMap.h b/panda/src/putil/simpleHashMap.h index cd759f6cbd..bae858006d 100644 --- a/panda/src/putil/simpleHashMap.h +++ b/panda/src/putil/simpleHashMap.h @@ -40,7 +40,7 @@ public: _data = data; } ALWAYS_INLINE void set_data(Value &&data) { - _data = move(data); + _data = std::move(data); } private: @@ -77,7 +77,7 @@ public: * * It can also be used as a set, by using nullptr_t as Value typename. */ -template > > +template > > class SimpleHashMap { // Per-entry overhead is determined by sizeof(int) * sparsity. Should be a // power of two. @@ -113,8 +113,8 @@ public: INLINE size_t get_num_entries() const; INLINE bool is_empty() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; bool validate() const; INLINE bool consider_shrink_table(); @@ -145,7 +145,7 @@ public: }; template -inline ostream &operator << (ostream &out, const SimpleHashMap &shm) { +inline std::ostream &operator << (std::ostream &out, const SimpleHashMap &shm) { shm.output(out); return out; } diff --git a/panda/src/putil/sparseArray.h b/panda/src/putil/sparseArray.h index a372fc240e..de6a508d29 100644 --- a/panda/src/putil/sparseArray.h +++ b/panda/src/putil/sparseArray.h @@ -80,7 +80,7 @@ PUBLISHED: bool has_bits_in_common(const SparseArray &other) const; INLINE void clear(); - void output(ostream &out) const; + void output(std::ostream &out) const; INLINE bool operator == (const SparseArray &other) const; INLINE bool operator != (const SparseArray &other) const; @@ -158,8 +158,8 @@ private: #include "sparseArray.I" -INLINE ostream & -operator << (ostream &out, const SparseArray &array) { +INLINE std::ostream & +operator << (std::ostream &out, const SparseArray &array) { array.output(out); return out; } diff --git a/panda/src/putil/test_bam.h b/panda/src/putil/test_bam.h index b49fca965a..1570f1541a 100644 --- a/panda/src/putil/test_bam.h +++ b/panda/src/putil/test_bam.h @@ -45,15 +45,15 @@ public: bool isMale() {return myGender == MALE;} void print_relationships(); - string name() {return _name;} + std::string name() {return _name;} private: Person *_bro, *_sis; sex myGender; - string _name; + std::string _name; public: Person() {} - Person(const string &name, const sex Gender) : + Person(const std::string &name, const sex Gender) : _name(name), myGender(Gender), _bro(nullptr), _sis(nullptr) { } @@ -100,7 +100,7 @@ private: public: Parent() {} - Parent(const string &name, const sex Gender) : Person(name, Gender) { + Parent(const std::string &name, const sex Gender) : Person(name, Gender) { } virtual ~Parent() { @@ -146,7 +146,7 @@ private: public: Child() {} - Child(const string &name, const sex Gender) : Person(name, Gender) { + Child(const std::string &name, const sex Gender) : Person(name, Gender) { } virtual ~Child() { diff --git a/panda/src/putil/uniqueIdAllocator.h b/panda/src/putil/uniqueIdAllocator.h index 54da7c6463..50db80b0b0 100644 --- a/panda/src/putil/uniqueIdAllocator.h +++ b/panda/src/putil/uniqueIdAllocator.h @@ -46,8 +46,8 @@ PUBLISHED: void free(uint32_t index); PN_stdfloat fraction_used() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; public: static const uint32_t IndexEnd; diff --git a/panda/src/putil/updateSeq.I b/panda/src/putil/updateSeq.I index ea9af8427c..bc620002a0 100644 --- a/panda/src/putil/updateSeq.I +++ b/panda/src/putil/updateSeq.I @@ -219,7 +219,7 @@ get_seq() const { * */ INLINE void UpdateSeq:: -output(ostream &out) const { +output(std::ostream &out) const { AtomicAdjust::Integer seq = AtomicAdjust::get(_seq); switch (seq) { case (AtomicAdjust::Integer)SC_initial: @@ -271,7 +271,7 @@ priv_le(AtomicAdjust::Integer a, AtomicAdjust::Integer b) { return (a == b) || priv_lt(a, b); } -INLINE ostream &operator << (ostream &out, const UpdateSeq &value) { +INLINE std::ostream &operator << (std::ostream &out, const UpdateSeq &value) { value.output(out); return out; } diff --git a/panda/src/putil/updateSeq.h b/panda/src/putil/updateSeq.h index bdddadde6e..f4feed804a 100644 --- a/panda/src/putil/updateSeq.h +++ b/panda/src/putil/updateSeq.h @@ -68,7 +68,7 @@ PUBLISHED: INLINE AtomicAdjust::Integer get_seq() const; MAKE_PROPERTY(seq, get_seq); - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; private: INLINE static bool priv_is_special(AtomicAdjust::Integer seq); @@ -85,7 +85,7 @@ private: AtomicAdjust::Integer _seq; }; -INLINE ostream &operator << (ostream &out, const UpdateSeq &value); +INLINE std::ostream &operator << (std::ostream &out, const UpdateSeq &value); #include "updateSeq.I" diff --git a/panda/src/putil/weakKeyHashMap.I b/panda/src/putil/weakKeyHashMap.I index 6801df4ad1..b2dc97c3f4 100644 --- a/panda/src/putil/weakKeyHashMap.I +++ b/panda/src/putil/weakKeyHashMap.I @@ -306,7 +306,7 @@ template INLINE void WeakKeyHashMap:: set_data(size_t n, Value &&data) { nassertv(has_element(n)); - _table[n]._data = move(data); + _table[n]._data = std::move(data); } /** @@ -390,7 +390,7 @@ is_empty() const { */ template void WeakKeyHashMap:: -output(ostream &out) const { +output(std::ostream &out) const { out << "WeakKeyHashMap (" << _num_entries << " entries): ["; for (size_t i = 0; i < _table_size; ++i) { if (get_exists_array()[i] == 0) { @@ -414,7 +414,7 @@ output(ostream &out) const { */ template void WeakKeyHashMap:: -write(ostream &out) const { +write(std::ostream &out) const { output(out); out << "\n"; } diff --git a/panda/src/putil/weakKeyHashMap.h b/panda/src/putil/weakKeyHashMap.h index b29a846e96..8e51ae700f 100644 --- a/panda/src/putil/weakKeyHashMap.h +++ b/panda/src/putil/weakKeyHashMap.h @@ -56,8 +56,8 @@ public: INLINE size_t get_num_entries() const; INLINE bool is_empty() const; - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; bool validate() const; private: @@ -96,7 +96,7 @@ private: }; template -inline ostream &operator << (ostream &out, const WeakKeyHashMap &shm) { +inline std::ostream &operator << (std::ostream &out, const WeakKeyHashMap &shm) { shm.output(out); return out; } diff --git a/panda/src/recorder/mouseRecorder.h b/panda/src/recorder/mouseRecorder.h index 7122c12299..a30c2d428a 100644 --- a/panda/src/recorder/mouseRecorder.h +++ b/panda/src/recorder/mouseRecorder.h @@ -33,7 +33,7 @@ class BamWriter; */ class EXPCL_PANDA_RECORDER MouseRecorder : public DataNode, public RecorderBase { PUBLISHED: - explicit MouseRecorder(const string &name); + explicit MouseRecorder(const std::string &name); virtual ~MouseRecorder(); public: @@ -41,8 +41,8 @@ public: virtual void play_frame(DatagramIterator &scan, BamReader *manager); public: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: // Inherited from DataNode diff --git a/panda/src/recorder/recorderController.I b/panda/src/recorder/recorderController.I index 043fb55fb4..7960a78ea1 100644 --- a/panda/src/recorder/recorderController.I +++ b/panda/src/recorder/recorderController.I @@ -115,7 +115,7 @@ get_frame_offset() const { * recorder will begin receiving data. */ INLINE void RecorderController:: -add_recorder(const string &name, RecorderBase *recorder) { +add_recorder(const std::string &name, RecorderBase *recorder) { _user_table->add_recorder(name, recorder); _user_table_modified = true; @@ -137,7 +137,7 @@ add_recorder(const string &name, RecorderBase *recorder) { * via add_recorder(); see get_recorder(). */ INLINE bool RecorderController:: -has_recorder(const string &name) const { +has_recorder(const std::string &name) const { return (_user_table->get_recorder(name) != nullptr); } @@ -151,7 +151,7 @@ has_recorder(const string &name) const { * return false, but get_recorder() will return a non-NULL value. */ INLINE RecorderBase *RecorderController:: -get_recorder(const string &name) const { +get_recorder(const std::string &name) const { RecorderBase *recorder = _user_table->get_recorder(name); if (is_playing() && recorder == nullptr) { recorder = _active_table->get_recorder(name); @@ -170,7 +170,7 @@ get_recorder(const string &name) const { * the data from the session file). */ INLINE bool RecorderController:: -remove_recorder(const string &name) { +remove_recorder(const std::string &name) { // If we are playing or recording, immediately remove the state flag from // the recorder. (When we are playing, the state flag will get removed // automatically at the next call to play_frame(), but we might as well be diff --git a/panda/src/recorder/recorderController.h b/panda/src/recorder/recorderController.h index 064e882373..d3d8ccd1fd 100644 --- a/panda/src/recorder/recorderController.h +++ b/panda/src/recorder/recorderController.h @@ -52,10 +52,10 @@ PUBLISHED: INLINE double get_clock_offset() const; INLINE int get_frame_offset() const; - INLINE void add_recorder(const string &name, RecorderBase *recorder); - INLINE bool has_recorder(const string &name) const; - INLINE RecorderBase *get_recorder(const string &name) const; - INLINE bool remove_recorder(const string &name); + INLINE void add_recorder(const std::string &name, RecorderBase *recorder); + INLINE bool has_recorder(const std::string &name) const; + INLINE RecorderBase *get_recorder(const std::string &name) const; + INLINE bool remove_recorder(const std::string &name); INLINE void set_frame_tie(bool frame_tie); INLINE bool get_frame_tie() const; diff --git a/panda/src/recorder/recorderTable.I b/panda/src/recorder/recorderTable.I index 088c74c52f..18e66bc3ee 100644 --- a/panda/src/recorder/recorderTable.I +++ b/panda/src/recorder/recorderTable.I @@ -45,7 +45,7 @@ operator = (const RecorderTable ©) { * Adds the named recorder to the set of recorders. */ INLINE void RecorderTable:: -add_recorder(const string &name, RecorderBase *recorder) { +add_recorder(const std::string &name, RecorderBase *recorder) { nassertv(recorder != nullptr); recorder->ref(); @@ -64,7 +64,7 @@ add_recorder(const string &name, RecorderBase *recorder) { * recorder. */ INLINE RecorderBase *RecorderTable:: -get_recorder(const string &name) const { +get_recorder(const std::string &name) const { Recorders::const_iterator ri = _recorders.find(name); if (ri != _recorders.end()) { return (*ri).second; @@ -77,7 +77,7 @@ get_recorder(const string &name) const { * false if there was no such recorder. */ INLINE bool RecorderTable:: -remove_recorder(const string &name) { +remove_recorder(const std::string &name) { Recorders::iterator ri = _recorders.find(name); if (ri != _recorders.end()) { unref_delete(ri->second); diff --git a/panda/src/recorder/recorderTable.h b/panda/src/recorder/recorderTable.h index 7a5046c651..8c6d1bf412 100644 --- a/panda/src/recorder/recorderTable.h +++ b/panda/src/recorder/recorderTable.h @@ -38,21 +38,21 @@ public: void merge_from(const RecorderTable &other); - INLINE void add_recorder(const string &name, RecorderBase *recorder); - INLINE RecorderBase *get_recorder(const string &name) const; - INLINE bool remove_recorder(const string &name); + INLINE void add_recorder(const std::string &name, RecorderBase *recorder); + INLINE RecorderBase *get_recorder(const std::string &name) const; + INLINE bool remove_recorder(const std::string &name); void record_frame(BamWriter *manager, Datagram &dg); void play_frame(DatagramIterator &scan, BamReader *manager); void set_flags(short flags); void clear_flags(short flags); - void write(ostream &out, int indent_level) const; + void write(std::ostream &out, int indent_level) const; // RecorderBase itself doesn't inherit from ReferenceCount, so we can't put // a PT() around it. Instead, we manage the reference count using calls to // ref() and unref(). - typedef pmap Recorders; + typedef pmap Recorders; Recorders _recorders; bool _error; diff --git a/panda/src/rocket/rocketFileInterface.h b/panda/src/rocket/rocketFileInterface.h index 144ccc4563..5e1f4d0f8c 100644 --- a/panda/src/rocket/rocketFileInterface.h +++ b/panda/src/rocket/rocketFileInterface.h @@ -41,7 +41,7 @@ public: protected: struct VirtualFileHandle { PT(VirtualFile) _file; - istream *_stream; + std::istream *_stream; }; VirtualFileSystem* _vfs; diff --git a/panda/src/rocket/rocketInputHandler.h b/panda/src/rocket/rocketInputHandler.h index e1637ba681..d0c20ff8e3 100644 --- a/panda/src/rocket/rocketInputHandler.h +++ b/panda/src/rocket/rocketInputHandler.h @@ -30,7 +30,7 @@ namespace Rocket { */ class EXPCL_ROCKET RocketInputHandler : public DataNode { PUBLISHED: - RocketInputHandler(const string &name = string()); + RocketInputHandler(const std::string &name = std::string()); virtual ~RocketInputHandler(); static int get_rocket_key(const ButtonHandle handle); diff --git a/panda/src/rocket/rocketRegion.I b/panda/src/rocket/rocketRegion.I index f9fe378ff7..1c9aab10da 100644 --- a/panda/src/rocket/rocketRegion.I +++ b/panda/src/rocket/rocketRegion.I @@ -18,7 +18,7 @@ * window. */ INLINE RocketRegion *RocketRegion:: -make(const string &context_name, GraphicsOutput *window) { +make(const std::string &context_name, GraphicsOutput *window) { return make(context_name, window, LVecBase4(0.0f, 1.0f, 0.0f, 1.0f)); } @@ -28,7 +28,7 @@ make(const string &context_name, GraphicsOutput *window) { * render to. */ INLINE RocketRegion *RocketRegion:: -make(const string &context_name, GraphicsOutput *window, +make(const std::string &context_name, GraphicsOutput *window, const LVecBase4 &dimensions) { return new RocketRegion(window, dimensions, context_name); diff --git a/panda/src/rocket/rocketRegion.h b/panda/src/rocket/rocketRegion.h index d978ac6305..0f0eeb5603 100644 --- a/panda/src/rocket/rocketRegion.h +++ b/panda/src/rocket/rocketRegion.h @@ -28,7 +28,7 @@ class OrthographicLens; class EXPCL_ROCKET RocketRegion : public DisplayRegion { protected: RocketRegion(GraphicsOutput *window, const LVecBase4 &dimensions, - const string &context_name); + const std::string &context_name); virtual void do_cull(CullHandler *cull_handler, SceneSetup *scene_setup, GraphicsStateGuardian *gsg, Thread *current_thread); @@ -36,9 +36,9 @@ protected: PUBLISHED: virtual ~RocketRegion(); - INLINE static RocketRegion* make(const string &context_name, + INLINE static RocketRegion* make(const std::string &context_name, GraphicsOutput *window); - INLINE static RocketRegion* make(const string &context_name, + INLINE static RocketRegion* make(const std::string &context_name, GraphicsOutput *window, const LVecBase4 &dimensions); #ifndef CPPPARSER diff --git a/panda/src/speedtree/loaderFileTypeSrt.h b/panda/src/speedtree/loaderFileTypeSrt.h index 6d26eeff6b..ba40a0e5a1 100644 --- a/panda/src/speedtree/loaderFileTypeSrt.h +++ b/panda/src/speedtree/loaderFileTypeSrt.h @@ -27,8 +27,8 @@ class EXPCL_PANDASPEEDTREE LoaderFileTypeSrt : public LoaderFileType { public: LoaderFileTypeSrt(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options, diff --git a/panda/src/speedtree/loaderFileTypeStf.h b/panda/src/speedtree/loaderFileTypeStf.h index 8ea8eae575..04bc8207e1 100644 --- a/panda/src/speedtree/loaderFileTypeStf.h +++ b/panda/src/speedtree/loaderFileTypeStf.h @@ -26,8 +26,8 @@ class EXPCL_PANDASPEEDTREE LoaderFileTypeStf : public LoaderFileType { public: LoaderFileTypeStf(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options, diff --git a/panda/src/speedtree/speedTreeNode.h b/panda/src/speedtree/speedTreeNode.h index fb153d2542..b45a3df6ee 100644 --- a/panda/src/speedtree/speedTreeNode.h +++ b/panda/src/speedtree/speedTreeNode.h @@ -71,8 +71,8 @@ PUBLISHED: INLINE int add_instance(const STTransform &transform); INLINE void remove_instance(int n); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; public: void write_datagram(BamWriter *manager, Datagram &dg); @@ -85,7 +85,7 @@ PUBLISHED: }; PUBLISHED: - explicit SpeedTreeNode(const string &name); + explicit SpeedTreeNode(const std::string &name); virtual ~SpeedTreeNode(); INLINE bool is_valid() const; @@ -121,7 +121,7 @@ PUBLISHED: bool add_from_stf(const Filename &stf_filename, const LoaderOptions &options = LoaderOptions()); - bool add_from_stf(istream &in, const Filename &pathname, + bool add_from_stf(std::istream &in, const Filename &pathname, const LoaderOptions &options = LoaderOptions(), Loader *loader = nullptr); @@ -145,7 +145,7 @@ PUBLISHED: MAKE_PROPERTY(global_time_delta, get_global_time_delta, set_global_time_delta); - static bool authorize(const string &license = ""); + static bool authorize(const std::string &license = ""); public: SpeedTreeNode(const SpeedTreeNode ©); @@ -167,10 +167,10 @@ public: int pipeline_stage, Thread *current_thread) const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level) const; - static void write_error(ostream &out); + static void write_error(std::ostream &out); protected: void set_transparent_texture_mode(SpeedTree::ETextureAlphaRenderMode eMode) const; @@ -219,7 +219,7 @@ private: }; private: - string _os_shaders_dir; + std::string _os_shaders_dir; // A list of instances per each unique tree. typedef ov_set > Trees; @@ -298,7 +298,7 @@ private: friend class SpeedTreeNode::DrawCallback; }; -INLINE ostream &operator << (ostream &out, const SpeedTreeNode::InstanceList &instances) { +INLINE std::ostream &operator << (std::ostream &out, const SpeedTreeNode::InstanceList &instances) { instances.output(out); return out; } diff --git a/panda/src/speedtree/stBasicTerrain.h b/panda/src/speedtree/stBasicTerrain.h index a61f15a785..048c507ac7 100644 --- a/panda/src/speedtree/stBasicTerrain.h +++ b/panda/src/speedtree/stBasicTerrain.h @@ -33,7 +33,7 @@ PUBLISHED: void clear(); bool setup_terrain(const Filename &terrain_filename); - bool setup_terrain(istream &in, const Filename &pathname); + bool setup_terrain(std::istream &in, const Filename &pathname); INLINE void set_height_map(const Filename &height_map); INLINE const Filename &get_height_map() const; @@ -49,8 +49,8 @@ PUBLISHED: PN_stdfloat start_x, PN_stdfloat start_y, PN_stdfloat size_xy, int num_xy) const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: bool read_height_map(); @@ -59,7 +59,7 @@ protected: INLINE PN_stdfloat interpolate(PN_stdfloat a, PN_stdfloat b, PN_stdfloat t); private: - static void read_quoted_filename(Filename &result, istream &in, + static void read_quoted_filename(Filename &result, std::istream &in, const Filename &dirname); protected: diff --git a/panda/src/speedtree/stTerrain.h b/panda/src/speedtree/stTerrain.h index cc2bf94215..d9a2c3160a 100644 --- a/panda/src/speedtree/stTerrain.h +++ b/panda/src/speedtree/stTerrain.h @@ -68,8 +68,8 @@ PUBLISHED: PN_stdfloat start_x, PN_stdfloat start_y, PN_stdfloat size_xy, int num_xy) const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: const SpeedTree::SVertexAttribDesc *get_st_vertex_format() const; @@ -123,7 +123,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const STTerrain &terrain) { +INLINE std::ostream &operator << (std::ostream &out, const STTerrain &terrain) { terrain.output(out); return out; } diff --git a/panda/src/speedtree/stTransform.h b/panda/src/speedtree/stTransform.h index 07d66a3eae..d3329b7be1 100644 --- a/panda/src/speedtree/stTransform.h +++ b/panda/src/speedtree/stTransform.h @@ -50,7 +50,7 @@ PUBLISHED: INLINE void operator *= (const STTransform &other); INLINE STTransform operator * (const STTransform &other) const; - void output(ostream &out) const; + void output(std::ostream &out) const; public: void write_datagram(BamWriter *manager, Datagram &dg); @@ -64,7 +64,7 @@ public: static STTransform _ident_mat; }; -INLINE ostream &operator << (ostream &out, const STTransform &transform) { +INLINE std::ostream &operator << (std::ostream &out, const STTransform &transform) { transform.output(out); return out; } diff --git a/panda/src/speedtree/stTree.h b/panda/src/speedtree/stTree.h index 379223aa97..e150f70ceb 100644 --- a/panda/src/speedtree/stTree.h +++ b/panda/src/speedtree/stTree.h @@ -35,7 +35,7 @@ PUBLISHED: INLINE bool is_valid() const; - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; public: INLINE const SpeedTree::CTreeRender *get_tree() const; @@ -64,7 +64,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const STTree &tree) { +INLINE std::ostream &operator << (std::ostream &out, const STTree &tree) { tree.output(out); return out; } diff --git a/panda/src/text/config_text.h b/panda/src/text/config_text.h index 895072fdf6..131b95809d 100644 --- a/panda/src/text/config_text.h +++ b/panda/src/text/config_text.h @@ -45,9 +45,9 @@ extern ConfigVariableInt text_pop_properties_key; extern ConfigVariableInt text_soft_hyphen_key; extern ConfigVariableInt text_soft_break_key; extern ConfigVariableInt text_embed_graphic_key; -extern wstring get_text_soft_hyphen_output(); +extern std::wstring get_text_soft_hyphen_output(); extern ConfigVariableDouble text_hyphen_ratio; -extern wstring get_text_never_break_before(); +extern std::wstring get_text_never_break_before(); extern ConfigVariableInt text_max_never_break; extern EXPCL_PANDA_TEXT ConfigVariableDouble text_default_underscore_height; diff --git a/panda/src/text/dynamicTextFont.I b/panda/src/text/dynamicTextFont.I index 16fd832efe..eafa2b50f8 100644 --- a/panda/src/text/dynamicTextFont.I +++ b/panda/src/text/dynamicTextFont.I @@ -15,7 +15,7 @@ * Disambiguates the get_name() method between that inherited from TextFont * and that inherited from FreetypeFont. */ -INLINE const string &DynamicTextFont:: +INLINE const std::string &DynamicTextFont:: get_name() const { return TextFont::get_name(); } @@ -441,7 +441,7 @@ get_tex_format() const { } -INLINE ostream & -operator << (ostream &out, const DynamicTextFont &dtf) { +INLINE std::ostream & +operator << (std::ostream &out, const DynamicTextFont &dtf) { return out << dtf.get_name(); } diff --git a/panda/src/text/dynamicTextFont.h b/panda/src/text/dynamicTextFont.h index 775fa6a450..d2643cffb1 100644 --- a/panda/src/text/dynamicTextFont.h +++ b/panda/src/text/dynamicTextFont.h @@ -47,7 +47,7 @@ PUBLISHED: virtual PT(TextFont) make_copy() const; - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE bool set_point_size(PN_stdfloat point_size); INLINE PN_stdfloat get_point_size() const; @@ -121,7 +121,7 @@ PUBLISHED: int garbage_collect(); void clear(); - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; public: virtual bool get_glyph(int character, CPT(TextGlyph) &glyph); @@ -198,7 +198,7 @@ private: friend class TextNode; }; -INLINE ostream &operator << (ostream &out, const DynamicTextFont &dtf); +INLINE std::ostream &operator << (std::ostream &out, const DynamicTextFont &dtf); #include "dynamicTextFont.I" diff --git a/panda/src/text/fontPool.I b/panda/src/text/fontPool.I index d0142579e1..c6fd4544e3 100644 --- a/panda/src/text/fontPool.I +++ b/panda/src/text/fontPool.I @@ -15,7 +15,7 @@ * Returns true if the font has ever been loaded, false otherwise. */ INLINE bool FontPool:: -has_font(const string &filename) { +has_font(const std::string &filename) { return get_ptr()->ns_has_font(filename); } @@ -26,7 +26,7 @@ has_font(const string &filename) { * with the same font name will return a valid Font pointer. */ INLINE bool FontPool:: -verify_font(const string &filename) { +verify_font(const std::string &filename) { return load_font(filename) != nullptr; } @@ -37,7 +37,7 @@ verify_font(const string &filename) { * returns NULL. */ INLINE TextFont *FontPool:: -load_font(const string &filename) { +load_font(const std::string &filename) { return get_ptr()->ns_load_font(filename); } @@ -46,7 +46,7 @@ load_font(const string &filename) { * replace any previously-loaded font in the pool that had the same filename. */ INLINE void FontPool:: -add_font(const string &filename, TextFont *font) { +add_font(const std::string &filename, TextFont *font) { get_ptr()->ns_add_font(filename, font); } @@ -57,7 +57,7 @@ add_font(const string &filename, TextFont *font) { * and fonts will never be freed. */ INLINE void FontPool:: -release_font(const string &filename) { +release_font(const std::string &filename) { get_ptr()->ns_release_font(filename); } @@ -83,7 +83,7 @@ garbage_collect() { * Lists the contents of the font pool to the indicated output stream. */ INLINE void FontPool:: -list_contents(ostream &out) { +list_contents(std::ostream &out) { get_ptr()->ns_list_contents(out); } diff --git a/panda/src/text/fontPool.h b/panda/src/text/fontPool.h index 363e2aade7..8852a83b0c 100644 --- a/panda/src/text/fontPool.h +++ b/panda/src/text/fontPool.h @@ -33,37 +33,37 @@ PUBLISHED: // parameters may not be entirely an actual filename: they may be a filename // followed by a face index. - INLINE static bool has_font(const string &filename); - INLINE static bool verify_font(const string &filename); - BLOCKING INLINE static TextFont *load_font(const string &filename); - INLINE static void add_font(const string &filename, TextFont *font); - INLINE static void release_font(const string &filename); + INLINE static bool has_font(const std::string &filename); + INLINE static bool verify_font(const std::string &filename); + BLOCKING INLINE static TextFont *load_font(const std::string &filename); + INLINE static void add_font(const std::string &filename, TextFont *font); + INLINE static void release_font(const std::string &filename); INLINE static void release_all_fonts(); INLINE static int garbage_collect(); - INLINE static void list_contents(ostream &out); - static void write(ostream &out); + INLINE static void list_contents(std::ostream &out); + static void write(std::ostream &out); private: INLINE FontPool(); - bool ns_has_font(const string &str); - TextFont *ns_load_font(const string &str); - void ns_add_font(const string &str, TextFont *font); - void ns_release_font(const string &str); + bool ns_has_font(const std::string &str); + TextFont *ns_load_font(const std::string &str); + void ns_add_font(const std::string &str, TextFont *font); + void ns_release_font(const std::string &str); void ns_release_all_fonts(); int ns_garbage_collect(); - void ns_list_contents(ostream &out) const; + void ns_list_contents(std::ostream &out) const; - static void lookup_filename(const string &str, string &index_str, + static void lookup_filename(const std::string &str, std::string &index_str, Filename &filename, int &face_index); static FontPool *get_ptr(); static FontPool *_global_ptr; LightMutex _lock; - typedef pmap Fonts; + typedef pmap Fonts; Fonts _fonts; }; diff --git a/panda/src/text/geomTextGlyph.h b/panda/src/text/geomTextGlyph.h index 38d5604ee7..7e697c1405 100644 --- a/panda/src/text/geomTextGlyph.h +++ b/panda/src/text/geomTextGlyph.h @@ -38,8 +38,8 @@ public: virtual bool copy_primitives_from(const Geom *other); void count_geom(const Geom *other); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; void add_glyph(const TextGlyph *glyph); diff --git a/panda/src/text/staticTextFont.h b/panda/src/text/staticTextFont.h index 99a3e2d309..0c36bf4c5e 100644 --- a/panda/src/text/staticTextFont.h +++ b/panda/src/text/staticTextFont.h @@ -41,7 +41,7 @@ PUBLISHED: virtual PT(TextFont) make_copy() const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; public: virtual bool get_glyph(int character, CPT(TextGlyph) &glyph); diff --git a/panda/src/text/textAssembler.I b/panda/src/text/textAssembler.I index 3cce3a4ad9..d72d3d99bf 100644 --- a/panda/src/text/textAssembler.I +++ b/panda/src/text/textAssembler.I @@ -319,7 +319,7 @@ TextCharacter(wchar_t character, * */ INLINE TextAssembler::TextCharacter:: -TextCharacter(const TextGraphic *graphic, const wstring &graphic_wname, +TextCharacter(const TextGraphic *graphic, const std::wstring &graphic_wname, TextAssembler::ComputedProperties *cprops) : _character(0), _graphic(graphic), @@ -405,7 +405,7 @@ ComputedProperties(const TextProperties &orig_properties) : * */ INLINE TextAssembler::ComputedProperties:: -ComputedProperties(ComputedProperties *based_on, const wstring &wname, +ComputedProperties(ComputedProperties *based_on, const std::wstring &wname, TextEncoder *encoder) : _based_on(based_on), _depth(_based_on->_depth + 1), @@ -417,7 +417,7 @@ ComputedProperties(ComputedProperties *based_on, const wstring &wname, // Now we have to encode the wstring into a string, for lookup in the // TextPropertiesManager. - string name = encoder->encode_wtext(wname); + std::string name = encoder->encode_wtext(wname); const TextProperties *named_props = manager->get_properties_ptr(name); if (named_props != nullptr) { diff --git a/panda/src/text/textAssembler.h b/panda/src/text/textAssembler.h index 52195f8f69..2cbede0d10 100644 --- a/panda/src/text/textAssembler.h +++ b/panda/src/text/textAssembler.h @@ -64,13 +64,13 @@ PUBLISHED: INLINE void set_properties(const TextProperties &properties); INLINE const TextProperties &get_properties() const; - bool set_wtext(const wstring &wtext); - bool set_wsubstr(const wstring &wtext, int start, int count); + bool set_wtext(const std::wstring &wtext); + bool set_wsubstr(const std::wstring &wtext, int start, int count); - wstring get_plain_wtext() const; - wstring get_wordwrapped_plain_wtext() const; - wstring get_wtext() const; - wstring get_wordwrapped_wtext() const; + std::wstring get_plain_wtext() const; + std::wstring get_wordwrapped_plain_wtext() const; + std::wstring get_wtext() const; + std::wstring get_wordwrapped_wtext() const; bool calc_r_c(int &r, int &c, int n) const; INLINE int calc_r(int n) const; @@ -116,12 +116,12 @@ private: public: INLINE ComputedProperties(const TextProperties &orig_properties); INLINE ComputedProperties(ComputedProperties *based_on, - const wstring &wname, TextEncoder *encoder); - void append_delta(wstring &wtext, ComputedProperties *other); + const std::wstring &wname, TextEncoder *encoder); + void append_delta(std::wstring &wtext, ComputedProperties *other); PT(ComputedProperties) _based_on; int _depth; - wstring _wname; + std::wstring _wname; TextProperties _properties; }; @@ -133,14 +133,14 @@ private: public: INLINE TextCharacter(wchar_t character, ComputedProperties *cprops); INLINE TextCharacter(const TextGraphic *graphic, - const wstring &graphic_wname, + const std::wstring &graphic_wname, ComputedProperties *cprops); INLINE TextCharacter(const TextCharacter ©); INLINE void operator = (const TextCharacter ©); wchar_t _character; const TextGraphic *_graphic; - wstring _graphic_wname; + std::wstring _graphic_wname; PT(ComputedProperties) _cprops; }; typedef pvector TextString; @@ -169,8 +169,8 @@ private: TextBlock _text_block; void scan_wtext(TextString &output_string, - wstring::const_iterator &si, - const wstring::const_iterator &send, + std::wstring::const_iterator &si, + const std::wstring::const_iterator &send, ComputedProperties *current_cprops); bool wordwrap_text(); diff --git a/panda/src/text/textFont.h b/panda/src/text/textFont.h index 7cea63e391..3c51c46d0c 100644 --- a/panda/src/text/textFont.h +++ b/panda/src/text/textFont.h @@ -76,7 +76,7 @@ PUBLISHED: virtual PN_stdfloat get_kerning(int first, int second) const; - virtual void write(ostream &out, int indent_level) const; + virtual void write(std::ostream &out, int indent_level) const; public: INLINE PN_stdfloat get_total_poly_margin() const; @@ -84,7 +84,7 @@ public: virtual bool get_glyph(int character, CPT(TextGlyph) &glyph)=0; TextGlyph *get_invalid_glyph(); - static RenderMode string_render_mode(const string &string); + static RenderMode string_render_mode(const std::string &string); private: void make_invalid_glyph(); @@ -114,8 +114,8 @@ private: static TypeHandle _type_handle; }; -EXPCL_PANDA_TEXT ostream &operator << (ostream &out, TextFont::RenderMode rm); -EXPCL_PANDA_TEXT istream &operator >> (istream &in, TextFont::RenderMode &rm); +EXPCL_PANDA_TEXT std::ostream &operator << (std::ostream &out, TextFont::RenderMode rm); +EXPCL_PANDA_TEXT std::istream &operator >> (std::istream &in, TextFont::RenderMode &rm); #include "textFont.I" diff --git a/panda/src/text/textNode.I b/panda/src/text/textNode.I index dd10624d27..313685c504 100644 --- a/panda/src/text/textNode.I +++ b/panda/src/text/textNode.I @@ -830,7 +830,7 @@ clear_shadow() { * "fixed". */ INLINE void TextNode:: -set_bin(const string &bin) { +set_bin(const std::string &bin) { TextProperties::set_bin(bin); invalidate_no_measure(); } @@ -935,7 +935,7 @@ clear_glyph_shift() { * Changes the text that is displayed under the TextNode. */ INLINE void TextNode:: -set_text(const string &text) { +set_text(const std::string &text) { TextEncoder::set_text(text); invalidate_with_measure(); } @@ -947,7 +947,7 @@ set_text(const string &text) { * whichever encoding is specified by set_encoding(). */ INLINE void TextNode:: -set_text(const string &text, TextNode::Encoding encoding) { +set_text(const std::string &text, TextNode::Encoding encoding) { TextEncoder::set_text(text, encoding); invalidate_with_measure(); } @@ -965,7 +965,7 @@ clear_text() { * Appends the indicates string to the end of the stored text. */ INLINE void TextNode:: -append_text(const string &text) { +append_text(const std::string &text) { TextEncoder::append_text(text); invalidate_with_measure(); } @@ -987,7 +987,7 @@ append_unicode_char(wchar_t character) { * In earlier versions, this did not contain any embedded special characters * like \1 or \3; now it does. */ -INLINE string TextNode:: +INLINE std::string TextNode:: get_wordwrapped_text() const { return encode_wtext(get_wordwrapped_wtext()); } @@ -997,7 +997,7 @@ get_wordwrapped_text() const { * should not include the newline character. */ INLINE PN_stdfloat TextNode:: -calc_width(const string &line) const { +calc_width(const std::string &line) const { return calc_width(decode_text(line)); } @@ -1007,7 +1007,7 @@ calc_width(const string &line) const { * encoded version of the same string. */ INLINE void TextNode:: -set_wtext(const wstring &wtext) { +set_wtext(const std::wstring &wtext) { TextEncoder::set_wtext(wtext); invalidate_with_measure(); } @@ -1016,7 +1016,7 @@ set_wtext(const wstring &wtext) { * Appends the indicates string to the end of the stored wide-character text. */ INLINE void TextNode:: -append_wtext(const wstring &wtext) { +append_wtext(const std::wstring &wtext) { TextEncoder::append_wtext(wtext); invalidate_with_measure(); } @@ -1028,7 +1028,7 @@ append_wtext(const wstring &wtext) { * In earlier versions, this did not contain any embedded special characters * like \1 or \3; now it does. */ -INLINE wstring TextNode:: +INLINE std::wstring TextNode:: get_wordwrapped_wtext() const { check_measure(); return _wordwrapped_wtext; diff --git a/panda/src/text/textNode.h b/panda/src/text/textNode.h index 4e24b110b9..4f37f806f4 100644 --- a/panda/src/text/textNode.h +++ b/panda/src/text/textNode.h @@ -45,8 +45,8 @@ */ class EXPCL_PANDA_TEXT TextNode : public PandaNode, public TextEncoder, public TextProperties { PUBLISHED: - explicit TextNode(const string &name); - explicit TextNode(const string &name, const TextProperties ©); + explicit TextNode(const std::string &name); + explicit TextNode(const std::string &name, const TextProperties ©); protected: TextNode(const TextNode ©); virtual PandaNode *make_copy() const; @@ -165,7 +165,7 @@ PUBLISHED: INLINE void set_shadow(const LVecBase2 &shadow_offset); INLINE void clear_shadow(); - INLINE void set_bin(const string &bin); + INLINE void set_bin(const std::string &bin); INLINE void clear_bin(); INLINE int set_draw_order(int draw_order); @@ -182,34 +182,34 @@ PUBLISHED: // These methods are inherited from TextEncoder, but we override here so we // can flag the TextNode as dirty when they have been changed. - INLINE void set_text(const string &text); - INLINE void set_text(const string &text, Encoding encoding); + INLINE void set_text(const std::string &text); + INLINE void set_text(const std::string &text, Encoding encoding); INLINE void clear_text(); - INLINE void append_text(const string &text); + INLINE void append_text(const std::string &text); INLINE void append_unicode_char(wchar_t character); // After the text has been set, you can query this to determine how it will // be wordwrapped. - INLINE string get_wordwrapped_text() const; + INLINE std::string get_wordwrapped_text() const; // These methods calculate the width of a single character or a line of text // in the current font. PN_stdfloat calc_width(wchar_t character) const; - INLINE PN_stdfloat calc_width(const string &line) const; + INLINE PN_stdfloat calc_width(const std::string &line) const; bool has_exact_character(wchar_t character) const; bool has_character(wchar_t character) const; bool is_whitespace(wchar_t character) const; // Direct support for wide-character strings. - INLINE void set_wtext(const wstring &wtext); - INLINE void append_wtext(const wstring &text); + INLINE void set_wtext(const std::wstring &wtext); + INLINE void append_wtext(const std::wstring &text); - INLINE wstring get_wordwrapped_wtext() const; - PN_stdfloat calc_width(const wstring &line) const; + INLINE std::wstring get_wordwrapped_wtext() const; + PN_stdfloat calc_width(const std::wstring &line) const; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; // The following functions return information about the text that was last // built (and is currently visible). @@ -358,7 +358,7 @@ private: // Returned from TextAssembler: LVector2 _text_ul, _text_lr; int _num_rows; - wstring _wordwrapped_wtext; + std::wstring _wordwrapped_wtext; static PStatCollector _text_generate_pcollector; diff --git a/panda/src/text/textProperties.I b/panda/src/text/textProperties.I index e3e296c95f..09bfc78dad 100644 --- a/panda/src/text/textProperties.I +++ b/panda/src/text/textProperties.I @@ -562,7 +562,7 @@ get_shadow() const { * "fixed". */ INLINE void TextProperties:: -set_bin(const string &bin) { +set_bin(const std::string &bin) { _bin = bin; _specified |= F_has_bin; _text_state.clear(); @@ -575,7 +575,7 @@ set_bin(const string &bin) { */ INLINE void TextProperties:: clear_bin() { - _bin = string(); + _bin = std::string(); _specified &= ~F_has_bin; _text_state.clear(); _shadow_state.clear(); @@ -594,7 +594,7 @@ has_bin() const { * Returns the drawing bin set with set_bin(), or empty string if no bin has * been set. */ -INLINE const string &TextProperties:: +INLINE const std::string &TextProperties:: get_bin() const { return _bin; } diff --git a/panda/src/text/textProperties.h b/panda/src/text/textProperties.h index af899f7b59..aca592e30b 100644 --- a/panda/src/text/textProperties.h +++ b/panda/src/text/textProperties.h @@ -135,10 +135,10 @@ PUBLISHED: INLINE bool has_shadow() const; INLINE LVector2 get_shadow() const; - INLINE void set_bin(const string &bin); + INLINE void set_bin(const std::string &bin); INLINE void clear_bin(); INLINE bool has_bin() const; - INLINE const string &get_bin() const; + INLINE const std::string &get_bin() const; INLINE int set_draw_order(int draw_order); INLINE void clear_draw_order(); @@ -172,7 +172,7 @@ PUBLISHED: void add_properties(const TextProperties &other); - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; PUBLISHED: MAKE_PROPERTY2(font, has_font, get_font, set_font, clear_font); @@ -255,7 +255,7 @@ private: LColor _text_color; LColor _shadow_color; LVector2 _shadow_offset; - string _bin; + std::string _bin; int _draw_order; PN_stdfloat _tab_width; PN_stdfloat _glyph_scale; diff --git a/panda/src/text/textPropertiesManager.h b/panda/src/text/textPropertiesManager.h index 2c4f6b3c84..bae0c86e78 100644 --- a/panda/src/text/textPropertiesManager.h +++ b/panda/src/text/textPropertiesManager.h @@ -47,30 +47,30 @@ protected: ~TextPropertiesManager(); PUBLISHED: - void set_properties(const string &name, const TextProperties &properties); - TextProperties get_properties(const string &name); - bool has_properties(const string &name) const; - void clear_properties(const string &name); + void set_properties(const std::string &name, const TextProperties &properties); + TextProperties get_properties(const std::string &name); + bool has_properties(const std::string &name) const; + void clear_properties(const std::string &name); - void set_graphic(const string &name, const TextGraphic &graphic); - void set_graphic(const string &name, const NodePath &model); - TextGraphic get_graphic(const string &name); - bool has_graphic(const string &name) const; - void clear_graphic(const string &name); + void set_graphic(const std::string &name, const TextGraphic &graphic); + void set_graphic(const std::string &name, const NodePath &model); + TextGraphic get_graphic(const std::string &name); + bool has_graphic(const std::string &name) const; + void clear_graphic(const std::string &name); - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; static TextPropertiesManager *get_global_ptr(); public: - const TextProperties *get_properties_ptr(const string &name); - const TextGraphic *get_graphic_ptr(const string &name); + const TextProperties *get_properties_ptr(const std::string &name); + const TextGraphic *get_graphic_ptr(const std::string &name); private: - typedef pmap Properties; + typedef pmap Properties; Properties _properties; - typedef pmap Graphics; + typedef pmap Graphics; Graphics _graphics; static TextPropertiesManager *_global_ptr; diff --git a/panda/src/tform/buttonThrower.I b/panda/src/tform/buttonThrower.I index 22832bc933..2e0fc4c57f 100644 --- a/panda/src/tform/buttonThrower.I +++ b/panda/src/tform/buttonThrower.I @@ -24,7 +24,7 @@ * See also set_keystroke_event(). */ INLINE void ButtonThrower:: -set_button_down_event(const string &button_down_event) { +set_button_down_event(const std::string &button_down_event) { _button_down_event = button_down_event; } @@ -32,7 +32,7 @@ set_button_down_event(const string &button_down_event) { * Returns the button_down_event that has been set on this ButtonThrower. See * set_button_down_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_button_down_event() const { return _button_down_event; } @@ -42,7 +42,7 @@ get_button_down_event() const { * button is released. See set_button_down_event(). */ INLINE void ButtonThrower:: -set_button_up_event(const string &button_up_event) { +set_button_up_event(const std::string &button_up_event) { _button_up_event = button_up_event; } @@ -50,7 +50,7 @@ set_button_up_event(const string &button_up_event) { * Returns the button_up_event that has been set on this ButtonThrower. See * set_button_up_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_button_up_event() const { return _button_up_event; } @@ -68,7 +68,7 @@ get_button_up_event() const { * See also set_keystroke_event(). */ INLINE void ButtonThrower:: -set_button_repeat_event(const string &button_repeat_event) { +set_button_repeat_event(const std::string &button_repeat_event) { _button_repeat_event = button_repeat_event; } @@ -76,7 +76,7 @@ set_button_repeat_event(const string &button_repeat_event) { * Returns the button_repeat_event that has been set on this ButtonThrower. * See set_button_repeat_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_button_repeat_event() const { return _button_repeat_event; } @@ -100,7 +100,7 @@ get_button_repeat_event() const { * See also set_button_down_event(). */ INLINE void ButtonThrower:: -set_keystroke_event(const string &keystroke_event) { +set_keystroke_event(const std::string &keystroke_event) { _keystroke_event = keystroke_event; } @@ -108,7 +108,7 @@ set_keystroke_event(const string &keystroke_event) { * Returns the keystroke_event that has been set on this ButtonThrower. See * set_keystroke_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_keystroke_event() const { return _keystroke_event; } @@ -129,7 +129,7 @@ get_keystroke_event() const { * which to end the highlight, and the current cursor position. */ INLINE void ButtonThrower:: -set_candidate_event(const string &candidate_event) { +set_candidate_event(const std::string &candidate_event) { _candidate_event = candidate_event; } @@ -137,7 +137,7 @@ set_candidate_event(const string &candidate_event) { * Returns the candidate_event that has been set on this ButtonThrower. See * set_candidate_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_candidate_event() const { return _candidate_event; } @@ -147,7 +147,7 @@ get_candidate_event() const { * within the window. */ INLINE void ButtonThrower:: -set_move_event(const string &move_event) { +set_move_event(const std::string &move_event) { _move_event = move_event; } @@ -155,7 +155,7 @@ set_move_event(const string &move_event) { * Returns the move_event that has been set on this ButtonThrower. See * set_move_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_move_event() const { return _move_event; } @@ -166,7 +166,7 @@ get_move_event() const { * selected keyboard layout. */ INLINE void ButtonThrower:: -set_raw_button_down_event(const string &raw_button_down_event) { +set_raw_button_down_event(const std::string &raw_button_down_event) { _raw_button_down_event = raw_button_down_event; } @@ -174,7 +174,7 @@ set_raw_button_down_event(const string &raw_button_down_event) { * Returns the raw_button_down_event that has been set on this ButtonThrower. * See set_raw_button_down_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_raw_button_down_event() const { return _raw_button_down_event; } @@ -184,7 +184,7 @@ get_raw_button_down_event() const { * button is released. See set_raw_button_down_event(). */ INLINE void ButtonThrower:: -set_raw_button_up_event(const string &raw_button_up_event) { +set_raw_button_up_event(const std::string &raw_button_up_event) { _raw_button_up_event = raw_button_up_event; } @@ -192,7 +192,7 @@ set_raw_button_up_event(const string &raw_button_up_event) { * Returns the raw_button_up_event that has been set on this ButtonThrower. * See set_raw_button_up_event(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_raw_button_up_event() const { return _raw_button_up_event; } @@ -203,7 +203,7 @@ get_raw_button_up_event() const { * generic event names like set_button_down_event) thrown by this object. */ INLINE void ButtonThrower:: -set_prefix(const string &prefix) { +set_prefix(const std::string &prefix) { _prefix = prefix; } @@ -211,7 +211,7 @@ set_prefix(const string &prefix) { * Returns the prefix that has been set on this ButtonThrower. See * set_prefix(). */ -INLINE const string &ButtonThrower:: +INLINE const std::string &ButtonThrower:: get_prefix() const { return _prefix; } diff --git a/panda/src/tform/buttonThrower.h b/panda/src/tform/buttonThrower.h index 2c1a8a3982..7aa47c1fa9 100644 --- a/panda/src/tform/buttonThrower.h +++ b/panda/src/tform/buttonThrower.h @@ -34,25 +34,25 @@ */ class EXPCL_PANDA_TFORM ButtonThrower : public DataNode { PUBLISHED: - explicit ButtonThrower(const string &name); + explicit ButtonThrower(const std::string &name); ~ButtonThrower(); - INLINE void set_button_down_event(const string &button_down_event); - INLINE const string &get_button_down_event() const; - INLINE void set_button_up_event(const string &button_up_event); - INLINE const string &get_button_up_event() const; - INLINE void set_button_repeat_event(const string &button_repeat_event); - INLINE const string &get_button_repeat_event() const; - INLINE void set_keystroke_event(const string &keystroke_event); - INLINE const string &get_keystroke_event() const; - INLINE void set_candidate_event(const string &candidate_event); - INLINE const string &get_candidate_event() const; - INLINE void set_move_event(const string &move_event); - INLINE const string &get_move_event() const; - INLINE void set_raw_button_down_event(const string &raw_button_down_event); - INLINE const string &get_raw_button_down_event() const; - INLINE void set_raw_button_up_event(const string &raw_button_up_event); - INLINE const string &get_raw_button_up_event() const; + INLINE void set_button_down_event(const std::string &button_down_event); + INLINE const std::string &get_button_down_event() const; + INLINE void set_button_up_event(const std::string &button_up_event); + INLINE const std::string &get_button_up_event() const; + INLINE void set_button_repeat_event(const std::string &button_repeat_event); + INLINE const std::string &get_button_repeat_event() const; + INLINE void set_keystroke_event(const std::string &keystroke_event); + INLINE const std::string &get_keystroke_event() const; + INLINE void set_candidate_event(const std::string &candidate_event); + INLINE const std::string &get_candidate_event() const; + INLINE void set_move_event(const std::string &move_event); + INLINE const std::string &get_move_event() const; + INLINE void set_raw_button_down_event(const std::string &raw_button_down_event); + INLINE const std::string &get_raw_button_down_event() const; + INLINE void set_raw_button_up_event(const std::string &raw_button_up_event); + INLINE const std::string &get_raw_button_up_event() const; MAKE_PROPERTY(button_down_event, get_button_down_event, set_button_down_event); MAKE_PROPERTY(button_up_event, get_button_up_event, set_button_up_event); MAKE_PROPERTY(button_repeat_event, get_button_repeat_event, set_button_repeat_event); @@ -62,8 +62,8 @@ PUBLISHED: MAKE_PROPERTY(raw_button_down_event, get_raw_button_down_event, set_raw_button_down_event); MAKE_PROPERTY(raw_button_up_event, get_raw_button_up_event, set_raw_button_up_event); - INLINE void set_prefix(const string &prefix); - INLINE const string &get_prefix() const; + INLINE void set_prefix(const std::string &prefix); + INLINE const std::string &get_prefix() const; INLINE void set_specific_flag(bool specific_flag); INLINE bool get_specific_flag() const; MAKE_PROPERTY(prefix, get_prefix, set_prefix); @@ -94,24 +94,24 @@ PUBLISHED: void clear_throw_buttons(); public: - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: - void do_specific_event(const string &event_name, double time); + void do_specific_event(const std::string &event_name, double time); void do_general_event(const ButtonEvent &button_event, - const string &event_name); + const std::string &event_name); private: - string _button_down_event; - string _button_up_event; - string _button_repeat_event; - string _keystroke_event; - string _candidate_event; - string _move_event; - string _raw_button_up_event; - string _raw_button_down_event; + std::string _button_down_event; + std::string _button_up_event; + std::string _button_repeat_event; + std::string _keystroke_event; + std::string _candidate_event; + std::string _move_event; + std::string _raw_button_up_event; + std::string _raw_button_down_event; bool _specific_flag; - string _prefix; + std::string _prefix; bool _time_flag; ModifierButtons _mods; diff --git a/panda/src/tform/driveInterface.h b/panda/src/tform/driveInterface.h index 89f6b069b0..516cc6be43 100644 --- a/panda/src/tform/driveInterface.h +++ b/panda/src/tform/driveInterface.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_TFORM DriveInterface : public MouseInterfaceNode { PUBLISHED: - explicit DriveInterface(const string &name = ""); + explicit DriveInterface(const std::string &name = ""); ~DriveInterface(); INLINE void set_forward_speed(PN_stdfloat speed); diff --git a/panda/src/tform/mouseInterfaceNode.h b/panda/src/tform/mouseInterfaceNode.h index 1555dba852..b1540e6aba 100644 --- a/panda/src/tform/mouseInterfaceNode.h +++ b/panda/src/tform/mouseInterfaceNode.h @@ -30,7 +30,7 @@ class ButtonEventList; */ class EXPCL_PANDA_TFORM MouseInterfaceNode : public DataNode { public: - explicit MouseInterfaceNode(const string &name); + explicit MouseInterfaceNode(const std::string &name); virtual ~MouseInterfaceNode(); PUBLISHED: diff --git a/panda/src/tform/mouseSubregion.h b/panda/src/tform/mouseSubregion.h index f500992bcb..105dda96f9 100644 --- a/panda/src/tform/mouseSubregion.h +++ b/panda/src/tform/mouseSubregion.h @@ -32,7 +32,7 @@ */ class EXPCL_PANDA_TFORM MouseSubregion : public MouseInterfaceNode { PUBLISHED: - explicit MouseSubregion(const string &name); + explicit MouseSubregion(const std::string &name); ~MouseSubregion(); INLINE PN_stdfloat get_left() const; diff --git a/panda/src/tform/mouseWatcher.I b/panda/src/tform/mouseWatcher.I index 7d709f252e..f47c07e6e2 100644 --- a/panda/src/tform/mouseWatcher.I +++ b/panda/src/tform/mouseWatcher.I @@ -160,7 +160,7 @@ is_button_down(ButtonHandle button) const { * values. */ INLINE void MouseWatcher:: -set_button_down_pattern(const string &pattern) { +set_button_down_pattern(const std::string &pattern) { _button_down_pattern = pattern; } @@ -168,7 +168,7 @@ set_button_down_pattern(const string &pattern) { * Returns the string that indicates how event names are generated when a * button is depressed. See set_button_down_pattern(). */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_button_down_pattern() const { return _button_down_pattern; } @@ -178,7 +178,7 @@ get_button_down_pattern() const { * when a button is released. See set_button_down_pattern(). */ INLINE void MouseWatcher:: -set_button_up_pattern(const string &pattern) { +set_button_up_pattern(const std::string &pattern) { _button_up_pattern = pattern; } @@ -186,7 +186,7 @@ set_button_up_pattern(const string &pattern) { * Returns the string that indicates how event names are generated when a * button is released. See set_button_down_pattern(). */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_button_up_pattern() const { return _button_up_pattern; } @@ -204,7 +204,7 @@ get_button_up_pattern() const { * values. */ INLINE void MouseWatcher:: -set_button_repeat_pattern(const string &pattern) { +set_button_repeat_pattern(const std::string &pattern) { _button_repeat_pattern = pattern; } @@ -213,7 +213,7 @@ set_button_repeat_pattern(const string &pattern) { * when a button is continuously held and generates keyrepeat "down" events. * See set_button_repeat_pattern(). */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_button_repeat_pattern() const { return _button_repeat_pattern; } @@ -225,7 +225,7 @@ get_button_repeat_pattern() const { * it might be "within" multiple nested regions. */ INLINE void MouseWatcher:: -set_enter_pattern(const string &pattern) { +set_enter_pattern(const std::string &pattern) { _enter_pattern = pattern; } @@ -235,7 +235,7 @@ set_enter_pattern(const string &pattern) { * mouse is only "entered" in the topmost region at a given time, while it * might be "within" multiple nested regions. */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_enter_pattern() const { return _enter_pattern; } @@ -247,7 +247,7 @@ get_enter_pattern() const { * it might be "within" multiple nested regions. */ INLINE void MouseWatcher:: -set_leave_pattern(const string &pattern) { +set_leave_pattern(const std::string &pattern) { _leave_pattern = pattern; } @@ -257,7 +257,7 @@ set_leave_pattern(const string &pattern) { * mouse is only "entered" in the topmost region at a given time, while it * might be "within" multiple nested regions. */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_leave_pattern() const { return _leave_pattern; } @@ -269,7 +269,7 @@ get_leave_pattern() const { * given time, while it might be "within" multiple nested regions. */ INLINE void MouseWatcher:: -set_within_pattern(const string &pattern) { +set_within_pattern(const std::string &pattern) { _within_pattern = pattern; } @@ -279,7 +279,7 @@ set_within_pattern(const string &pattern) { * a mouse is only "entered" in the topmost region at a given time, while it * might be "within" multiple nested regions. */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_within_pattern() const { return _within_pattern; } @@ -291,7 +291,7 @@ get_within_pattern() const { * given time, while it might be "within" multiple nested regions. */ INLINE void MouseWatcher:: -set_without_pattern(const string &pattern) { +set_without_pattern(const std::string &pattern) { _without_pattern = pattern; } @@ -301,7 +301,7 @@ set_without_pattern(const string &pattern) { * that a mouse is only "entered" in the topmost region at a given time, while * it might be "within" multiple nested regions. */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_without_pattern() const { return _without_pattern; } @@ -475,7 +475,7 @@ clear_inactivity_timeout() { * timeout counter expires. See set_inactivity_timeout(). */ INLINE void MouseWatcher:: -set_inactivity_timeout_event(const string &event) { +set_inactivity_timeout_event(const std::string &event) { _inactivity_timeout_event = event; } @@ -483,7 +483,7 @@ set_inactivity_timeout_event(const string &event) { * Returns the event string that will be generated when the inactivity timeout * counter expires. See set_inactivity_timeout(). */ -INLINE const string &MouseWatcher:: +INLINE const std::string &MouseWatcher:: get_inactivity_timeout_event() const { return _inactivity_timeout_event; } diff --git a/panda/src/tform/mouseWatcher.h b/panda/src/tform/mouseWatcher.h index c3b4988b7f..9f21f3d09b 100644 --- a/panda/src/tform/mouseWatcher.h +++ b/panda/src/tform/mouseWatcher.h @@ -60,7 +60,7 @@ class DisplayRegion; */ class EXPCL_PANDA_TFORM MouseWatcher : public DataNode, public MouseWatcherBase { PUBLISHED: - explicit MouseWatcher(const string &name = ""); + explicit MouseWatcher(const std::string &name = ""); ~MouseWatcher(); bool remove_region(MouseWatcherRegion *region); @@ -85,26 +85,26 @@ PUBLISHED: INLINE bool is_button_down(ButtonHandle button) const; - INLINE void set_button_down_pattern(const string &pattern); - INLINE const string &get_button_down_pattern() const; + INLINE void set_button_down_pattern(const std::string &pattern); + INLINE const std::string &get_button_down_pattern() const; - INLINE void set_button_up_pattern(const string &pattern); - INLINE const string &get_button_up_pattern() const; + INLINE void set_button_up_pattern(const std::string &pattern); + INLINE const std::string &get_button_up_pattern() const; - INLINE void set_button_repeat_pattern(const string &pattern); - INLINE const string &get_button_repeat_pattern() const; + INLINE void set_button_repeat_pattern(const std::string &pattern); + INLINE const std::string &get_button_repeat_pattern() const; - INLINE void set_enter_pattern(const string &pattern); - INLINE const string &get_enter_pattern() const; + INLINE void set_enter_pattern(const std::string &pattern); + INLINE const std::string &get_enter_pattern() const; - INLINE void set_leave_pattern(const string &pattern); - INLINE const string &get_leave_pattern() const; + INLINE void set_leave_pattern(const std::string &pattern); + INLINE const std::string &get_leave_pattern() const; - INLINE void set_within_pattern(const string &pattern); - INLINE const string &get_within_pattern() const; + INLINE void set_within_pattern(const std::string &pattern); + INLINE const std::string &get_within_pattern() const; - INLINE void set_without_pattern(const string &pattern); - INLINE const string &get_without_pattern() const; + INLINE void set_without_pattern(const std::string &pattern); + INLINE const std::string &get_without_pattern() const; INLINE void set_geometry(PandaNode *node); INLINE bool has_geometry() const; @@ -134,8 +134,8 @@ PUBLISHED: INLINE double get_inactivity_timeout() const; INLINE void clear_inactivity_timeout(); - INLINE void set_inactivity_timeout_event(const string &event); - INLINE const string &get_inactivity_timeout_event() const; + INLINE void set_inactivity_timeout_event(const std::string &event); + INLINE const std::string &get_inactivity_timeout_event() const; INLINE CPT(PointerEventList) get_trail_log() const; INLINE int num_trail_recent() const; @@ -147,8 +147,8 @@ PUBLISHED: void note_activity(); public: - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: void get_over_regions(Regions ®ions, const LPoint2 &pos) const; @@ -159,7 +159,7 @@ protected: #ifndef NDEBUG virtual void do_show_regions(const NodePath &render2d, - const string &bin_name, int draw_order); + const std::string &bin_name, int draw_order); virtual void do_hide_regions(); #endif // NDEBUG @@ -173,7 +173,7 @@ protected: static bool has_region_in(const Regions ®ions, MouseWatcherRegion *region); - void throw_event_pattern(const string &pattern, + void throw_event_pattern(const std::string &pattern, const MouseWatcherRegion *region, const ButtonHandle &button); @@ -181,7 +181,7 @@ protected: void press(ButtonHandle button, bool keyrepeat); void release(ButtonHandle button); void keystroke(int keycode); - void candidate(const wstring &candidate, size_t highlight_start, + void candidate(const std::wstring &candidate, size_t highlight_start, size_t highlight_end, size_t cursor_pos); void global_keyboard_press(const MouseWatcherParameter ¶m); @@ -232,13 +232,13 @@ private: bool _enter_multiple; bool _implicit_click; - string _button_down_pattern; - string _button_up_pattern; - string _button_repeat_pattern; - string _enter_pattern; - string _leave_pattern; - string _within_pattern; - string _without_pattern; + std::string _button_down_pattern; + std::string _button_up_pattern; + std::string _button_repeat_pattern; + std::string _enter_pattern; + std::string _leave_pattern; + std::string _within_pattern; + std::string _without_pattern; PT(PandaNode) _geometry; @@ -249,7 +249,7 @@ private: bool _has_inactivity_timeout; double _inactivity_timeout; - string _inactivity_timeout_event; + std::string _inactivity_timeout_event; double _last_activity; enum InactivityState { @@ -262,7 +262,7 @@ private: #ifndef NDEBUG NodePath _show_regions_render2d; - string _show_regions_bin_name; + std::string _show_regions_bin_name; int _show_regions_draw_order; #endif diff --git a/panda/src/tform/mouseWatcherBase.h b/panda/src/tform/mouseWatcherBase.h index 8836f57023..f3b53c2ec2 100644 --- a/panda/src/tform/mouseWatcherBase.h +++ b/panda/src/tform/mouseWatcherBase.h @@ -37,7 +37,7 @@ PUBLISHED: void add_region(MouseWatcherRegion *region); bool has_region(MouseWatcherRegion *region) const; bool remove_region(MouseWatcherRegion *region); - MouseWatcherRegion *find_region(const string &name) const; + MouseWatcherRegion *find_region(const std::string &name) const; void clear_regions(); void sort_regions(); @@ -49,12 +49,12 @@ PUBLISHED: MAKE_SEQ(get_regions, get_num_regions, get_region); MAKE_SEQ_PROPERTY(regions, get_num_regions, get_region); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; #ifndef NDEBUG void show_regions(const NodePath &render2d, - const string &bin_name, int draw_order); + const std::string &bin_name, int draw_order); void set_color(const LColor &color); void hide_regions(); @@ -67,7 +67,7 @@ protected: #ifndef NDEBUG virtual void do_show_regions(const NodePath &render2d, - const string &bin_name, int draw_order); + const std::string &bin_name, int draw_order); virtual void do_hide_regions(); void do_update_regions(); #endif // NDEBUG diff --git a/panda/src/tform/mouseWatcherParameter.I b/panda/src/tform/mouseWatcherParameter.I index 4983fcfda0..49d6314e91 100644 --- a/panda/src/tform/mouseWatcherParameter.I +++ b/panda/src/tform/mouseWatcherParameter.I @@ -88,7 +88,7 @@ set_keycode(int keycode) { * Sets the candidate string associated with this event, if any. */ INLINE void MouseWatcherParameter:: -set_candidate(const wstring &candidate_string, +set_candidate(const std::wstring &candidate_string, size_t highlight_start, size_t highlight_end, size_t cursor_pos) { _candidate_string = candidate_string; @@ -188,7 +188,7 @@ has_candidate() const { * Returns the candidate string associated with this event. If * has_candidate(), above, returns false, this returns the empty string. */ -INLINE const wstring &MouseWatcherParameter:: +INLINE const std::wstring &MouseWatcherParameter:: get_candidate_string() const { return _candidate_string; } @@ -197,7 +197,7 @@ get_candidate_string() const { * Returns the candidate string associated with this event. If * has_candidate(), above, returns false, this returns the empty string. */ -INLINE string MouseWatcherParameter:: +INLINE std::string MouseWatcherParameter:: get_candidate_string_encoded() const { return get_candidate_string_encoded(TextEncoder::get_default_encoding()); } @@ -206,7 +206,7 @@ get_candidate_string_encoded() const { * Returns the candidate string associated with this event. If * has_candidate(), above, returns false, this returns the empty string. */ -INLINE string MouseWatcherParameter:: +INLINE std::string MouseWatcherParameter:: get_candidate_string_encoded(TextEncoder::Encoding encoding) const { return TextEncoder::encode_wtext(_candidate_string, encoding); } @@ -274,8 +274,8 @@ is_outside() const { return (_flags & F_is_outside) != 0; } -INLINE ostream & -operator << (ostream &out, const MouseWatcherParameter &parm) { +INLINE std::ostream & +operator << (std::ostream &out, const MouseWatcherParameter &parm) { parm.output(out); return out; } diff --git a/panda/src/tform/mouseWatcherParameter.h b/panda/src/tform/mouseWatcherParameter.h index 1da5dcfc45..8ea454d4f2 100644 --- a/panda/src/tform/mouseWatcherParameter.h +++ b/panda/src/tform/mouseWatcherParameter.h @@ -35,7 +35,7 @@ public: INLINE void set_button(const ButtonHandle &button); INLINE void set_keyrepeat(bool flag); INLINE void set_keycode(int keycode); - INLINE void set_candidate(const wstring &candidate_string, + INLINE void set_candidate(const std::wstring &candidate_string, size_t highlight_start, size_t higlight_end, size_t cursor_pos); @@ -54,11 +54,11 @@ PUBLISHED: INLINE bool has_candidate() const; public: - INLINE const wstring &get_candidate_string() const; + INLINE const std::wstring &get_candidate_string() const; PUBLISHED: - INLINE string get_candidate_string_encoded() const; - INLINE string get_candidate_string_encoded(TextEncoder::Encoding encoding) const; + INLINE std::string get_candidate_string_encoded() const; + INLINE std::string get_candidate_string_encoded(TextEncoder::Encoding encoding) const; INLINE size_t get_highlight_start() const; INLINE size_t get_highlight_end() const; INLINE size_t get_cursor_pos() const; @@ -70,12 +70,12 @@ PUBLISHED: INLINE bool is_outside() const; - void output(ostream &out) const; + void output(std::ostream &out) const; public: ButtonHandle _button; int _keycode; - wstring _candidate_string; + std::wstring _candidate_string; size_t _highlight_start; size_t _highlight_end; size_t _cursor_pos; @@ -93,7 +93,7 @@ public: int _flags; }; -INLINE ostream &operator << (ostream &out, const MouseWatcherParameter &parm); +INLINE std::ostream &operator << (std::ostream &out, const MouseWatcherParameter &parm); #include "mouseWatcherParameter.I" diff --git a/panda/src/tform/mouseWatcherRegion.I b/panda/src/tform/mouseWatcherRegion.I index cdcc71d51e..50dfada487 100644 --- a/panda/src/tform/mouseWatcherRegion.I +++ b/panda/src/tform/mouseWatcherRegion.I @@ -15,7 +15,7 @@ * */ INLINE MouseWatcherRegion:: -MouseWatcherRegion(const string &name, PN_stdfloat left, PN_stdfloat right, +MouseWatcherRegion(const std::string &name, PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) : Namable(name), _frame(left, right, bottom, top) @@ -28,7 +28,7 @@ MouseWatcherRegion(const string &name, PN_stdfloat left, PN_stdfloat right, * */ INLINE MouseWatcherRegion:: -MouseWatcherRegion(const string &name, const LVecBase4 &frame) : +MouseWatcherRegion(const std::string &name, const LVecBase4 &frame) : Namable(name), _frame(frame) { diff --git a/panda/src/tform/mouseWatcherRegion.h b/panda/src/tform/mouseWatcherRegion.h index 0230c42d96..a49cfcbc6e 100644 --- a/panda/src/tform/mouseWatcherRegion.h +++ b/panda/src/tform/mouseWatcherRegion.h @@ -30,9 +30,9 @@ class MouseWatcherParameter; */ class EXPCL_PANDA_TFORM MouseWatcherRegion : public TypedWritableReferenceCount, public Namable { PUBLISHED: - INLINE explicit MouseWatcherRegion(const string &name, PN_stdfloat left, PN_stdfloat right, + INLINE explicit MouseWatcherRegion(const std::string &name, PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top); - INLINE explicit MouseWatcherRegion(const string &name, const LVecBase4 &frame); + INLINE explicit MouseWatcherRegion(const std::string &name, const LVecBase4 &frame); INLINE void set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top); INLINE void set_frame(const LVecBase4 &frame); @@ -58,8 +58,8 @@ PUBLISHED: INLINE void set_suppress_flags(int suppress_flags); INLINE int get_suppress_flags() const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; public: INLINE bool operator < (const MouseWatcherRegion &other) const; @@ -108,7 +108,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const MouseWatcherRegion ®ion) { +INLINE std::ostream &operator << (std::ostream &out, const MouseWatcherRegion ®ion) { region.output(out); return out; } diff --git a/panda/src/tform/trackball.h b/panda/src/tform/trackball.h index 634e81f61a..0ef01f6b8e 100644 --- a/panda/src/tform/trackball.h +++ b/panda/src/tform/trackball.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_TFORM Trackball : public MouseInterfaceNode { PUBLISHED: - explicit Trackball(const string &name); + explicit Trackball(const std::string &name); ~Trackball(); void reset(); diff --git a/panda/src/tform/transform2sg.h b/panda/src/tform/transform2sg.h index 66939aa096..a385abb428 100644 --- a/panda/src/tform/transform2sg.h +++ b/panda/src/tform/transform2sg.h @@ -27,7 +27,7 @@ */ class EXPCL_PANDA_TFORM Transform2SG : public DataNode { PUBLISHED: - explicit Transform2SG(const string &name); + explicit Transform2SG(const std::string &name); void set_node(PandaNode *node); PandaNode *get_node() const; diff --git a/panda/src/tinydisplay/tinyGraphicsBuffer.h b/panda/src/tinydisplay/tinyGraphicsBuffer.h index c7f7a1e61e..79c6e8c5e5 100644 --- a/panda/src/tinydisplay/tinyGraphicsBuffer.h +++ b/panda/src/tinydisplay/tinyGraphicsBuffer.h @@ -24,7 +24,7 @@ class EXPCL_TINYDISPLAY TinyGraphicsBuffer : public GraphicsBuffer { public: TinyGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinyOffscreenGraphicsPipe.h b/panda/src/tinydisplay/tinyOffscreenGraphicsPipe.h index 21395b1e62..94d4eb8d73 100644 --- a/panda/src/tinydisplay/tinyOffscreenGraphicsPipe.h +++ b/panda/src/tinydisplay/tinyOffscreenGraphicsPipe.h @@ -31,11 +31,11 @@ public: TinyOffscreenGraphicsPipe(); virtual ~TinyOffscreenGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinyOsxGraphicsPipe.h b/panda/src/tinydisplay/tinyOsxGraphicsPipe.h index f0781dfb5b..14cc0aded0 100644 --- a/panda/src/tinydisplay/tinyOsxGraphicsPipe.h +++ b/panda/src/tinydisplay/tinyOsxGraphicsPipe.h @@ -35,7 +35,7 @@ public: TinyOsxGraphicsPipe(); virtual ~TinyOsxGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); static CGImageRef create_cg_image(const PNMImage &pnm_image); @@ -44,7 +44,7 @@ private: static void release_data(void *info, const void *data, size_t size); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinyOsxGraphicsWindow.h b/panda/src/tinydisplay/tinyOsxGraphicsWindow.h index 1d61868c9c..71682c9a3b 100644 --- a/panda/src/tinydisplay/tinyOsxGraphicsWindow.h +++ b/panda/src/tinydisplay/tinyOsxGraphicsWindow.h @@ -30,7 +30,7 @@ class TinyOsxGraphicsWindow : public GraphicsWindow { public: TinyOsxGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinySDLGraphicsPipe.h b/panda/src/tinydisplay/tinySDLGraphicsPipe.h index 6897e51b6b..a3fc009647 100644 --- a/panda/src/tinydisplay/tinySDLGraphicsPipe.h +++ b/panda/src/tinydisplay/tinySDLGraphicsPipe.h @@ -32,11 +32,11 @@ public: TinySDLGraphicsPipe(); virtual ~TinySDLGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinySDLGraphicsWindow.h b/panda/src/tinydisplay/tinySDLGraphicsWindow.h index ae5793dcd4..b1be27b557 100644 --- a/panda/src/tinydisplay/tinySDLGraphicsWindow.h +++ b/panda/src/tinydisplay/tinySDLGraphicsWindow.h @@ -30,7 +30,7 @@ class EXPCL_TINYDISPLAY TinySDLGraphicsWindow : public GraphicsWindow { public: TinySDLGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinyWinGraphicsPipe.h b/panda/src/tinydisplay/tinyWinGraphicsPipe.h index fed6c7fa12..8626a9d675 100644 --- a/panda/src/tinydisplay/tinyWinGraphicsPipe.h +++ b/panda/src/tinydisplay/tinyWinGraphicsPipe.h @@ -30,11 +30,11 @@ public: TinyWinGraphicsPipe(); virtual ~TinyWinGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinyWinGraphicsWindow.h b/panda/src/tinydisplay/tinyWinGraphicsWindow.h index 3140e61d27..ecc1365a0b 100644 --- a/panda/src/tinydisplay/tinyWinGraphicsWindow.h +++ b/panda/src/tinydisplay/tinyWinGraphicsWindow.h @@ -28,7 +28,7 @@ class EXPCL_TINYDISPLAY TinyWinGraphicsWindow : public WinGraphicsWindow { public: TinyWinGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinyXGraphicsPipe.h b/panda/src/tinydisplay/tinyXGraphicsPipe.h index c6ecf15817..c0f7f69eeb 100644 --- a/panda/src/tinydisplay/tinyXGraphicsPipe.h +++ b/panda/src/tinydisplay/tinyXGraphicsPipe.h @@ -30,14 +30,14 @@ */ class EXPCL_TINYDISPLAY TinyXGraphicsPipe : public x11GraphicsPipe { public: - TinyXGraphicsPipe(const string &display = string()); + TinyXGraphicsPipe(const std::string &display = std::string()); virtual ~TinyXGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/tinydisplay/tinyXGraphicsWindow.h b/panda/src/tinydisplay/tinyXGraphicsWindow.h index e533f2b67d..da60c70eeb 100644 --- a/panda/src/tinydisplay/tinyXGraphicsWindow.h +++ b/panda/src/tinydisplay/tinyXGraphicsWindow.h @@ -28,7 +28,7 @@ class EXPCL_TINYDISPLAY TinyXGraphicsWindow : public x11GraphicsWindow { public: TinyXGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/vision/openCVTexture.h b/panda/src/vision/openCVTexture.h index ce4d279456..e3fa1a3edb 100644 --- a/panda/src/vision/openCVTexture.h +++ b/panda/src/vision/openCVTexture.h @@ -28,7 +28,7 @@ struct CvCapture; */ class EXPCL_VISION OpenCVTexture : public VideoTexture { PUBLISHED: - OpenCVTexture(const string &name = string()); + OpenCVTexture(const std::string &name = std::string()); OpenCVTexture(const OpenCVTexture ©) = delete; virtual ~OpenCVTexture(); @@ -54,7 +54,7 @@ protected: const LoaderOptions &options, bool header_only, BamCacheRecord *record); virtual bool do_load_one(Texture::CData *cdata, - const PNMImage &pnmimage, const string &name, + const PNMImage &pnmimage, const std::string &name, int z, int n, const LoaderOptions &options); private: diff --git a/panda/src/vision/webcamVideo.I b/panda/src/vision/webcamVideo.I index dcc0f473ca..c0c2e1fe74 100644 --- a/panda/src/vision/webcamVideo.I +++ b/panda/src/vision/webcamVideo.I @@ -39,7 +39,7 @@ get_fps() const { /** * Returns the camera's pixel format, as a FourCC code, if known. */ -INLINE const string &WebcamVideo:: +INLINE const std::string &WebcamVideo:: get_pixel_format() const { return _pixel_format; } @@ -49,7 +49,7 @@ get_pixel_format() const { * FPS to the output stream. */ INLINE void WebcamVideo:: -output(ostream &out) const { +output(std::ostream &out) const { out << get_name() << ": " << get_size_x() << "x" << get_size_y(); if (!_pixel_format.empty()) { @@ -59,7 +59,7 @@ output(ostream &out) const { out << " @ " << get_fps() << "Hz"; } -INLINE ostream &operator << (ostream &out, const WebcamVideo &n) { +INLINE std::ostream &operator << (std::ostream &out, const WebcamVideo &n) { n.output(out); return out; } diff --git a/panda/src/vision/webcamVideo.h b/panda/src/vision/webcamVideo.h index cdcf5e393d..903afa87f3 100644 --- a/panda/src/vision/webcamVideo.h +++ b/panda/src/vision/webcamVideo.h @@ -33,11 +33,11 @@ PUBLISHED: INLINE int get_size_x() const; INLINE int get_size_y() const; INLINE double get_fps() const; - INLINE const string &get_pixel_format() const; + INLINE const std::string &get_pixel_format() const; virtual PT(MovieVideoCursor) open() = 0; - INLINE void output(ostream &out) const; + INLINE void output(std::ostream &out) const; public: static void find_all_webcams(); @@ -46,7 +46,7 @@ protected: int _size_x; int _size_y; double _fps; - string _pixel_format; + std::string _pixel_format; static pvector _all_webcams; @@ -68,7 +68,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const WebcamVideo &n); +INLINE std::ostream &operator << (std::ostream &out, const WebcamVideo &n); #include "webcamVideo.I" diff --git a/panda/src/vision/webcamVideoV4L.h b/panda/src/vision/webcamVideoV4L.h index 374daf6f76..40045ee402 100644 --- a/panda/src/vision/webcamVideoV4L.h +++ b/panda/src/vision/webcamVideoV4L.h @@ -31,11 +31,11 @@ private: friend class WebcamVideoCursorV4L; friend void find_all_webcams_v4l(); - static void add_options_for_size(int fd, const string &dev, const char *name, + static void add_options_for_size(int fd, const std::string &dev, const char *name, unsigned width, unsigned height, unsigned pixelformat); - string _device; + std::string _device; uint32_t _pformat; public: diff --git a/panda/src/vrpn/vrpnAnalog.I b/panda/src/vrpn/vrpnAnalog.I index 61efae3f51..afd951e417 100644 --- a/panda/src/vrpn/vrpnAnalog.I +++ b/panda/src/vrpn/vrpnAnalog.I @@ -15,7 +15,7 @@ * Returns the name of the analog device that was used to create this * VrpnAnalog. */ -INLINE const string &VrpnAnalog:: +INLINE const std::string &VrpnAnalog:: get_analog_name() const { return _analog_name; } diff --git a/panda/src/vrpn/vrpnAnalog.h b/panda/src/vrpn/vrpnAnalog.h index 0816c48ff5..07f3c84b21 100644 --- a/panda/src/vrpn/vrpnAnalog.h +++ b/panda/src/vrpn/vrpnAnalog.h @@ -37,10 +37,10 @@ class VrpnAnalogDevice; */ class VrpnAnalog { public: - VrpnAnalog(const string &analog_name, vrpn_Connection *connection); + VrpnAnalog(const std::string &analog_name, vrpn_Connection *connection); ~VrpnAnalog(); - INLINE const string &get_analog_name() const; + INLINE const std::string &get_analog_name() const; INLINE bool is_empty() const; void mark(VrpnAnalogDevice *device); @@ -48,22 +48,22 @@ public: INLINE void poll(); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: static void VRPN_CALLBACK vrpn_analog_callback(void *userdata, const vrpn_ANALOGCB info); private: - string _analog_name; + std::string _analog_name; vrpn_Analog_Remote *_analog; typedef pvector Devices; Devices _devices; }; -INLINE ostream &operator << (ostream &out, const VrpnAnalog &analog) { +INLINE std::ostream &operator << (std::ostream &out, const VrpnAnalog &analog) { analog.output(out); return out; } diff --git a/panda/src/vrpn/vrpnAnalogDevice.h b/panda/src/vrpn/vrpnAnalogDevice.h index e34f864d1c..a778857f60 100644 --- a/panda/src/vrpn/vrpnAnalogDevice.h +++ b/panda/src/vrpn/vrpnAnalogDevice.h @@ -29,7 +29,7 @@ class VrpnAnalog; */ class VrpnAnalogDevice : public ClientAnalogDevice { public: - VrpnAnalogDevice(VrpnClient *client, const string &device_name, + VrpnAnalogDevice(VrpnClient *client, const std::string &device_name, VrpnAnalog *vrpn_analog); virtual ~VrpnAnalogDevice(); diff --git a/panda/src/vrpn/vrpnButton.I b/panda/src/vrpn/vrpnButton.I index e5252a8e19..ed10b89fae 100644 --- a/panda/src/vrpn/vrpnButton.I +++ b/panda/src/vrpn/vrpnButton.I @@ -15,7 +15,7 @@ * Returns the name of the button device that was used to create this * VrpnButton. */ -INLINE const string &VrpnButton:: +INLINE const std::string &VrpnButton:: get_button_name() const { return _button_name; } diff --git a/panda/src/vrpn/vrpnButton.h b/panda/src/vrpn/vrpnButton.h index bdd829ab98..1b9fc14cf4 100644 --- a/panda/src/vrpn/vrpnButton.h +++ b/panda/src/vrpn/vrpnButton.h @@ -36,10 +36,10 @@ class VrpnButtonDevice; */ class VrpnButton { public: - VrpnButton(const string &button_name, vrpn_Connection *connection); + VrpnButton(const std::string &button_name, vrpn_Connection *connection); ~VrpnButton(); - INLINE const string &get_button_name() const; + INLINE const std::string &get_button_name() const; INLINE bool is_empty() const; void mark(VrpnButtonDevice *device); @@ -47,22 +47,22 @@ public: INLINE void poll(); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: static void VRPN_CALLBACK vrpn_button_callback(void *userdata, const vrpn_BUTTONCB info); private: - string _button_name; + std::string _button_name; vrpn_Button_Remote *_button; typedef pvector Devices; Devices _devices; }; -INLINE ostream &operator << (ostream &out, const VrpnButton &button) { +INLINE std::ostream &operator << (std::ostream &out, const VrpnButton &button) { button.output(out); return out; } diff --git a/panda/src/vrpn/vrpnButtonDevice.h b/panda/src/vrpn/vrpnButtonDevice.h index 3c88da7f2b..45ba3df694 100644 --- a/panda/src/vrpn/vrpnButtonDevice.h +++ b/panda/src/vrpn/vrpnButtonDevice.h @@ -29,7 +29,7 @@ class VrpnButton; */ class VrpnButtonDevice : public ClientButtonDevice { public: - VrpnButtonDevice(VrpnClient *client, const string &device_name, + VrpnButtonDevice(VrpnClient *client, const std::string &device_name, VrpnButton *vrpn_button); virtual ~VrpnButtonDevice(); diff --git a/panda/src/vrpn/vrpnClient.I b/panda/src/vrpn/vrpnClient.I index 563428d917..486a4e29f6 100644 --- a/panda/src/vrpn/vrpnClient.I +++ b/panda/src/vrpn/vrpnClient.I @@ -14,7 +14,7 @@ /** * Returns the name of the server as passed to the VrpnClient constructor. */ -INLINE const string &VrpnClient:: +INLINE const std::string &VrpnClient:: get_server_name() const { return _server_name; } @@ -55,7 +55,7 @@ convert_to_secs(struct timeval msg_time) { * */ INLINE VrpnClient:: -VrpnClient(const string &server) : +VrpnClient(const std::string &server) : ClientBase(server) { _connection = vrpn_get_connection_by_name(server.c_str()); @@ -66,7 +66,7 @@ VrpnClient(const string &server) : * particular sensor we have interest in) */ INLINE void VrpnClient:: -tracker_position(const string &tracker, const vrpn_TRACKERCB info) { +tracker_position(const std::string &tracker, const vrpn_TRACKERCB info) { double ptime = convert_to_secs(info.msg_time); LPoint3 pos(info.pos[0], info.pos[1], info.pos[2]); LVector4 pquat(info.quat[0], info.quat[1], info.quat[2], info.quat[3]); @@ -79,7 +79,7 @@ tracker_position(const string &tracker, const vrpn_TRACKERCB info) { * particular sensor we have interest in) */ INLINE void VrpnClient:: -tracker_velocity(const string &tracker, const vrpn_TRACKERVELCB info) { +tracker_velocity(const std::string &tracker, const vrpn_TRACKERVELCB info) { double vtime = convert_to_secs(info.msg_time); LPoint3 vel(info.vel[0], info.vel[1], info.vel[2]); LVector4 vquat(info.vel_quat[0], info.vel_quat[1], @@ -93,7 +93,7 @@ tracker_velocity(const string &tracker, const vrpn_TRACKERVELCB info) { * particular sensor we have interest in) */ INLINE void VrpnClient:: -tracker_acceleration(const string &tracker, const vrpn_TRACKERACCCB info) { +tracker_acceleration(const std::string &tracker, const vrpn_TRACKERACCCB info) { double atime = convert_to_secs(info.msg_time); LPoint3 acc(info.acc[0], info.acc[1], info.acc[2]); LVector4 aquat(info.acc_quat[0], info.acc_quat[1], @@ -107,7 +107,7 @@ tracker_acceleration(const string &tracker, const vrpn_TRACKERACCCB info) { * Stores the latest information as sent by the analog device */ INLINE void VrpnClient:: -analog(const string &analog, const vrpn_ANALOGCB info) { +analog(const std::string &analog, const vrpn_ANALOGCB info) { double atime = convert_to_secs(info.msg_time); push_analog(analog, atime, info.channel, info.num_channel); @@ -117,7 +117,7 @@ analog(const string &analog, const vrpn_ANALOGCB info) { * Stores the latest button pressed information as sent by the button */ INLINE void VrpnClient:: -button(const string &button, const vrpn_BUTTONCB info) { +button(const std::string &button, const vrpn_BUTTONCB info) { double btime = convert_to_secs(info.msg_time); push_button(button, btime, info.button, info.state); @@ -127,7 +127,7 @@ button(const string &button, const vrpn_BUTTONCB info) { * Stores the latest change information as sent by the dial */ INLINE void VrpnClient:: -dial(const string &dial, const vrpn_DIALCB info) { +dial(const std::string &dial, const vrpn_DIALCB info) { double dtime = convert_to_secs(info.msg_time); push_dial(dial, dtime, info.dial, info.change); diff --git a/panda/src/vrpn/vrpnClient.h b/panda/src/vrpn/vrpnClient.h index 501c0e2ae8..127492d9cf 100644 --- a/panda/src/vrpn/vrpnClient.h +++ b/panda/src/vrpn/vrpnClient.h @@ -34,58 +34,58 @@ class VrpnDialDevice; */ class EXPCL_VRPN VrpnClient : public ClientBase { PUBLISHED: - explicit VrpnClient(const string &server_name); + explicit VrpnClient(const std::string &server_name); ~VrpnClient(); - INLINE const string &get_server_name() const; + INLINE const std::string &get_server_name() const; INLINE bool is_valid() const; INLINE bool is_connected() const; - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; public: INLINE static double convert_to_secs(struct timeval msg_time); protected: virtual PT(ClientDevice) make_device(TypeHandle device_type, - const string &device_name); + const std::string &device_name); virtual bool disconnect_device(TypeHandle device_type, - const string &device_name, + const std::string &device_name, ClientDevice *device); virtual void do_poll(); private: - PT(ClientDevice) make_tracker_device(const string &device_name); - PT(ClientDevice) make_button_device(const string &device_name); - PT(ClientDevice) make_analog_device(const string &device_name); - PT(ClientDevice) make_dial_device(const string &device_name); + PT(ClientDevice) make_tracker_device(const std::string &device_name); + PT(ClientDevice) make_button_device(const std::string &device_name); + PT(ClientDevice) make_analog_device(const std::string &device_name); + PT(ClientDevice) make_dial_device(const std::string &device_name); void disconnect_tracker_device(VrpnTrackerDevice *device); void disconnect_button_device(VrpnButtonDevice *device); void disconnect_analog_device(VrpnAnalogDevice *device); void disconnect_dial_device(VrpnDialDevice *device); - VrpnTracker *get_tracker(const string &tracker_name); + VrpnTracker *get_tracker(const std::string &tracker_name); void free_tracker(VrpnTracker *vrpn_tracker); - VrpnButton *get_button(const string &button_name); + VrpnButton *get_button(const std::string &button_name); void free_button(VrpnButton *vrpn_button); - VrpnAnalog *get_analog(const string &analog_name); + VrpnAnalog *get_analog(const std::string &analog_name); void free_analog(VrpnAnalog *vrpn_analog); - VrpnDial *get_dial(const string &dial_name); + VrpnDial *get_dial(const std::string &dial_name); void free_dial(VrpnDial *vrpn_dial); private: - string _server_name; + std::string _server_name; vrpn_Connection *_connection; - typedef pmap Trackers; - typedef pmap Buttons; - typedef pmap Analogs; - typedef pmap Dials; + typedef pmap Trackers; + typedef pmap Buttons; + typedef pmap Analogs; + typedef pmap Dials; Trackers _trackers; Buttons _buttons; diff --git a/panda/src/vrpn/vrpnDial.I b/panda/src/vrpn/vrpnDial.I index 240f51fa40..2cb9981826 100644 --- a/panda/src/vrpn/vrpnDial.I +++ b/panda/src/vrpn/vrpnDial.I @@ -14,7 +14,7 @@ /** * Returns the name of the dial device that was used to create this VrpnDial. */ -INLINE const string &VrpnDial:: +INLINE const std::string &VrpnDial:: get_dial_name() const { return _dial_name; } diff --git a/panda/src/vrpn/vrpnDial.h b/panda/src/vrpn/vrpnDial.h index 5500d730e0..e98fd7d99d 100644 --- a/panda/src/vrpn/vrpnDial.h +++ b/panda/src/vrpn/vrpnDial.h @@ -36,10 +36,10 @@ class VrpnDialDevice; */ class VrpnDial { public: - VrpnDial(const string &dial_name, vrpn_Connection *connection); + VrpnDial(const std::string &dial_name, vrpn_Connection *connection); ~VrpnDial(); - INLINE const string &get_dial_name() const; + INLINE const std::string &get_dial_name() const; INLINE bool is_empty() const; void mark(VrpnDialDevice *device); @@ -47,22 +47,22 @@ public: INLINE void poll(); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: static void VRPN_CALLBACK vrpn_dial_callback(void *userdata, const vrpn_DIALCB info); private: - string _dial_name; + std::string _dial_name; vrpn_Dial_Remote *_dial; typedef pvector Devices; Devices _devices; }; -INLINE ostream &operator << (ostream &out, const VrpnDial &dial) { +INLINE std::ostream &operator << (std::ostream &out, const VrpnDial &dial) { dial.output(out); return out; } diff --git a/panda/src/vrpn/vrpnDialDevice.h b/panda/src/vrpn/vrpnDialDevice.h index 533f3b3f97..52bb88c587 100644 --- a/panda/src/vrpn/vrpnDialDevice.h +++ b/panda/src/vrpn/vrpnDialDevice.h @@ -29,7 +29,7 @@ class VrpnDial; */ class VrpnDialDevice : public ClientDialDevice { public: - VrpnDialDevice(VrpnClient *client, const string &device_name, + VrpnDialDevice(VrpnClient *client, const std::string &device_name, VrpnDial *vrpn_dial); virtual ~VrpnDialDevice(); diff --git a/panda/src/vrpn/vrpnTracker.I b/panda/src/vrpn/vrpnTracker.I index 9c97e92968..b651121923 100644 --- a/panda/src/vrpn/vrpnTracker.I +++ b/panda/src/vrpn/vrpnTracker.I @@ -15,7 +15,7 @@ * Returns the name of the tracker device that was used to create this * VrpnTracker. */ -INLINE const string &VrpnTracker:: +INLINE const std::string &VrpnTracker:: get_tracker_name() const { return _tracker_name; } diff --git a/panda/src/vrpn/vrpnTracker.h b/panda/src/vrpn/vrpnTracker.h index acfdcaff5b..1b6c30347d 100644 --- a/panda/src/vrpn/vrpnTracker.h +++ b/panda/src/vrpn/vrpnTracker.h @@ -36,10 +36,10 @@ class VrpnTrackerDevice; */ class VrpnTracker { public: - VrpnTracker(const string &tracker_name, vrpn_Connection *connection); + VrpnTracker(const std::string &tracker_name, vrpn_Connection *connection); ~VrpnTracker(); - INLINE const string &get_tracker_name() const; + INLINE const std::string &get_tracker_name() const; INLINE bool is_empty() const; void mark(VrpnTrackerDevice *device); @@ -47,8 +47,8 @@ public: INLINE void poll(); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: static void VRPN_CALLBACK @@ -59,14 +59,14 @@ private: vrpn_acceleration_callback(void *userdata, const vrpn_TRACKERACCCB info); private: - string _tracker_name; + std::string _tracker_name; vrpn_Tracker_Remote *_tracker; typedef pvector Devices; Devices _devices; }; -INLINE ostream &operator << (ostream &out, const VrpnTracker &tracker) { +INLINE std::ostream &operator << (std::ostream &out, const VrpnTracker &tracker) { tracker.output(out); return out; } diff --git a/panda/src/vrpn/vrpnTrackerDevice.h b/panda/src/vrpn/vrpnTrackerDevice.h index 17a626795e..58ddf9068b 100644 --- a/panda/src/vrpn/vrpnTrackerDevice.h +++ b/panda/src/vrpn/vrpnTrackerDevice.h @@ -39,7 +39,7 @@ public: DT_acceleration }; - VrpnTrackerDevice(VrpnClient *client, const string &device_name, + VrpnTrackerDevice(VrpnClient *client, const std::string &device_name, int sensor, DataType data_type, VrpnTracker *vrpn_tracker); virtual ~VrpnTrackerDevice(); diff --git a/panda/src/wgldisplay/wglGraphicsBuffer.h b/panda/src/wgldisplay/wglGraphicsBuffer.h index e5155e8653..594adc921d 100644 --- a/panda/src/wgldisplay/wglGraphicsBuffer.h +++ b/panda/src/wgldisplay/wglGraphicsBuffer.h @@ -35,7 +35,7 @@ class EXPCL_PANDAGL wglGraphicsBuffer : public GraphicsBuffer { public: wglGraphicsBuffer(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/wgldisplay/wglGraphicsPipe.h b/panda/src/wgldisplay/wglGraphicsPipe.h index 2ac6d8d29d..892a8f8884 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.h +++ b/panda/src/wgldisplay/wglGraphicsPipe.h @@ -28,11 +28,11 @@ public: wglGraphicsPipe(); virtual ~wglGraphicsPipe(); - virtual string get_interface_name() const; + virtual std::string get_interface_name() const; static PT(GraphicsPipe) pipe_constructor(); protected: - virtual PT(GraphicsOutput) make_output(const string &name, + virtual PT(GraphicsOutput) make_output(const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, @@ -45,7 +45,7 @@ protected: private: - static string format_pfd_flags(DWORD pfd_flags); + static std::string format_pfd_flags(DWORD pfd_flags); static void wgl_make_current(HDC hdc, HGLRC hglrc, PStatCollector *collector); static bool _current_valid; diff --git a/panda/src/wgldisplay/wglGraphicsWindow.h b/panda/src/wgldisplay/wglGraphicsWindow.h index 9236640876..0db8f9cc73 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.h +++ b/panda/src/wgldisplay/wglGraphicsWindow.h @@ -23,7 +23,7 @@ class EXPCL_PANDAGL wglGraphicsWindow : public WinGraphicsWindow { public: wglGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, diff --git a/panda/src/windisplay/winDetectDx.h b/panda/src/windisplay/winDetectDx.h index e350c37564..df7d89f0ff 100644 --- a/panda/src/windisplay/winDetectDx.h +++ b/panda/src/windisplay/winDetectDx.h @@ -74,7 +74,7 @@ static DWORD _GetLastError (char *message_prefix) { FORMAT_MESSAGE_ALLOCATE_BUFFER |FORMAT_MESSAGE_FROM_SYSTEM, nullptr, error, MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ), (LPTSTR)&ptr,0, nullptr)) { - cout << "ERROR: "<< message_prefix << " result = " << (char*) ptr << "\n"; + std::cout << "ERROR: "<< message_prefix << " result = " << (char*) ptr << "\n"; LocalFree( ptr ); } @@ -100,7 +100,7 @@ static DWORD print_GetLastError (char *message_prefix) (LPTSTR)&ptr, 0, nullptr)) { - cout << "ERROR: "<< message_prefix << " result = " << (char*) ptr << "\n"; + std::cout << "ERROR: "<< message_prefix << " result = " << (char*) ptr << "\n"; LocalFree( ptr ); } diff --git a/panda/src/windisplay/winGraphicsWindow.h b/panda/src/windisplay/winGraphicsWindow.h index ec7e1217ff..ffcbc79553 100644 --- a/panda/src/windisplay/winGraphicsWindow.h +++ b/panda/src/windisplay/winGraphicsWindow.h @@ -64,7 +64,7 @@ typedef struct tagTOUCHINPUT { class EXPCL_PANDAWIN WinGraphicsWindow : public GraphicsWindow { public: WinGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, @@ -197,7 +197,7 @@ private: private: // We need this map to support per-window calls to window_proc(). - typedef map WindowHandles; + typedef std::map WindowHandles; static WindowHandles _window_handles; // And we need a static pointer to the current WinGraphicsWindow we are @@ -242,7 +242,7 @@ private: INLINE WindowClass(const WindowProperties &props); INLINE bool operator < (const WindowClass &other) const; - wstring _name; + std::wstring _name; HICON _icon; }; diff --git a/panda/src/x11display/x11GraphicsPipe.h b/panda/src/x11display/x11GraphicsPipe.h index 4da09d3144..c13b192627 100644 --- a/panda/src/x11display/x11GraphicsPipe.h +++ b/panda/src/x11display/x11GraphicsPipe.h @@ -46,7 +46,7 @@ class FrameBufferProperties; */ class x11GraphicsPipe : public GraphicsPipe { public: - x11GraphicsPipe(const string &display = string()); + x11GraphicsPipe(const std::string &display = std::string()); virtual ~x11GraphicsPipe(); INLINE X11_Display *get_display() const; diff --git a/panda/src/x11display/x11GraphicsWindow.h b/panda/src/x11display/x11GraphicsWindow.h index 5b55bf3619..46b93225dd 100644 --- a/panda/src/x11display/x11GraphicsWindow.h +++ b/panda/src/x11display/x11GraphicsWindow.h @@ -26,7 +26,7 @@ class x11GraphicsWindow : public GraphicsWindow { public: x11GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, - const string &name, + const std::string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, @@ -71,7 +71,7 @@ protected: private: X11_Cursor get_cursor(const Filename &filename); - X11_Cursor read_ico(istream &ico); + X11_Cursor read_ico(std::istream &ico); protected: X11_Display *_display; @@ -94,7 +94,7 @@ protected: struct MouseDeviceInfo { int _fd; int _input_device_index; - string _io_buffer; + std::string _io_buffer; }; pvector _mouse_device_info; diff --git a/pandatool/src/assimp/assimpLoader.h b/pandatool/src/assimp/assimpLoader.h index 41ac3e1dc6..35a9bb6947 100644 --- a/pandatool/src/assimp/assimpLoader.h +++ b/pandatool/src/assimp/assimpLoader.h @@ -46,7 +46,7 @@ public: AssimpLoader(); virtual ~AssimpLoader(); - void get_extensions(string &ext) const; + void get_extensions(std::string &ext) const; bool read(const Filename &filename); void build_graph(); diff --git a/pandatool/src/assimp/loaderFileTypeAssimp.h b/pandatool/src/assimp/loaderFileTypeAssimp.h index 495130a40e..45d810f964 100644 --- a/pandatool/src/assimp/loaderFileTypeAssimp.h +++ b/pandatool/src/assimp/loaderFileTypeAssimp.h @@ -28,9 +28,9 @@ public: LoaderFileTypeAssimp(); virtual ~LoaderFileTypeAssimp(); - virtual string get_name() const; - virtual string get_extension() const; - virtual string get_additional_extensions() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; + virtual std::string get_additional_extensions() const; virtual bool supports_compressed() const; virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options, diff --git a/pandatool/src/assimp/pandaIOStream.h b/pandatool/src/assimp/pandaIOStream.h index cb4ddf251c..fa5cc2bb1e 100644 --- a/pandatool/src/assimp/pandaIOStream.h +++ b/pandatool/src/assimp/pandaIOStream.h @@ -26,7 +26,7 @@ class PandaIOSystem; */ class PandaIOStream : public Assimp::IOStream { public: - PandaIOStream(istream &stream); + PandaIOStream(std::istream &stream); virtual ~PandaIOStream() {}; size_t FileSize() const; @@ -37,7 +37,7 @@ public: size_t Write(const void *buffer, size_t size, size_t count); private: - istream &_istream; + std::istream &_istream; friend class PandaIOSystem; }; diff --git a/pandatool/src/bam/eggToBam.h b/pandatool/src/bam/eggToBam.h index a2fb838871..1ab262a52a 100644 --- a/pandatool/src/bam/eggToBam.h +++ b/pandatool/src/bam/eggToBam.h @@ -64,8 +64,8 @@ private: bool _tex_txopz; bool _tex_ctex; bool _tex_mipmap; - string _ctex_quality; - string _load_display; + std::string _ctex_quality; + std::string _load_display; // The rest of this is required to support -ctex. PT(GraphicsPipe) _pipe; diff --git a/pandatool/src/bam/ptsToBam.h b/pandatool/src/bam/ptsToBam.h index 9e6f7ac63e..20fa76e7a9 100644 --- a/pandatool/src/bam/ptsToBam.h +++ b/pandatool/src/bam/ptsToBam.h @@ -37,7 +37,7 @@ protected: virtual bool handle_args(Args &args); private: - void process_line(const string &line); + void process_line(const std::string &line); void add_point(const vector_string &words); void open_vertex_data(); diff --git a/pandatool/src/converter/eggToSomethingConverter.h b/pandatool/src/converter/eggToSomethingConverter.h index 47838859d4..0e95958c39 100644 --- a/pandatool/src/converter/eggToSomethingConverter.h +++ b/pandatool/src/converter/eggToSomethingConverter.h @@ -51,9 +51,9 @@ public: INLINE void set_output_coordinate_system(CoordinateSystem output_coordinate_system) const; INLINE CoordinateSystem get_output_coordinate_system() const; - virtual string get_name() const=0; - virtual string get_extension() const=0; - virtual string get_additional_extensions() const; + virtual std::string get_name() const=0; + virtual std::string get_extension() const=0; + virtual std::string get_additional_extensions() const; virtual bool supports_compressed() const; virtual bool write_file(const Filename &filename)=0; diff --git a/pandatool/src/converter/somethingToEggConverter.I b/pandatool/src/converter/somethingToEggConverter.I index a0259bc13d..b3fed0cb11 100644 --- a/pandatool/src/converter/somethingToEggConverter.I +++ b/pandatool/src/converter/somethingToEggConverter.I @@ -82,14 +82,14 @@ get_animation_convert() const { * its associated animations. */ INLINE void SomethingToEggConverter:: -set_character_name(const string &character_name) { +set_character_name(const std::string &character_name) { _character_name = character_name; } /** * Returns the name of the character generated. See set_character_name(). */ -INLINE const string &SomethingToEggConverter:: +INLINE const std::string &SomethingToEggConverter:: get_character_name() const { return _character_name; } diff --git a/pandatool/src/converter/somethingToEggConverter.h b/pandatool/src/converter/somethingToEggConverter.h index b3e71b6ab5..16d16df50d 100644 --- a/pandatool/src/converter/somethingToEggConverter.h +++ b/pandatool/src/converter/somethingToEggConverter.h @@ -55,8 +55,8 @@ public: INLINE void set_animation_convert(AnimationConvert animation_convert); INLINE AnimationConvert get_animation_convert() const; - INLINE void set_character_name(const string &character_name); - INLINE const string &get_character_name() const; + INLINE void set_character_name(const std::string &character_name); + INLINE const std::string &get_character_name() const; INLINE void set_start_frame(double start_frame); INLINE bool has_start_frame() const; @@ -97,9 +97,9 @@ public: INLINE void clear_egg_data(); INLINE EggData *get_egg_data(); - virtual string get_name() const=0; - virtual string get_extension() const=0; - virtual string get_additional_extensions() const; + virtual std::string get_name() const=0; + virtual std::string get_extension() const=0; + virtual std::string get_additional_extensions() const; virtual bool supports_compressed() const; virtual bool supports_convert_to_node(const LoaderOptions &options) const; @@ -119,7 +119,7 @@ protected: PT(PathReplace) _path_replace; AnimationConvert _animation_convert; - string _character_name; + std::string _character_name; double _start_frame; double _end_frame; double _frame_inc; diff --git a/pandatool/src/cvscopy/cvsCopy.h b/pandatool/src/cvscopy/cvsCopy.h index e8957eaa59..d820edf84d 100644 --- a/pandatool/src/cvscopy/cvsCopy.h +++ b/pandatool/src/cvscopy/cvsCopy.h @@ -52,14 +52,14 @@ protected: bool copy_binary_file(Filename source, Filename dest); bool cvs_add(const Filename &filename); - static string protect_from_shell(const string &source); + static std::string protect_from_shell(const std::string &source); - virtual string filter_filename(const string &source); + virtual std::string filter_filename(const std::string &source); private: bool scan_hierarchy(); - bool scan_for_root(const string &dirname); - string prompt(const string &message); + bool scan_for_root(const std::string &dirname); + std::string prompt(const std::string &message); protected: bool _force; @@ -72,7 +72,7 @@ protected: Filename _root_dirname; Filename _key_filename; bool _no_cvs; - string _cvs_binary; + std::string _cvs_binary; bool _user_aborted; typedef pvector SourceFiles; @@ -82,7 +82,7 @@ protected: CVSSourceDirectory *_model_dir; CVSSourceDirectory *_map_dir; - typedef pmap CopiedFiles; + typedef pmap CopiedFiles; CopiedFiles _copied_files; }; diff --git a/pandatool/src/cvscopy/cvsSourceDirectory.h b/pandatool/src/cvscopy/cvsSourceDirectory.h index e8e379c8f0..eb452612e4 100644 --- a/pandatool/src/cvscopy/cvsSourceDirectory.h +++ b/pandatool/src/cvscopy/cvsSourceDirectory.h @@ -35,10 +35,10 @@ class CVSSourceTree; class CVSSourceDirectory { public: CVSSourceDirectory(CVSSourceTree *tree, CVSSourceDirectory *parent, - const string &dirname); + const std::string &dirname); ~CVSSourceDirectory(); - string get_dirname() const; + std::string get_dirname() const; Filename get_fullpath() const; Filename get_path() const; Filename get_rel_to(const CVSSourceDirectory *other) const; @@ -46,16 +46,16 @@ public: int get_num_children() const; CVSSourceDirectory *get_child(int n) const; - CVSSourceDirectory *find_relpath(const string &relpath); - CVSSourceDirectory *find_dirname(const string &dirname); + CVSSourceDirectory *find_relpath(const std::string &relpath); + CVSSourceDirectory *find_dirname(const std::string &dirname); public: - bool scan(const Filename &directory, const string &key_filename); + bool scan(const Filename &directory, const std::string &key_filename); private: CVSSourceTree *_tree; CVSSourceDirectory *_parent; - string _dirname; + std::string _dirname; int _depth; typedef pvector Children; diff --git a/pandatool/src/cvscopy/cvsSourceTree.h b/pandatool/src/cvscopy/cvsSourceTree.h index b512ce6db0..238431f78d 100644 --- a/pandatool/src/cvscopy/cvsSourceTree.h +++ b/pandatool/src/cvscopy/cvsSourceTree.h @@ -41,8 +41,8 @@ public: CVSSourceDirectory *get_root() const; CVSSourceDirectory *find_directory(const Filename &path); - CVSSourceDirectory *find_relpath(const string &relpath); - CVSSourceDirectory *find_dirname(const string &dirname); + CVSSourceDirectory *find_relpath(const std::string &relpath); + CVSSourceDirectory *find_dirname(const std::string &dirname); // This nested class represents the selection of a particular directory in // which to place a given file, given its basename. The basename of the @@ -52,17 +52,17 @@ public: class FilePath { public: FilePath(); - FilePath(CVSSourceDirectory *dir, const string &basename); + FilePath(CVSSourceDirectory *dir, const std::string &basename); bool is_valid() const; Filename get_path() const; Filename get_fullpath() const; Filename get_rel_from(const CVSSourceDirectory *other) const; CVSSourceDirectory *_dir; - string _basename; + std::string _basename; }; - FilePath choose_directory(const string &basename, + FilePath choose_directory(const std::string &basename, CVSSourceDirectory *suggested_dir, bool force, bool interactive); @@ -73,22 +73,22 @@ public: static void restore_cwd(); public: - void add_file(const string &basename, CVSSourceDirectory *dir); + void add_file(const std::string &basename, CVSSourceDirectory *dir); private: typedef pvector FilePaths; FilePath - prompt_user(const string &basename, CVSSourceDirectory *suggested_dir, + prompt_user(const std::string &basename, CVSSourceDirectory *suggested_dir, const FilePaths &paths, bool force, bool interactive); - FilePath ask_existing(const string &filename, const FilePath &path); - FilePath ask_existing(const string &filename, const FilePaths &paths, + FilePath ask_existing(const std::string &filename, const FilePath &path); + FilePath ask_existing(const std::string &filename, const FilePaths &paths, CVSSourceDirectory *suggested_dir); - FilePath ask_new(const string &filename, CVSSourceDirectory *dir); - FilePath ask_any(const string &filename, const FilePaths &paths); + FilePath ask_new(const std::string &filename, CVSSourceDirectory *dir); + FilePath ask_any(const std::string &filename, const FilePaths &paths); - string prompt(const string &message); + std::string prompt(const std::string &message); static Filename get_actual_fullpath(const Filename &path); static Filename get_start_fullpath(); @@ -97,7 +97,7 @@ private: Filename _path; CVSSourceDirectory *_root; - typedef pmap Basenames; + typedef pmap Basenames; Basenames _basenames; static bool _got_start_fullpath; diff --git a/pandatool/src/daeegg/daeCharacter.h b/pandatool/src/daeegg/daeCharacter.h index 76339368c9..25378b684d 100644 --- a/pandatool/src/daeegg/daeCharacter.h +++ b/pandatool/src/daeegg/daeCharacter.h @@ -49,7 +49,7 @@ public: DaeCharacter *_character; }; typedef epvector Joints; - typedef pmap JointMap; + typedef pmap JointMap; void bind_joints(JointMap &joint_map); void adjust_joints(FCDSceneNode *node, const JointMap &joint_map, @@ -69,7 +69,7 @@ public: LMatrix4d _bind_shape_mat; private: - string _name; + std::string _name; const FCDSkinController *_skin_controller; Joints _joints; JointMap _bound_joints; diff --git a/pandatool/src/daeegg/daeMaterials.h b/pandatool/src/daeegg/daeMaterials.h index 7c2ba0d563..c18e631535 100644 --- a/pandatool/src/daeegg/daeMaterials.h +++ b/pandatool/src/daeegg/daeMaterials.h @@ -41,9 +41,9 @@ public: virtual ~DaeMaterials() {}; void add_material_instance(const FCDMaterialInstance* instance); - void apply_to_primitive(const string semantic, const PT(EggPrimitive) to); - void apply_to_group(const string semantic, const PT(EggGroup) to, bool invert_transparency=false); - const string get_uvset_name(const string semantic, FUDaeGeometryInput::Semantic input_semantic, int32 input_set); + void apply_to_primitive(const std::string semantic, const PT(EggPrimitive) to); + void apply_to_group(const std::string semantic, const PT(EggGroup) to, bool invert_transparency=false); + const std::string get_uvset_name(const std::string semantic, FUDaeGeometryInput::Semantic input_semantic, int32 input_set); static EggTexture::TextureType convert_texture_type(const FCDEffectParameterSampler::SamplerType orig_type); static EggTexture::WrapMode convert_wrap_mode(const FUDaeTextureWrapMode::WrapMode orig_mode); @@ -62,7 +62,7 @@ private: struct DaeVertexInputBinding : public ReferenceCount { int32 _input_set; FUDaeGeometryInput::Semantic _input_semantic; - string _semantic; + std::string _semantic; }; // Holds stuff for an individual material. @@ -74,11 +74,11 @@ private: PT(DaeBlendSettings) _blend; }; - void process_texture_bucket(const string semantic, const FCDEffectStandard* effect_common, FUDaeTextureChannel::Channel bucket, EggTexture::EnvType envtype = EggTexture::ET_unspecified, EggTexture::Format format = EggTexture::F_unspecified); - void process_extra(const string semantic, const FCDExtra* extra); + void process_texture_bucket(const std::string semantic, const FCDEffectStandard* effect_common, FUDaeTextureChannel::Channel bucket, EggTexture::EnvType envtype = EggTexture::ET_unspecified, EggTexture::Format format = EggTexture::F_unspecified); + void process_extra(const std::string semantic, const FCDExtra* extra); static PT(DaeBlendSettings) convert_blend(FCDEffectStandard::TransparencyMode mode, const LColor &transparent, double transparency); - pmap _materials; + pmap _materials; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/daeegg/daeToEggConverter.h b/pandatool/src/daeegg/daeToEggConverter.h index 2c1dc234c1..a1203c2f2c 100644 --- a/pandatool/src/daeegg/daeToEggConverter.h +++ b/pandatool/src/daeegg/daeToEggConverter.h @@ -49,8 +49,8 @@ public: virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool convert_file(const Filename &filename); virtual DistanceUnit get_input_units(); @@ -58,7 +58,7 @@ public: bool _invert_transparency; private: - string _unit_name; + std::string _unit_name; double _unit_meters; PT(EggTable) _table; FCDocument* _document; @@ -73,7 +73,7 @@ private: void process_instance(EggGroup *parent, const FCDEntityInstance* instance); void process_mesh(EggGroup *parent, const FCDGeometryMesh* mesh, DaeMaterials *materials, DaeCharacter *character = nullptr); - void process_spline(EggGroup *parent, const string group_name, FCDGeometrySpline* geometry_spline); + void process_spline(EggGroup *parent, const std::string group_name, FCDGeometrySpline* geometry_spline); void process_spline(EggGroup *parent, const FCDSpline* spline); void process_controller(EggGroup *parent, const FCDControllerInstance* instance); void process_extra(EggGroup *group, const FCDExtra* extra); diff --git a/pandatool/src/daeegg/fcollada_utils.h b/pandatool/src/daeegg/fcollada_utils.h index eefe990bac..cf1a3069f3 100644 --- a/pandatool/src/daeegg/fcollada_utils.h +++ b/pandatool/src/daeegg/fcollada_utils.h @@ -33,6 +33,6 @@ inline LColor TO_COLOR(FMVector4 v) { #define FROM_VEC3(v) (FMVector3(v[0], v[1], v[2])) #define FROM_VEC4(v) (FMVector4(v[0], v[1], v[2], v[3])) #define FROM_MAT4(v) (FMMatrix44(v.getData())) -#define FROM_FSTRING(fs) (string(fs.c_str())) +#define FROM_FSTRING(fs) (std::string(fs.c_str())) #endif diff --git a/pandatool/src/dxf/dxfFile.h b/pandatool/src/dxf/dxfFile.h index 59d37d3057..e555960e6a 100644 --- a/pandatool/src/dxf/dxfFile.h +++ b/pandatool/src/dxf/dxfFile.h @@ -38,7 +38,7 @@ public: virtual ~DXFFile(); void process(Filename filename); - void process(istream *in, bool owns_in); + void process(std::istream *in, bool owns_in); // These functions are called as the file is processed. These are the main // hooks for redefining how the class should dispense its data. As each @@ -57,7 +57,7 @@ public: // definition, and must allocate a DXFLayer instance. This function is // provided so that user code may force allocate of a specialized DXFLayer // instance instead. - virtual DXFLayer *new_layer(const string &name) { + virtual DXFLayer *new_layer(const std::string &name) { return new DXFLayer(name); } @@ -140,18 +140,18 @@ protected: bool _vertices_follow; LMatrix4d _ocs2wcs; - istream *_in; + std::istream *_in; bool _owns_in; int _code; - string _string; + std::string _string; void compute_ocs(); bool get_group(); void change_state(State new_state); void change_section(Section new_section); - void change_layer(const string &layer_name); + void change_layer(const std::string &layer_name); void change_entity(Entity new_entity); void reset_entity(); @@ -161,8 +161,8 @@ protected: void state_verts(); }; -ostream &operator << (ostream &out, const DXFFile::State &state); -ostream &operator << (ostream &out, const DXFFile::Section §ion); -ostream &operator << (ostream &out, const DXFFile::Entity &entity); +std::ostream &operator << (std::ostream &out, const DXFFile::State &state); +std::ostream &operator << (std::ostream &out, const DXFFile::Section §ion); +std::ostream &operator << (std::ostream &out, const DXFFile::Entity &entity); #endif diff --git a/pandatool/src/dxf/dxfLayer.h b/pandatool/src/dxf/dxfLayer.h index dab55adb4d..745197280c 100644 --- a/pandatool/src/dxf/dxfLayer.h +++ b/pandatool/src/dxf/dxfLayer.h @@ -27,7 +27,7 @@ */ class DXFLayer : public Namable { public: - DXFLayer(const string &name); + DXFLayer(const std::string &name); virtual ~DXFLayer(); }; diff --git a/pandatool/src/dxf/dxfLayerMap.h b/pandatool/src/dxf/dxfLayerMap.h index 1dfabca80b..f2fabe5373 100644 --- a/pandatool/src/dxf/dxfLayerMap.h +++ b/pandatool/src/dxf/dxfLayerMap.h @@ -25,9 +25,9 @@ class DXFFile; * ordered by name. This is used as a lookup within DXFFile to locate the * layer associated with a particular entity. */ -class DXFLayerMap : public pmap { +class DXFLayerMap : public pmap { public: - DXFLayer *get_layer(const string &name, DXFFile *dxffile); + DXFLayer *get_layer(const std::string &name, DXFFile *dxffile); }; #endif diff --git a/pandatool/src/dxfegg/dxfToEggConverter.h b/pandatool/src/dxfegg/dxfToEggConverter.h index 8a10a50fc3..56969e7482 100644 --- a/pandatool/src/dxfegg/dxfToEggConverter.h +++ b/pandatool/src/dxfegg/dxfToEggConverter.h @@ -31,14 +31,14 @@ public: virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool convert_file(const Filename &filename); protected: - virtual DXFLayer *new_layer(const string &name); + virtual DXFLayer *new_layer(const std::string &name); virtual void done_entity(); virtual void error(); diff --git a/pandatool/src/dxfegg/dxfToEggLayer.h b/pandatool/src/dxfegg/dxfToEggLayer.h index 45a053e4df..9067cc702f 100644 --- a/pandatool/src/dxfegg/dxfToEggLayer.h +++ b/pandatool/src/dxfegg/dxfToEggLayer.h @@ -34,7 +34,7 @@ class DXFToEggConverter; */ class DXFToEggLayer : public DXFLayer { public: - DXFToEggLayer(const string &name, EggGroupNode *parent); + DXFToEggLayer(const std::string &name, EggGroupNode *parent); void add_polygon(const DXFToEggConverter *entity); void add_line(const DXFToEggConverter *entity); diff --git a/pandatool/src/dxfprogs/eggToDXF.h b/pandatool/src/dxfprogs/eggToDXF.h index 0af0e999de..da7764fb85 100644 --- a/pandatool/src/dxfprogs/eggToDXF.h +++ b/pandatool/src/dxfprogs/eggToDXF.h @@ -34,8 +34,8 @@ public: private: void get_layers(EggGroupNode *group); - void write_tables(ostream &out); - void write_entities(ostream &out); + void write_tables(std::ostream &out); + void write_entities(std::ostream &out); EggToDXFLayers _layers; }; diff --git a/pandatool/src/dxfprogs/eggToDXFLayer.h b/pandatool/src/dxfprogs/eggToDXFLayer.h index 314346f7d0..a5fe7b7517 100644 --- a/pandatool/src/dxfprogs/eggToDXFLayer.h +++ b/pandatool/src/dxfprogs/eggToDXFLayer.h @@ -35,10 +35,10 @@ public: void add_color(const LColor &color); void choose_overall_color(); - void write_layer(ostream &out); - void write_polyline(EggPolygon *poly, ostream &out); - void write_3d_face(EggPolygon *poly, ostream &out); - void write_entities(ostream &out); + void write_layer(std::ostream &out); + void write_polyline(EggPolygon *poly, std::ostream &out); + void write_3d_face(EggPolygon *poly, std::ostream &out); + void write_entities(std::ostream &out); private: int get_autocad_color(const LColor &color); diff --git a/pandatool/src/egg-mkfont/eggMakeFont.h b/pandatool/src/egg-mkfont/eggMakeFont.h index 20bd99f01f..3df12af6fa 100644 --- a/pandatool/src/egg-mkfont/eggMakeFont.h +++ b/pandatool/src/egg-mkfont/eggMakeFont.h @@ -46,7 +46,7 @@ public: void run(); private: - static bool dispatch_range(const string &, const string &arg, void *var); + static bool dispatch_range(const std::string &, const std::string &arg, void *var); EggVertex *make_vertex(const LPoint2d &xy); void add_character(int code); @@ -55,7 +55,7 @@ private: EggTexture *make_tref(PNMTextGlyph *glyph, int character); void add_extra_glyphs(const Filename &extra_filename); void r_add_extra_glyphs(EggGroupNode *egg_group); - static bool is_numeric(const string &str); + static bool is_numeric(const std::string &str); private: @@ -79,8 +79,8 @@ private: double _palettize_scale_factor; Filename _input_font_filename; int _face_index; - string _output_glyph_pattern; - string _output_palette_pattern; + std::string _output_glyph_pattern; + std::string _output_palette_pattern; PNMTextMaker *_text_maker; diff --git a/pandatool/src/egg-mkfont/rangeDescription.I b/pandatool/src/egg-mkfont/rangeDescription.I index b19912d303..39a20162f5 100644 --- a/pandatool/src/egg-mkfont/rangeDescription.I +++ b/pandatool/src/egg-mkfont/rangeDescription.I @@ -55,7 +55,7 @@ Range(int from_code, int to_code) : { } -INLINE ostream &operator << (ostream &out, const RangeDescription &range) { +INLINE std::ostream &operator << (std::ostream &out, const RangeDescription &range) { range.output(out); return out; } diff --git a/pandatool/src/egg-mkfont/rangeDescription.h b/pandatool/src/egg-mkfont/rangeDescription.h index d1e26b573d..25119cb16f 100644 --- a/pandatool/src/egg-mkfont/rangeDescription.h +++ b/pandatool/src/egg-mkfont/rangeDescription.h @@ -25,17 +25,17 @@ class RangeDescription { public: RangeDescription(); - bool parse_parameter(const string ¶m); + bool parse_parameter(const std::string ¶m); INLINE void add_singleton(int code); INLINE void add_range(int from_code, int to_code); INLINE bool is_empty() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: - bool parse_word(const string &word); - bool parse_code(const string &word, int &code); - bool parse_bracket(const string &str); + bool parse_word(const std::string &word); + bool parse_code(const std::string &word, int &code); + bool parse_bracket(const std::string &str); private: class Range { @@ -53,7 +53,7 @@ private: friend class RangeIterator; }; -INLINE ostream &operator << (ostream &out, const RangeDescription &range); +INLINE std::ostream &operator << (std::ostream &out, const RangeDescription &range); #include "rangeDescription.I" diff --git a/pandatool/src/egg-optchar/eggOptchar.h b/pandatool/src/egg-optchar/eggOptchar.h index 5d461a3442..30ea4cddae 100644 --- a/pandatool/src/egg-optchar/eggOptchar.h +++ b/pandatool/src/egg-optchar/eggOptchar.h @@ -44,10 +44,10 @@ protected: virtual bool handle_args(Args &args); private: - static bool dispatch_vector_string_pair(const string &opt, const string &arg, void *var); - static bool dispatch_name_components(const string &opt, const string &arg, void *var); - static bool dispatch_double_components(const string &opt, const string &arg, void *var); - static bool dispatch_flag_groups(const string &opt, const string &arg, void *var); + static bool dispatch_vector_string_pair(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_name_components(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_double_components(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_flag_groups(const std::string &opt, const std::string &arg, void *var); void determine_removed_components(); void move_vertices(); @@ -73,8 +73,8 @@ private: void do_flag_groups(EggGroupNode *egg_group); void rename_joints(); - void rename_primitives(EggGroupNode *egg_group, const string &name); - void change_dart_type(EggGroupNode *egg_group, const string &new_dart_type); + void rename_primitives(EggGroupNode *egg_group, const std::string &name); + void change_dart_type(EggGroupNode *egg_group, const std::string &new_dart_type); void do_preload(); void do_defpose(); @@ -86,8 +86,8 @@ private: class StringPair { public: - string _a; - string _b; + std::string _a; + std::string _b; }; typedef pvector StringPairs; StringPairs _new_joints; @@ -100,12 +100,12 @@ private: vector_string _expose_components; vector_string _suppress_components; - string _dart_type; + std::string _dart_type; class DoubleString { public: double _a; - string _b; + std::string _b; }; typedef pvector DoubleStrings; DoubleStrings _quantize_anims; @@ -115,12 +115,12 @@ private: class FlagGroupsEntry { public: Globs _groups; - string _name; + std::string _name; }; typedef pvector FlagGroups; FlagGroups _flag_groups; - string _defpose; + std::string _defpose; bool _optimal_hierarchy; double _vref_quantum; diff --git a/pandatool/src/egg-palettize/eggPalettize.h b/pandatool/src/egg-palettize/eggPalettize.h index 8bb1c65774..d30a9d4fb6 100644 --- a/pandatool/src/egg-palettize/eggPalettize.h +++ b/pandatool/src/egg-palettize/eggPalettize.h @@ -37,19 +37,19 @@ public: bool _got_txa_filename; Filename _txa_filename; bool _got_txa_script; - string _txa_script; + std::string _txa_script; bool _nodb; - string _generated_image_pattern; + std::string _generated_image_pattern; bool _got_generated_image_pattern; - string _map_dirname; + std::string _map_dirname; bool _got_map_dirname; Filename _shadow_dirname; bool _got_shadow_dirname; Filename _rel_dirname; bool _got_rel_dirname; - string _default_groupname; + std::string _default_groupname; bool _got_default_groupname; - string _default_groupdir; + std::string _default_groupdir; bool _got_default_groupdir; private: diff --git a/pandatool/src/egg-qtess/qtessInputEntry.I b/pandatool/src/egg-qtess/qtessInputEntry.I index 1386256913..d8ab6de61e 100644 --- a/pandatool/src/egg-qtess/qtessInputEntry.I +++ b/pandatool/src/egg-qtess/qtessInputEntry.I @@ -23,7 +23,7 @@ QtessInputEntry(const QtessInputEntry ©) { * */ INLINE void QtessInputEntry:: -add_node_name(const string &name) { +add_node_name(const std::string &name) { _node_names.push_back(GlobPattern(name)); } @@ -150,7 +150,7 @@ get_num_surfaces() const { } -INLINE ostream &operator << (ostream &out, const QtessInputEntry &entry) { +INLINE std::ostream &operator << (std::ostream &out, const QtessInputEntry &entry) { entry.output(out); return out; } diff --git a/pandatool/src/egg-qtess/qtessInputEntry.h b/pandatool/src/egg-qtess/qtessInputEntry.h index 170d0fadf3..bffcca0d4a 100644 --- a/pandatool/src/egg-qtess/qtessInputEntry.h +++ b/pandatool/src/egg-qtess/qtessInputEntry.h @@ -32,11 +32,11 @@ public: T_min_u, T_min_v }; - QtessInputEntry(const string &name = string()); + QtessInputEntry(const std::string &name = std::string()); INLINE QtessInputEntry(const QtessInputEntry ©); void operator = (const QtessInputEntry ©); - INLINE void add_node_name(const string &name); + INLINE void add_node_name(const std::string &name); INLINE void set_importance(double i); INLINE void set_match_uu(); INLINE void set_match_vv(); @@ -48,7 +48,7 @@ public: INLINE void set_omit(); INLINE void set_num_tris(int nt); INLINE void set_uv(int u, int v); - void set_uv(int u, int v, const string params[], int num_params); + void set_uv(int u, int v, const std::string params[], int num_params); INLINE void set_per_isoparam(double pi); INLINE void set_per_score(double pi); void add_extra_u_isoparam(double u); @@ -58,9 +58,9 @@ public: INLINE int get_num_surfaces() const; int count_tris(double tri_factor = 1.0, int attempts = 0); - static void output_extra(ostream &out, const pvector &iso, char axis); - void output(ostream &out) const; - void write(ostream &out, int indent_level) const; + static void output_extra(std::ostream &out, const pvector &iso, char axis); + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level) const; bool _auto_place, _auto_distribute; double _curvature_ratio; @@ -83,7 +83,7 @@ private: double _num_patches; }; -INLINE ostream &operator << (ostream &out, const QtessInputEntry &entry); +INLINE std::ostream &operator << (std::ostream &out, const QtessInputEntry &entry); #include "qtessInputEntry.I" diff --git a/pandatool/src/egg-qtess/qtessInputFile.h b/pandatool/src/egg-qtess/qtessInputFile.h index 7b015b46ac..d0e6b62464 100644 --- a/pandatool/src/egg-qtess/qtessInputFile.h +++ b/pandatool/src/egg-qtess/qtessInputFile.h @@ -37,7 +37,7 @@ public: QtessInputEntry::Type match(QtessSurface *surface); int count_tris(); - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; private: void add_default_entry(); diff --git a/pandatool/src/egg-qtess/qtessSurface.I b/pandatool/src/egg-qtess/qtessSurface.I index f603bf830f..d65f82c32c 100644 --- a/pandatool/src/egg-qtess/qtessSurface.I +++ b/pandatool/src/egg-qtess/qtessSurface.I @@ -14,7 +14,7 @@ /** * */ -INLINE const string &QtessSurface:: +INLINE const std::string &QtessSurface:: get_name() const { return _egg_surface->get_name(); } @@ -126,7 +126,7 @@ get_joint_membership_index(EggGroup *joint) { * Dxyz morph offset should be stored. */ INLINE int QtessSurface:: -get_dxyz_index(const string &morph_name) { +get_dxyz_index(const std::string &morph_name) { MorphTable::iterator mti = _dxyz_table.find(morph_name); if (mti != _dxyz_table.end()) { return (*mti).second; @@ -142,7 +142,7 @@ get_dxyz_index(const string &morph_name) { * Drgba morph offset should be stored. */ INLINE int QtessSurface:: -get_drgba_index(const string &morph_name) { +get_drgba_index(const std::string &morph_name) { MorphTable::iterator mti = _drgba_table.find(morph_name); if (mti != _drgba_table.end()) { return (*mti).second; diff --git a/pandatool/src/egg-qtess/qtessSurface.h b/pandatool/src/egg-qtess/qtessSurface.h index f93c57c52e..fc3720e524 100644 --- a/pandatool/src/egg-qtess/qtessSurface.h +++ b/pandatool/src/egg-qtess/qtessSurface.h @@ -33,7 +33,7 @@ class QtessSurface : public ReferenceCount { public: QtessSurface(EggNurbsSurface *egg_surface); - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; INLINE bool is_valid() const; INLINE void set_importance(double importance2); @@ -48,7 +48,7 @@ public: double get_score(double ratio); int tesselate(); - int write_qtess_parameter(ostream &out); + int write_qtess_parameter(std::ostream &out); void omit(); void tesselate_uv(int u, int v, bool autoplace, double ratio); void tesselate_specific(const pvector &u_list, @@ -60,8 +60,8 @@ public: private: void record_vertex_extras(); INLINE int get_joint_membership_index(EggGroup *joint); - INLINE int get_dxyz_index(const string &morph_name); - INLINE int get_drgba_index(const string &morph_name); + INLINE int get_dxyz_index(const std::string &morph_name); + INLINE int get_drgba_index(const std::string &morph_name); void apply_match(); PT(EggGroup) do_uniform_tesselate(int &tris) const; @@ -75,9 +75,9 @@ private: // Mapping arbitrary attributes to integer extended dimension values, so we // can hang arbitrary data in the extra dimensional space of the surface. int _next_d; - typedef map JointTable; + typedef std::map JointTable; JointTable _joint_table; - typedef map MorphTable; + typedef std::map MorphTable; MorphTable _dxyz_table; MorphTable _drgba_table; diff --git a/pandatool/src/eggbase/eggBase.h b/pandatool/src/eggbase/eggBase.h index 3b2bb1ed68..4c6b156721 100644 --- a/pandatool/src/eggbase/eggBase.h +++ b/pandatool/src/eggbase/eggBase.h @@ -39,17 +39,17 @@ public: protected: void append_command_comment(EggData *_data); - static void append_command_comment(EggData *_data, const string &comment); + static void append_command_comment(EggData *_data, const std::string &comment); - static bool dispatch_normals(ProgramBase *self, const string &opt, const string &arg, void *mode); - bool ns_dispatch_normals(const string &opt, const string &arg, void *mode); + static bool dispatch_normals(ProgramBase *self, const std::string &opt, const std::string &arg, void *mode); + bool ns_dispatch_normals(const std::string &opt, const std::string &arg, void *mode); - static bool dispatch_scale(const string &opt, const string &arg, void *var); - static bool dispatch_rotate_xyz(ProgramBase *self, const string &opt, const string &arg, void *var); - bool ns_dispatch_rotate_xyz(const string &opt, const string &arg, void *var); - static bool dispatch_rotate_axis(ProgramBase *self, const string &opt, const string &arg, void *var); - bool ns_dispatch_rotate_axis(const string &opt, const string &arg, void *var); - static bool dispatch_translate(const string &opt, const string &arg, void *var); + static bool dispatch_scale(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_rotate_xyz(ProgramBase *self, const std::string &opt, const std::string &arg, void *var); + bool ns_dispatch_rotate_xyz(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_rotate_axis(ProgramBase *self, const std::string &opt, const std::string &arg, void *var); + bool ns_dispatch_rotate_axis(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_translate(const std::string &opt, const std::string &arg, void *var); protected: enum NormalsMode { diff --git a/pandatool/src/eggbase/eggConverter.h b/pandatool/src/eggbase/eggConverter.h index 1dfa1b00dc..3922a6b842 100644 --- a/pandatool/src/eggbase/eggConverter.h +++ b/pandatool/src/eggbase/eggConverter.h @@ -24,13 +24,13 @@ */ class EggConverter : public EggFilter { public: - EggConverter(const string &format_name, - const string &preferred_extension = string(), + EggConverter(const std::string &format_name, + const std::string &preferred_extension = std::string(), bool allow_last_param = true, bool allow_stdout = true); protected: - string _format_name; + std::string _format_name; }; #endif diff --git a/pandatool/src/eggbase/eggReader.h b/pandatool/src/eggbase/eggReader.h index c195b0c07d..134799431d 100644 --- a/pandatool/src/eggbase/eggReader.h +++ b/pandatool/src/eggbase/eggReader.h @@ -51,7 +51,7 @@ protected: private: Filename _tex_dirname; bool _got_tex_dirname; - string _tex_extension; + std::string _tex_extension; bool _got_tex_extension; PNMFileType *_tex_type; double _delod; diff --git a/pandatool/src/eggbase/eggToSomething.h b/pandatool/src/eggbase/eggToSomething.h index 56885c33aa..aafc045a3d 100644 --- a/pandatool/src/eggbase/eggToSomething.h +++ b/pandatool/src/eggbase/eggToSomething.h @@ -25,8 +25,8 @@ */ class EggToSomething : public EggConverter { public: - EggToSomething(const string &format_name, - const string &preferred_extension = string(), + EggToSomething(const std::string &format_name, + const std::string &preferred_extension = std::string(), bool allow_last_param = true, bool allow_stdout = true); diff --git a/pandatool/src/eggbase/somethingToEgg.h b/pandatool/src/eggbase/somethingToEgg.h index 263cfd5336..5c5427dcde 100644 --- a/pandatool/src/eggbase/somethingToEgg.h +++ b/pandatool/src/eggbase/somethingToEgg.h @@ -28,8 +28,8 @@ class SomethingToEggConverter; */ class SomethingToEgg : public EggConverter { public: - SomethingToEgg(const string &format_name, - const string &preferred_extension = string(), + SomethingToEgg(const std::string &format_name, + const std::string &preferred_extension = std::string(), bool allow_last_param = true, bool allow_stdout = true); @@ -45,7 +45,7 @@ protected: virtual bool post_command_line(); virtual void post_process_egg_file(); - static bool dispatch_animation_convert(const string &opt, const string &arg, void *var); + static bool dispatch_animation_convert(const std::string &opt, const std::string &arg, void *var); Filename _input_filename; @@ -54,7 +54,7 @@ protected: DistanceUnit _output_units; AnimationConvert _animation_convert; - string _character_name; + std::string _character_name; double _start_frame; double _end_frame; double _frame_inc; diff --git a/pandatool/src/eggcharbase/eggBackPointer.h b/pandatool/src/eggcharbase/eggBackPointer.h index 6a0e864046..2595c09d18 100644 --- a/pandatool/src/eggcharbase/eggBackPointer.h +++ b/pandatool/src/eggcharbase/eggBackPointer.h @@ -37,7 +37,7 @@ public: virtual void extend_to(int num_frames); virtual bool has_vertices() const; - virtual void set_name(const string &name); + virtual void set_name(const std::string &name); public: static TypeHandle get_class_type() { diff --git a/pandatool/src/eggcharbase/eggCharacterCollection.h b/pandatool/src/eggcharbase/eggCharacterCollection.h index 57c3bc984d..8a0bbd4f28 100644 --- a/pandatool/src/eggcharbase/eggCharacterCollection.h +++ b/pandatool/src/eggcharbase/eggCharacterCollection.h @@ -43,21 +43,21 @@ public: INLINE int get_num_characters() const; INLINE EggCharacterData *get_character(int i) const; - EggCharacterData *get_character_by_name(const string &character_name) const; + EggCharacterData *get_character_by_name(const std::string &character_name) const; INLINE EggCharacterData *get_character_by_model_index(int model_index) const; - void rename_char(int i, const string &name); + void rename_char(int i, const std::string &name); - virtual void write(ostream &out, int indent_level = 0) const; - void check_errors(ostream &out, bool force_initial_rest_frame); + virtual void write(std::ostream &out, int indent_level = 0) const; + void check_errors(std::ostream &out, bool force_initial_rest_frame); virtual EggCharacterData *make_character_data(); virtual EggJointData *make_joint_data(EggCharacterData *char_data); virtual EggSliderData *make_slider_data(EggCharacterData *char_data); public: - EggCharacterData *make_character(const string &character_name); + EggCharacterData *make_character(const std::string &character_name); class EggInfo { public: @@ -77,9 +77,9 @@ public: private: bool scan_hierarchy(EggNode *egg_node); void scan_for_top_joints(EggNode *egg_node, EggNode *model_root, - const string &character_name); + const std::string &character_name); void scan_for_top_tables(EggTable *bundle, EggNode *model_root, - const string &character_name); + const std::string &character_name); void scan_for_morphs(EggNode *egg_node, int model_index, EggCharacterData *char_data); void scan_for_sliders(EggNode *egg_node, int model_index, @@ -101,7 +101,7 @@ private: }; typedef pmap TopEggNodes; - typedef pmap TopEggNodesByName; + typedef pmap TopEggNodesByName; TopEggNodesByName _top_egg_nodes; int _next_model_index; diff --git a/pandatool/src/eggcharbase/eggCharacterData.I b/pandatool/src/eggcharbase/eggCharacterData.I index 7ea131a3ec..fc3d3f1bcc 100644 --- a/pandatool/src/eggcharbase/eggCharacterData.I +++ b/pandatool/src/eggcharbase/eggCharacterData.I @@ -77,7 +77,7 @@ get_root_joint() const { * has that name. */ INLINE EggJointData *EggCharacterData:: -find_joint(const string &name) const { +find_joint(const std::string &name) const { return _root_joint->find_joint(name); } @@ -87,7 +87,7 @@ find_joint(const string &name) const { * inherits the net transform of the indicated parent joint. */ INLINE EggJointData *EggCharacterData:: -make_new_joint(const string &name, EggJointData *parent) { +make_new_joint(const std::string &name, EggJointData *parent) { EggJointData *joint = parent->make_new_joint(name); _joints.push_back(joint); _components.push_back(joint); diff --git a/pandatool/src/eggcharbase/eggCharacterData.h b/pandatool/src/eggcharbase/eggCharacterData.h index d4b7125487..f488e33536 100644 --- a/pandatool/src/eggcharbase/eggCharacterData.h +++ b/pandatool/src/eggcharbase/eggCharacterData.h @@ -54,7 +54,7 @@ public: EggCharacterData(EggCharacterCollection *collection); virtual ~EggCharacterData(); - void rename_char(const string &name); + void rename_char(const std::string &name); void add_model(int model_index, EggNode *model_root, EggData *egg_data); INLINE int get_num_models() const; @@ -66,8 +66,8 @@ public: double get_frame_rate(int model_index) const; INLINE EggJointData *get_root_joint() const; - INLINE EggJointData *find_joint(const string &name) const; - INLINE EggJointData *make_new_joint(const string &name, EggJointData *parent); + INLINE EggJointData *find_joint(const std::string &name) const; + INLINE EggJointData *make_new_joint(const std::string &name, EggJointData *parent); INLINE int get_num_joints() const; INLINE EggJointData *get_joint(int n) const; @@ -76,15 +76,15 @@ public: INLINE int get_num_sliders() const; INLINE EggSliderData *get_slider(int n) const; - EggSliderData *find_slider(const string &name) const; - EggSliderData *make_slider(const string &name); + EggSliderData *find_slider(const std::string &name) const; + EggSliderData *make_slider(const std::string &name); INLINE int get_num_components() const; INLINE EggComponentData *get_component(int n) const; size_t estimate_db_size() const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: class Model { @@ -99,7 +99,7 @@ private: EggCharacterCollection *_collection; EggJointData *_root_joint; - typedef pmap SlidersByName; + typedef pmap SlidersByName; SlidersByName _sliders_by_name; typedef pvector Sliders; diff --git a/pandatool/src/eggcharbase/eggComponentData.h b/pandatool/src/eggcharbase/eggComponentData.h index 4445d51fe1..b54c20ffb6 100644 --- a/pandatool/src/eggcharbase/eggComponentData.h +++ b/pandatool/src/eggcharbase/eggComponentData.h @@ -37,15 +37,15 @@ public: EggCharacterData *char_data); virtual ~EggComponentData(); - void add_name(const string &name, NameUniquifier &uniquifier); - bool matches_name(const string &name) const; + void add_name(const std::string &name, NameUniquifier &uniquifier); + bool matches_name(const std::string &name) const; int get_num_frames(int model_index) const; void extend_to(int model_index, int num_frames) const; double get_frame_rate(int model_index) const; virtual void add_back_pointer(int model_index, EggObject *egg_object)=0; - virtual void write(ostream &out, int indent_level = 0) const=0; + virtual void write(std::ostream &out, int indent_level = 0) const=0; INLINE int get_num_models() const; INLINE bool has_model(int model_index) const; @@ -59,7 +59,7 @@ protected: typedef pvector BackPointers; BackPointers _back_pointers; - typedef pset Names; + typedef pset Names; Names _names; EggCharacterCollection *_collection; diff --git a/pandatool/src/eggcharbase/eggJointData.I b/pandatool/src/eggcharbase/eggJointData.I index ad0b91aee5..c8b81967ee 100644 --- a/pandatool/src/eggcharbase/eggJointData.I +++ b/pandatool/src/eggcharbase/eggJointData.I @@ -41,7 +41,7 @@ get_child(int n) const { * if no joint has that name. */ INLINE EggJointData *EggJointData:: -find_joint(const string &name) { +find_joint(const std::string &name) { EggJointData *joint = find_joint_exact(name); if (joint == nullptr) { joint = find_joint_matches(name); diff --git a/pandatool/src/eggcharbase/eggJointData.h b/pandatool/src/eggcharbase/eggJointData.h index aff56459cc..bf9cf7b3d1 100644 --- a/pandatool/src/eggcharbase/eggJointData.h +++ b/pandatool/src/eggcharbase/eggJointData.h @@ -36,7 +36,7 @@ public: INLINE EggJointData *get_parent() const; INLINE int get_num_children() const; INLINE EggJointData *get_child(int n) const; - INLINE EggJointData *find_joint(const string &name); + INLINE EggJointData *find_joint(const std::string &name); LMatrix4d get_frame(int model_index, int n) const; LMatrix4d get_net_frame(int model_index, int n, EggCharacterDb &db) const; @@ -54,12 +54,12 @@ public: bool do_rebuild_all(EggCharacterDb &db); void optimize(); void expose(EggGroup::DCSType dcs_type = EggGroup::DC_default); - void zero_channels(const string &components); - void quantize_channels(const string &components, double quantum); + void zero_channels(const std::string &components); + void quantize_channels(const std::string &components, double quantum); void apply_default_pose(int source_model, int frame); virtual void add_back_pointer(int model_index, EggObject *egg_object); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: void do_begin_reparent(); @@ -70,9 +70,9 @@ protected: void do_finish_reparent(); private: - EggJointData *make_new_joint(const string &name); - EggJointData *find_joint_exact(const string &name); - EggJointData *find_joint_matches(const string &name); + EggJointData *make_new_joint(const std::string &name); + EggJointData *find_joint_exact(const std::string &name); + EggJointData *find_joint_matches(const std::string &name); bool is_new_ancestor(EggJointData *child) const; const LMatrix4d &get_new_net_frame(int model_index, int n, EggCharacterDb &db); diff --git a/pandatool/src/eggcharbase/eggJointNodePointer.h b/pandatool/src/eggcharbase/eggJointNodePointer.h index 52aacbd042..8a979f11d5 100644 --- a/pandatool/src/eggcharbase/eggJointNodePointer.h +++ b/pandatool/src/eggcharbase/eggJointNodePointer.h @@ -41,9 +41,9 @@ public: virtual bool has_vertices() const; - virtual EggJointPointer *make_new_joint(const string &name); + virtual EggJointPointer *make_new_joint(const std::string &name); - virtual void set_name(const string &name); + virtual void set_name(const std::string &name); private: PT(EggGroup) _joint; diff --git a/pandatool/src/eggcharbase/eggJointPointer.h b/pandatool/src/eggcharbase/eggJointPointer.h index cbb759c9d4..94a8a3180e 100644 --- a/pandatool/src/eggcharbase/eggJointPointer.h +++ b/pandatool/src/eggcharbase/eggJointPointer.h @@ -42,11 +42,11 @@ public: virtual void optimize(); virtual void expose(EggGroup::DCSType dcs_type); - virtual void zero_channels(const string &components); - virtual void quantize_channels(const string &components, double quantum); + virtual void zero_channels(const std::string &components); + virtual void quantize_channels(const std::string &components, double quantum); virtual void apply_default_pose(EggJointPointer *source_joint, int frame); - virtual EggJointPointer *make_new_joint(const string &name)=0; + virtual EggJointPointer *make_new_joint(const std::string &name)=0; public: static TypeHandle get_class_type() { diff --git a/pandatool/src/eggcharbase/eggMatrixTablePointer.h b/pandatool/src/eggcharbase/eggMatrixTablePointer.h index c23187955b..cbdeeecc5a 100644 --- a/pandatool/src/eggcharbase/eggMatrixTablePointer.h +++ b/pandatool/src/eggcharbase/eggMatrixTablePointer.h @@ -43,12 +43,12 @@ public: virtual bool do_rebuild(EggCharacterDb &db); virtual void optimize(); - virtual void zero_channels(const string &components); - virtual void quantize_channels(const string &components, double quantum); + virtual void zero_channels(const std::string &components); + virtual void quantize_channels(const std::string &components, double quantum); - virtual EggJointPointer *make_new_joint(const string &name); + virtual EggJointPointer *make_new_joint(const std::string &name); - virtual void set_name(const string &name); + virtual void set_name(const std::string &name); private: PT(EggTable) _table; diff --git a/pandatool/src/eggcharbase/eggScalarTablePointer.h b/pandatool/src/eggcharbase/eggScalarTablePointer.h index f1cd226c1f..c0a7487973 100644 --- a/pandatool/src/eggcharbase/eggScalarTablePointer.h +++ b/pandatool/src/eggcharbase/eggScalarTablePointer.h @@ -35,7 +35,7 @@ public: virtual void extend_to(int num_frames); virtual double get_frame(int n) const; - virtual void set_name(const string &name); + virtual void set_name(const std::string &name); private: PT(EggSAnimData) _data; diff --git a/pandatool/src/eggcharbase/eggSliderData.h b/pandatool/src/eggcharbase/eggSliderData.h index 03c1d2fe3f..dd0e4c3486 100644 --- a/pandatool/src/eggcharbase/eggSliderData.h +++ b/pandatool/src/eggcharbase/eggSliderData.h @@ -33,7 +33,7 @@ public: double get_frame(int model_index, int n) const; virtual void add_back_pointer(int model_index, EggObject *egg_object); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: diff --git a/pandatool/src/eggprogs/eggRetargetAnim.h b/pandatool/src/eggprogs/eggRetargetAnim.h index bf9d94cd38..455942ae94 100644 --- a/pandatool/src/eggprogs/eggRetargetAnim.h +++ b/pandatool/src/eggprogs/eggRetargetAnim.h @@ -37,7 +37,7 @@ public: void run(); void retarget_anim(EggCharacterData *char_data, EggJointData *joint_data, - int reference_model, const pset &keep_names, + int reference_model, const pset &keep_names, EggCharacterDb &db); Filename _reference_filename; diff --git a/pandatool/src/eggprogs/eggTextureCards.h b/pandatool/src/eggprogs/eggTextureCards.h index f3adde8b34..c30e926d8e 100644 --- a/pandatool/src/eggprogs/eggTextureCards.h +++ b/pandatool/src/eggprogs/eggTextureCards.h @@ -36,10 +36,10 @@ public: protected: virtual bool handle_args(Args &args); - static bool dispatch_wrap_mode(const string &opt, const string &arg, void *var); - static bool dispatch_filter_type(const string &opt, const string &arg, void *var); - static bool dispatch_quality_level(const string &opt, const string &arg, void *var); - static bool dispatch_format(const string &opt, const string &arg, void *var); + static bool dispatch_wrap_mode(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_filter_type(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_quality_level(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_format(const std::string &opt, const std::string &arg, void *var); private: bool scan_texture(const Filename &filename, LVecBase4d &geometry, diff --git a/pandatool/src/eggprogs/eggTopstrip.h b/pandatool/src/eggprogs/eggTopstrip.h index efdd4c0e82..8e04b7e0af 100644 --- a/pandatool/src/eggprogs/eggTopstrip.h +++ b/pandatool/src/eggprogs/eggTopstrip.h @@ -48,10 +48,10 @@ public: void adjust_transform(LMatrix4d &mat) const; - string _top_joint_name; + std::string _top_joint_name; bool _got_invert_transform; bool _invert_transform; - string _transform_channels; + std::string _transform_channels; Filename _channel_filename; }; diff --git a/pandatool/src/flt/fltBeadID.h b/pandatool/src/flt/fltBeadID.h index c14b82b4a3..d7e943b207 100644 --- a/pandatool/src/flt/fltBeadID.h +++ b/pandatool/src/flt/fltBeadID.h @@ -25,10 +25,10 @@ class FltBeadID : public FltBead { public: FltBeadID(FltHeader *header); - const string &get_id() const; - void set_id(const string &id); + const std::string &get_id() const; + void set_id(const std::string &id); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual bool extract_record(FltRecordReader &reader); @@ -38,7 +38,7 @@ protected: virtual FltError write_ancillary(FltRecordWriter &writer) const; private: - string _id; + std::string _id; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/flt/fltError.h b/pandatool/src/flt/fltError.h index 5d4ac08165..29c4453869 100644 --- a/pandatool/src/flt/fltError.h +++ b/pandatool/src/flt/fltError.h @@ -32,6 +32,6 @@ enum FltError { FE_internal }; -ostream &operator << (ostream &out, FltError error); +std::ostream &operator << (std::ostream &out, FltError error); #endif diff --git a/pandatool/src/flt/fltExternalReference.h b/pandatool/src/flt/fltExternalReference.h index 5afe57d091..03cac968cb 100644 --- a/pandatool/src/flt/fltExternalReference.h +++ b/pandatool/src/flt/fltExternalReference.h @@ -29,7 +29,7 @@ public: FltExternalReference(FltHeader *header); virtual void apply_converted_filenames(); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; enum Flags { F_color_palette_override = 0x80000000, @@ -40,9 +40,9 @@ public: F_light_palette_override = 0x04000000 }; - string _orig_filename; + std::string _orig_filename; Filename _converted_filename; - string _bead_id; + std::string _bead_id; int _flags; Filename get_ref_filename() const; diff --git a/pandatool/src/flt/fltHeader.h b/pandatool/src/flt/fltHeader.h index 0cde95d1ad..620e553ad9 100644 --- a/pandatool/src/flt/fltHeader.h +++ b/pandatool/src/flt/fltHeader.h @@ -57,9 +57,9 @@ public: const Filename &get_flt_filename() const; FltError read_flt(Filename filename); - FltError read_flt(istream &in); + FltError read_flt(std::istream &in); FltError write_flt(Filename filename); - FltError write_flt(ostream &out); + FltError write_flt(std::ostream &out); enum AttrUpdate { AU_none, @@ -113,7 +113,7 @@ public: int _format_revision_level; int _edit_revision_level; - string _last_revision; + std::string _last_revision; int _next_group_id; int _next_lod_id; int _next_object_id; @@ -181,7 +181,7 @@ public: LColor get_color(int color_index) const; LRGBColor get_rgb(int color_index) const; bool has_color_name(int color_index) const; - string get_color_name(int color_index) const; + std::string get_color_name(int color_index) const; int get_closest_color(const LColor &color) const; int get_closest_rgb(const LRGBColor &color) const; @@ -262,7 +262,7 @@ private: // Support for the color palette. bool _got_color_palette; typedef pvector Colors; - typedef pmap ColorNames; + typedef pmap ColorNames; Colors _colors; ColorNames _color_names; diff --git a/pandatool/src/flt/fltInstanceRef.h b/pandatool/src/flt/fltInstanceRef.h index 6bbbe11ebd..2f8e281c9f 100644 --- a/pandatool/src/flt/fltInstanceRef.h +++ b/pandatool/src/flt/fltInstanceRef.h @@ -33,7 +33,7 @@ public: FltInstanceDefinition *get_instance() const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: virtual bool extract_record(FltRecordReader &reader); diff --git a/pandatool/src/flt/fltLightSourceDefinition.h b/pandatool/src/flt/fltLightSourceDefinition.h index 80f307de13..e96d275254 100644 --- a/pandatool/src/flt/fltLightSourceDefinition.h +++ b/pandatool/src/flt/fltLightSourceDefinition.h @@ -36,7 +36,7 @@ public: }; int _light_index; - string _light_name; + std::string _light_name; LColor _ambient; LColor _diffuse; LColor _specular; diff --git a/pandatool/src/flt/fltMaterial.h b/pandatool/src/flt/fltMaterial.h index c801efc993..fadc3accd1 100644 --- a/pandatool/src/flt/fltMaterial.h +++ b/pandatool/src/flt/fltMaterial.h @@ -34,7 +34,7 @@ public: }; int _material_index; - string _material_name; + std::string _material_name; unsigned int _flags; LRGBColor _ambient; LRGBColor _diffuse; diff --git a/pandatool/src/flt/fltOpcode.h b/pandatool/src/flt/fltOpcode.h index 2cadaeacb5..f9bbeb9eab 100644 --- a/pandatool/src/flt/fltOpcode.h +++ b/pandatool/src/flt/fltOpcode.h @@ -117,6 +117,6 @@ enum FltOpcode { FO_road_construction = 127 }; -ostream &operator << (ostream &out, FltOpcode opcode); +std::ostream &operator << (std::ostream &out, FltOpcode opcode); #endif diff --git a/pandatool/src/flt/fltPackedColor.I b/pandatool/src/flt/fltPackedColor.I index 9b42f4d64d..50ae590650 100644 --- a/pandatool/src/flt/fltPackedColor.I +++ b/pandatool/src/flt/fltPackedColor.I @@ -11,8 +11,8 @@ * @date 2000-08-25 */ -INLINE ostream & -operator << (ostream &out, const FltPackedColor &color) { +INLINE std::ostream & +operator << (std::ostream &out, const FltPackedColor &color) { color.output(out); return out; } diff --git a/pandatool/src/flt/fltPackedColor.h b/pandatool/src/flt/fltPackedColor.h index d8897363aa..1e38e02bc8 100644 --- a/pandatool/src/flt/fltPackedColor.h +++ b/pandatool/src/flt/fltPackedColor.h @@ -35,7 +35,7 @@ public: INLINE void set_color(const LColor &color); INLINE void set_rgb(const LRGBColor &rgb); - void output(ostream &out) const; + void output(std::ostream &out) const; bool extract_record(FltRecordReader &reader); bool build_record(FltRecordWriter &writer) const; @@ -46,7 +46,7 @@ public: int _r; }; -INLINE ostream &operator << (ostream &out, const FltPackedColor &color); +INLINE std::ostream &operator << (std::ostream &out, const FltPackedColor &color); #include "fltPackedColor.I" diff --git a/pandatool/src/flt/fltRecord.I b/pandatool/src/flt/fltRecord.I index 39d8765018..add78f2d7a 100644 --- a/pandatool/src/flt/fltRecord.I +++ b/pandatool/src/flt/fltRecord.I @@ -11,8 +11,8 @@ * @date 2000-08-24 */ -INLINE ostream & -operator << (ostream &out, const FltRecord &record) { +INLINE std::ostream & +operator << (std::ostream &out, const FltRecord &record) { record.output(out); return out; } diff --git a/pandatool/src/flt/fltRecord.h b/pandatool/src/flt/fltRecord.h index fc64441c7f..9fc8e3ad3e 100644 --- a/pandatool/src/flt/fltRecord.h +++ b/pandatool/src/flt/fltRecord.h @@ -59,20 +59,20 @@ public: void add_ancillary(FltRecord *ancillary); bool has_comment() const; - const string &get_comment() const; + const std::string &get_comment() const; void clear_comment(); - void set_comment(const string &comment); + void set_comment(const std::string &comment); void check_remaining_size(const DatagramIterator &di, - const string &name = string()) const; + const std::string &name = std::string()) const; virtual void apply_converted_filenames(); - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; protected: - void write_children(ostream &out, int indent_level) const; + void write_children(std::ostream &out, int indent_level) const; static bool is_ancillary(FltOpcode opcode); @@ -95,7 +95,7 @@ private: Records _extensions; Records _ancillary; - string _comment; + std::string _comment; public: @@ -116,7 +116,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const FltRecord &record); +INLINE std::ostream &operator << (std::ostream &out, const FltRecord &record); #include "fltRecord.I" diff --git a/pandatool/src/flt/fltRecordReader.h b/pandatool/src/flt/fltRecordReader.h index 09800f7e42..8817e800c2 100644 --- a/pandatool/src/flt/fltRecordReader.h +++ b/pandatool/src/flt/fltRecordReader.h @@ -29,7 +29,7 @@ */ class FltRecordReader { public: - FltRecordReader(istream &in); + FltRecordReader(std::istream &in); ~FltRecordReader(); FltOpcode get_opcode() const; @@ -45,7 +45,7 @@ public: private: void read_next_header(); - istream &_in; + std::istream &_in; Datagram _datagram; FltOpcode _opcode; int _record_length; diff --git a/pandatool/src/flt/fltRecordWriter.h b/pandatool/src/flt/fltRecordWriter.h index 6c8798937c..8cd4e4b6d1 100644 --- a/pandatool/src/flt/fltRecordWriter.h +++ b/pandatool/src/flt/fltRecordWriter.h @@ -30,7 +30,7 @@ class FltHeader; */ class FltRecordWriter { public: - FltRecordWriter(ostream &out); + FltRecordWriter(std::ostream &out); ~FltRecordWriter(); void set_opcode(FltOpcode opcode); @@ -46,7 +46,7 @@ public: FltError write_instance_def(FltHeader *header, int instance_index); private: - ostream &_out; + std::ostream &_out; Datagram _datagram; FltOpcode _opcode; diff --git a/pandatool/src/flt/fltTexture.h b/pandatool/src/flt/fltTexture.h index 21e1a24141..34a487e16b 100644 --- a/pandatool/src/flt/fltTexture.h +++ b/pandatool/src/flt/fltTexture.h @@ -30,7 +30,7 @@ public: virtual void apply_converted_filenames(); - string _orig_filename; + std::string _orig_filename; Filename _converted_filename; int _pattern_index; int _x_location; @@ -157,7 +157,7 @@ public: typedef pvector GeospecificControlPoints; struct SubtextureDef { - string _name; + std::string _name; int _left; int _bottom; int _right; @@ -216,7 +216,7 @@ public: ImageOrigin _image_origin; PointsUnits _geospecific_points_units; Hemisphere _geospecific_hemisphere; - string _comment; + std::string _comment; int _file_version; GeospecificControlPoints _geospecific_control_points; SubtextureDefs _subtexture_defs; diff --git a/pandatool/src/flt/fltUnsupportedRecord.h b/pandatool/src/flt/fltUnsupportedRecord.h index 02131f35f7..a358577dfa 100644 --- a/pandatool/src/flt/fltUnsupportedRecord.h +++ b/pandatool/src/flt/fltUnsupportedRecord.h @@ -27,7 +27,7 @@ class FltUnsupportedRecord : public FltRecord { public: FltUnsupportedRecord(FltHeader *header); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual bool extract_record(FltRecordReader &reader); diff --git a/pandatool/src/flt/fltVertexList.h b/pandatool/src/flt/fltVertexList.h index 449c5ab5ce..5fd53ad884 100644 --- a/pandatool/src/flt/fltVertexList.h +++ b/pandatool/src/flt/fltVertexList.h @@ -34,7 +34,7 @@ public: void clear_vertices(); void add_vertex(FltVertex *vertex); - virtual void output(ostream &out) const; + virtual void output(std::ostream &out) const; protected: virtual bool extract_record(FltRecordReader &reader); diff --git a/pandatool/src/fltegg/fltToEggConverter.h b/pandatool/src/fltegg/fltToEggConverter.h index 5188c3fce4..c9e8cc61c1 100644 --- a/pandatool/src/fltegg/fltToEggConverter.h +++ b/pandatool/src/fltegg/fltToEggConverter.h @@ -54,8 +54,8 @@ public: virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool convert_file(const Filename &filename); @@ -91,7 +91,7 @@ private: bool parse_comment(const FltBeadID *flt_bead, EggNode *egg_node); bool parse_comment(const FltBead *flt_bead, EggNode *egg_node); bool parse_comment(const FltTexture *flt_texture, EggNode *egg_node); - bool parse_comment(const string &comment, const string &name, + bool parse_comment(const std::string &comment, const std::string &name, EggNode *egg_node); PT_EggVertex make_egg_vertex(const FltVertex *flt_vertex); diff --git a/pandatool/src/fltegg/fltToEggLevelState.h b/pandatool/src/fltegg/fltToEggLevelState.h index 876d9835e1..91877e2306 100644 --- a/pandatool/src/fltegg/fltToEggLevelState.h +++ b/pandatool/src/fltegg/fltToEggLevelState.h @@ -34,7 +34,7 @@ public: INLINE void operator = (const FltToEggLevelState ©); ~FltToEggLevelState(); - EggGroupNode *get_synthetic_group(const string &name, + EggGroupNode *get_synthetic_group(const std::string &name, const FltBead *transform_bead, FltGeometry::BillboardType type = FltGeometry::BT_none); diff --git a/pandatool/src/fltprogs/eggToFlt.h b/pandatool/src/fltprogs/eggToFlt.h index ebae3de586..0cbcb2126d 100644 --- a/pandatool/src/fltprogs/eggToFlt.h +++ b/pandatool/src/fltprogs/eggToFlt.h @@ -42,7 +42,7 @@ public: void run(); private: - static bool dispatch_attr(const string &opt, const string &arg, void *var); + static bool dispatch_attr(const std::string &opt, const std::string &arg, void *var); void traverse(EggNode *egg_node, FltBead *flt_node, FltGeometry::BillboardType billboard); @@ -51,7 +51,7 @@ private: void convert_group(EggGroup *egg_group, FltBead *flt_node, FltGeometry::BillboardType billboard); void apply_transform(EggTransform *egg_transform, FltBead *flt_node); - void apply_egg_syntax(const string &egg_syntax, FltRecord *flt_record); + void apply_egg_syntax(const std::string &egg_syntax, FltRecord *flt_record); FltVertex *get_flt_vertex(EggVertex *egg_vertex, EggNode *context); FltTexture *get_flt_texture(EggTexture *egg_texture); diff --git a/pandatool/src/gtk-stats/gtkStatsLabel.h b/pandatool/src/gtk-stats/gtkStatsLabel.h index bf4834985e..624e4193f9 100644 --- a/pandatool/src/gtk-stats/gtkStatsLabel.h +++ b/pandatool/src/gtk-stats/gtkStatsLabel.h @@ -59,7 +59,7 @@ private: GtkStatsGraph *_graph; int _thread_index; int _collector_index; - string _text; + std::string _text; GtkWidget *_widget; GdkColor _fg_color; GdkColor _bg_color; diff --git a/pandatool/src/gtk-stats/gtkStatsMonitor.h b/pandatool/src/gtk-stats/gtkStatsMonitor.h index 704a919cf8..be1f1c7d42 100644 --- a/pandatool/src/gtk-stats/gtkStatsMonitor.h +++ b/pandatool/src/gtk-stats/gtkStatsMonitor.h @@ -48,7 +48,7 @@ public: GtkStatsMonitor(GtkStatsServer *server); virtual ~GtkStatsMonitor(); - virtual string get_monitor_name(); + virtual std::string get_monitor_name(); virtual void initialized(); virtual void got_hello(); @@ -100,7 +100,7 @@ private: int _next_chart_index; GtkWidget *_frame_rate_menu_item; GtkWidget *_frame_rate_label; - string _window_title; + std::string _window_title; int _time_units; double _scroll_speed; bool _pause; diff --git a/pandatool/src/gtk-stats/gtkStatsStripChart.h b/pandatool/src/gtk-stats/gtkStatsStripChart.h index 65bd50b598..484d669c9f 100644 --- a/pandatool/src/gtk-stats/gtkStatsStripChart.h +++ b/pandatool/src/gtk-stats/gtkStatsStripChart.h @@ -75,7 +75,7 @@ private: private: int _brush_origin; - string _net_value_text; + std::string _net_value_text; GtkWidget *_top_hbox; GtkWidget *_smooth_check_box; diff --git a/pandatool/src/imageprogs/imageResize.h b/pandatool/src/imageprogs/imageResize.h index c7e71076db..731786a4cb 100644 --- a/pandatool/src/imageprogs/imageResize.h +++ b/pandatool/src/imageprogs/imageResize.h @@ -29,7 +29,7 @@ public: void run(); private: - static bool dispatch_size_request(const string &opt, const string &arg, void *var); + static bool dispatch_size_request(const std::string &opt, const std::string &arg, void *var); enum RequestType { RT_none, diff --git a/pandatool/src/imageprogs/imageTrans.h b/pandatool/src/imageprogs/imageTrans.h index 8a4d3fffd6..a41d3ef5ef 100644 --- a/pandatool/src/imageprogs/imageTrans.h +++ b/pandatool/src/imageprogs/imageTrans.h @@ -29,7 +29,7 @@ public: void run(); private: - static bool dispatch_channels(const string &opt, const string &arg, void *var); + static bool dispatch_channels(const std::string &opt, const std::string &arg, void *var); void extract_alpha(); enum Channels { diff --git a/pandatool/src/imageprogs/imageTransformColors.h b/pandatool/src/imageprogs/imageTransformColors.h index d668ea5895..a6d11bb143 100644 --- a/pandatool/src/imageprogs/imageTransformColors.h +++ b/pandatool/src/imageprogs/imageTransformColors.h @@ -33,11 +33,11 @@ public: void run(); protected: - static bool dispatch_mat4(const string &opt, const string &arg, void *var); - static bool dispatch_mat3(const string &opt, const string &arg, void *var); - static bool dispatch_range(const string &opt, const string &arg, void *var); - static bool dispatch_scale(const string &opt, const string &arg, void *var); - static bool dispatch_add(const string &opt, const string &arg, void *var); + static bool dispatch_mat4(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_mat3(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_range(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_scale(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_add(const std::string &opt, const std::string &arg, void *var); virtual bool handle_args(Args &args); Filename get_output_filename(const Filename &source_filename) const; diff --git a/pandatool/src/lwo/iffChunk.h b/pandatool/src/lwo/iffChunk.h index dd162497ae..58de26470b 100644 --- a/pandatool/src/lwo/iffChunk.h +++ b/pandatool/src/lwo/iffChunk.h @@ -36,8 +36,8 @@ public: virtual bool read_iff(IffInputFile *in, size_t stop_at)=0; - virtual void output(ostream &out) const; - virtual void write(ostream &out, int indent_level = 0) const; + virtual void output(std::ostream &out) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual IffChunk *make_new_chunk(IffInputFile *in, IffId id); @@ -64,7 +64,7 @@ private: #include "iffChunk.I" -INLINE ostream &operator << (ostream &out, const IffChunk &chunk) { +INLINE std::ostream &operator << (std::ostream &out, const IffChunk &chunk) { chunk.output(out); return out; } diff --git a/pandatool/src/lwo/iffGenericChunk.h b/pandatool/src/lwo/iffGenericChunk.h index bb50fb36d4..e1e9902443 100644 --- a/pandatool/src/lwo/iffGenericChunk.h +++ b/pandatool/src/lwo/iffGenericChunk.h @@ -33,7 +33,7 @@ public: INLINE void set_data(const Datagram &data); virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: Datagram _data; diff --git a/pandatool/src/lwo/iffId.I b/pandatool/src/lwo/iffId.I index b5775dcbaa..938e26c4cc 100644 --- a/pandatool/src/lwo/iffId.I +++ b/pandatool/src/lwo/iffId.I @@ -78,7 +78,7 @@ operator < (const IffId &other) const { /** * Returns the four-character name of the Id, for outputting. */ -INLINE string IffId:: +INLINE std::string IffId:: get_name() const { - return string(_id._c, 4); + return std::string(_id._c, 4); } diff --git a/pandatool/src/lwo/iffId.h b/pandatool/src/lwo/iffId.h index 2d20b9b99c..c3d14a7abd 100644 --- a/pandatool/src/lwo/iffId.h +++ b/pandatool/src/lwo/iffId.h @@ -34,9 +34,9 @@ public: INLINE bool operator != (const IffId &other) const; INLINE bool operator < (const IffId &other) const; - INLINE string get_name() const; + INLINE std::string get_name() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: union { @@ -47,7 +47,7 @@ private: #include "iffId.I" -INLINE ostream &operator << (ostream &out, const IffId &id) { +INLINE std::ostream &operator << (std::ostream &out, const IffId &id) { id.output(out); return out; } diff --git a/pandatool/src/lwo/iffInputFile.h b/pandatool/src/lwo/iffInputFile.h index 2b788f07a0..dc39be7da0 100644 --- a/pandatool/src/lwo/iffInputFile.h +++ b/pandatool/src/lwo/iffInputFile.h @@ -33,7 +33,7 @@ public: virtual ~IffInputFile(); bool open_read(Filename filename); - void set_input(istream *input, bool owns_istream); + void set_input(std::istream *input, bool owns_istream); INLINE void set_filename(const Filename &filename); INLINE const Filename &get_filename() const; @@ -52,7 +52,7 @@ public: uint32_t get_be_uint32(); PN_stdfloat get_be_float32(); - string get_string(); + std::string get_string(); IffId get_id(); @@ -66,7 +66,7 @@ public: protected: virtual IffChunk *make_new_chunk(IffId id); - istream *_input; + std::istream *_input; Filename _filename; bool _owns_istream; bool _eof; diff --git a/pandatool/src/lwo/lwoBoundingBox.h b/pandatool/src/lwo/lwoBoundingBox.h index 3120bee5b0..993425ffce 100644 --- a/pandatool/src/lwo/lwoBoundingBox.h +++ b/pandatool/src/lwo/lwoBoundingBox.h @@ -30,7 +30,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoClip.h b/pandatool/src/lwo/lwoClip.h index 647a2e69dd..3955efa526 100644 --- a/pandatool/src/lwo/lwoClip.h +++ b/pandatool/src/lwo/lwoClip.h @@ -28,7 +28,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual IffChunk *make_new_chunk(IffInputFile *in, IffId id); diff --git a/pandatool/src/lwo/lwoDiscontinuousVertexMap.h b/pandatool/src/lwo/lwoDiscontinuousVertexMap.h index 1404d02ccd..2f48e146e7 100644 --- a/pandatool/src/lwo/lwoDiscontinuousVertexMap.h +++ b/pandatool/src/lwo/lwoDiscontinuousVertexMap.h @@ -32,11 +32,11 @@ public: IffId _map_type; int _dimension; - string _name; + std::string _name; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: typedef pmap VMap; diff --git a/pandatool/src/lwo/lwoGroupChunk.h b/pandatool/src/lwo/lwoGroupChunk.h index fb2db24f11..2a72dd7943 100644 --- a/pandatool/src/lwo/lwoGroupChunk.h +++ b/pandatool/src/lwo/lwoGroupChunk.h @@ -35,7 +35,7 @@ public: protected: bool read_chunks_iff(IffInputFile *in, size_t stop_at); bool read_subchunks_iff(IffInputFile *in, size_t stop_at); - void write_chunks(ostream &out, int indent_level) const; + void write_chunks(std::ostream &out, int indent_level) const; typedef pvector< PT(IffChunk) > Chunks; Chunks _chunks; diff --git a/pandatool/src/lwo/lwoHeader.h b/pandatool/src/lwo/lwoHeader.h index f4bbc93c8f..539d49764c 100644 --- a/pandatool/src/lwo/lwoHeader.h +++ b/pandatool/src/lwo/lwoHeader.h @@ -32,7 +32,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: bool _valid; diff --git a/pandatool/src/lwo/lwoLayer.h b/pandatool/src/lwo/lwoLayer.h index 641311a5e6..a959d4890e 100644 --- a/pandatool/src/lwo/lwoLayer.h +++ b/pandatool/src/lwo/lwoLayer.h @@ -36,12 +36,12 @@ public: int _number; int _flags; LPoint3 _pivot; - string _name; + std::string _name; int _parent; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoPoints.h b/pandatool/src/lwo/lwoPoints.h index 5cc44bebca..27f2a36ccb 100644 --- a/pandatool/src/lwo/lwoPoints.h +++ b/pandatool/src/lwo/lwoPoints.h @@ -30,7 +30,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: typedef pvector Points; diff --git a/pandatool/src/lwo/lwoPolygonTags.h b/pandatool/src/lwo/lwoPolygonTags.h index bd93f1d524..8603492cda 100644 --- a/pandatool/src/lwo/lwoPolygonTags.h +++ b/pandatool/src/lwo/lwoPolygonTags.h @@ -32,7 +32,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: typedef pmap TMap; diff --git a/pandatool/src/lwo/lwoPolygons.h b/pandatool/src/lwo/lwoPolygons.h index 69d2d20e8b..d7ad655669 100644 --- a/pandatool/src/lwo/lwoPolygons.h +++ b/pandatool/src/lwo/lwoPolygons.h @@ -56,7 +56,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: typedef pvector< PT(Polygon) > Polygons; diff --git a/pandatool/src/lwo/lwoStillImage.h b/pandatool/src/lwo/lwoStillImage.h index c2dc02e4e2..c800cfb006 100644 --- a/pandatool/src/lwo/lwoStillImage.h +++ b/pandatool/src/lwo/lwoStillImage.h @@ -29,7 +29,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurface.h b/pandatool/src/lwo/lwoSurface.h index 96bb1f13d4..75523f0cd2 100644 --- a/pandatool/src/lwo/lwoSurface.h +++ b/pandatool/src/lwo/lwoSurface.h @@ -24,12 +24,12 @@ */ class LwoSurface : public LwoGroupChunk { public: - string _name; - string _source; + std::string _name; + std::string _source; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual IffChunk *make_new_chunk(IffInputFile *in, IffId id); diff --git a/pandatool/src/lwo/lwoSurfaceBlock.h b/pandatool/src/lwo/lwoSurfaceBlock.h index acd45a1dd9..bfac032aff 100644 --- a/pandatool/src/lwo/lwoSurfaceBlock.h +++ b/pandatool/src/lwo/lwoSurfaceBlock.h @@ -25,7 +25,7 @@ class LwoSurfaceBlock : public LwoGroupChunk { public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual IffChunk *make_new_chunk(IffInputFile *in, IffId id); diff --git a/pandatool/src/lwo/lwoSurfaceBlockAxis.h b/pandatool/src/lwo/lwoSurfaceBlockAxis.h index 81633ed066..4e0920c57d 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockAxis.h +++ b/pandatool/src/lwo/lwoSurfaceBlockAxis.h @@ -34,7 +34,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockChannel.h b/pandatool/src/lwo/lwoSurfaceBlockChannel.h index 0849d185a1..00e35bc28a 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockChannel.h +++ b/pandatool/src/lwo/lwoSurfaceBlockChannel.h @@ -28,7 +28,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockCoordSys.h b/pandatool/src/lwo/lwoSurfaceBlockCoordSys.h index 4c9d777ff3..a9be9419c7 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockCoordSys.h +++ b/pandatool/src/lwo/lwoSurfaceBlockCoordSys.h @@ -33,7 +33,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockEnabled.h b/pandatool/src/lwo/lwoSurfaceBlockEnabled.h index 59c42165e9..a07c6ea31c 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockEnabled.h +++ b/pandatool/src/lwo/lwoSurfaceBlockEnabled.h @@ -28,7 +28,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockHeader.h b/pandatool/src/lwo/lwoSurfaceBlockHeader.h index 4ae37b45a5..6249db26bc 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockHeader.h +++ b/pandatool/src/lwo/lwoSurfaceBlockHeader.h @@ -23,11 +23,11 @@ */ class LwoSurfaceBlockHeader : public LwoGroupChunk { public: - string _ordinal; + std::string _ordinal; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual IffChunk *make_new_chunk(IffInputFile *in, IffId id); diff --git a/pandatool/src/lwo/lwoSurfaceBlockImage.h b/pandatool/src/lwo/lwoSurfaceBlockImage.h index b7710d7561..968f5d3a71 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockImage.h +++ b/pandatool/src/lwo/lwoSurfaceBlockImage.h @@ -28,7 +28,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockOpacity.h b/pandatool/src/lwo/lwoSurfaceBlockOpacity.h index e923eb538b..906c86154b 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockOpacity.h +++ b/pandatool/src/lwo/lwoSurfaceBlockOpacity.h @@ -40,7 +40,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockProjection.h b/pandatool/src/lwo/lwoSurfaceBlockProjection.h index 49c816f156..bcbbff41e0 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockProjection.h +++ b/pandatool/src/lwo/lwoSurfaceBlockProjection.h @@ -37,7 +37,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockRefObj.h b/pandatool/src/lwo/lwoSurfaceBlockRefObj.h index 65b70a958b..77818957a3 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockRefObj.h +++ b/pandatool/src/lwo/lwoSurfaceBlockRefObj.h @@ -24,11 +24,11 @@ */ class LwoSurfaceBlockRefObj : public LwoChunk { public: - string _name; + std::string _name; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockRepeat.h b/pandatool/src/lwo/lwoSurfaceBlockRepeat.h index eb3beb251c..73c77a4537 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockRepeat.h +++ b/pandatool/src/lwo/lwoSurfaceBlockRepeat.h @@ -31,7 +31,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockTMap.h b/pandatool/src/lwo/lwoSurfaceBlockTMap.h index 8da9841f46..273522d50a 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockTMap.h +++ b/pandatool/src/lwo/lwoSurfaceBlockTMap.h @@ -24,7 +24,7 @@ class LwoSurfaceBlockTMap : public LwoGroupChunk { public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; virtual IffChunk *make_new_chunk(IffInputFile *in, IffId id); diff --git a/pandatool/src/lwo/lwoSurfaceBlockTransform.h b/pandatool/src/lwo/lwoSurfaceBlockTransform.h index f8fce53163..e3e07a49b8 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockTransform.h +++ b/pandatool/src/lwo/lwoSurfaceBlockTransform.h @@ -33,7 +33,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockVMapName.h b/pandatool/src/lwo/lwoSurfaceBlockVMapName.h index 30de8f3ad6..1433bfad9e 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockVMapName.h +++ b/pandatool/src/lwo/lwoSurfaceBlockVMapName.h @@ -24,11 +24,11 @@ */ class LwoSurfaceBlockVMapName : public LwoChunk { public: - string _name; + std::string _name; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceBlockWrap.h b/pandatool/src/lwo/lwoSurfaceBlockWrap.h index b046657242..bf18e92da1 100644 --- a/pandatool/src/lwo/lwoSurfaceBlockWrap.h +++ b/pandatool/src/lwo/lwoSurfaceBlockWrap.h @@ -33,7 +33,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceColor.h b/pandatool/src/lwo/lwoSurfaceColor.h index 77d0740665..584d1e7892 100644 --- a/pandatool/src/lwo/lwoSurfaceColor.h +++ b/pandatool/src/lwo/lwoSurfaceColor.h @@ -30,7 +30,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceParameter.h b/pandatool/src/lwo/lwoSurfaceParameter.h index 70a6188f40..075383b370 100644 --- a/pandatool/src/lwo/lwoSurfaceParameter.h +++ b/pandatool/src/lwo/lwoSurfaceParameter.h @@ -30,7 +30,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceSidedness.h b/pandatool/src/lwo/lwoSurfaceSidedness.h index cb8c75ebb2..f64ef112e0 100644 --- a/pandatool/src/lwo/lwoSurfaceSidedness.h +++ b/pandatool/src/lwo/lwoSurfaceSidedness.h @@ -33,7 +33,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoSurfaceSmoothingAngle.h b/pandatool/src/lwo/lwoSurfaceSmoothingAngle.h index 97600b80aa..c27b9a3080 100644 --- a/pandatool/src/lwo/lwoSurfaceSmoothingAngle.h +++ b/pandatool/src/lwo/lwoSurfaceSmoothingAngle.h @@ -28,7 +28,7 @@ public: public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; public: virtual TypeHandle get_type() const { diff --git a/pandatool/src/lwo/lwoTags.h b/pandatool/src/lwo/lwoTags.h index 5812965be6..03ac6ede30 100644 --- a/pandatool/src/lwo/lwoTags.h +++ b/pandatool/src/lwo/lwoTags.h @@ -31,11 +31,11 @@ class LwoTags : public LwoChunk { public: int get_num_tags() const; - string get_tag(int n) const; + std::string get_tag(int n) const; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: typedef vector_string Tags; diff --git a/pandatool/src/lwo/lwoVertexMap.h b/pandatool/src/lwo/lwoVertexMap.h index abbcc0f3cc..e2b059063d 100644 --- a/pandatool/src/lwo/lwoVertexMap.h +++ b/pandatool/src/lwo/lwoVertexMap.h @@ -31,11 +31,11 @@ public: IffId _map_type; int _dimension; - string _name; + std::string _name; public: virtual bool read_iff(IffInputFile *in, size_t stop_at); - virtual void write(ostream &out, int indent_level = 0) const; + virtual void write(std::ostream &out, int indent_level = 0) const; private: typedef pmap VMap; diff --git a/pandatool/src/lwoegg/cLwoPoints.h b/pandatool/src/lwoegg/cLwoPoints.h index b235c3de31..a4dbf642ac 100644 --- a/pandatool/src/lwoegg/cLwoPoints.h +++ b/pandatool/src/lwoegg/cLwoPoints.h @@ -36,7 +36,7 @@ public: CLwoLayer *layer); void add_vmap(const LwoVertexMap *lwo_vmap); - bool get_uv(const string &uv_name, int n, LPoint2 &uv) const; + bool get_uv(const std::string &uv_name, int n, LPoint2 &uv) const; void make_egg(); void connect_egg(); @@ -48,7 +48,7 @@ public: // A number of vertex maps of different types may be associated, but we only // care about some of the types here. - typedef pmap VMap; + typedef pmap VMap; VMap _txuv; VMap _pick; }; diff --git a/pandatool/src/lwoegg/cLwoPolygons.h b/pandatool/src/lwoegg/cLwoPolygons.h index a11dc0987a..d5c4b4afda 100644 --- a/pandatool/src/lwoegg/cLwoPolygons.h +++ b/pandatool/src/lwoegg/cLwoPolygons.h @@ -43,7 +43,7 @@ public: void add_vmad(const LwoDiscontinuousVertexMap *lwo_vmad); CLwoSurface *get_surface(int polygon_index) const; - bool get_uv(const string &uv_name, int pi, int vi, LPoint2 &uv) const; + bool get_uv(const std::string &uv_name, int pi, int vi, LPoint2 &uv) const; void make_egg(); void connect_egg(); @@ -61,7 +61,7 @@ public: // There might be named maps associated with the polygons to bring a per- // polygon mapping to the UV's. - typedef pmap VMad; + typedef pmap VMad; VMad _txuv; private: diff --git a/pandatool/src/lwoegg/cLwoSurface.I b/pandatool/src/lwoegg/cLwoSurface.I index 49c6eaf6bc..8c39871a08 100644 --- a/pandatool/src/lwoegg/cLwoSurface.I +++ b/pandatool/src/lwoegg/cLwoSurface.I @@ -15,7 +15,7 @@ * Returns the name of the surface. Each surface in a given Lightwave file * should have a unique name. */ -INLINE const string &CLwoSurface:: +INLINE const std::string &CLwoSurface:: get_name() const { return _surface->_name; } @@ -36,7 +36,7 @@ has_named_uvs() const { * Returns the name of the set of UV's that are associated with this surface, * if has_named_uvs() is true. */ -INLINE const string &CLwoSurface:: +INLINE const std::string &CLwoSurface:: get_uv_name() const { return _block->_uv_name; } diff --git a/pandatool/src/lwoegg/cLwoSurface.h b/pandatool/src/lwoegg/cLwoSurface.h index 09b3762656..ec098f182f 100644 --- a/pandatool/src/lwoegg/cLwoSurface.h +++ b/pandatool/src/lwoegg/cLwoSurface.h @@ -41,7 +41,7 @@ public: CLwoSurface(LwoToEggConverter *converter, const LwoSurface *surface); ~CLwoSurface(); - INLINE const string &get_name() const; + INLINE const std::string &get_name() const; void apply_properties(EggPrimitive *egg_prim, vector_PT_EggVertex &egg_vertices, @@ -50,7 +50,7 @@ public: bool check_material(); INLINE bool has_named_uvs() const; - INLINE const string &get_uv_name() const; + INLINE const std::string &get_uv_name() const; enum Flags { diff --git a/pandatool/src/lwoegg/cLwoSurfaceBlock.h b/pandatool/src/lwoegg/cLwoSurfaceBlock.h index d62f73684d..cf86126f26 100644 --- a/pandatool/src/lwoegg/cLwoSurfaceBlock.h +++ b/pandatool/src/lwoegg/cLwoSurfaceBlock.h @@ -38,7 +38,7 @@ public: IffId _block_type; IffId _channel_id; - string _ordinal; + std::string _ordinal; bool _enabled; LwoSurfaceBlockOpacity::Type _opacity_type; @@ -54,7 +54,7 @@ public: LwoSurfaceBlockWrap::Mode _h_wrap; PN_stdfloat _w_repeat; PN_stdfloat _h_repeat; - string _uv_name; + std::string _uv_name; LwoToEggConverter *_converter; CPT(LwoSurfaceBlock) _block; diff --git a/pandatool/src/lwoegg/cLwoSurfaceBlockTMap.h b/pandatool/src/lwoegg/cLwoSurfaceBlockTMap.h index 4fde4938ca..075ed4182e 100644 --- a/pandatool/src/lwoegg/cLwoSurfaceBlockTMap.h +++ b/pandatool/src/lwoegg/cLwoSurfaceBlockTMap.h @@ -37,7 +37,7 @@ public: LVecBase3 _size; LVecBase3 _rotation; - string _reference_object; + std::string _reference_object; LwoSurfaceBlockCoordSys::Type _csys; diff --git a/pandatool/src/lwoegg/lwoToEggConverter.h b/pandatool/src/lwoegg/lwoToEggConverter.h index bd4a5a2e41..c4380a21f7 100644 --- a/pandatool/src/lwoegg/lwoToEggConverter.h +++ b/pandatool/src/lwoegg/lwoToEggConverter.h @@ -43,8 +43,8 @@ public: virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool convert_file(const Filename &filename); bool convert_lwo(const LwoHeader *lwo_header); @@ -53,7 +53,7 @@ public: CLwoLayer *get_layer(int number) const; CLwoClip *get_clip(int number) const; - CLwoSurface *get_surface(const string &name) const; + CLwoSurface *get_surface(const std::string &name) const; bool _make_materials; @@ -83,7 +83,7 @@ private: typedef pvector Polygons; Polygons _polygons; - typedef pmap Surfaces; + typedef pmap Surfaces; Surfaces _surfaces; }; diff --git a/pandatool/src/maxegg/maxToEggConverter.h b/pandatool/src/maxegg/maxToEggConverter.h index fc2ed1843f..86cb2303c1 100644 --- a/pandatool/src/maxegg/maxToEggConverter.h +++ b/pandatool/src/maxegg/maxToEggConverter.h @@ -56,7 +56,7 @@ class MaxToEggConverter { MaxEggOptions *_options; int _current_frame; PT(EggData) _egg_data; - string _program_name; + std::string _program_name; MaxNodeTree _tree; int _cur_tref; EggTextureCollection _textures; diff --git a/pandatool/src/maya/mayaApi.h b/pandatool/src/maya/mayaApi.h index 590f7b4817..02cc421955 100644 --- a/pandatool/src/maya/mayaApi.h +++ b/pandatool/src/maya/mayaApi.h @@ -29,14 +29,14 @@ class Filename; */ class MayaApi : public ReferenceCount { protected: - MayaApi(const string &program_name, bool view_license = false, bool revertdir = true); + MayaApi(const std::string &program_name, bool view_license = false, bool revertdir = true); MayaApi(const MayaApi ©); void operator = (const MayaApi ©); public: ~MayaApi(); - static PT(MayaApi) open_api(string program_name = "", bool view_license = false, bool revertdir = true); + static PT(MayaApi) open_api(std::string program_name = "", bool view_license = false, bool revertdir = true); bool is_valid() const; bool read(const Filename &filename); diff --git a/pandatool/src/maya/mayaShader.h b/pandatool/src/maya/mayaShader.h index b998588122..41c9bdf77f 100644 --- a/pandatool/src/maya/mayaShader.h +++ b/pandatool/src/maya/mayaShader.h @@ -33,8 +33,8 @@ public: MayaShader(MObject engine, bool legacy_shader); ~MayaShader(); - void output(ostream &out) const; - void write(ostream &out) const; + void output(std::ostream &out) const; + void write(std::ostream &out) const; private: bool find_textures_modern(MObject shader); @@ -64,7 +64,7 @@ private: bool try_pair(MayaShaderColorDef *map1, MayaShaderColorDef *map2, bool perfect); - string get_file_prefix(const string &fn); + std::string get_file_prefix(const std::string &fn); bool _legacy_shader; public: // relevant only to legacy mode. MayaShaderColorList _color; @@ -73,7 +73,7 @@ public: // relevant only to legacy mode. MayaShaderColorDef *get_color_def(size_t idx=0) const; }; -INLINE ostream &operator << (ostream &out, const MayaShader &shader) { +INLINE std::ostream &operator << (std::ostream &out, const MayaShader &shader) { shader.output(out); return out; } diff --git a/pandatool/src/maya/mayaShaderColorDef.h b/pandatool/src/maya/mayaShaderColorDef.h index 522146fc53..ca2d532f13 100644 --- a/pandatool/src/maya/mayaShaderColorDef.h +++ b/pandatool/src/maya/mayaShaderColorDef.h @@ -26,7 +26,7 @@ class MPlug; class MayaShader; class MayaShaderColorDef; typedef pvector MayaShaderColorList; -typedef pmap MayaFileToUVSetMap; +typedef pmap MayaFileToUVSetMap; /** * This defines the various attributes that Maya may associate with the @@ -39,14 +39,14 @@ public: MayaShaderColorDef (MayaShaderColorDef&); ~MayaShaderColorDef(); - string strip_prefix(string full_name); + std::string strip_prefix(std::string full_name); LMatrix3d compute_texture_matrix() const; bool has_projection() const; LTexCoordd project_uv(const LPoint3d &pos, const LPoint3d &ref_point) const; bool reset_maya_texture(const Filename &texture); - void write(ostream &out) const; + void write(std::ostream &out) const; enum BlendType { BT_unspecified, @@ -85,7 +85,7 @@ public: double _v_angle; Filename _texture_filename; - string _texture_name; + std::string _texture_name; LColor _color_gain; LVector2 _coverage; @@ -103,19 +103,19 @@ public: bool _is_alpha; - string _uvset_name; + std::string _uvset_name; MayaShaderColorDef *_opposite; - string get_panda_uvset_name(); + std::string get_panda_uvset_name(); private: MObject *_color_object; private: - static void find_textures_modern(const string &shadername, MayaShaderColorList &list, MPlug inplug, bool is_alpha); + static void find_textures_modern(const std::string &shadername, MayaShaderColorList &list, MPlug inplug, bool is_alpha); void find_textures_legacy(MayaShader *shader, MObject color, bool trans=false); - void set_projection_type(const string &type); + void set_projection_type(const std::string &type); LPoint2d map_planar(const LPoint3d &pos, const LPoint3d ¢roid) const; LPoint2d map_spherical(const LPoint3d &pos, const LPoint3d ¢roid) const; diff --git a/pandatool/src/maya/mayaShaders.h b/pandatool/src/maya/mayaShaders.h index 7c92ae4416..f1c107a755 100644 --- a/pandatool/src/maya/mayaShaders.h +++ b/pandatool/src/maya/mayaShaders.h @@ -37,13 +37,13 @@ public: MayaShader *get_shader(int n) const; MayaFileToUVSetMap _file_to_uvset; - pvector _uvset_names; + pvector _uvset_names; void clear(); void bind_uvsets(MObject mesh); - string find_uv_link(const string &match); + std::string find_uv_link(const std::string &match); private: - typedef pmap Shaders; + typedef pmap Shaders; Shaders _shaders; typedef pvector ShadersInOrder; ShadersInOrder _shaders_in_order; diff --git a/pandatool/src/maya/maya_funcs.I b/pandatool/src/maya/maya_funcs.I index 422b525751..1a56126c44 100644 --- a/pandatool/src/maya/maya_funcs.I +++ b/pandatool/src/maya/maya_funcs.I @@ -14,13 +14,13 @@ /** * */ -INLINE ostream &operator << (ostream &out, const MString &str) { +INLINE std::ostream &operator << (std::ostream &out, const MString &str) { return out << str.asChar(); } /** * */ -INLINE ostream &operator << (ostream &out, const MVector &vec) { +INLINE std::ostream &operator << (std::ostream &out, const MVector &vec) { return out << vec.x << " " << vec.y << " " << vec.z; } diff --git a/pandatool/src/maya/maya_funcs.h b/pandatool/src/maya/maya_funcs.h index 7b2ef5df13..2966fef9e3 100644 --- a/pandatool/src/maya/maya_funcs.h +++ b/pandatool/src/maya/maya_funcs.h @@ -31,77 +31,77 @@ class MObject; bool -get_maya_plug(MObject &node, const string &attribute_name, MPlug &plug); +get_maya_plug(MObject &node, const std::string &attribute_name, MPlug &plug); bool -is_connected(MObject &node, const string &attribute_name); +is_connected(MObject &node, const std::string &attribute_name); template bool -get_maya_attribute(MObject &node, const string &attribute_name, +get_maya_attribute(MObject &node, const std::string &attribute_name, ValueType &value); template bool -set_maya_attribute(MObject &node, const string &attribute_name, +set_maya_attribute(MObject &node, const std::string &attribute_name, ValueType &value); bool -has_attribute(MObject &node, const string &attribute_name); +has_attribute(MObject &node, const std::string &attribute_name); bool -remove_attribute(MObject &node, const string &attribute_name); +remove_attribute(MObject &node, const std::string &attribute_name); bool -get_bool_attribute(MObject &node, const string &attribute_name, +get_bool_attribute(MObject &node, const std::string &attribute_name, bool &value); bool -get_angle_attribute(MObject &node, const string &attribute_name, +get_angle_attribute(MObject &node, const std::string &attribute_name, double &value); bool -get_vec2_attribute(MObject &node, const string &attribute_name, +get_vec2_attribute(MObject &node, const std::string &attribute_name, LVecBase2 &value); bool -get_vec3_attribute(MObject &node, const string &attribute_name, +get_vec3_attribute(MObject &node, const std::string &attribute_name, LVecBase3 &value); bool -get_vec2d_attribute(MObject &node, const string &attribute_name, +get_vec2d_attribute(MObject &node, const std::string &attribute_name, LVecBase2d &value); bool -get_vec3d_attribute(MObject &node, const string &attribute_name, +get_vec3d_attribute(MObject &node, const std::string &attribute_name, LVecBase3d &value); bool -get_mat4d_attribute(MObject &node, const string &attribute_name, +get_mat4d_attribute(MObject &node, const std::string &attribute_name, LMatrix4d &value); void -get_tag_attribute_names(MObject &node, pvector &tag_names); +get_tag_attribute_names(MObject &node, pvector &tag_names); bool -get_enum_attribute(MObject &node, const string &attribute_name, - string &value); +get_enum_attribute(MObject &node, const std::string &attribute_name, + std::string &value); bool -get_string_attribute(MObject &node, const string &attribute_name, - string &value); +get_string_attribute(MObject &node, const std::string &attribute_name, + std::string &value); bool -set_string_attribute(MObject &node, const string &attribute_name, - const string &value); +set_string_attribute(MObject &node, const std::string &attribute_name, + const std::string &value); void -describe_maya_attribute(MObject &node, const string &attribute_name); +describe_maya_attribute(MObject &node, const std::string &attribute_name); bool describe_compound_attribute(MObject &node); -string +std::string string_mfndata_type(MFnData::Type type); void @@ -110,8 +110,8 @@ list_maya_attributes(MObject &node); // Also, we must define some output functions for Maya objects, since we can't // use those built into Maya (which forward-defines the ostream type // incorrectly). -INLINE ostream &operator << (ostream &out, const MString &str); -INLINE ostream &operator << (ostream &out, const MVector &vec); +INLINE std::ostream &operator << (std::ostream &out, const MString &str); +INLINE std::ostream &operator << (std::ostream &out, const MVector &vec); #include "maya_funcs.I" #include "maya_funcs.T" diff --git a/pandatool/src/mayaegg/mayaNodeDesc.h b/pandatool/src/mayaegg/mayaNodeDesc.h index bfae4300ce..f4123ee9a2 100644 --- a/pandatool/src/mayaegg/mayaNodeDesc.h +++ b/pandatool/src/mayaegg/mayaNodeDesc.h @@ -40,7 +40,7 @@ class EggXfmSAnim; class MayaNodeDesc : public ReferenceCount, public Namable { public: MayaNodeDesc(MayaNodeTree *tree, - MayaNodeDesc *parent = nullptr, const string &name = string()); + MayaNodeDesc *parent = nullptr, const std::string &name = std::string()); ~MayaNodeDesc(); void from_dag_path(const MDagPath &dag_path, MayaToEggConverter *converter); @@ -55,7 +55,7 @@ public: bool is_tagged() const; bool is_joint_tagged() const; - bool has_object_type(string object_type) const; + bool has_object_type(std::string object_type) const; MayaNodeTree *_tree; MayaNodeDesc *_parent; @@ -74,7 +74,7 @@ private: void mark_joint_parent(); void check_pseudo_joints(bool joint_above); void check_blend_shapes(const MFnDagNode &node, - const string &attrib_name); + const std::string &attrib_name); void check_lods(); MDagPath *_dag_path; diff --git a/pandatool/src/mayaegg/mayaNodeTree.h b/pandatool/src/mayaegg/mayaNodeTree.h index febb794f23..e355c45ff3 100644 --- a/pandatool/src/mayaegg/mayaNodeTree.h +++ b/pandatool/src/mayaegg/mayaNodeTree.h @@ -60,8 +60,8 @@ public: EggXfmSAnim *get_egg_anim(MayaNodeDesc *node_desc); EggSAnimData *get_egg_slider(MayaBlendDesc *blend_desc); - bool ignore_slider(const string &name) const; - void report_ignored_slider(const string &name); + bool ignore_slider(const std::string &name) const; + void report_ignored_slider(const std::string &name); MayaBlendDesc *add_blend_desc(MayaBlendDesc *blend_desc); int get_num_blend_descs() const; @@ -70,12 +70,12 @@ public: void reset_sliders(); public: - string _subroot_parent_name; + std::string _subroot_parent_name; PT(MayaNodeDesc) _root; PN_stdfloat _fps; private: - MayaNodeDesc *r_build_node(const string &path); + MayaNodeDesc *r_build_node(const std::string &path); MayaToEggConverter *_converter; @@ -84,7 +84,7 @@ private: EggGroupNode *_skeleton_node; EggGroupNode *_morph_node; - typedef pmap NodesByPath; + typedef pmap NodesByPath; NodesByPath _nodes_by_path; typedef pvector Nodes; @@ -93,7 +93,7 @@ private: typedef ov_set > BlendDescs; BlendDescs _blend_descs; - typedef pset Strings; + typedef pset Strings; Strings _ignored_slider_names; }; diff --git a/pandatool/src/mayaegg/mayaToEggConverter.h b/pandatool/src/mayaegg/mayaToEggConverter.h index ff9d75e7b9..3e3782a601 100644 --- a/pandatool/src/mayaegg/mayaToEggConverter.h +++ b/pandatool/src/mayaegg/mayaToEggConverter.h @@ -60,15 +60,15 @@ class MFloatArray; */ class MayaToEggConverter : public SomethingToEggConverter { public: - MayaToEggConverter(const string &program_name = ""); + MayaToEggConverter(const std::string &program_name = ""); MayaToEggConverter(const MayaToEggConverter ©); virtual ~MayaToEggConverter(); virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; - virtual string get_additional_extensions() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; + virtual std::string get_additional_extensions() const; virtual bool convert_file(const Filename &filename); virtual DistanceUnit get_input_units(); @@ -84,11 +84,11 @@ public: void clear_ignore_sliders(); void add_ignore_slider(const GlobPattern &glob); - bool ignore_slider(const string &name) const; + bool ignore_slider(const std::string &name) const; void clear_force_joints(); void add_force_joint(const GlobPattern &glob); - bool force_joint(const string &name) const; + bool force_joint(const std::string &name) const; void set_from_selection(bool from_selection); @@ -123,7 +123,7 @@ private: MFnNurbsSurface &surface, EggGroup *group); EggNurbsCurve *make_trim_curve(const MFnNurbsCurve &curve, - const string &nurbs_name, + const std::string &nurbs_name, EggGroupNode *egg_group, int trim_curve_index); void make_nurbs_curve(const MDagPath &dag_path, @@ -167,10 +167,10 @@ private: int round(double value); - string _program_name; + std::string _program_name; bool _from_selection; - string _subroot; + std::string _subroot; typedef pvector Globs; Globs _subsets; Globs _subroots; @@ -205,7 +205,7 @@ public: }; TransformType _transform_type; - static TransformType string_transform_type(const string &arg); + static TransformType string_transform_type(const std::string &arg); }; diff --git a/pandatool/src/mayaprogs/mayaCopy.h b/pandatool/src/mayaprogs/mayaCopy.h index e48c2f9204..90ceddfbc0 100644 --- a/pandatool/src/mayaprogs/mayaCopy.h +++ b/pandatool/src/mayaprogs/mayaCopy.h @@ -41,7 +41,7 @@ protected: CVSSourceDirectory *dir, void *extra_data, bool new_file); - virtual string filter_filename(const string &source); + virtual std::string filter_filename(const std::string &source); private: enum FileType { diff --git a/pandatool/src/mayaprogs/mayaToEgg.h b/pandatool/src/mayaprogs/mayaToEgg.h index 4b3661a104..a6ec0453f2 100644 --- a/pandatool/src/mayaprogs/mayaToEgg.h +++ b/pandatool/src/mayaprogs/mayaToEgg.h @@ -28,7 +28,7 @@ public: void run(); protected: - static bool dispatch_transform_type(const string &opt, const string &arg, void *var); + static bool dispatch_transform_type(const std::string &opt, const std::string &arg, void *var); int _verbose; bool _polygon_output; diff --git a/pandatool/src/mayaprogs/mayaToEgg_server.h b/pandatool/src/mayaprogs/mayaToEgg_server.h index 3eaf739ada..ba014f4846 100644 --- a/pandatool/src/mayaprogs/mayaToEgg_server.h +++ b/pandatool/src/mayaprogs/mayaToEgg_server.h @@ -43,7 +43,7 @@ public: protected: - static bool dispatch_transform_type(const string &opt, const string &arg, void *var); + static bool dispatch_transform_type(const std::string &opt, const std::string &arg, void *var); typedef pset< PT(Connection) > Clients; Clients _clients; diff --git a/pandatool/src/miscprogs/binToC.h b/pandatool/src/miscprogs/binToC.h index 39eff76766..f1ba6599b2 100644 --- a/pandatool/src/miscprogs/binToC.h +++ b/pandatool/src/miscprogs/binToC.h @@ -34,7 +34,7 @@ protected: virtual bool handle_args(Args &args); Filename _input_filename; - string _table_name; + std::string _table_name; bool _static_table; bool _for_string; }; diff --git a/pandatool/src/objegg/eggToObjConverter.h b/pandatool/src/objegg/eggToObjConverter.h index df54648a72..51f940d56c 100644 --- a/pandatool/src/objegg/eggToObjConverter.h +++ b/pandatool/src/objegg/eggToObjConverter.h @@ -31,8 +31,8 @@ public: virtual EggToSomethingConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool write_file(const Filename &filename); @@ -53,9 +53,9 @@ private: bool process(const Filename &filename); void collect_vertices(EggNode *egg_node); - void write_faces(ostream &out, EggNode *egg_node); - void write_group_reference(ostream &out, EggNode *egg_node); - void get_group_name(string &group_name, EggGroupNode *egg_group); + void write_faces(std::ostream &out, EggNode *egg_node); + void write_group_reference(std::ostream &out, EggNode *egg_node); + void get_group_name(std::string &group_name, EggGroupNode *egg_group); void record_vertex(EggVertex *vertex); int record_unique(UniqueVertices &unique, const LVecBase4d &vec); @@ -63,7 +63,7 @@ private: int record_unique(UniqueVertices &unique, const LVecBase2d &vec); int record_unique(UniqueVertices &unique, double pos); - void write_vertices(ostream &out, const string &prefix, int num_components, + void write_vertices(std::ostream &out, const std::string &prefix, int num_components, const UniqueVertices &unique); private: diff --git a/pandatool/src/objegg/objToEggConverter.h b/pandatool/src/objegg/objToEggConverter.h index 062f08c6cd..528dab8e7a 100644 --- a/pandatool/src/objegg/objToEggConverter.h +++ b/pandatool/src/objegg/objToEggConverter.h @@ -38,8 +38,8 @@ public: virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool supports_convert_to_node(const LoaderOptions &options) const; @@ -48,8 +48,8 @@ public: protected: bool process(const Filename &filename); - bool process_line(const string &line); - bool process_ref_plane_res(const string &line); + bool process_line(const std::string &line); + bool process_ref_plane_res(const std::string &line); bool process_v(vector_string &words); bool process_vt(vector_string &words); @@ -59,11 +59,11 @@ protected: bool process_f(vector_string &words); bool process_g(vector_string &words); - EggVertex *get_face_vertex(const string &face_reference); + EggVertex *get_face_vertex(const std::string &face_reference); void generate_egg_points(); bool process_node(const Filename &filename); - bool process_line_node(const string &line); + bool process_line_node(const std::string &line); bool process_f_node(vector_string &words); bool process_g_node(vector_string &words); @@ -88,7 +88,7 @@ protected: bool _v4_given, _vt3_given; bool _f_given; - pset _ignored_tags; + pset _ignored_tags; // Structures filled when creating an egg file. PT(EggVertexPool) _vpool; @@ -101,7 +101,7 @@ protected: class VertexEntry { public: VertexEntry(); - VertexEntry(const ObjToEggConverter *converter, const string &obj_vertex); + VertexEntry(const ObjToEggConverter *converter, const std::string &obj_vertex); INLINE bool operator < (const VertexEntry &other) const; INLINE bool operator == (const VertexEntry &other) const; @@ -119,7 +119,7 @@ protected: class VertexData { public: - VertexData(PandaNode *parent, const string &name); + VertexData(PandaNode *parent, const std::string &name); int add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry); void add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, @@ -128,7 +128,7 @@ protected: void close_geom(const ObjToEggConverter *converter); PT(PandaNode) _parent; - string _name; + std::string _name; PT(GeomNode) _geom_node; PT(GeomPrimitive) _prim; diff --git a/pandatool/src/palettizer/destTextureImage.h b/pandatool/src/palettizer/destTextureImage.h index 0916661c6c..31075b8f99 100644 --- a/pandatool/src/palettizer/destTextureImage.h +++ b/pandatool/src/palettizer/destTextureImage.h @@ -65,8 +65,8 @@ private: static TypeHandle _type_handle; }; -INLINE ostream & -operator << (ostream &out, const DestTextureImage &dest) { +INLINE std::ostream & +operator << (std::ostream &out, const DestTextureImage &dest) { dest.output_filename(out); return out; } diff --git a/pandatool/src/palettizer/eggFile.h b/pandatool/src/palettizer/eggFile.h index 696ec833e6..cc3887242e 100644 --- a/pandatool/src/palettizer/eggFile.h +++ b/pandatool/src/palettizer/eggFile.h @@ -40,7 +40,7 @@ public: bool from_command_line(EggData *data, const Filename &source_filename, const Filename &dest_filename, - const string &egg_comment); + const std::string &egg_comment); const Filename &get_source_filename() const; @@ -73,8 +73,8 @@ public: void release_egg_data(); bool write_egg(); - void write_description(ostream &out, int indent_level = 0) const; - void write_texture_refs(ostream &out, int indent_level = 0) const; + void write_description(std::ostream &out, int indent_level = 0) const; + void write_texture_refs(std::ostream &out, int indent_level = 0) const; private: void remove_backstage(EggGroupNode *node); @@ -85,7 +85,7 @@ private: Filename _current_directory; Filename _source_filename; Filename _dest_filename; - string _egg_comment; + std::string _egg_comment; typedef pvector Textures; Textures _textures; diff --git a/pandatool/src/palettizer/filenameUnifier.h b/pandatool/src/palettizer/filenameUnifier.h index b5646f5628..0f701b3ce5 100644 --- a/pandatool/src/palettizer/filenameUnifier.h +++ b/pandatool/src/palettizer/filenameUnifier.h @@ -44,7 +44,7 @@ private: static Filename _txa_dir; static Filename _rel_dirname; - typedef pmap CanonicalFilenames; + typedef pmap CanonicalFilenames; static CanonicalFilenames _canonical_filenames; }; diff --git a/pandatool/src/palettizer/imageFile.h b/pandatool/src/palettizer/imageFile.h index 80de6266f3..c4d8ed9014 100644 --- a/pandatool/src/palettizer/imageFile.h +++ b/pandatool/src/palettizer/imageFile.h @@ -34,7 +34,7 @@ class ImageFile : public TypedWritable { public: ImageFile(); - bool make_shadow_image(const string &basename); + bool make_shadow_image(const std::string &basename); bool is_size_known() const; int get_x_size() const; @@ -46,8 +46,8 @@ public: void clear_basic_properties(); void update_properties(const TextureProperties &properties); - bool set_filename(PaletteGroup *group, const string &basename); - bool set_filename(const string &dirname, const string &basename); + bool set_filename(PaletteGroup *group, const std::string &basename); + bool set_filename(const std::string &dirname, const std::string &basename); const Filename &get_filename() const; const Filename &get_alpha_filename() const; int get_alpha_file_channel() const; @@ -59,7 +59,7 @@ public: void update_egg_tex(EggTexture *egg_tex) const; - void output_filename(ostream &out) const; + void output_filename(std::ostream &out) const; protected: TextureProperties _properties; diff --git a/pandatool/src/palettizer/omitReason.h b/pandatool/src/palettizer/omitReason.h index db2a7bb03f..c60a86f364 100644 --- a/pandatool/src/palettizer/omitReason.h +++ b/pandatool/src/palettizer/omitReason.h @@ -52,6 +52,6 @@ enum OmitReason { // The texture is omitted because _omit_everything is set true. }; -ostream &operator << (ostream &out, OmitReason omit); +std::ostream &operator << (std::ostream &out, OmitReason omit); #endif diff --git a/pandatool/src/palettizer/pal_string_utils.h b/pandatool/src/palettizer/pal_string_utils.h index 6eed342977..4f37b33063 100644 --- a/pandatool/src/palettizer/pal_string_utils.h +++ b/pandatool/src/palettizer/pal_string_utils.h @@ -19,9 +19,9 @@ class PNMFileType; -void extract_param_value(const string &str, string ¶m, string &value); +void extract_param_value(const std::string &str, std::string ¶m, std::string &value); -bool parse_image_type_request(const string &word, PNMFileType *&color_type, +bool parse_image_type_request(const std::string &word, PNMFileType *&color_type, PNMFileType *&alpha_type); #endif diff --git a/pandatool/src/palettizer/paletteGroup.h b/pandatool/src/palettizer/paletteGroup.h index 615663b571..54eaa08fc0 100644 --- a/pandatool/src/palettizer/paletteGroup.h +++ b/pandatool/src/palettizer/paletteGroup.h @@ -44,9 +44,9 @@ class PaletteGroup : public TypedWritable, public Namable { public: PaletteGroup(); - void set_dirname(const string &dirname); + void set_dirname(const std::string &dirname); bool has_dirname() const; - const string &get_dirname() const; + const std::string &get_dirname() const; void clear_depends(); void group_with(PaletteGroup *other); @@ -80,17 +80,17 @@ public: void place_all(); void update_unknown_textures(const TxaFile &txa_file); - void write_image_info(ostream &out, int indent_level = 0) const; + void write_image_info(std::ostream &out, int indent_level = 0) const; void optimal_resize(); void reset_images(); void setup_shadow_images(); void update_images(bool redo_all); - void add_texture_swap_info(const string sourceTextureName, const vector_string &swapTextures); + void add_texture_swap_info(const std::string sourceTextureName, const vector_string &swapTextures); bool is_none_texture_swap() const; private: - string _dirname; + std::string _dirname; int _egg_count; PaletteGroups _dependent; int _dependency_level; @@ -103,7 +103,7 @@ private: typedef pmap Pages; Pages _pages; - typedef pmap TextureSwapInfo; + typedef pmap TextureSwapInfo; TextureSwapInfo _textureSwapInfo; // The TypedWritable interface follows. diff --git a/pandatool/src/palettizer/paletteGroups.h b/pandatool/src/palettizer/paletteGroups.h index 2be2eb4602..9a2cdd2b52 100644 --- a/pandatool/src/palettizer/paletteGroups.h +++ b/pandatool/src/palettizer/paletteGroups.h @@ -60,8 +60,8 @@ public: iterator begin() const; iterator end() const; - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: void r_make_complete(Groups &result, PaletteGroup *group); @@ -103,7 +103,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const PaletteGroups &groups) { +INLINE std::ostream &operator << (std::ostream &out, const PaletteGroups &groups) { groups.output(out); return out; } diff --git a/pandatool/src/palettizer/paletteImage.h b/pandatool/src/palettizer/paletteImage.h index 314942e8ab..60395fdc39 100644 --- a/pandatool/src/palettizer/paletteImage.h +++ b/pandatool/src/palettizer/paletteImage.h @@ -51,7 +51,7 @@ public: bool resize_image(int x_size, int y_size); void resize_swapped_image(int x_size, int y_size); - void write_placements(ostream &out, int indent_level = 0) const; + void write_placements(std::ostream &out, int indent_level = 0) const; void reset_image(); void setup_shadow_image(); void update_image(bool redo_all); @@ -96,7 +96,7 @@ private: PalettePage *_page; int _index; - string _basename; + std::string _basename; bool _new_image; bool _got_image; diff --git a/pandatool/src/palettizer/palettePage.h b/pandatool/src/palettizer/palettePage.h index 35a17841dd..91ba875219 100644 --- a/pandatool/src/palettizer/palettePage.h +++ b/pandatool/src/palettizer/palettePage.h @@ -45,7 +45,7 @@ public: void place(TexturePlacement *placement); void unplace(TexturePlacement *placement); - void write_image_info(ostream &out, int indent_level = 0) const; + void write_image_info(std::ostream &out, int indent_level = 0) const; void optimal_resize(); void reset_images(); void setup_shadow_images(); diff --git a/pandatool/src/palettizer/palettizer.h b/pandatool/src/palettizer/palettizer.h index ad8c389df8..523968e952 100644 --- a/pandatool/src/palettizer/palettizer.h +++ b/pandatool/src/palettizer/palettizer.h @@ -47,7 +47,7 @@ public: void report_pi() const; void report_statistics() const; - void read_txa_file(istream &txa_file, const string &txa_filename); + void read_txa_file(std::istream &txa_file, const std::string &txa_filename); void all_params_set(); void process_command_line_eggs(bool force_texture_read, const Filename &state_filename); void process_all(bool force_texture_read, const Filename &state_filename); @@ -57,15 +57,15 @@ public: bool read_stale_eggs(bool redo_all); bool write_eggs(); - EggFile *get_egg_file(const string &name); - bool remove_egg_file(const string &name); + EggFile *get_egg_file(const std::string &name); + bool remove_egg_file(const std::string &name); void add_command_line_egg(EggFile *egg_file); - PaletteGroup *get_palette_group(const string &name); - PaletteGroup *test_palette_group(const string &name) const; + PaletteGroup *get_palette_group(const std::string &name); + PaletteGroup *test_palette_group(const std::string &name) const; PaletteGroup *get_default_group(); - TextureImage *get_texture(const string &name); + TextureImage *get_texture(const std::string &name); private: static const char *yesno(bool flag); @@ -82,22 +82,22 @@ public: RU_invalid }; - static RemapUV string_remap(const string &str); + static RemapUV string_remap(const std::string &str); bool _is_valid; // These values are not stored in the textures.boo file, but are specific to // each session. TxaFile _txa_file; - string _default_groupname; - string _default_groupdir; + std::string _default_groupname; + std::string _default_groupdir; bool _noabs; // The following parameter values specifically relate to textures and // palettes. These values are stored in the textures.boo file for future // reference. - string _generated_image_pattern; - string _map_dirname; + std::string _generated_image_pattern; + std::string _map_dirname; Filename _shadow_dirname; Filename _rel_dirname; int _pal_x_size, _pal_y_size; @@ -121,10 +121,10 @@ public: private: typedef pvector Placements; - void compute_statistics(ostream &out, int indent_level, + void compute_statistics(std::ostream &out, int indent_level, const Placements &placements) const; - typedef pmap EggFiles; + typedef pmap EggFiles; EggFiles _egg_files; typedef pvector CommandLineEggs; @@ -133,10 +133,10 @@ private: typedef pset CommandLineTextures; CommandLineTextures _command_line_textures; - typedef pmap Groups; + typedef pmap Groups; Groups _groups; - typedef pmap Textures; + typedef pmap Textures; Textures _textures; typedef pvector TextureConflicts; TextureConflicts _texture_conflicts; diff --git a/pandatool/src/palettizer/sourceTextureImage.h b/pandatool/src/palettizer/sourceTextureImage.h index 09c1792222..1f1f64b9dc 100644 --- a/pandatool/src/palettizer/sourceTextureImage.h +++ b/pandatool/src/palettizer/sourceTextureImage.h @@ -76,8 +76,8 @@ private: static TypeHandle _type_handle; }; -INLINE ostream & -operator << (ostream &out, const SourceTextureImage &source) { +INLINE std::ostream & +operator << (std::ostream &out, const SourceTextureImage &source) { source.output_filename(out); return out; } diff --git a/pandatool/src/palettizer/textureImage.h b/pandatool/src/palettizer/textureImage.h index 4d9b1b84e9..1e590da621 100644 --- a/pandatool/src/palettizer/textureImage.h +++ b/pandatool/src/palettizer/textureImage.h @@ -88,14 +88,14 @@ public: void read_header(); bool is_newer_than(const Filename &reference_filename); - void write_source_pathnames(ostream &out, int indent_level = 0) const; - void write_scale_info(ostream &out, int indent_level = 0); + void write_source_pathnames(std::ostream &out, int indent_level = 0) const; + void write_scale_info(std::ostream &out, int indent_level = 0); private: typedef pset EggFiles; typedef pvector WorkingEggs; - typedef pmap Sources; - typedef pmap Dests; + typedef pmap Sources; + typedef pmap Dests; static int compute_egg_count(PaletteGroup *group, const WorkingEggs &egg_files); @@ -107,7 +107,7 @@ private: void remove_old_dests(const Dests &a, const Dests &b); void copy_new_dests(const Dests &a, const Dests &b); - string get_source_key(const Filename &filename, + std::string get_source_key(const Filename &filename, const Filename &alpha_filename, int alpha_file_channel); diff --git a/pandatool/src/palettizer/textureMemoryCounter.h b/pandatool/src/palettizer/textureMemoryCounter.h index 47d70db230..49de474732 100644 --- a/pandatool/src/palettizer/textureMemoryCounter.h +++ b/pandatool/src/palettizer/textureMemoryCounter.h @@ -37,10 +37,10 @@ public: void reset(); void add_placement(TexturePlacement *placement); - void report(ostream &out, int indent_level); + void report(std::ostream &out, int indent_level); private: - static ostream &format_memory_fraction(ostream &out, int fraction_bytes, + static std::ostream &format_memory_fraction(std::ostream &out, int fraction_bytes, int palette_bytes); void add_palette(PaletteImage *image); void add_texture(TextureImage *texture, int bytes); diff --git a/pandatool/src/palettizer/texturePlacement.h b/pandatool/src/palettizer/texturePlacement.h index ca69f93ea0..552f50f3d6 100644 --- a/pandatool/src/palettizer/texturePlacement.h +++ b/pandatool/src/palettizer/texturePlacement.h @@ -46,7 +46,7 @@ public: TexturePlacement(TextureImage *texture, PaletteGroup *group); ~TexturePlacement(); - const string &get_name() const; + const std::string &get_name() const; TextureImage *get_texture() const; const TextureProperties &get_properties() const; PaletteGroup *get_group() const; @@ -82,7 +82,7 @@ public: void compute_tex_matrix(LMatrix3d &transform); - void write_placed(ostream &out, int indent_level = 0); + void write_placed(std::ostream &out, int indent_level = 0); bool is_filled() const; void mark_unfilled(); diff --git a/pandatool/src/palettizer/textureProperties.h b/pandatool/src/palettizer/textureProperties.h index cfd5fd36f8..5186f29308 100644 --- a/pandatool/src/palettizer/textureProperties.h +++ b/pandatool/src/palettizer/textureProperties.h @@ -42,7 +42,7 @@ public: void force_nonalpha(); bool uses_alpha() const; - string get_string() const; + std::string get_string() const; void update_properties(const TextureProperties &other); void fully_define(); @@ -64,11 +64,11 @@ public: PNMFileType *_alpha_type; private: - static string get_format_string(EggTexture::Format format); - static string get_filter_string(EggTexture::FilterType filter_type); - static string get_anisotropic_degree_string(int aniso_degree); - static string get_quality_level_string(EggTexture::QualityLevel quality_level); - static string get_type_string(PNMFileType *color_type, + static std::string get_format_string(EggTexture::Format format); + static std::string get_filter_string(EggTexture::FilterType filter_type); + static std::string get_anisotropic_degree_string(int aniso_degree); + static std::string get_quality_level_string(EggTexture::QualityLevel quality_level); + static std::string get_type_string(PNMFileType *color_type, PNMFileType *alpha_type); static EggTexture::Format union_format(EggTexture::Format a, diff --git a/pandatool/src/palettizer/textureReference.h b/pandatool/src/palettizer/textureReference.h index aa555263b9..f17d8337b2 100644 --- a/pandatool/src/palettizer/textureReference.h +++ b/pandatool/src/palettizer/textureReference.h @@ -50,7 +50,7 @@ public: EggFile *get_egg_file() const; SourceTextureImage *get_source() const; TextureImage *get_texture() const; - const string &get_tref_name() const; + const std::string &get_tref_name() const; bool operator < (const TextureReference &other) const; @@ -71,8 +71,8 @@ public: void update_egg(); void apply_properties_to_source(); - void output(ostream &out) const; - void write(ostream &out, int indent_level = 0) const; + void output(std::ostream &out) const; + void write(std::ostream &out, int indent_level = 0) const; private: @@ -93,7 +93,7 @@ private: EggTexture *_egg_tex; EggData *_egg_data; - string _tref_name; + std::string _tref_name; LMatrix3d _tex_mat, _inv_tex_mat; SourceTextureImage *_source_texture; TexturePlacement *_placement; @@ -134,8 +134,8 @@ private: static TypeHandle _type_handle; }; -INLINE ostream & -operator << (ostream &out, const TextureReference &ref) { +INLINE std::ostream & +operator << (std::ostream &out, const TextureReference &ref) { ref.output(out); return out; } diff --git a/pandatool/src/palettizer/txaFile.h b/pandatool/src/palettizer/txaFile.h index 507e0ac21a..05d0a32ae1 100644 --- a/pandatool/src/palettizer/txaFile.h +++ b/pandatool/src/palettizer/txaFile.h @@ -31,15 +31,15 @@ class TxaFile { public: TxaFile(); - bool read(istream &in, const string &filename); + bool read(std::istream &in, const std::string &filename); bool match_egg(EggFile *egg_file) const; bool match_texture(TextureImage *texture) const; - void write(ostream &out) const; + void write(std::ostream &out) const; private: - static int get_line_or_semicolon(istream &in, string &line); + static int get_line_or_semicolon(std::istream &in, std::string &line); bool parse_group_line(const vector_string &words); bool parse_palette_line(const vector_string &words); diff --git a/pandatool/src/palettizer/txaLine.h b/pandatool/src/palettizer/txaLine.h index 98166f0bec..b0fe5e2c06 100644 --- a/pandatool/src/palettizer/txaLine.h +++ b/pandatool/src/palettizer/txaLine.h @@ -37,12 +37,12 @@ class TxaLine { public: TxaLine(); - bool parse(const string &line); + bool parse(const std::string &line); bool match_egg(EggFile *egg_file) const; bool match_texture(TextureImage *texture) const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: typedef pvector Patterns; @@ -93,7 +93,7 @@ private: PNMFileType *_alpha_type; }; -INLINE ostream &operator << (ostream &out, const TxaLine &line) { +INLINE std::ostream &operator << (std::ostream &out, const TxaLine &line) { line.output(out); return out; } diff --git a/pandatool/src/pandatoolbase/animationConvert.h b/pandatool/src/pandatoolbase/animationConvert.h index b5d9ec9cda..2365cfff1e 100644 --- a/pandatool/src/pandatoolbase/animationConvert.h +++ b/pandatool/src/pandatoolbase/animationConvert.h @@ -31,9 +31,9 @@ enum AnimationConvert { AC_both, // A character model and tables in the same file. }; -string format_animation_convert(AnimationConvert unit); +std::string format_animation_convert(AnimationConvert unit); -ostream &operator << (ostream &out, AnimationConvert unit); -AnimationConvert string_animation_convert(const string &str); +std::ostream &operator << (std::ostream &out, AnimationConvert unit); +AnimationConvert string_animation_convert(const std::string &str); #endif diff --git a/pandatool/src/pandatoolbase/distanceUnit.h b/pandatool/src/pandatoolbase/distanceUnit.h index 4e82b74335..2030ae09e0 100644 --- a/pandatool/src/pandatoolbase/distanceUnit.h +++ b/pandatool/src/pandatoolbase/distanceUnit.h @@ -33,12 +33,12 @@ enum DistanceUnit { DU_invalid }; -string format_abbrev_unit(DistanceUnit unit); -string format_long_unit(DistanceUnit unit); +std::string format_abbrev_unit(DistanceUnit unit); +std::string format_long_unit(DistanceUnit unit); -ostream &operator << (ostream &out, DistanceUnit unit); -istream &operator >> (istream &in, DistanceUnit &unit); -DistanceUnit string_distance_unit(const string &str); +std::ostream &operator << (std::ostream &out, DistanceUnit unit); +std::istream &operator >> (std::istream &in, DistanceUnit &unit); +DistanceUnit string_distance_unit(const std::string &str); double convert_units(DistanceUnit from, DistanceUnit to); diff --git a/pandatool/src/pandatoolbase/pathReplace.I b/pandatool/src/pandatoolbase/pathReplace.I index a2fde11ad8..282c37d306 100644 --- a/pandatool/src/pandatoolbase/pathReplace.I +++ b/pandatool/src/pandatoolbase/pathReplace.I @@ -44,7 +44,7 @@ clear() { * orig_prefix, that prefix will be replaced with replacement_prefix. */ INLINE void PathReplace:: -add_pattern(const string &orig_prefix, const string &replacement_prefix) { +add_pattern(const std::string &orig_prefix, const std::string &replacement_prefix) { _entries.push_back(Entry(orig_prefix, replacement_prefix)); } @@ -59,7 +59,7 @@ get_num_patterns() const { /** * Returns the original prefix associated with the nth pattern. */ -INLINE const string &PathReplace:: +INLINE const std::string &PathReplace:: get_orig_prefix(int n) const { nassertr(n >= 0 && n < (int)_entries.size(), _entries[0]._orig_prefix); return _entries[n]._orig_prefix; @@ -68,7 +68,7 @@ get_orig_prefix(int n) const { /** * Returns the replacement prefix associated with the nth pattern. */ -INLINE const string &PathReplace:: +INLINE const std::string &PathReplace:: get_replacement_prefix(int n) const { nassertr(n >= 0 && n < (int)_entries.size(), _entries[0]._replacement_prefix); return _entries[n]._replacement_prefix; @@ -98,7 +98,7 @@ convert_path(const Filename &orig_filename, const DSearchPath &additional_path) * */ INLINE PathReplace::Component:: -Component(const string &component) : +Component(const std::string &component) : _orig_prefix(component), _double_star(component == "**") { diff --git a/pandatool/src/pandatoolbase/pathReplace.h b/pandatool/src/pandatoolbase/pathReplace.h index a0ec064acd..edc69abc08 100644 --- a/pandatool/src/pandatoolbase/pathReplace.h +++ b/pandatool/src/pandatoolbase/pathReplace.h @@ -42,11 +42,11 @@ public: INLINE bool had_error() const; INLINE void clear(); - INLINE void add_pattern(const string &orig_prefix, const string &replacement_prefix); + INLINE void add_pattern(const std::string &orig_prefix, const std::string &replacement_prefix); INLINE int get_num_patterns() const; - INLINE const string &get_orig_prefix(int n) const; - INLINE const string &get_replacement_prefix(int n) const; + INLINE const std::string &get_orig_prefix(int n) const; + INLINE const std::string &get_replacement_prefix(int n) const; INLINE bool is_empty() const; @@ -62,7 +62,7 @@ public: Filename &resolved_path, Filename &output_path); - void write(ostream &out, int indent_level = 0) const; + void write(std::ostream &out, int indent_level = 0) const; public: // This is used (along with _entries) to support match_path(). @@ -88,7 +88,7 @@ private: class Component { public: - INLINE Component(const string &component); + INLINE Component(const std::string &component); INLINE Component(const Component ©); INLINE void operator = (const Component ©); @@ -99,17 +99,17 @@ private: class Entry { public: - Entry(const string &orig_prefix, const string &replacement_prefix); + Entry(const std::string &orig_prefix, const std::string &replacement_prefix); INLINE Entry(const Entry ©); INLINE void operator = (const Entry ©); bool try_match(const Filename &filename, Filename &new_filename) const; size_t r_try_match(const vector_string &components, size_t oi, size_t ci) const; - string _orig_prefix; + std::string _orig_prefix; Components _orig_components; bool _is_local; - string _replacement_prefix; + std::string _replacement_prefix; }; typedef pvector Entries; diff --git a/pandatool/src/pandatoolbase/pathStore.h b/pandatool/src/pandatoolbase/pathStore.h index 7c15515038..30440b70a7 100644 --- a/pandatool/src/pandatoolbase/pathStore.h +++ b/pandatool/src/pandatoolbase/pathStore.h @@ -29,9 +29,9 @@ enum PathStore { PS_keep, // Don't change the filename at all. }; -string format_path_store(PathStore unit); +std::string format_path_store(PathStore unit); -ostream &operator << (ostream &out, PathStore unit); -PathStore string_path_store(const string &str); +std::ostream &operator << (std::ostream &out, PathStore unit); +PathStore string_path_store(const std::string &str); #endif diff --git a/pandatool/src/pfmprogs/pfmTrans.h b/pandatool/src/pfmprogs/pfmTrans.h index c36a6b975d..7d79127724 100644 --- a/pandatool/src/pfmprogs/pfmTrans.h +++ b/pandatool/src/pfmprogs/pfmTrans.h @@ -38,12 +38,12 @@ public: protected: virtual bool handle_args(Args &args); - static bool dispatch_scale(const string &opt, const string &arg, void *var); - static bool dispatch_rotate_xyz(ProgramBase *self, const string &opt, const string &arg, void *var); - bool ns_dispatch_rotate_xyz(const string &opt, const string &arg, void *var); - static bool dispatch_rotate_axis(ProgramBase *self, const string &opt, const string &arg, void *var); - bool ns_dispatch_rotate_axis(const string &opt, const string &arg, void *var); - static bool dispatch_translate(const string &opt, const string &arg, void *var); + static bool dispatch_scale(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_rotate_xyz(ProgramBase *self, const std::string &opt, const std::string &arg, void *var); + bool ns_dispatch_rotate_xyz(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_rotate_axis(ProgramBase *self, const std::string &opt, const std::string &arg, void *var); + bool ns_dispatch_rotate_axis(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_translate(const std::string &opt, const std::string &arg, void *var); private: typedef pvector Filenames; diff --git a/pandatool/src/progbase/programBase.I b/pandatool/src/progbase/programBase.I index 698efedfdf..960bad09f2 100644 --- a/pandatool/src/progbase/programBase.I +++ b/pandatool/src/progbase/programBase.I @@ -15,6 +15,6 @@ * Formats the indicated text to stderr with the known _terminal_width. */ INLINE void ProgramBase:: -show_text(const string &text) { +show_text(const std::string &text) { show_text("", 0, text); } diff --git a/pandatool/src/progbase/programBase.h b/pandatool/src/progbase/programBase.h index d5d1e310a0..d3d06eb67a 100644 --- a/pandatool/src/progbase/programBase.h +++ b/pandatool/src/progbase/programBase.h @@ -33,82 +33,82 @@ */ class ProgramBase { public: - ProgramBase(const string &name = string()); + ProgramBase(const std::string &name = std::string()); virtual ~ProgramBase(); void show_description(); void show_usage(); void show_options(); - INLINE void show_text(const string &text); - void show_text(const string &prefix, int indent_width, string text); + INLINE void show_text(const std::string &text); + void show_text(const std::string &prefix, int indent_width, std::string text); - void write_man_page(ostream &out); + void write_man_page(std::ostream &out); virtual void parse_command_line(int argc, char **argv); - string get_exec_command() const; + std::string get_exec_command() const; - typedef pdeque Args; + typedef pdeque Args; Filename _program_name; Args _program_args; protected: - typedef bool (*OptionDispatchFunction)(const string &opt, const string &parm, void *data); - typedef bool (*OptionDispatchMethod)(ProgramBase *self, const string &opt, const string &parm, void *data); + typedef bool (*OptionDispatchFunction)(const std::string &opt, const std::string &parm, void *data); + typedef bool (*OptionDispatchMethod)(ProgramBase *self, const std::string &opt, const std::string &parm, void *data); virtual bool handle_args(Args &args); virtual bool post_command_line(); - void set_program_brief(const string &brief); - void set_program_description(const string &description); + void set_program_brief(const std::string &brief); + void set_program_description(const std::string &description); void clear_runlines(); - void add_runline(const string &runline); + void add_runline(const std::string &runline); void clear_options(); - void add_option(const string &option, const string &parm_name, - int index_group, const string &description, + void add_option(const std::string &option, const std::string &parm_name, + int index_group, const std::string &description, OptionDispatchFunction option_function, bool *bool_var = nullptr, void *option_data = nullptr); - void add_option(const string &option, const string &parm_name, - int index_group, const string &description, + void add_option(const std::string &option, const std::string &parm_name, + int index_group, const std::string &description, OptionDispatchMethod option_method, bool *bool_var = nullptr, void *option_data = nullptr); - bool redescribe_option(const string &option, const string &description); - bool remove_option(const string &option); + bool redescribe_option(const std::string &option, const std::string &description); + bool remove_option(const std::string &option); void add_path_replace_options(); void add_path_store_options(); - static bool dispatch_none(const string &opt, const string &arg, void *); - static bool dispatch_true(const string &opt, const string &arg, void *var); - static bool dispatch_false(const string &opt, const string &arg, void *var); - static bool dispatch_count(const string &opt, const string &arg, void *var); - static bool dispatch_int(const string &opt, const string &arg, void *var); - static bool dispatch_int_pair(const string &opt, const string &arg, void *var); - static bool dispatch_int_quad(const string &opt, const string &arg, void *var); - static bool dispatch_double(const string &opt, const string &arg, void *var); - static bool dispatch_double_pair(const string &opt, const string &arg, void *var); - static bool dispatch_double_triple(const string &opt, const string &arg, void *var); - static bool dispatch_double_quad(const string &opt, const string &arg, void *var); - static bool dispatch_color(const string &opt, const string &arg, void *var); - static bool dispatch_string(const string &opt, const string &arg, void *var); - static bool dispatch_vector_string(const string &opt, const string &arg, void *var); - static bool dispatch_vector_string_comma(const string &opt, const string &arg, void *var); - static bool dispatch_filename(const string &opt, const string &arg, void *var); - static bool dispatch_search_path(const string &opt, const string &arg, void *var); - static bool dispatch_coordinate_system(const string &opt, const string &arg, void *var); - static bool dispatch_units(const string &opt, const string &arg, void *var); - static bool dispatch_image_type(const string &opt, const string &arg, void *var); - static bool dispatch_path_replace(const string &opt, const string &arg, void *var); - static bool dispatch_path_store(const string &opt, const string &arg, void *var); + static bool dispatch_none(const std::string &opt, const std::string &arg, void *); + static bool dispatch_true(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_false(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_count(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_int(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_int_pair(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_int_quad(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_double(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_double_pair(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_double_triple(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_double_quad(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_color(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_string(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_vector_string(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_vector_string_comma(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_filename(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_search_path(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_coordinate_system(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_units(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_image_type(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_path_replace(const std::string &opt, const std::string &arg, void *var); + static bool dispatch_path_store(const std::string &opt, const std::string &arg, void *var); - static bool handle_help_option(const string &opt, const string &arg, void *); + static bool handle_help_option(const std::string &opt, const std::string &arg, void *); - static void format_text(ostream &out, bool &last_newline, - const string &prefix, int indent_width, - const string &text, int line_width); + static void format_text(std::ostream &out, bool &last_newline, + const std::string &prefix, int indent_width, + const std::string &text, int line_width); PT(PathReplace) _path_replace; bool _got_path_store; @@ -121,11 +121,11 @@ private: class Option { public: - string _option; - string _parm_name; + std::string _option; + std::string _parm_name; int _index_group; int _sequence; - string _description; + std::string _description; OptionDispatchFunction _option_function; OptionDispatchMethod _option_method; bool *_bool_var; @@ -137,20 +137,20 @@ private: bool operator () (const Option *a, const Option *b) const; }; - string _name; - string _brief; - string _description; + std::string _name; + std::string _brief; + std::string _description; typedef vector_string Runlines; Runlines _runlines; - typedef pmap OptionsByName; + typedef pmap OptionsByName; typedef pvector OptionsByIndex; OptionsByName _options_by_name; OptionsByIndex _options_by_index; int _next_sequence; bool _sorted_options; - typedef pmap GotOptions; + typedef pmap GotOptions; GotOptions _got_options; bool _last_newline; diff --git a/pandatool/src/progbase/withOutputFile.h b/pandatool/src/progbase/withOutputFile.h index 7c4c0f2af7..385114c001 100644 --- a/pandatool/src/progbase/withOutputFile.h +++ b/pandatool/src/progbase/withOutputFile.h @@ -32,7 +32,7 @@ public: bool binary_output); virtual ~WithOutputFile(); - ostream &get_output(); + std::ostream &get_output(); void close_output(); bool has_output_filename() const; Filename get_output_filename() const; @@ -47,7 +47,7 @@ protected: bool _allow_last_param; bool _allow_stdout; bool _binary_output; - string _preferred_extension; + std::string _preferred_extension; bool _got_output_filename; Filename _output_filename; diff --git a/pandatool/src/progbase/wordWrapStream.h b/pandatool/src/progbase/wordWrapStream.h index af5c2f90ab..cfa7969df1 100644 --- a/pandatool/src/progbase/wordWrapStream.h +++ b/pandatool/src/progbase/wordWrapStream.h @@ -27,7 +27,7 @@ * WordWrapStream indicates a paragraph break, and is generally printed as a * blank line. To force a line break without a paragraph break, use '\r'. */ -class WordWrapStream : public ostream { +class WordWrapStream : public std::ostream { public: WordWrapStream(ProgramBase *program); diff --git a/pandatool/src/progbase/wordWrapStreamBuf.h b/pandatool/src/progbase/wordWrapStreamBuf.h index 506f72a6ea..0bc54b01f2 100644 --- a/pandatool/src/progbase/wordWrapStreamBuf.h +++ b/pandatool/src/progbase/wordWrapStreamBuf.h @@ -25,7 +25,7 @@ class WordWrapStream; * Used by WordWrapStream to implement an ostream that flushes its output to * ProgramBase::show_text(). */ -class WordWrapStreamBuf : public streambuf { +class WordWrapStreamBuf : public std::streambuf { public: WordWrapStreamBuf(WordWrapStream *owner, ProgramBase *program); virtual ~WordWrapStreamBuf(); @@ -39,7 +39,7 @@ private: INLINE void set_literal_mode(bool mode); void flush_data(); - string _data; + std::string _data; WordWrapStream *_owner; ProgramBase *_program; bool _literal_mode; diff --git a/pandatool/src/pstatserver/pStatClientData.h b/pandatool/src/pstatserver/pStatClientData.h index 2d4ab293d5..051bb568ae 100644 --- a/pandatool/src/pstatserver/pStatClientData.h +++ b/pandatool/src/pstatserver/pStatClientData.h @@ -44,8 +44,8 @@ public: int get_num_collectors() const; bool has_collector(int index) const; const PStatCollectorDef &get_collector_def(int index) const; - string get_collector_name(int index) const; - string get_collector_fullname(int index) const; + std::string get_collector_name(int index) const; + std::string get_collector_fullname(int index) const; bool set_collector_has_level(int index, int thread_index, bool flag); bool get_collector_has_level(int index, int thread_index) const; @@ -54,14 +54,14 @@ public: int get_num_threads() const; bool has_thread(int index) const; - string get_thread_name(int index) const; + std::string get_thread_name(int index) const; const PStatThreadData *get_thread_data(int index) const; int get_child_distance(int parent, int child) const; void add_collector(PStatCollectorDef *def); - void define_thread(int thread_index, const string &name = string()); + void define_thread(int thread_index, const std::string &name = std::string()); void record_new_frame(int thread_index, int frame_number, PStatFrameData *frame_data); @@ -87,7 +87,7 @@ private: class Thread { public: - string _name; + std::string _name; PT(PStatThreadData) _data; }; typedef pvector Threads; diff --git a/pandatool/src/pstatserver/pStatGraph.I b/pandatool/src/pstatserver/pStatGraph.I index b198296fd7..3bda0cedee 100644 --- a/pandatool/src/pstatserver/pStatGraph.I +++ b/pandatool/src/pstatserver/pStatGraph.I @@ -39,9 +39,9 @@ get_label_collector(int n) const { /** * Returns the text associated with the nth label. */ -INLINE string PStatGraph:: +INLINE std::string PStatGraph:: get_label_name(int n) const { - nassertr(n >= 0 && n < (int)_labels.size(), string()); + nassertr(n >= 0 && n < (int)_labels.size(), std::string()); return _monitor->get_client_data()->get_collector_name(_labels[n]); } @@ -117,7 +117,7 @@ get_guide_bar_units() const { * is set to GBU_named | GBU_show_units. */ INLINE void PStatGraph:: -set_guide_bar_unit_name(const string &unit_name) { +set_guide_bar_unit_name(const std::string &unit_name) { _unit_name = unit_name; } @@ -125,7 +125,7 @@ set_guide_bar_unit_name(const string &unit_name) { * Returns the name of the units to be used for the guide bars if the units * type is set to GBU_named | GBU_show_units. */ -INLINE const string &PStatGraph:: +INLINE const std::string &PStatGraph:: get_guide_bar_unit_name() const { return _unit_name; } diff --git a/pandatool/src/pstatserver/pStatGraph.h b/pandatool/src/pstatserver/pStatGraph.h index b7d907f52b..5b8a2d664e 100644 --- a/pandatool/src/pstatserver/pStatGraph.h +++ b/pandatool/src/pstatserver/pStatGraph.h @@ -39,7 +39,7 @@ public: INLINE int get_num_labels() const; INLINE int get_label_collector(int n) const; - INLINE string get_label_name(int n) const; + INLINE std::string get_label_name(int n) const; INLINE LRGBColor get_label_color(int n) const; INLINE void set_target_frame_rate(double frame_rate); @@ -56,11 +56,11 @@ public: class GuideBar { public: - GuideBar(double height, const string &label, GuideBarStyle style); + GuideBar(double height, const std::string &label, GuideBarStyle style); GuideBar(const GuideBar ©); double _height; - string _label; + std::string _label; GuideBarStyle _style; }; @@ -83,12 +83,12 @@ public: INLINE void set_guide_bar_units(int unit_mask); INLINE int get_guide_bar_units() const; - INLINE void set_guide_bar_unit_name(const string &unit_name); - INLINE const string &get_guide_bar_unit_name() const; + INLINE void set_guide_bar_unit_name(const std::string &unit_name); + INLINE const std::string &get_guide_bar_unit_name() const; - static string format_number(double value); - static string format_number(double value, int guide_bar_units, - const string &unit_name = string()); + static std::string format_number(double value); + static std::string format_number(double value, int guide_bar_units, + const std::string &unit_name = std::string()); protected: virtual void normal_guide_bars()=0; @@ -113,7 +113,7 @@ protected: typedef pvector GuideBars; GuideBars _guide_bars; int _guide_bar_units; - string _unit_name; + std::string _unit_name; }; #include "pStatGraph.I" diff --git a/pandatool/src/pstatserver/pStatMonitor.I b/pandatool/src/pstatserver/pStatMonitor.I index 2b23d43a43..761b7b9a79 100644 --- a/pandatool/src/pstatserver/pStatMonitor.I +++ b/pandatool/src/pstatserver/pStatMonitor.I @@ -30,7 +30,7 @@ get_client_data() const { /** * Returns the name of the indicated collector, if it is known. */ -INLINE string PStatMonitor:: +INLINE std::string PStatMonitor:: get_collector_name(int collector_index) { if (!_client_data.is_null() && _client_data->has_collector(collector_index)) { @@ -54,7 +54,7 @@ is_client_known() const { * thereafter when we receive the client's "hello" message. See * is_client_known(). */ -INLINE string PStatMonitor:: +INLINE std::string PStatMonitor:: get_client_hostname() const { return _client_hostname; } @@ -65,7 +65,7 @@ get_client_hostname() const { * shortly thereafter when we receive the client's "hello" message. See * is_client_known(). */ -INLINE string PStatMonitor:: +INLINE std::string PStatMonitor:: get_client_progname() const { return _client_progname; } diff --git a/pandatool/src/pstatserver/pStatMonitor.h b/pandatool/src/pstatserver/pStatMonitor.h index cd4a012069..f7e92073c4 100644 --- a/pandatool/src/pstatserver/pStatMonitor.h +++ b/pandatool/src/pstatserver/pStatMonitor.h @@ -43,8 +43,8 @@ public: PStatMonitor(PStatServer *server); virtual ~PStatMonitor(); - void hello_from(const string &hostname, const string &progname); - void bad_version(const string &hostname, const string &progname, + void hello_from(const std::string &hostname, const std::string &progname); + void bad_version(const std::string &hostname, const std::string &progname, int client_major, int client_minor, int server_major, int server_minor); void set_client_data(PStatClientData *client_data); @@ -57,12 +57,12 @@ public: INLINE PStatServer *get_server(); INLINE const PStatClientData *get_client_data() const; - INLINE string get_collector_name(int collector_index); + INLINE std::string get_collector_name(int collector_index); const LRGBColor &get_collector_color(int collector_index); INLINE bool is_client_known() const; - INLINE string get_client_hostname() const; - INLINE string get_client_progname() const; + INLINE std::string get_client_hostname() const; + INLINE std::string get_client_progname() const; PStatView &get_view(int thread_index); PStatView &get_level_view(int collector_index, int thread_index); @@ -71,7 +71,7 @@ public: // The following virtual methods may be overridden by a derived monitor // class to customize behavior. - virtual string get_monitor_name()=0; + virtual std::string get_monitor_name()=0; virtual void initialized(); virtual void got_hello(); @@ -96,8 +96,8 @@ private: PT(PStatClientData) _client_data; bool _client_known; - string _client_hostname; - string _client_progname; + std::string _client_hostname; + std::string _client_progname; typedef pmap Views; Views _views; diff --git a/pandatool/src/pstatserver/pStatReader.h b/pandatool/src/pstatserver/pStatReader.h index 4f30fd93cd..40d1d9b5e0 100644 --- a/pandatool/src/pstatserver/pStatReader.h +++ b/pandatool/src/pstatserver/pStatReader.h @@ -52,7 +52,7 @@ public: PStatMonitor *get_monitor(); private: - string get_hostname(); + std::string get_hostname(); void send_hello(); virtual void receive_datagram(const NetDatagram &datagram); @@ -72,7 +72,7 @@ private: PT(PStatClientData) _client_data; - string _hostname; + std::string _hostname; class FrameData { public: diff --git a/pandatool/src/pstatserver/pStatStripChart.h b/pandatool/src/pstatserver/pStatStripChart.h index 6cfe896bf2..5cba0164e2 100644 --- a/pandatool/src/pstatserver/pStatStripChart.h +++ b/pandatool/src/pstatserver/pStatStripChart.h @@ -68,7 +68,7 @@ public: INLINE int height_to_pixel(double value) const; INLINE double pixel_to_height(int y) const; - string get_title_text(); + std::string get_title_text(); bool is_title_unknown() const; protected: diff --git a/pandatool/src/ptloader/loaderFileTypePandatool.h b/pandatool/src/ptloader/loaderFileTypePandatool.h index 721e7477c3..f50400cd4f 100644 --- a/pandatool/src/ptloader/loaderFileTypePandatool.h +++ b/pandatool/src/ptloader/loaderFileTypePandatool.h @@ -32,9 +32,9 @@ public: EggToSomethingConverter *saver = nullptr); virtual ~LoaderFileTypePandatool(); - virtual string get_name() const; - virtual string get_extension() const; - virtual string get_additional_extensions() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; + virtual std::string get_additional_extensions() const; virtual bool supports_compressed() const; virtual bool supports_load() const; diff --git a/pandatool/src/softegg/softNodeDesc.h b/pandatool/src/softegg/softNodeDesc.h index af2060435a..c6512b7dda 100644 --- a/pandatool/src/softegg/softNodeDesc.h +++ b/pandatool/src/softegg/softNodeDesc.h @@ -42,7 +42,7 @@ class EggXfmSAnim; */ class SoftNodeDesc : public ReferenceCount, public Namable { public: - SoftNodeDesc(SoftNodeDesc *parent=nullptr, const string &name = string()); + SoftNodeDesc(SoftNodeDesc *parent=nullptr, const std::string &name = std::string()); ~SoftNodeDesc(); void set_parent(SoftNodeDesc *parent); diff --git a/pandatool/src/softegg/softNodeTree.h b/pandatool/src/softegg/softNodeTree.h index ba44caa810..afbef5877b 100644 --- a/pandatool/src/softegg/softNodeTree.h +++ b/pandatool/src/softegg/softNodeTree.h @@ -40,7 +40,7 @@ public: int get_num_nodes() const; SoftNodeDesc *get_node(int n) const; - SoftNodeDesc *get_node(string name) const; + SoftNodeDesc *get_node(std::string name) const; char *GetRootName(const char *); char *GetModelNoteInfo(SAA_Scene *, SAA_Elem *); @@ -66,9 +66,9 @@ private: EggGroupNode *_egg_root; EggGroupNode *_skeleton_node; - SoftNodeDesc *r_build_node(SoftNodeDesc *parent_node, const string &path); + SoftNodeDesc *r_build_node(SoftNodeDesc *parent_node, const std::string &path); - typedef pmap NodesByName; + typedef pmap NodesByName; NodesByName _nodes_by_name; typedef pvector Nodes; diff --git a/pandatool/src/softegg/softToEggConverter.h b/pandatool/src/softegg/softToEggConverter.h index 1ac9442263..05c26fa60f 100644 --- a/pandatool/src/softegg/softToEggConverter.h +++ b/pandatool/src/softegg/softToEggConverter.h @@ -50,7 +50,7 @@ class EggSAnimData; */ class SoftToEggConverter : public SomethingToEggConverter { public: - SoftToEggConverter(const string &program_name = ""); + SoftToEggConverter(const std::string &program_name = ""); SoftToEggConverter(const SoftToEggConverter ©); virtual ~SoftToEggConverter(); @@ -61,12 +61,12 @@ public: bool HandleGetopts(int &idx, int argc, char **argv); bool DoGetopts(int &argc, char **&argv); - SoftNodeDesc *find_node(string name); + SoftNodeDesc *find_node(std::string name); int *FindClosestTriVert( EggVertexPool *vpool, SAA_DVector *vertices, int numVert ); virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool convert_file(const Filename &filename); bool convert_soft(bool from_selection); @@ -93,7 +93,7 @@ private: bool reparent_decals(EggGroupNode *egg_parent); - string _program_name; + std::string _program_name; bool _from_selection; SI_Error result; @@ -165,7 +165,7 @@ public: }; TransformType _transform_type; - static TransformType string_transform_type(const string &arg); + static TransformType string_transform_type(const std::string &arg); typedef pvector MorphTable; MorphTable _morph_table; diff --git a/pandatool/src/softprogs/softCVS.h b/pandatool/src/softprogs/softCVS.h index f4907e8cbe..adbd89efa6 100644 --- a/pandatool/src/softprogs/softCVS.h +++ b/pandatool/src/softprogs/softCVS.h @@ -49,11 +49,11 @@ private: void remove_unused_elements(); bool rename_file(SceneFiles::iterator begin, SceneFiles::iterator end); - bool scan_cvs(const string &dirname, pset &cvs_elements); - bool scan_scene_file(istream &in, Multifile &multifile); + bool scan_cvs(const std::string &dirname, pset &cvs_elements); + bool scan_scene_file(std::istream &in, Multifile &multifile); - bool cvs_add(const string &path); - bool cvs_add_or_remove(const string &cvs_command, + bool cvs_add(const std::string &path); + bool cvs_add_or_remove(const std::string &cvs_command, const vector_string &paths); SceneFiles _scene_files; @@ -64,7 +64,7 @@ private: vector_string _cvs_remove; bool _no_cvs; - string _cvs_binary; + std::string _cvs_binary; }; #endif diff --git a/pandatool/src/softprogs/softFilename.h b/pandatool/src/softprogs/softFilename.h index 3c1e448b27..0565eabf89 100644 --- a/pandatool/src/softprogs/softFilename.h +++ b/pandatool/src/softprogs/softFilename.h @@ -26,21 +26,21 @@ */ class SoftFilename { public: - SoftFilename(const string &dirname, const string &filename); + SoftFilename(const std::string &dirname, const std::string &filename); SoftFilename(const SoftFilename ©); void operator = (const SoftFilename ©); - const string &get_dirname() const; - const string &get_filename() const; + const std::string &get_dirname() const; + const std::string &get_filename() const; bool has_version() const; - string get_1_0_filename() const; + std::string get_1_0_filename() const; - const string &get_base() const; + const std::string &get_base() const; int get_major() const; int get_minor() const; - const string &get_extension() const; - string get_non_extension() const; + const std::string &get_extension() const; + std::string get_non_extension() const; bool is_1_0() const; void make_1_0(); @@ -58,13 +58,13 @@ public: int get_use_count() const; private: - string _dirname; - string _filename; + std::string _dirname; + std::string _filename; bool _has_version; - string _base; + std::string _base; int _major; int _minor; - string _ext; + std::string _ext; bool _in_cvs; bool _wants_cvs; int _use_count; diff --git a/pandatool/src/text-stats/textMonitor.h b/pandatool/src/text-stats/textMonitor.h index 7be48fc07c..4c88340e46 100644 --- a/pandatool/src/text-stats/textMonitor.h +++ b/pandatool/src/text-stats/textMonitor.h @@ -29,10 +29,10 @@ class TextStats; */ class TextMonitor : public PStatMonitor { public: - TextMonitor(TextStats *server, ostream *outStream, bool show_raw_data); + TextMonitor(TextStats *server, std::ostream *outStream, bool show_raw_data); TextStats *get_server(); - virtual string get_monitor_name(); + virtual std::string get_monitor_name(); virtual void got_hello(); virtual void got_bad_version(int client_major, int client_minor, @@ -45,7 +45,7 @@ public: void show_level(const PStatViewLevel *level, int indent_level); private: - ostream *_outStream; //[PECI] + std::ostream *_outStream; //[PECI] bool _show_raw_data; }; diff --git a/pandatool/src/text-stats/textStats.h b/pandatool/src/text-stats/textStats.h index 0f8ec97ed6..b6853ecb46 100644 --- a/pandatool/src/text-stats/textStats.h +++ b/pandatool/src/text-stats/textStats.h @@ -40,8 +40,8 @@ private: // [PECI] bool _got_outputFileName; - string _outputFileName; - ostream *_outFile; + std::string _outputFileName; + std::ostream *_outFile; }; #endif diff --git a/pandatool/src/vrml/parse_vrml.h b/pandatool/src/vrml/parse_vrml.h index 88c52e16f7..81a04847bf 100644 --- a/pandatool/src/vrml/parse_vrml.h +++ b/pandatool/src/vrml/parse_vrml.h @@ -18,6 +18,6 @@ #include "filename.h" VrmlScene *parse_vrml(Filename filename); -VrmlScene *parse_vrml(istream &in, const string &filename); +VrmlScene *parse_vrml(std::istream &in, const std::string &filename); #endif diff --git a/pandatool/src/vrml/vrmlLexerDefs.h b/pandatool/src/vrml/vrmlLexerDefs.h index f33a444fe4..5cbdc81b14 100644 --- a/pandatool/src/vrml/vrmlLexerDefs.h +++ b/pandatool/src/vrml/vrmlLexerDefs.h @@ -16,12 +16,12 @@ #include "pandatoolbase.h" -void vrml_init_lexer(istream &in, const string &filename); +void vrml_init_lexer(std::istream &in, const std::string &filename); int vrml_error_count(); int vrml_warning_count(); -void vrmlyyerror(const string &msg); -void vrmlyywarning(const string &msg); +void vrmlyyerror(const std::string &msg); +void vrmlyywarning(const std::string &msg); int vrmlyylex(); diff --git a/pandatool/src/vrml/vrmlNode.h b/pandatool/src/vrml/vrmlNode.h index dad8a1bce1..648f477c90 100644 --- a/pandatool/src/vrml/vrmlNode.h +++ b/pandatool/src/vrml/vrmlNode.h @@ -27,7 +27,7 @@ public: const VrmlFieldValue &get_value(const char *field_name) const; - void output(ostream &out, int indent) const; + void output(std::ostream &out, int indent) const; class Field { public: @@ -38,7 +38,7 @@ public: VrmlFieldValue _value; }; - typedef vector Fields; + typedef std::vector Fields; Fields _fields; int _use_count; @@ -46,7 +46,7 @@ public: const VrmlNodeType *_type; }; -inline ostream &operator << (ostream &out, const VrmlNode &node) { +inline std::ostream &operator << (std::ostream &out, const VrmlNode &node) { node.output(out, 0); return out; } @@ -55,16 +55,16 @@ class Declaration { public: SFNodeRef _node; - void output(ostream &out, int indent) const; + void output(std::ostream &out, int indent) const; }; -inline ostream &operator << (ostream &out, const Declaration &dec) { +inline std::ostream &operator << (std::ostream &out, const Declaration &dec) { dec.output(out, 0); return out; } typedef pvector VrmlScene; -ostream &operator << (ostream &out, const VrmlScene &scene); +std::ostream &operator << (std::ostream &out, const VrmlScene &scene); #endif diff --git a/pandatool/src/vrml/vrmlNodeType.h b/pandatool/src/vrml/vrmlNodeType.h index ae259af055..1852429ad1 100644 --- a/pandatool/src/vrml/vrmlNodeType.h +++ b/pandatool/src/vrml/vrmlNodeType.h @@ -42,7 +42,7 @@ union VrmlFieldValue { typedef pvector MFArray; -ostream &output_value(ostream &out, const VrmlFieldValue &value, int type, +std::ostream &output_value(std::ostream &out, const VrmlFieldValue &value, int type, int indent = 0); diff --git a/pandatool/src/vrml/vrmlParserDefs.h b/pandatool/src/vrml/vrmlParserDefs.h index 75464abd46..cad0d5b263 100644 --- a/pandatool/src/vrml/vrmlParserDefs.h +++ b/pandatool/src/vrml/vrmlParserDefs.h @@ -16,7 +16,7 @@ #include "pandatoolbase.h" -void vrml_init_parser(istream &in, const string &filename); +void vrml_init_parser(std::istream &in, const std::string &filename); void vrml_cleanup_parser(); int vrmlyyparse(); diff --git a/pandatool/src/vrmlegg/vrmlToEggConverter.h b/pandatool/src/vrmlegg/vrmlToEggConverter.h index 612881d770..34a9b6843d 100644 --- a/pandatool/src/vrmlegg/vrmlToEggConverter.h +++ b/pandatool/src/vrmlegg/vrmlToEggConverter.h @@ -37,14 +37,14 @@ public: virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool convert_file(const Filename &filename); private: - typedef pmap Nodes; + typedef pmap Nodes; void get_all_defs(SFNodeRef &vrml, Nodes &nodes); void vrml_node(const SFNodeRef &vrml, EggGroupNode *egg, diff --git a/pandatool/src/win-stats/winStatsLabel.h b/pandatool/src/win-stats/winStatsLabel.h index 8c98f09f12..0317f0dcfb 100644 --- a/pandatool/src/win-stats/winStatsLabel.h +++ b/pandatool/src/win-stats/winStatsLabel.h @@ -59,7 +59,7 @@ private: WinStatsGraph *_graph; int _thread_index; int _collector_index; - string _text; + std::string _text; HWND _window; COLORREF _bg_color; COLORREF _fg_color; diff --git a/pandatool/src/win-stats/winStatsMonitor.h b/pandatool/src/win-stats/winStatsMonitor.h index 8d4ccf473d..de74aa0d68 100644 --- a/pandatool/src/win-stats/winStatsMonitor.h +++ b/pandatool/src/win-stats/winStatsMonitor.h @@ -47,7 +47,7 @@ public: WinStatsMonitor(WinStatsServer *server); virtual ~WinStatsMonitor(); - virtual string get_monitor_name(); + virtual std::string get_monitor_name(); virtual void initialized(); virtual void got_hello(); @@ -102,7 +102,7 @@ private: HMENU _menu_bar; HMENU _options_menu; HMENU _speed_menu; - string _window_title; + std::string _window_title; int _time_units; double _scroll_speed; bool _pause; diff --git a/pandatool/src/win-stats/winStatsStripChart.h b/pandatool/src/win-stats/winStatsStripChart.h index 8ca08fee23..59953fbe8c 100644 --- a/pandatool/src/win-stats/winStatsStripChart.h +++ b/pandatool/src/win-stats/winStatsStripChart.h @@ -73,7 +73,7 @@ private: static LONG WINAPI static_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); int _brush_origin; - string _net_value_text; + std::string _net_value_text; HWND _smooth_check_box; static size_t _check_box_height, _check_box_width; diff --git a/pandatool/src/xfile/windowsGuid.I b/pandatool/src/xfile/windowsGuid.I index 95591161d0..5d0ce22046 100644 --- a/pandatool/src/xfile/windowsGuid.I +++ b/pandatool/src/xfile/windowsGuid.I @@ -91,8 +91,8 @@ compare_to(const WindowsGuid &other) const { return memcmp(this, &other, sizeof(WindowsGuid)); } -INLINE ostream & -operator << (ostream &out, const WindowsGuid &guid) { +INLINE std::ostream & +operator << (std::ostream &out, const WindowsGuid &guid) { guid.output(out); return out; } diff --git a/pandatool/src/xfile/windowsGuid.h b/pandatool/src/xfile/windowsGuid.h index 30296782f4..ea79d0be5a 100644 --- a/pandatool/src/xfile/windowsGuid.h +++ b/pandatool/src/xfile/windowsGuid.h @@ -39,10 +39,10 @@ public: INLINE bool operator < (const WindowsGuid &other) const; INLINE int compare_to(const WindowsGuid &other) const; - bool parse_string(const string &str); - string format_string() const; + bool parse_string(const std::string &str); + std::string format_string() const; - void output(ostream &out) const; + void output(std::ostream &out) const; private: unsigned long _data1; @@ -51,7 +51,7 @@ private: unsigned char _b1, _b2, _b3, _b4, _b5, _b6, _b7, _b8; }; -INLINE ostream &operator << (ostream &out, const WindowsGuid &guid); +INLINE std::ostream &operator << (std::ostream &out, const WindowsGuid &guid); #include "windowsGuid.I" diff --git a/pandatool/src/xfile/xFile.h b/pandatool/src/xfile/xFile.h index fa43e5ab77..c53bdd8313 100644 --- a/pandatool/src/xfile/xFile.h +++ b/pandatool/src/xfile/xFile.h @@ -37,21 +37,21 @@ public: virtual void clear(); 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) const; - bool write(ostream &out) const; + bool write(std::ostream &out) const; - XFileTemplate *find_template(const string &name) const; + XFileTemplate *find_template(const std::string &name) const; XFileTemplate *find_template(const WindowsGuid &guid) const; - static XFileTemplate *find_standard_template(const string &name); + static XFileTemplate *find_standard_template(const std::string &name); static XFileTemplate *find_standard_template(const WindowsGuid &guid); - XFileDataNodeTemplate *find_data_object(const string &name) const; + XFileDataNodeTemplate *find_data_object(const std::string &name) const; XFileDataNodeTemplate *find_data_object(const WindowsGuid &guid) const; - virtual void write_text(ostream &out, int indent_level) const; + virtual void write_text(std::ostream &out, int indent_level) const; enum FormatType { FT_text, @@ -64,8 +64,8 @@ public: }; private: - bool read_header(istream &in); - bool write_header(ostream &out) const; + bool read_header(std::istream &in); + bool write_header(std::ostream &out) const; static const XFile *get_standard_templates(); diff --git a/pandatool/src/xfile/xFileArrayDef.h b/pandatool/src/xfile/xFileArrayDef.h index 2c8f79d443..5871e6e28c 100644 --- a/pandatool/src/xfile/xFileArrayDef.h +++ b/pandatool/src/xfile/xFileArrayDef.h @@ -34,7 +34,7 @@ public: int get_size(const XFileNode::PrevData &prev_data) const; - void output(ostream &out) const; + void output(std::ostream &out) const; bool matches(const XFileArrayDef &other, const XFileDataDef *parent, const XFileDataDef *other_parent) const; diff --git a/pandatool/src/xfile/xFileDataDef.I b/pandatool/src/xfile/xFileDataDef.I index 59dd89db50..65a7d9c36a 100644 --- a/pandatool/src/xfile/xFileDataDef.I +++ b/pandatool/src/xfile/xFileDataDef.I @@ -15,7 +15,7 @@ * */ INLINE XFileDataDef:: -XFileDataDef(XFile *x_file, const string &name, +XFileDataDef(XFile *x_file, const std::string &name, XFileDataDef::Type type, XFileTemplate *xtemplate) : XFileNode(x_file, name), _type(type), diff --git a/pandatool/src/xfile/xFileDataDef.h b/pandatool/src/xfile/xFileDataDef.h index 93d85c2b36..3921619cdb 100644 --- a/pandatool/src/xfile/xFileDataDef.h +++ b/pandatool/src/xfile/xFileDataDef.h @@ -45,7 +45,7 @@ public: T_template, }; - INLINE XFileDataDef(XFile *x_file, const string &name, + INLINE XFileDataDef(XFile *x_file, const std::string &name, Type type, XFileTemplate *xtemplate = nullptr); virtual ~XFileDataDef(); @@ -58,7 +58,7 @@ public: INLINE int get_num_array_defs() const; INLINE const XFileArrayDef &get_array_def(int i) const; - virtual void write_text(ostream &out, int indent_level) const; + virtual void write_text(std::ostream &out, int indent_level) const; virtual bool repack_data(XFileDataObject *object, const XFileParseDataList &parse_data_list, diff --git a/pandatool/src/xfile/xFileDataNode.I b/pandatool/src/xfile/xFileDataNode.I index 23e63eb321..5591778ee6 100644 --- a/pandatool/src/xfile/xFileDataNode.I +++ b/pandatool/src/xfile/xFileDataNode.I @@ -39,7 +39,7 @@ get_template() const { * A convenience function to return the name of the template used to define * this data object. */ -INLINE const string &XFileDataNode:: +INLINE const std::string &XFileDataNode:: get_template_name() const { return _template->get_name(); } diff --git a/pandatool/src/xfile/xFileDataNode.h b/pandatool/src/xfile/xFileDataNode.h index 78bf6da05d..c04df4a3d1 100644 --- a/pandatool/src/xfile/xFileDataNode.h +++ b/pandatool/src/xfile/xFileDataNode.h @@ -32,17 +32,17 @@ */ class XFileDataNode : public XFileNode, public XFileDataObject { public: - XFileDataNode(XFile *x_file, const string &name, + XFileDataNode(XFile *x_file, const std::string &name, XFileTemplate *xtemplate); virtual bool is_object() const; - virtual bool is_standard_object(const string &template_name) const; - virtual string get_type_name() const; + virtual bool is_standard_object(const std::string &template_name) const; + virtual std::string get_type_name() const; INLINE const XFileDataNode &get_data_child(int n) const; INLINE XFileTemplate *get_template() const; - INLINE const string &get_template_name() const; + INLINE const std::string &get_template_name() const; protected: PT(XFileTemplate) _template; diff --git a/pandatool/src/xfile/xFileDataNodeReference.h b/pandatool/src/xfile/xFileDataNodeReference.h index 294b8a105d..f1e9eb4c80 100644 --- a/pandatool/src/xfile/xFileDataNodeReference.h +++ b/pandatool/src/xfile/xFileDataNodeReference.h @@ -36,12 +36,12 @@ public: virtual bool is_reference() const; virtual bool is_complex_object() const; - virtual void write_text(ostream &out, int indent_level) const; + virtual void write_text(std::ostream &out, int indent_level) const; protected: virtual int get_num_elements() const; virtual XFileDataObject *get_element(int n); - virtual XFileDataObject *get_element(const string &name); + virtual XFileDataObject *get_element(const std::string &name); private: PT(XFileDataNodeTemplate) _object; diff --git a/pandatool/src/xfile/xFileDataNodeTemplate.h b/pandatool/src/xfile/xFileDataNodeTemplate.h index 32c3a74460..521c3752e2 100644 --- a/pandatool/src/xfile/xFileDataNodeTemplate.h +++ b/pandatool/src/xfile/xFileDataNodeTemplate.h @@ -29,7 +29,7 @@ */ class XFileDataNodeTemplate : public XFileDataNode { public: - XFileDataNodeTemplate(XFile *x_file, const string &name, + XFileDataNodeTemplate(XFile *x_file, const std::string &name, XFileTemplate *xtemplate); void zero_fill(); @@ -38,19 +38,19 @@ public: void add_parse_double(PTA_double double_list); void add_parse_int(PTA_int int_list); - void add_parse_string(const string &str); + void add_parse_string(const std::string &str); bool finalize_parse_data(); virtual bool add_element(XFileDataObject *element); - virtual void write_text(ostream &out, int indent_level) const; - virtual void write_data(ostream &out, int indent_level, + virtual void write_text(std::ostream &out, int indent_level) const; + virtual void write_data(std::ostream &out, int indent_level, const char *separator) const; protected: virtual int get_num_elements() const; virtual XFileDataObject *get_element(int n); - virtual XFileDataObject *get_element(const string &name); + virtual XFileDataObject *get_element(const std::string &name); private: XFileParseDataList _parse_data_list; diff --git a/pandatool/src/xfile/xFileDataObject.I b/pandatool/src/xfile/xFileDataObject.I index e68f383e1c..269bc0b0e9 100644 --- a/pandatool/src/xfile/xFileDataObject.I +++ b/pandatool/src/xfile/xFileDataObject.I @@ -55,7 +55,7 @@ operator = (double double_value) { * value. */ INLINE void XFileDataObject:: -operator = (const string &string_value) { +operator = (const std::string &string_value) { set(string_value); } @@ -125,7 +125,7 @@ set(double double_value) { * value. */ INLINE void XFileDataObject:: -set(const string &string_value) { +set(const std::string &string_value) { set_string_value(string_value); } @@ -194,7 +194,7 @@ d() const { * string if the object has no string representation. See also get_data_def() * to determine what kind of representation this object has. */ -INLINE string XFileDataObject:: +INLINE std::string XFileDataObject:: s() const { return get_string_value(); } @@ -268,7 +268,7 @@ operator [] (int n) const { * doubt. */ INLINE const XFileDataObject &XFileDataObject:: -operator [] (const string &name) const { +operator [] (const std::string &name) const { const XFileDataObject *element = ((XFileDataObject *)this)->get_element(name); nassertr(element != nullptr, *this); return *element; @@ -291,14 +291,14 @@ operator [] (int n) { * doubt. */ INLINE XFileDataObject &XFileDataObject:: -operator [] (const string &name) { +operator [] (const std::string &name) { XFileDataObject *element = get_element(name); nassertr(element != nullptr, *this); return *element; } -INLINE ostream & -operator << (ostream &out, const XFileDataObject &data_object) { +INLINE std::ostream & +operator << (std::ostream &out, const XFileDataObject &data_object) { data_object.output_data(out); return out; } diff --git a/pandatool/src/xfile/xFileDataObject.h b/pandatool/src/xfile/xFileDataObject.h index 6b40c5f399..814d5f3c3f 100644 --- a/pandatool/src/xfile/xFileDataObject.h +++ b/pandatool/src/xfile/xFileDataObject.h @@ -35,11 +35,11 @@ public: INLINE const XFileDataDef *get_data_def() const; virtual bool is_complex_object() const; - virtual string get_type_name() const; + virtual std::string get_type_name() const; INLINE void operator = (int int_value); INLINE void operator = (double double_value); - INLINE void operator = (const string &string_value); + INLINE void operator = (const std::string &string_value); INLINE void operator = (const LVecBase2d &vec); INLINE void operator = (const LVecBase3d &vec); INLINE void operator = (const LVecBase4d &vec); @@ -47,7 +47,7 @@ public: INLINE void set(int int_value); INLINE void set(double double_value); - INLINE void set(const string &string_value); + INLINE void set(const std::string &string_value); INLINE void set(const LVecBase2d &vec); INLINE void set(const LVecBase3d &vec); INLINE void set(const LVecBase4d &vec); @@ -55,7 +55,7 @@ public: INLINE int i() const; INLINE double d() const; - INLINE string s() const; + INLINE std::string s() const; INLINE LVecBase2d vec2() const; INLINE LVecBase3d vec3() const; INLINE LVecBase4d vec4() const; @@ -63,17 +63,17 @@ public: INLINE int size() const; INLINE const XFileDataObject &operator [] (int n) const; - INLINE const XFileDataObject &operator [] (const string &name) const; + INLINE const XFileDataObject &operator [] (const std::string &name) const; INLINE XFileDataObject &operator [] (int n); - INLINE XFileDataObject &operator [] (const string &name); + INLINE XFileDataObject &operator [] (const std::string &name); // The following methods can be used to add elements of a specific type to a // complex object, e.g. an array or a template object. XFileDataObject &add_int(int int_value); XFileDataObject &add_double(double double_value); - XFileDataObject &add_string(const string &string_value); + XFileDataObject &add_string(const std::string &string_value); // The following methods can be used to add elements of a specific type, // based on one of the standard templates. @@ -87,24 +87,24 @@ public: public: virtual bool add_element(XFileDataObject *element); - virtual void output_data(ostream &out) const; - virtual void write_data(ostream &out, int indent_level, + virtual void output_data(std::ostream &out) const; + virtual void write_data(std::ostream &out, int indent_level, const char *separator) const; protected: virtual void set_int_value(int int_value); virtual void set_double_value(double double_value); - virtual void set_string_value(const string &string_value); + virtual void set_string_value(const std::string &string_value); void store_double_array(int num_elements, const double *values); virtual int get_int_value() const; virtual double get_double_value() const; - virtual string get_string_value() const; + virtual std::string get_string_value() const; void get_double_array(int num_elements, double *values) const; virtual int get_num_elements() const; virtual XFileDataObject *get_element(int n); - virtual XFileDataObject *get_element(const string &name); + virtual XFileDataObject *get_element(const std::string &name); const XFileDataDef *_data_def; @@ -126,7 +126,7 @@ private: static TypeHandle _type_handle; }; -INLINE ostream &operator << (ostream &out, const XFileDataObject &data_object); +INLINE std::ostream &operator << (std::ostream &out, const XFileDataObject &data_object); #include "xFileDataObject.I" diff --git a/pandatool/src/xfile/xFileDataObjectArray.h b/pandatool/src/xfile/xFileDataObjectArray.h index e42df7845d..3b9000c9ee 100644 --- a/pandatool/src/xfile/xFileDataObjectArray.h +++ b/pandatool/src/xfile/xFileDataObjectArray.h @@ -28,7 +28,7 @@ public: virtual bool add_element(XFileDataObject *element); - virtual void write_data(ostream &out, int indent_level, + virtual void write_data(std::ostream &out, int indent_level, const char *separator) const; protected: diff --git a/pandatool/src/xfile/xFileDataObjectDouble.h b/pandatool/src/xfile/xFileDataObjectDouble.h index afa20ee859..4450f45288 100644 --- a/pandatool/src/xfile/xFileDataObjectDouble.h +++ b/pandatool/src/xfile/xFileDataObjectDouble.h @@ -25,8 +25,8 @@ class XFileDataObjectDouble : public XFileDataObject { public: XFileDataObjectDouble(const XFileDataDef *data_def, double value); - virtual void output_data(ostream &out) const; - virtual void write_data(ostream &out, int indent_level, + virtual void output_data(std::ostream &out) const; + virtual void write_data(std::ostream &out, int indent_level, const char *separator) const; protected: @@ -35,7 +35,7 @@ protected: virtual int get_int_value() const; virtual double get_double_value() const; - virtual string get_string_value() const; + virtual std::string get_string_value() const; private: double _value; diff --git a/pandatool/src/xfile/xFileDataObjectInteger.h b/pandatool/src/xfile/xFileDataObjectInteger.h index 59e3ea13d3..b185ea9310 100644 --- a/pandatool/src/xfile/xFileDataObjectInteger.h +++ b/pandatool/src/xfile/xFileDataObjectInteger.h @@ -25,8 +25,8 @@ class XFileDataObjectInteger : public XFileDataObject { public: XFileDataObjectInteger(const XFileDataDef *data_def, int value); - virtual void output_data(ostream &out) const; - virtual void write_data(ostream &out, int indent_level, + virtual void output_data(std::ostream &out) const; + virtual void write_data(std::ostream &out, int indent_level, const char *separator) const; protected: @@ -34,7 +34,7 @@ protected: virtual int get_int_value() const; virtual double get_double_value() const; - virtual string get_string_value() const; + virtual std::string get_string_value() const; private: int _value; diff --git a/pandatool/src/xfile/xFileDataObjectString.h b/pandatool/src/xfile/xFileDataObjectString.h index 20dd503e06..1fd10dea2b 100644 --- a/pandatool/src/xfile/xFileDataObjectString.h +++ b/pandatool/src/xfile/xFileDataObjectString.h @@ -23,20 +23,20 @@ */ class XFileDataObjectString : public XFileDataObject { public: - XFileDataObjectString(const XFileDataDef *data_def, const string &value); + XFileDataObjectString(const XFileDataDef *data_def, const std::string &value); - virtual void output_data(ostream &out) const; - virtual void write_data(ostream &out, int indent_level, + virtual void output_data(std::ostream &out) const; + virtual void write_data(std::ostream &out, int indent_level, const char *separator) const; protected: - virtual void set_string_value(const string &string_value); - virtual string get_string_value() const; + virtual void set_string_value(const std::string &string_value); + virtual std::string get_string_value() const; private: - void enquote_string(ostream &out) const; + void enquote_string(std::ostream &out) const; - string _value; + std::string _value; public: static TypeHandle get_class_type() { diff --git a/pandatool/src/xfile/xFileNode.h b/pandatool/src/xfile/xFileNode.h index 89ab1a1ba8..a954b8f9fd 100644 --- a/pandatool/src/xfile/xFileNode.h +++ b/pandatool/src/xfile/xFileNode.h @@ -39,17 +39,17 @@ class Filename; class XFileNode : public TypedObject, public Namable, virtual public ReferenceCount { public: - XFileNode(XFile *x_file, const string &name); + XFileNode(XFile *x_file, const std::string &name); virtual ~XFileNode(); INLINE XFile *get_x_file() const; INLINE int get_num_children() const; INLINE XFileNode *get_child(int n) const; - XFileNode *find_child(const string &name) const; - int find_child_index(const string &name) const; + XFileNode *find_child(const std::string &name) const; + int find_child_index(const std::string &name) const; int find_child_index(const XFileNode *child) const; - XFileNode *find_descendent(const string &name) const; + XFileNode *find_descendent(const std::string &name) const; INLINE int get_num_objects() const; INLINE XFileDataNode *get_object(int n) const; @@ -60,12 +60,12 @@ public: virtual bool is_template_def() const; virtual bool is_reference() const; virtual bool is_object() const; - virtual bool is_standard_object(const string &template_name) const; + virtual bool is_standard_object(const std::string &template_name) const; void add_child(XFileNode *node); virtual void clear(); - virtual void write_text(ostream &out, int indent_level) const; + virtual void write_text(std::ostream &out, int indent_level) const; typedef pmap PrevData; @@ -81,21 +81,21 @@ public: // The following methods can be used to create instances of the standard // template objects. These definitions match those defined in // standardTemplates.x in this directory (and compiled into the executable). - XFileDataNode *add_Mesh(const string &name); - XFileDataNode *add_MeshNormals(const string &name); - XFileDataNode *add_MeshVertexColors(const string &name); - XFileDataNode *add_MeshTextureCoords(const string &name); - XFileDataNode *add_MeshMaterialList(const string &name); - XFileDataNode *add_Material(const string &name, const LColor &face_color, + XFileDataNode *add_Mesh(const std::string &name); + XFileDataNode *add_MeshNormals(const std::string &name); + XFileDataNode *add_MeshVertexColors(const std::string &name); + XFileDataNode *add_MeshTextureCoords(const std::string &name); + XFileDataNode *add_MeshMaterialList(const std::string &name); + XFileDataNode *add_Material(const std::string &name, const LColor &face_color, double power, const LRGBColor &specular_color, const LRGBColor &emissive_color); - XFileDataNode *add_TextureFilename(const string &name, + XFileDataNode *add_TextureFilename(const std::string &name, const Filename &filename); - XFileDataNode *add_Frame(const string &name); + XFileDataNode *add_Frame(const std::string &name); XFileDataNode *add_FrameTransformMatrix(const LMatrix4d &mat); public: - static string make_nice_name(const string &str); + static std::string make_nice_name(const std::string &str); protected: XFile *_x_file; @@ -106,7 +106,7 @@ protected: typedef pvector Objects; Objects _objects; - typedef pmap ChildrenByName; + typedef pmap ChildrenByName; ChildrenByName _children_by_name; public: diff --git a/pandatool/src/xfile/xFileParseData.h b/pandatool/src/xfile/xFileParseData.h index c31089274b..2e7ef8dbc0 100644 --- a/pandatool/src/xfile/xFileParseData.h +++ b/pandatool/src/xfile/xFileParseData.h @@ -31,7 +31,7 @@ class XFileParseData { public: XFileParseData(); - void yyerror(const string &message) const; + void yyerror(const std::string &message) const; enum ParseFlags { PF_object = 0x001, @@ -45,12 +45,12 @@ public: PT(XFileDataObject) _object; PTA_double _double_list; PTA_int _int_list; - string _string; + std::string _string; int _parse_flags; int _line_number; int _col_number; - string _current_line; + std::string _current_line; }; /** diff --git a/pandatool/src/xfile/xFileTemplate.h b/pandatool/src/xfile/xFileTemplate.h index 2f4770c66a..5acc117072 100644 --- a/pandatool/src/xfile/xFileTemplate.h +++ b/pandatool/src/xfile/xFileTemplate.h @@ -26,7 +26,7 @@ class XFileDataDef; */ class XFileTemplate : public XFileNode { public: - XFileTemplate(XFile *x_file, const string &name, const WindowsGuid &guid); + XFileTemplate(XFile *x_file, const std::string &name, const WindowsGuid &guid); virtual ~XFileTemplate(); virtual bool has_guid() const; @@ -35,7 +35,7 @@ public: virtual bool is_template_def() const; virtual void clear(); - virtual void write_text(ostream &out, int indent_level) const; + virtual void write_text(std::ostream &out, int indent_level) const; INLINE bool is_standard() const; diff --git a/pandatool/src/xfile/xLexerDefs.h b/pandatool/src/xfile/xLexerDefs.h index eb600edb32..c256cd0d05 100644 --- a/pandatool/src/xfile/xLexerDefs.h +++ b/pandatool/src/xfile/xLexerDefs.h @@ -16,14 +16,14 @@ #include "pandatoolbase.h" -void x_init_lexer(istream &in, const string &filename); +void x_init_lexer(std::istream &in, const std::string &filename); int x_error_count(); int x_warning_count(); -void xyyerror(const string &msg); -void xyyerror(const string &msg, int line_number, int col_number, - const string ¤t_line); -void xyywarning(const string &msg); +void xyyerror(const std::string &msg); +void xyyerror(const std::string &msg, int line_number, int col_number, + const std::string ¤t_line); +void xyywarning(const std::string &msg); int xyylex(); diff --git a/pandatool/src/xfile/xParserDefs.h b/pandatool/src/xfile/xParserDefs.h index 898d4a150e..0900ae4267 100644 --- a/pandatool/src/xfile/xParserDefs.h +++ b/pandatool/src/xfile/xParserDefs.h @@ -23,7 +23,7 @@ class XFile; class XFileNode; -void x_init_parser(istream &in, const string &filename, XFile &file); +void x_init_parser(std::istream &in, const std::string &filename, XFile &file); void x_cleanup_parser(); int xyyparse(); @@ -40,7 +40,7 @@ public: XFileNode *node; XFileDataDef::Type primitive_type; } u; - string str; + std::string str; WindowsGuid guid; PTA_double double_list; PTA_int int_list; diff --git a/pandatool/src/xfileegg/xFileAnimationSet.h b/pandatool/src/xfileegg/xFileAnimationSet.h index 9ef7e1d134..a0bec7d43a 100644 --- a/pandatool/src/xfileegg/xFileAnimationSet.h +++ b/pandatool/src/xfileegg/xFileAnimationSet.h @@ -36,7 +36,7 @@ public: ~XFileAnimationSet(); bool create_hierarchy(XFileToEggConverter *converter); - EggXfmSAnim *get_table(const string &joint_name) const; + EggXfmSAnim *get_table(const std::string &joint_name) const; enum FrameDataFlags { FDF_scale = 0x01, @@ -65,7 +65,7 @@ public: int _flags; }; - FrameData &create_frame_data(const string &joint_name); + FrameData &create_frame_data(const std::string &joint_name); public: double _frame_rate; @@ -74,7 +74,7 @@ private: void mirror_table(XFileToEggConverter *converter, EggGroup *model_node, EggTable *anim_node); - typedef pmap JointData; + typedef pmap JointData; JointData _joint_data; class TablePair { @@ -83,7 +83,7 @@ private: EggXfmSAnim *_table; }; - typedef pmap Tables; + typedef pmap Tables; Tables _tables; }; diff --git a/pandatool/src/xfileegg/xFileMaterial.h b/pandatool/src/xfileegg/xFileMaterial.h index 915bff11b0..dc6a586d09 100644 --- a/pandatool/src/xfileegg/xFileMaterial.h +++ b/pandatool/src/xfileegg/xFileMaterial.h @@ -41,7 +41,7 @@ public: bool has_material() const; bool has_texture() const; - XFileDataNode *make_x_material(XFileNode *x_meshMaterials, const string &suffix); + XFileDataNode *make_x_material(XFileNode *x_meshMaterials, const std::string &suffix); bool fill_material(XFileDataNode *obj); private: diff --git a/pandatool/src/xfileegg/xFileMesh.h b/pandatool/src/xfileegg/xFileMesh.h index 8c300f2db6..417d7c4253 100644 --- a/pandatool/src/xfileegg/xFileMesh.h +++ b/pandatool/src/xfileegg/xFileMesh.h @@ -68,11 +68,11 @@ public: int get_num_materials() const; XFileMaterial *get_material(int n) const; - XFileDataNode *make_x_mesh(XFileNode *x_parent, const string &suffix); - XFileDataNode *make_x_normals(XFileNode *x_mesh, const string &suffix); - XFileDataNode *make_x_colors(XFileNode *x_mesh, const string &suffix); - XFileDataNode *make_x_uvs(XFileNode *x_mesh, const string &suffix); - XFileDataNode *make_x_material_list(XFileNode *x_mesh, const string &suffix); + XFileDataNode *make_x_mesh(XFileNode *x_parent, const std::string &suffix); + XFileDataNode *make_x_normals(XFileNode *x_mesh, const std::string &suffix); + XFileDataNode *make_x_colors(XFileNode *x_mesh, const std::string &suffix); + XFileDataNode *make_x_uvs(XFileNode *x_mesh, const std::string &suffix); + XFileDataNode *make_x_material_list(XFileNode *x_mesh, const std::string &suffix); bool fill_mesh(XFileDataNode *obj); bool fill_mesh_child(XFileDataNode *obj); @@ -100,7 +100,7 @@ private: class SkinWeightsData { public: LMatrix4d _matrix_offset; - string _joint_name; + std::string _joint_name; WeightMap _weight_map; }; typedef epvector SkinWeights; diff --git a/pandatool/src/xfileegg/xFileToEggConverter.h b/pandatool/src/xfileegg/xFileToEggConverter.h index c853cae4ca..d92f4c2325 100644 --- a/pandatool/src/xfileegg/xFileToEggConverter.h +++ b/pandatool/src/xfileegg/xFileToEggConverter.h @@ -45,8 +45,8 @@ public: virtual SomethingToEggConverter *make_copy(); - virtual string get_name() const; - virtual string get_extension() const; + virtual std::string get_name() const; + virtual std::string get_extension() const; virtual bool supports_compressed() const; virtual bool convert_file(const Filename &filename); @@ -56,12 +56,12 @@ public: EggTexture *create_unique_texture(const EggTexture ©); EggMaterial *create_unique_material(const EggMaterial ©); - EggGroup *find_joint(const string &joint_name); + EggGroup *find_joint(const std::string &joint_name); void strip_nodes(TypeHandle t); public: bool _make_char; - string _char_name; + std::string _char_name; double _frame_rate; bool _keep_model; bool _keep_animation; @@ -80,10 +80,10 @@ private: bool convert_animation(XFileDataNode *obj, XFileAnimationSet &animation_set); bool convert_animation_object(XFileDataNode *obj, - const string &joint_name, FrameData &table); - bool convert_animation_key(XFileDataNode *obj, const string &joint_name, + const std::string &joint_name, FrameData &table); + bool convert_animation_key(XFileDataNode *obj, const std::string &joint_name, FrameData &table); - bool set_animation_frame(const string &joint_name, FrameData &table, + bool set_animation_frame(const std::string &joint_name, FrameData &table, int frame, int key_type, const XFileDataObject &values); bool convert_mesh(XFileDataNode *obj, EggGroupNode *egg_parent); @@ -105,7 +105,7 @@ private: typedef pvector AnimationSets; AnimationSets _animation_sets; - typedef pmap Joints; + typedef pmap Joints; Joints _joints; EggGroup *_dart_node; diff --git a/pandatool/src/xfileprogs/xFileToEgg.h b/pandatool/src/xfileprogs/xFileToEgg.h index 2adbc7e2f7..c95815fe2c 100644 --- a/pandatool/src/xfileprogs/xFileToEgg.h +++ b/pandatool/src/xfileprogs/xFileToEgg.h @@ -31,7 +31,7 @@ public: public: bool _make_char; - string _char_name; + std::string _char_name; double _frame_rate; bool _keep_model; bool _keep_animation;