From 23e6780695c03d940ce1c75492185e30ea89bdc6 Mon Sep 17 00:00:00 2001 From: "Ithamar R. Adema" Date: Fri, 14 Jul 2006 20:51:34 +0000 Subject: [PATCH] Lots 'n lots of STL fixes to make it compiling for GCC 4+ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18152 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/cortex/DiagramView/DiagramItem.h | 6 ++--- src/apps/cortex/DiagramView/DiagramWire.h | 2 +- src/apps/cortex/MediaRoutingView/Jamfile | 1 + .../MediaRoutingView/MediaNodePanel.cpp | 2 ++ src/apps/cortex/NodeManager/Connection.h | 4 ++-- src/apps/cortex/NodeManager/NodeGroup.cpp | 2 ++ src/apps/cortex/NodeManager/NodeGroup.h | 6 ++--- src/apps/cortex/NodeManager/NodeManager.cpp | 2 ++ src/apps/cortex/NodeManager/NodeManager.h | 12 +++++----- src/apps/cortex/NodeManager/NodeRef.cpp | 2 ++ src/apps/cortex/NodeManager/NodeRef.h | 22 +++++++++---------- src/apps/cortex/Persistence/ExportContext.h | 4 ++-- src/apps/cortex/Persistence/ImportContext.cpp | 2 ++ src/apps/cortex/Persistence/ImportContext.h | 12 +++++----- src/apps/cortex/Persistence/Importer.cpp | 2 ++ src/apps/cortex/Persistence/Importer.h | 4 ++-- .../cortex/Persistence/Wrappers/MessageIO.cpp | 4 +++- src/apps/cortex/Persistence/XML.cpp | 2 ++ src/apps/cortex/Persistence/XML.h | 14 +++++++----- .../cortex/Persistence/XMLElementMapping.h | 2 +- src/apps/cortex/RouteApp/ConnectionIO.cpp | 4 +++- src/apps/cortex/RouteApp/Jamfile | 1 + src/apps/cortex/RouteApp/NodeSetIOContext.h | 6 ++--- src/apps/cortex/RouteApp/RouteApp.cpp | 2 ++ .../cortex/RouteApp/RouteAppNodeManager.cpp | 2 ++ .../cortex/RouteApp/RouteAppNodeManager.h | 4 ++-- src/apps/cortex/RouteApp/StatusView.cpp | 2 +- src/apps/cortex/TipManager/TipManagerImpl.cpp | 2 ++ src/apps/cortex/TipManager/TipManagerImpl.h | 12 +++++----- src/apps/cortex/TipManager/TipView.cpp | 4 +++- src/apps/cortex/TipManager/TipView.h | 4 ++-- src/apps/cortex/TipManager/TipWindow.cpp | 4 ++-- .../cortex/TransportView/TransportView.cpp | 2 ++ src/apps/cortex/TransportView/TransportView.h | 6 ++--- src/apps/cortex/ValControl/ValControl.cpp | 2 ++ src/apps/cortex/ValControl/ValControl.h | 2 +- src/apps/cortex/support/debug_tools.cpp | 2 ++ src/apps/cortex/support/debug_tools.h | 6 ++--- src/apps/cortex/support/functional_tools.h | 16 +++++++------- src/apps/cortex/support/observe.h | 3 ++- src/apps/cortex/support/set_tools.h | 10 ++++----- 41 files changed, 120 insertions(+), 83 deletions(-) diff --git a/src/apps/cortex/DiagramView/DiagramItem.h b/src/apps/cortex/DiagramView/DiagramItem.h index 4342de7936..1d0a98d22d 100644 --- a/src/apps/cortex/DiagramView/DiagramItem.h +++ b/src/apps/cortex/DiagramView/DiagramItem.h @@ -30,9 +30,9 @@ class DiagramBox; class DiagramItem { - friend DiagramItemGroup; - friend DiagramView; - friend DiagramBox; + friend class DiagramItemGroup; + friend class DiagramView; + friend class DiagramBox; public: // *** types diff --git a/src/apps/cortex/DiagramView/DiagramWire.h b/src/apps/cortex/DiagramView/DiagramWire.h index 4a800d4514..332d025023 100644 --- a/src/apps/cortex/DiagramView/DiagramWire.h +++ b/src/apps/cortex/DiagramView/DiagramWire.h @@ -24,7 +24,7 @@ class DiagramEndPoint; class DiagramWire : public DiagramItem { - friend DiagramView; + friend class DiagramView; public: // *** ctor/dtor diff --git a/src/apps/cortex/MediaRoutingView/Jamfile b/src/apps/cortex/MediaRoutingView/Jamfile index 3ad9adc3be..c18a1c707d 100644 --- a/src/apps/cortex/MediaRoutingView/Jamfile +++ b/src/apps/cortex/MediaRoutingView/Jamfile @@ -11,6 +11,7 @@ SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) RouteApp ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) TipManager ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) TransportView ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) support ] ; +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) expat xmlparse ] ; SubDirCcFlags -DCORTEX_NAMESPACE=cortex ; diff --git a/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp b/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp index c2e49f5dce..e64ad211e1 100644 --- a/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp +++ b/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp @@ -32,6 +32,8 @@ #include #include +using namespace std; + __USE_CORTEX_NAMESPACE #include diff --git a/src/apps/cortex/NodeManager/Connection.h b/src/apps/cortex/NodeManager/Connection.h index b89bd984e8..24b37dc779 100644 --- a/src/apps/cortex/NodeManager/Connection.h +++ b/src/apps/cortex/NodeManager/Connection.h @@ -40,8 +40,8 @@ class NodeRef; class Connection { // rather incestuous set of classes we've got here... - friend NodeRef; - friend NodeManager; + friend class NodeRef; + friend class NodeManager; public: // *** types & constants enum flag_t { diff --git a/src/apps/cortex/NodeManager/NodeGroup.cpp b/src/apps/cortex/NodeManager/NodeGroup.cpp index 231e9ba464..42e9964d1b 100644 --- a/src/apps/cortex/NodeManager/NodeGroup.cpp +++ b/src/apps/cortex/NodeManager/NodeGroup.cpp @@ -18,6 +18,8 @@ #include "node_manager_impl.h" #include "functional_tools.h" +using namespace std; + __USE_CORTEX_NAMESPACE #define D_METHOD(x) //PRINT (x) #define D_ROSTER(x) //PRINT (x) diff --git a/src/apps/cortex/NodeManager/NodeGroup.h b/src/apps/cortex/NodeManager/NodeGroup.h index 2461665af8..64846b366a 100644 --- a/src/apps/cortex/NodeManager/NodeGroup.h +++ b/src/apps/cortex/NodeManager/NodeGroup.h @@ -104,8 +104,8 @@ class NodeGroup : typedef ObservableHandler _inherited; - friend NodeManager; - friend NodeRef; + friend class NodeManager; + friend class NodeRef; public: // *** messages enum message_t { @@ -542,7 +542,7 @@ private: // *** members BString m_name; // group contents - typedef vector node_set; + typedef std::vector node_set; node_set m_nodes; // flags & state diff --git a/src/apps/cortex/NodeManager/NodeManager.cpp b/src/apps/cortex/NodeManager/NodeManager.cpp index dc3058e45e..30e5cde391 100644 --- a/src/apps/cortex/NodeManager/NodeManager.cpp +++ b/src/apps/cortex/NodeManager/NodeManager.cpp @@ -21,6 +21,8 @@ #include "node_manager_impl.h" +using namespace std; + __USE_CORTEX_NAMESPACE #define D_METHOD(x) //PRINT (x) diff --git a/src/apps/cortex/NodeManager/NodeManager.h b/src/apps/cortex/NodeManager/NodeManager.h index 48a2a263e0..dfaedcaeee 100644 --- a/src/apps/cortex/NodeManager/NodeManager.h +++ b/src/apps/cortex/NodeManager/NodeManager.h @@ -71,9 +71,9 @@ class NodeManager : // primary parent class: typedef ObservableLooper _inherited; - friend NodeGroup; - friend NodeRef; - friend Connection; + friend class NodeGroup; + friend class NodeRef; + friend class Connection; public: // *** messages // [13aug99] @@ -521,17 +521,17 @@ private: // *** internal messages private: // *** members // the main NodeRef store - typedef map node_ref_map; + typedef std::map node_ref_map; node_ref_map m_nodeRefMap; // the Connection stores (connections are indexed by both // source and destination node ID) - typedef multimap con_map; + typedef std::multimap con_map; con_map m_conSourceMap; con_map m_conDestinationMap; // the NodeGroup store - typedef vector node_group_set; + typedef std::vector node_group_set; node_group_set m_nodeGroupSet; // common system nodes diff --git a/src/apps/cortex/NodeManager/NodeRef.cpp b/src/apps/cortex/NodeManager/NodeRef.cpp index 508a253863..cde43f08cb 100644 --- a/src/apps/cortex/NodeManager/NodeRef.cpp +++ b/src/apps/cortex/NodeManager/NodeRef.cpp @@ -25,6 +25,8 @@ // -------------------------------------------------------- // +using namespace std; + __USE_CORTEX_NAMESPACE #define D_METHOD(x) //PRINT (x) diff --git a/src/apps/cortex/NodeManager/NodeRef.h b/src/apps/cortex/NodeManager/NodeRef.h index fef4f7ce58..0b892004a5 100644 --- a/src/apps/cortex/NodeManager/NodeRef.h +++ b/src/apps/cortex/NodeManager/NodeRef.h @@ -44,8 +44,8 @@ class NodeRef : typedef ObservableHandler _inherited; - friend NodeManager; - friend NodeGroup; + friend class NodeManager; + friend class NodeGroup; public: // *** messages enum message_t { @@ -212,11 +212,11 @@ public: // *** connection access // connection access: vector versions status_t getInputConnections( - vector& ioConnections, + std::vector& ioConnections, media_type filterType=B_MEDIA_UNKNOWN_TYPE) const; status_t getOutputConnections( - vector& ioConnections, + std::vector& ioConnections, media_type filterType=B_MEDIA_UNKNOWN_TYPE) const; // connection access: flat array versions @@ -326,19 +326,19 @@ public: // *** BMediaRoster wrappers & convenience methods // calls.) status_t getFreeInputs( - vector& ioInputs, + std::vector& ioInputs, media_type filterType=B_MEDIA_UNKNOWN_TYPE) const; status_t getConnectedInputs( - vector& ioInputs, + std::vector& ioInputs, media_type filterType=B_MEDIA_UNKNOWN_TYPE) const; status_t getFreeOutputs( - vector& ioOutputs, + std::vector& ioOutputs, media_type filterType=B_MEDIA_UNKNOWN_TYPE) const; status_t getConnectedOutputs( - vector& ioOutputs, + std::vector& ioOutputs, media_type filterType=B_MEDIA_UNKNOWN_TYPE) const; @@ -408,13 +408,13 @@ protected: // *** endpoint-fixing operations (no lock required) media_input* inputs, int32 count) const; void _fixInputs( - vector& inputs) const; + std::vector& inputs) const; void _fixOutputs( media_output* outputs, int32 count) const; void _fixOutputs( - vector& outputs) const; + std::vector& outputs) const; protected: // *** internal/NodeManager operations (LOCK REQUIRED) @@ -608,7 +608,7 @@ private: // *** members bigtime_t m_positionUpdatePeriod; static const bigtime_t s_defaultPositionUpdatePeriod = 50000LL; - MultiInvoker m_positionInvoker; + ::MultiInvoker m_positionInvoker; bigtime_t m_tpLastPositionUpdate; bigtime_t m_lastPosition; diff --git a/src/apps/cortex/Persistence/ExportContext.h b/src/apps/cortex/Persistence/ExportContext.h index a11d4f0b90..3b0c33ea9b 100644 --- a/src/apps/cortex/Persistence/ExportContext.h +++ b/src/apps/cortex/Persistence/ExportContext.h @@ -52,7 +52,7 @@ public: // *** public members bool hasContent; }; - typedef list element_list; + typedef std::list element_list; element_list m_elementStack; public: // *** XML formatting helpers @@ -228,7 +228,7 @@ private: // members IPersistent* object; }; - typedef list object_list; + typedef std::list object_list; object_list m_objectStack; private: diff --git a/src/apps/cortex/Persistence/ImportContext.cpp b/src/apps/cortex/Persistence/ImportContext.cpp index 6f4b251395..a7c37d5399 100644 --- a/src/apps/cortex/Persistence/ImportContext.cpp +++ b/src/apps/cortex/Persistence/ImportContext.cpp @@ -4,6 +4,8 @@ #include "ImportContext.h" #include "xmlparse.h" +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // diff --git a/src/apps/cortex/Persistence/ImportContext.h b/src/apps/cortex/Persistence/ImportContext.h index 560915ca6f..b8d1e70f0d 100644 --- a/src/apps/cortex/Persistence/ImportContext.h +++ b/src/apps/cortex/Persistence/ImportContext.h @@ -31,7 +31,7 @@ public: // *** types public: // *** ctor/dtor virtual ~ImportContext(); ImportContext( - list& errors); + std::list& errors); public: // *** accessors @@ -43,7 +43,7 @@ public: // *** accessors // (returns 0 if the stack is empty or the current element is top-level) const char* parentElement() const; - list& errors() const; + std::list& errors() const; const state_t state() const; public: // *** error-reporting operations @@ -64,11 +64,11 @@ protected: // *** internal operations private: // *** members state_t m_state; - list& m_errors; + std::list& m_errors; - list m_elementStack; - typedef pair object_entry; - list m_objectStack; + std::list m_elementStack; + typedef std::pair object_entry; + std::list m_objectStack; void* m_pParser; }; diff --git a/src/apps/cortex/Persistence/Importer.cpp b/src/apps/cortex/Persistence/Importer.cpp index 68e8fc2b79..8db4eeb785 100644 --- a/src/apps/cortex/Persistence/Importer.cpp +++ b/src/apps/cortex/Persistence/Importer.cpp @@ -7,6 +7,8 @@ #include #include +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // diff --git a/src/apps/cortex/Persistence/Importer.h b/src/apps/cortex/Persistence/Importer.h index 119b86b67d..8d14e2ca3b 100644 --- a/src/apps/cortex/Persistence/Importer.h +++ b/src/apps/cortex/Persistence/Importer.h @@ -31,7 +31,7 @@ public: // *** ctor/dtor // constructs a format-guessing Importer (uses the // DocumentType registry) Importer( - list& errors); + std::list& errors); // the Importer takes ownership of the given context! Importer( @@ -40,7 +40,7 @@ public: // *** ctor/dtor // constructs a manual Importer; the given root // object is populated Importer( - list& errors, + std::list& errors, IPersistent* rootObject, XML::DocumentType* docType); diff --git a/src/apps/cortex/Persistence/Wrappers/MessageIO.cpp b/src/apps/cortex/Persistence/Wrappers/MessageIO.cpp index b3c387fc0e..44dc620123 100644 --- a/src/apps/cortex/Persistence/Wrappers/MessageIO.cpp +++ b/src/apps/cortex/Persistence/Wrappers/MessageIO.cpp @@ -11,6 +11,8 @@ #include #include +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // @@ -546,4 +548,4 @@ status_t MessageIO::_exportField( return B_OK; } -// END -- MessageIO.cpp -- \ No newline at end of file +// END -- MessageIO.cpp -- diff --git a/src/apps/cortex/Persistence/XML.cpp b/src/apps/cortex/Persistence/XML.cpp index 6d0e937806..4dbc019739 100644 --- a/src/apps/cortex/Persistence/XML.cpp +++ b/src/apps/cortex/Persistence/XML.cpp @@ -10,6 +10,8 @@ #include "array_delete.h" #include "set_tools.h" +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // diff --git a/src/apps/cortex/Persistence/XML.h b/src/apps/cortex/Persistence/XML.h index 4da851bba6..28c252283e 100644 --- a/src/apps/cortex/Persistence/XML.h +++ b/src/apps/cortex/Persistence/XML.h @@ -35,6 +35,8 @@ #include "cortex_defs.h" __BEGIN_CORTEX_NAMESPACE +class Importer; + // -------------------------------------------------------- // // class XML // -------------------------------------------------------- // @@ -65,7 +67,7 @@ public: // *** import/export operations static status_t Identify( BDataIO* stream, DocumentType** outType, - list* outErrors); + std::list* outErrors); // create & populate the root object from the given // XML stream. @@ -78,7 +80,7 @@ public: // *** import/export operations static status_t Read( BDataIO* stream, IPersistent** outObject, - list* outErrors); + std::list* outErrors); static status_t Read( BDataIO* stream, @@ -99,7 +101,7 @@ public: // *** import/export operations BDataIO* stream, IPersistent* rootObject, XML::DocumentType* documentType, - list* outErrors); + std::list* outErrors); static status_t Read( BDataIO* stream, @@ -117,7 +119,7 @@ public: // *** import/export operations private: // static members - typedef map doc_type_map; + typedef std::map doc_type_map; static doc_type_map s_docTypeMap; static BLocker s_docTypeLock; @@ -126,7 +128,7 @@ private: // implementation static status_t _DoRead( BDataIO* stream, Importer& i, - list* outErrors); //nyi + std::list* outErrors); //nyi }; // -------------------------------------------------------- // @@ -162,7 +164,7 @@ public: // *** 'factory' interface private: // implementation - typedef set mapping_set; + typedef std::set mapping_set; mapping_set m_mappingSet; }; diff --git a/src/apps/cortex/Persistence/XMLElementMapping.h b/src/apps/cortex/Persistence/XMLElementMapping.h index 67b477b1ba..b99a02de61 100644 --- a/src/apps/cortex/Persistence/XMLElementMapping.h +++ b/src/apps/cortex/Persistence/XMLElementMapping.h @@ -50,7 +50,7 @@ public: }; // compare pointers to Mappings by element name -struct _mapping_ptr_less : public binary_function { +struct _mapping_ptr_less : public std::binary_function { public: bool operator()(const XMLElementMapping* a, const XMLElementMapping* b) const { return a->element < b->element; diff --git a/src/apps/cortex/RouteApp/ConnectionIO.cpp b/src/apps/cortex/RouteApp/ConnectionIO.cpp index 346150ffd3..30e34e7f25 100644 --- a/src/apps/cortex/RouteApp/ConnectionIO.cpp +++ b/src/apps/cortex/RouteApp/ConnectionIO.cpp @@ -11,6 +11,8 @@ #include #include +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // @@ -496,4 +498,4 @@ void ConnectionIO::xmlImportChildComplete( m_importState = IMPORT_NONE; } -// END -- ConnectionIO.cpp -- \ No newline at end of file +// END -- ConnectionIO.cpp -- diff --git a/src/apps/cortex/RouteApp/Jamfile b/src/apps/cortex/RouteApp/Jamfile index a9ffc0daff..17e94dbe72 100644 --- a/src/apps/cortex/RouteApp/Jamfile +++ b/src/apps/cortex/RouteApp/Jamfile @@ -10,6 +10,7 @@ SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) Persistence Wrappers ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) TipManager ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) TransportView ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) support ] ; +SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) expat xmlparse ] ; SubDirCcFlags -DCORTEX_NAMESPACE=cortex ; diff --git a/src/apps/cortex/RouteApp/NodeSetIOContext.h b/src/apps/cortex/RouteApp/NodeSetIOContext.h index 50715adfee..617f7cef0f 100644 --- a/src/apps/cortex/RouteApp/NodeSetIOContext.h +++ b/src/apps/cortex/RouteApp/NodeSetIOContext.h @@ -67,8 +67,8 @@ public: // *** operations private: // implementation // the node/key set - typedef pair node_entry; - typedef vector node_set; + typedef std::pair node_entry; + typedef std::vector node_set; node_set m_nodes; // next node key value @@ -76,4 +76,4 @@ private: // implementation }; __END_CORTEX_NAMESPACE -#endif /*__NodeSetIOContext_H__*/ \ No newline at end of file +#endif /*__NodeSetIOContext_H__*/ diff --git a/src/apps/cortex/RouteApp/RouteApp.cpp b/src/apps/cortex/RouteApp/RouteApp.cpp index 23957024be..d4f92e3565 100644 --- a/src/apps/cortex/RouteApp/RouteApp.cpp +++ b/src/apps/cortex/RouteApp/RouteApp.cpp @@ -31,6 +31,8 @@ extern "C" void SetNewLeakChecking(bool); extern "C" void SetMallocLeakChecking(bool); +using namespace std; + __USE_CORTEX_NAMESPACE const char* const RouteApp::s_settingsDirectory = "Cortex"; diff --git a/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp b/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp index 167a108c46..b20e13f5b6 100644 --- a/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp +++ b/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp @@ -31,6 +31,8 @@ #include "set_tools.h" +using namespace std; + __USE_CORTEX_NAMESPACE #define D_METHOD(x) //PRINT (x) diff --git a/src/apps/cortex/RouteApp/RouteAppNodeManager.h b/src/apps/cortex/RouteApp/RouteAppNodeManager.h index 12f3a5c059..c6899cf51d 100644 --- a/src/apps/cortex/RouteApp/RouteAppNodeManager.h +++ b/src/apps/cortex/RouteApp/RouteAppNodeManager.h @@ -185,7 +185,7 @@ private: // implementation // KEY: // high 32 bits: media_node_id // low 32 bits: icon_size - typedef map icon_map; + typedef std::map icon_map; icon_map m_iconMap; // class import_state* m_importState; @@ -208,4 +208,4 @@ private: }; __END_CORTEX_NAMESPACE -#endif /*__RouteAppNodeManager_H__*/ \ No newline at end of file +#endif /*__RouteAppNodeManager_H__*/ diff --git a/src/apps/cortex/RouteApp/StatusView.cpp b/src/apps/cortex/RouteApp/StatusView.cpp index 64824f57e4..0f5dc15e53 100644 --- a/src/apps/cortex/RouteApp/StatusView.cpp +++ b/src/apps/cortex/RouteApp/StatusView.cpp @@ -326,7 +326,7 @@ StatusView::drawInto(BView *v, BRect updateRect) void StatusView::setMessage( BString &title, BString &details, - status_t error = B_OK) { + status_t error) { D_OPERATION(("StatusView::setMessage(%s)\n", title.String())); // get the tip manager instance and reset diff --git a/src/apps/cortex/TipManager/TipManagerImpl.cpp b/src/apps/cortex/TipManager/TipManagerImpl.cpp index 0163391ec8..e84881c0f6 100644 --- a/src/apps/cortex/TipManager/TipManagerImpl.cpp +++ b/src/apps/cortex/TipManager/TipManagerImpl.cpp @@ -15,6 +15,8 @@ //#include "debug_tools.h" +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // diff --git a/src/apps/cortex/TipManager/TipManagerImpl.h b/src/apps/cortex/TipManager/TipManagerImpl.h index 3ba8cba7a0..16f6ae6084 100644 --- a/src/apps/cortex/TipManager/TipManagerImpl.h +++ b/src/apps/cortex/TipManager/TipManagerImpl.h @@ -102,7 +102,7 @@ class tip_entry_ptr_less_fn { public: } }; -typedef set tip_entry_set; +typedef std::set tip_entry_set; // -------------------------------------------------------- // // _ViewEntry @@ -144,7 +144,7 @@ public: // *** interface // match the given point (in target's view coordinates) // against tips in this view and child views. - pair match( + std::pair match( BPoint point, BPoint screenPoint); @@ -168,7 +168,7 @@ private: _ViewEntry* m_parent; // [e.moon 13oct99] child view list now stores pointers - list<_ViewEntry*> m_childViews; + std::list<_ViewEntry*> m_childViews; tip_entry_set m_tips; }; @@ -208,7 +208,7 @@ public: // *** interface // match the given point (in screen coordinates) // against tips in this view and child views. - pair match( + std::pair match( BPoint screenPoint); BWindow* target() const { return m_target; } @@ -222,7 +222,7 @@ private: BWindow* m_target; // view subtrees with tip entries - list<_ViewEntry*> m_views; + std::list<_ViewEntry*> m_views; }; // -------------------------------------------------------- // @@ -318,7 +318,7 @@ private: // implementation TipManager* m_manager; // set of window entries containing one or more bound tip rectangles - list<_WindowEntry*> m_windows; + std::list<_WindowEntry*> m_windows; // update message source BMessageRunner* m_messageRunner; diff --git a/src/apps/cortex/TipManager/TipView.cpp b/src/apps/cortex/TipManager/TipView.cpp index 66bbf1dd2a..64b9cc86b6 100644 --- a/src/apps/cortex/TipManager/TipView.cpp +++ b/src/apps/cortex/TipManager/TipView.cpp @@ -7,6 +7,8 @@ #include #include +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // @@ -205,4 +207,4 @@ float TipView::_textHeight() { return height; } -// END -- TipView.cpp -- \ No newline at end of file +// END -- TipView.cpp -- diff --git a/src/apps/cortex/TipManager/TipView.h b/src/apps/cortex/TipManager/TipView.h index 71c29de27f..09de4e33c7 100644 --- a/src/apps/cortex/TipManager/TipView.h +++ b/src/apps/cortex/TipManager/TipView.h @@ -60,7 +60,7 @@ private: // implementation rgb_color m_viewColor; - typedef vector line_set; + typedef std::vector line_set; line_set m_lineSet; private: @@ -81,4 +81,4 @@ private: }; __END_CORTEX_NAMESPACE -#endif /*__TipView_H__*/ \ No newline at end of file +#endif /*__TipView_H__*/ diff --git a/src/apps/cortex/TipManager/TipWindow.cpp b/src/apps/cortex/TipManager/TipWindow.cpp index f83eaa1f49..940dec30e9 100644 --- a/src/apps/cortex/TipManager/TipWindow.cpp +++ b/src/apps/cortex/TipManager/TipWindow.cpp @@ -13,7 +13,7 @@ __USE_CORTEX_NAMESPACE TipWindow::~TipWindow() {} TipWindow::TipWindow( - const char* text=0) : + const char* text) : BWindow( BRect(0,0,0,0), "TipWindow", @@ -125,4 +125,4 @@ void TipWindow::_destroyTipView() { m_tipView = 0; } -// END -- TipWindow.cpp -- \ No newline at end of file +// END -- TipWindow.cpp -- diff --git a/src/apps/cortex/TransportView/TransportView.cpp b/src/apps/cortex/TransportView/TransportView.cpp index ba63d4eac0..e6c41cdf77 100644 --- a/src/apps/cortex/TransportView/TransportView.cpp +++ b/src/apps/cortex/TransportView/TransportView.cpp @@ -26,6 +26,8 @@ #include #include +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // diff --git a/src/apps/cortex/TransportView/TransportView.h b/src/apps/cortex/TransportView/TransportView.h index 2c58bd90ad..68a7d19632 100644 --- a/src/apps/cortex/TransportView/TransportView.h +++ b/src/apps/cortex/TransportView/TransportView.h @@ -124,8 +124,8 @@ protected: // *** layout void _updateLayout(); private: - friend _GroupInfoView; - friend TransportWindow; + friend class _GroupInfoView; + friend class TransportWindow; // logical NodeManager* m_manager; @@ -145,7 +145,7 @@ private: BButton* m_stopButton; BButton* m_prerollButton; - typedef list target_set; + typedef std::list target_set; target_set m_localTargets; target_set m_groupTargets; diff --git a/src/apps/cortex/ValControl/ValControl.cpp b/src/apps/cortex/ValControl/ValControl.cpp index 3707a41014..c1e8a20548 100644 --- a/src/apps/cortex/ValControl/ValControl.cpp +++ b/src/apps/cortex/ValControl/ValControl.cpp @@ -13,6 +13,8 @@ #include #include +using namespace std; + __USE_CORTEX_NAMESPACE // -------------------------------------------------------- // diff --git a/src/apps/cortex/ValControl/ValControl.h b/src/apps/cortex/ValControl/ValControl.h index 6f19858af6..6a2de1a1db 100644 --- a/src/apps/cortex/ValControl/ValControl.h +++ b/src/apps/cortex/ValControl/ValControl.h @@ -344,7 +344,7 @@ protected: // impl. members // the set of visible segments and other child views, // in left-to-right. top-to-bottom order - typedef vector layout_set; + typedef std::vector layout_set; layout_set m_layoutSet; // true if value has been changed since last request diff --git a/src/apps/cortex/support/debug_tools.cpp b/src/apps/cortex/support/debug_tools.cpp index a73ab550bb..685b5ac1ca 100644 --- a/src/apps/cortex/support/debug_tools.cpp +++ b/src/apps/cortex/support/debug_tools.cpp @@ -8,6 +8,8 @@ #include +using namespace std; + string point_to_string(const BPoint& p) { strstream out; out << '(' << p.x << ',' << p.y << ')'; diff --git a/src/apps/cortex/support/debug_tools.h b/src/apps/cortex/support/debug_tools.h index 4bf2db96a0..17893ff824 100644 --- a/src/apps/cortex/support/debug_tools.h +++ b/src/apps/cortex/support/debug_tools.h @@ -24,9 +24,9 @@ #include #include -string point_to_string(const BPoint& p); -string rect_to_string(const BRect& r); -string id_to_string(uint32 n); +std::string point_to_string(const BPoint& p); +std::string rect_to_string(const BRect& r); +std::string id_to_string(uint32 n); void show_alert(char* pFormat, ...); //nyi diff --git a/src/apps/cortex/support/functional_tools.h b/src/apps/cortex/support/functional_tools.h index 89f08d441f..a13cc834a9 100644 --- a/src/apps/cortex/support/functional_tools.h +++ b/src/apps/cortex/support/functional_tools.h @@ -28,7 +28,7 @@ __BEGIN_CORTEX_NAMESPACE // 27jul99: functor adaptor "call a given method of a given object with argument" template -class bound_method_t : public unary_function<_objectT*, _retT> { +class bound_method_t : public std::unary_function<_objectT*, _retT> { public: explicit bound_method_t( // the bound instance on which the method will be called @@ -47,7 +47,7 @@ private: // 27jul99: functor adaptor "call a given method of a given object with argument" template -class bound_const_method_t : public unary_function { +class bound_const_method_t : public std::unary_function { public: explicit bound_const_method_t( // the bound instance on which the method will be called @@ -65,7 +65,7 @@ private: }; template -class bound_method_ref_t : public unary_function<_objectT&, _retT> { +class bound_method_ref_t : public std::unary_function<_objectT&, _retT> { public: explicit bound_method_ref_t( // the bound instance on which the method will be called @@ -83,7 +83,7 @@ private: }; template -class bound_const_method_ref_t : public unary_function { +class bound_const_method_ref_t : public std::unary_function { public: explicit bound_const_method_ref_t( // the bound instance on which the method will be called @@ -105,7 +105,7 @@ private: // 27jul99: functor adaptor "call a given method of a given object with argument" // + an additional argument template -class bound_method1_t : public binary_function<_objectT*,_arg1T,_retT> { +class bound_method1_t : public std::binary_function<_objectT*,_arg1T,_retT> { public: explicit bound_method1_t( // the bound instance on which the method will be called @@ -125,7 +125,7 @@ private: // 27jul99: functor adaptor "call a given method of a given object with argument" template -class bound_const_method1_t : public binary_function { +class bound_const_method1_t : public std::binary_function { public: explicit bound_const_method1_t( // the bound instance on which the method will be called @@ -143,7 +143,7 @@ private: }; template -class bound_method_ref1_t : public binary_function<_objectT&,_arg1T,_retT> { +class bound_method_ref1_t : public std::binary_function<_objectT&,_arg1T,_retT> { public: explicit bound_method_ref1_t( // the bound instance on which the method will be called @@ -161,7 +161,7 @@ private: }; template -class bound_const_method_ref1_t : public binary_function { +class bound_const_method_ref1_t : public std::binary_function { public: explicit bound_const_method_ref1_t( // the bound instance on which the method will be called diff --git a/src/apps/cortex/support/observe.h b/src/apps/cortex/support/observe.h index 5c01c47100..63f6b39bed 100644 --- a/src/apps/cortex/support/observe.h +++ b/src/apps/cortex/support/observe.h @@ -9,6 +9,7 @@ #define __Observe_H__ #include +#include #include "cortex_defs.h" __BEGIN_CORTEX_NAMESPACE @@ -159,7 +160,7 @@ public: // interface _observer_messenger, _target_messenger, reply, - timeout); + _timeout); if(err < B_OK) { PRINT(( "! observer_handle<>::release(): remove_observer() failed:\n" diff --git a/src/apps/cortex/support/set_tools.h b/src/apps/cortex/support/set_tools.h index ee08eadb51..1851f7d9da 100644 --- a/src/apps/cortex/support/set_tools.h +++ b/src/apps/cortex/support/set_tools.h @@ -37,10 +37,10 @@ void ptr_map_delete(iter begin, iter end) { // a simple equality-test functor for maps template class map_value_equal_to : - public binary_function, value, bool> { + public std::binary_function, value, bool> { public: - bool operator()(const pair& p, const value& v) const { + bool operator()(const std::pair& p, const value& v) const { return p.second == v; } }; @@ -55,7 +55,7 @@ public: // //public: // map_value_predicate_t(const unary_function& _fn) : fn(_fn) {} -// bool operator()(const pair& p) const { +// bool operator()(const std::pair& p) const { // return fn(p.second); // } //}; @@ -79,7 +79,7 @@ void map_value_copy(input_iter begin, input_iter end, output_iter to) { // adapt a unary functor to a map (eek) template class unary_map_function_t : - public unary_function { + public std::unary_function { opT f; @@ -102,4 +102,4 @@ unary_map_function( __END_CORTEX_NAMESPACE -#endif /* __SET_TOOLS_H__ */ \ No newline at end of file +#endif /* __SET_TOOLS_H__ */