[Libreoffice-commits] .: odk/examples unodevtools/inc unodevtools/source

Fridrich Strba fridrich at kemper.freedesktop.org
Sat Feb 5 16:04:39 PST 2011


 odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h |    6 -
 unodevtools/inc/unodevtools/typemanager.hxx              |    2 
 unodevtools/source/skeletonmaker/cppcompskeleton.cxx     |   50 +++++++--------
 unodevtools/source/skeletonmaker/javacompskeleton.cxx    |   28 ++++----
 unodevtools/source/skeletonmaker/skeletoncommon.cxx      |   28 ++++----
 unodevtools/source/skeletonmaker/skeletoncommon.hxx      |   20 +++---
 6 files changed, 67 insertions(+), 67 deletions(-)

New commits:
commit 46e4e5397ba3375924567c5427318315a80619fe
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Sat Feb 5 21:56:00 2011 +0100

    move sdk repo to boost unordered containters

diff --git a/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h b/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h
index e4255ec..15cb7f2 100644
--- a/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h
+++ b/odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 #include <vector>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/frame/XStatusListener.hpp>
 #include <com/sun/star/frame/FeatureStateEvent.hpp>
@@ -27,7 +27,7 @@ struct eqObjectName_Impl
 
 typedef std::vector < com::sun::star::uno::Reference < com::sun::star::frame::XStatusListener > > StatusListeners;
 
-typedef std::hash_map
+typedef boost::unordered_map
 <
     ::rtl::OUString,
     StatusListeners,
@@ -38,7 +38,7 @@ ListenerMap;
 
 // For every frame there is *one* Dispatch object for all possible commands
 // this struct contains an array of listeners for every supported command
-// these arrays are accessed by a hash_map (with the command string as index)
+// these arrays are accessed by a boost::unordered_map (with the command string as index)
 struct ListenerItem
 {
     ListenerMap	aContainer;
diff --git a/unodevtools/inc/unodevtools/typemanager.hxx b/unodevtools/inc/unodevtools/typemanager.hxx
index c1f375a..d2f019e 100644
--- a/unodevtools/inc/unodevtools/typemanager.hxx
+++ b/unodevtools/inc/unodevtools/typemanager.hxx
@@ -32,7 +32,7 @@
 #include <codemaker/typemanager.hxx>
 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
 
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 #include <vector>
 
 class RegistryKey;
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index fe5a839..bd0c4ac 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -39,7 +39,7 @@ using namespace ::codemaker::cpp;
 namespace skeletonmaker { namespace cpp {
 
 void generateIncludes(std::ostream & o,
-         const std::hash_set< OString, OStringHash >& interfaces,
+         const boost::unordered_set< OString, OStringHash >& interfaces,
          const AttributeInfo& /*properties*/,
          OString propertyhelper, bool serviceobject,
          bool supportxcomponent)
@@ -65,7 +65,7 @@ void generateIncludes(std::ostream & o,
             o << "#include \"cppuhelper/propertysetmixin.hxx\"\n";            
     }
 
-    std::hash_set< OString, OStringHash >::const_iterator iter = interfaces.begin();
+    boost::unordered_set< OString, OStringHash >::const_iterator iter = interfaces.begin();
     while (iter != interfaces.end())
     {
         o << "#include \""
@@ -148,7 +148,7 @@ OString generateCompHelperDeclaration(std::ostream & o,
 void generateCompHelperDefinition(std::ostream & o,
          const OString & implname,
          const OString & classname,                       
-         const std::hash_set< OString, OStringHash >& services)
+         const boost::unordered_set< OString, OStringHash >& services)
 {
     OString nm;
     short nbrackets = generateNamespace(o, implname, true, nm);
@@ -161,7 +161,7 @@ void generateCompHelperDefinition(std::ostream & o,
         "_getSupportedServiceNames()\n{\n    css::uno::Sequence< "
       << "::rtl::OUString >" << " s(" << services.size() << ");\n";
 
-    std::hash_set< OString, OStringHash >::const_iterator iter = services.begin();
+    boost::unordered_set< OString, OStringHash >::const_iterator iter = services.begin();
     short i=0;
     while (iter != services.end())
     {
@@ -515,7 +515,7 @@ void generateXDispatchProvider(std::ostream& o,
 void generateAddinConstructorAndHelper(std::ostream& o,
          ProgramOptions const & options,
          TypeManager const & manager, const OString & classname,
-         const std::hash_set< OString, OStringHash >& interfaces)
+         const boost::unordered_set< OString, OStringHash >& interfaces)
 {
     o << classname << "::" << classname
       << "(css::uno::Reference< css::uno::XComponentContext > const & context) :\n"
@@ -635,10 +635,10 @@ OString generateClassDefinition(std::ostream& o,
          ProgramOptions const & options,
          TypeManager const & manager,
          OString const & classname,
-         std::hash_set< OString, OStringHash > const & interfaces,
+         boost::unordered_set< OString, OStringHash > const & interfaces,
          AttributeInfo const & properties,
          AttributeInfo const & attributes,
-         std::hash_set< OString, OStringHash > const & propinterfaces,
+         boost::unordered_set< OString, OStringHash > const & propinterfaces,
          OString const & propertyhelper, bool supportxcomponent)
 {
     OStringBuffer parentname(64);
@@ -657,7 +657,7 @@ OString generateClassDefinition(std::ostream& o,
             o << "    public ::cppu::WeakImplHelper" << interfaces.size() << "<";
         }
       
-        std::hash_set< OString, OStringHash >::const_iterator iter =
+        boost::unordered_set< OString, OStringHash >::const_iterator iter =
             interfaces.begin();
         while (iter != interfaces.end())
         {
@@ -698,7 +698,7 @@ OString generateClassDefinition(std::ostream& o,
         OStringBuffer buffer(256);
         buffer.append(parentname);
         buffer.append("< ");
-        std::hash_set< OString, OStringHash >::const_iterator iter =
+        boost::unordered_set< OString, OStringHash >::const_iterator iter =
             interfaces.begin();
         while (iter != interfaces.end())
         {
@@ -716,7 +716,7 @@ OString generateClassDefinition(std::ostream& o,
           << parent << "::release(); }\n\n";
     }
     
-    std::hash_set< OString, OStringHash >::const_iterator it =
+    boost::unordered_set< OString, OStringHash >::const_iterator it =
         interfaces.begin();
     codemaker::GeneratedTypeSet generated;
     while (it != interfaces.end())
@@ -733,9 +733,9 @@ OString generateClassDefinition(std::ostream& o,
       << "    virtual ~" << classname << "() {}\n\n";
 
     if (options.componenttype == 2) {
-        o << "    typedef std::hash_map< ::sal_Int32, rtl::OUString, "
+        o << "    typedef boost::unordered_map< ::sal_Int32, rtl::OUString, "
             "std::hash<::sal_Int32> > ParamMap;\n"
-            "    typedef std::hash_map< rtl::OUString, ParamMap, "
+            "    typedef boost::unordered_map< rtl::OUString, ParamMap, "
             "rtl::OUStringHash > FunctionMap;\n\n"
             "    ::rtl::OUString SAL_CALL getAddinProperty(const ::rtl::OUString & "
             "funcName, const ::rtl::OUString & paramName, const char * propName) "
@@ -810,7 +810,7 @@ OString generateClassDefinition(std::ostream& o,
           << "(css::uno::Reference< css::uno::XComponentContext > const & context) :\n";
         if (supportxcomponent) {
             o << "    ::cppu::WeakComponentImplHelper" << interfaces.size() << "<";
-            std::hash_set< OString, OStringHash >::const_iterator iter =
+            boost::unordered_set< OString, OStringHash >::const_iterator iter =
                 interfaces.begin();
             while (iter != interfaces.end()) {
                 o << "\n        " << scopedCppName(*iter, false, true);
@@ -897,13 +897,13 @@ void generateXServiceInfoBodies(std::ostream& o,
 void generateMethodBodies(std::ostream& o,
         ProgramOptions const & options,                    
         TypeManager const & manager,
-        std::hash_set< OString, OStringHash > const & interfaces,
+        boost::unordered_set< OString, OStringHash > const & interfaces,
         OString const & classname,
         OString const & comphelpernamespace,
         OString const & propertyhelper)
 {
     OString name(classname.concat("::"));
-    std::hash_set< OString, OStringHash >::const_iterator iter =
+    boost::unordered_set< OString, OStringHash >::const_iterator iter =
         interfaces.begin();
     codemaker::GeneratedTypeSet generated;
     while (iter != interfaces.end()) {
@@ -922,7 +922,7 @@ void generateMethodBodies(std::ostream& o,
 void generateQueryInterface(std::ostream& o,
                             ProgramOptions const & options,                    
                             TypeManager const & manager,
-                            const std::hash_set< OString, OStringHash >& interfaces,
+                            const boost::unordered_set< OString, OStringHash >& interfaces,
                             OString const & parentname,
                             OString const & classname,
                             OString const & propertyhelper)
@@ -940,7 +940,7 @@ void generateQueryInterface(std::ostream& o,
         o << "css::uno::Any a(";
 
     o   << parentname << "<";
-    std::hash_set< OString, OStringHash >::const_iterator iter =
+    boost::unordered_set< OString, OStringHash >::const_iterator iter =
         interfaces.begin();
     while (iter != interfaces.end())
     {
@@ -980,11 +980,11 @@ void generateSkeleton(ProgramOptions const & options,
         return;
     }
     
-    std::hash_set< OString, OStringHash > interfaces;
-    std::hash_set< OString, OStringHash > services;
+    boost::unordered_set< OString, OStringHash > interfaces;
+    boost::unordered_set< OString, OStringHash > services;
     AttributeInfo properties;
     AttributeInfo attributes;
-    std::hash_set< OString, OStringHash > propinterfaces;
+    boost::unordered_set< OString, OStringHash > propinterfaces;
     bool serviceobject = false;
     bool supportxcomponent = false;
 
@@ -1113,11 +1113,11 @@ void generateCalcAddin(ProgramOptions const & options,
                        TypeManager const & manager,
                        std::vector< OString > const & types)
 {
-    std::hash_set< OString, OStringHash > interfaces;
-    std::hash_set< OString, OStringHash > services;
+    boost::unordered_set< OString, OStringHash > interfaces;
+    boost::unordered_set< OString, OStringHash > services;
     AttributeInfo properties;
     AttributeInfo attributes;
-    std::hash_set< OString, OStringHash > propinterfaces;
+    boost::unordered_set< OString, OStringHash > propinterfaces;
     bool serviceobject = false;
     bool supportxcomponent = false;
 
@@ -1137,7 +1137,7 @@ void generateCalcAddin(ProgramOptions const & options,
     
     
     // get the one and only add-in service for later use
-    std::hash_set< OString, OStringHash >::const_iterator iter2 = services.begin();
+    boost::unordered_set< OString, OStringHash >::const_iterator iter2 = services.begin();
     sAddinService = (*iter2).replace('/', '.');
     if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
         sAddinService = (*(++iter2)).replace('/', '.');
@@ -1204,7 +1204,7 @@ void generateCalcAddin(ProgramOptions const & options,
             "#include \"com/sun/star/container/XNameAccess.hpp\"\n"
             "#include \"com/sun/star/container/XHierarchicalNameAccess.hpp\"\n\n"
             "#include \"rtl/ustrbuf.hxx\"\n\n"
-            "#include <hash_map>\n"
+            "#include <boost/unordered_map.hpp>\n"
             "#include <set>\n";
         
         // namespace
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 16c6d2d..4a08a61 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -46,7 +46,7 @@ void generatePackage(std::ostream & o, const OString & implname)
 }
 
 void generateImports(std::ostream & o, ProgramOptions const & options,
-         const std::hash_set< OString, OStringHash >& /*interfaces*/,
+         const boost::unordered_set< OString, OStringHash >& /*interfaces*/,
          const OString & propertyhelper,
          bool serviceobject, bool supportxcomponent)
 {
@@ -80,7 +80,7 @@ void generateImports(std::ostream & o, ProgramOptions const & options,
     }
 
     
-//     std::hash_set< OString, OStringHash >::const_iterator iter =
+//     boost::unordered_set< OString, OStringHash >::const_iterator iter =
 //                    interfaces.begin();
 //     while (iter != interfaces.end())
 //     {
@@ -524,10 +524,10 @@ void generateXDispatchProviderBodies(std::ostream& o, ProgramOptions const & opt
 void generateMethodBodies(std::ostream& o,
          ProgramOptions const & options,
          TypeManager const & manager,
-         const std::hash_set< OString, OStringHash >& interfaces,
+         const boost::unordered_set< OString, OStringHash >& interfaces,
          const OString& indentation, bool usepropertymixin)
 {
-    std::hash_set< OString, OStringHash >::const_iterator iter =
+    boost::unordered_set< OString, OStringHash >::const_iterator iter =
         interfaces.begin();
     codemaker::GeneratedTypeSet generated;
     while (iter != interfaces.end()) {
@@ -596,8 +596,8 @@ static const char* propcomment=
 void generateAddinConstructorAndHelper(std::ostream& o,
          ProgramOptions const & options,
          TypeManager const & manager, const OString & classname,
-         const std::hash_set< OString, OStringHash >& services,
-         const std::hash_set< OString, OStringHash >& interfaces)
+         const boost::unordered_set< OString, OStringHash >& services,
+         const boost::unordered_set< OString, OStringHash >& interfaces)
 {
     o << "    private com.sun.star.lang.Locale m_locale = "
         "new com.sun.star.lang.Locale();\n";
@@ -611,7 +611,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
         
 
     // get the one and only add-in service for later use
-    std::hash_set< OString, OStringHash >::const_iterator iter = services.begin();
+    boost::unordered_set< OString, OStringHash >::const_iterator iter = services.begin();
     OString sAddinService = (*iter).replace('/', '.');
     if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
         sAddinService = (*(++iter)).replace('/', '.');
@@ -742,8 +742,8 @@ void generateClassDefinition(std::ostream& o,
          ProgramOptions const & options,
          TypeManager const & manager,
          const OString & classname,
-         const std::hash_set< OString, OStringHash >& services,
-         const std::hash_set< OString, OStringHash >& interfaces,
+         const boost::unordered_set< OString, OStringHash >& services,
+         const boost::unordered_set< OString, OStringHash >& interfaces,
          const AttributeInfo& properties,
          const AttributeInfo& attributes,
          const OString& propertyhelper, bool supportxcomponent)
@@ -760,7 +760,7 @@ void generateClassDefinition(std::ostream& o,
                 o << "WeakBase\n";
         }
         o << "   implements ";
-        std::hash_set< OString, OStringHash >::const_iterator iter =
+        boost::unordered_set< OString, OStringHash >::const_iterator iter =
             interfaces.begin();
         while (iter != interfaces.end()) {
             o << (*iter);
@@ -787,7 +787,7 @@ void generateClassDefinition(std::ostream& o,
 
     if (!services.empty()) {
         o << "    private static final String[] m_serviceNames = {\n";
-        std::hash_set< OString, OStringHash >::const_iterator iter =
+        boost::unordered_set< OString, OStringHash >::const_iterator iter =
             services.begin();
         while (iter != services.end()) {
             o << "        \"" << (*iter).replace('/','.') << "\"";
@@ -864,11 +864,11 @@ void generateSkeleton(ProgramOptions const & options,
                       std::vector< OString > const & types,
                       OString const & /*delegate*/)
 {
-    std::hash_set< OString, OStringHash > interfaces;
-    std::hash_set< OString, OStringHash > services;
+    boost::unordered_set< OString, OStringHash > interfaces;
+    boost::unordered_set< OString, OStringHash > services;
     AttributeInfo properties;
     AttributeInfo attributes;
-    std::hash_set< OString, OStringHash > propinterfaces;
+    boost::unordered_set< OString, OStringHash > propinterfaces;
     bool serviceobject = false;
     bool supportxcomponent = false;
 
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index e8d2416..ee17c55 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -155,7 +155,7 @@ bool containsAttribute(AttributeInfo& attributes, OString const & attrname)
 void checkAttributes(TypeManager const & manager,
                      const typereg::Reader& reader,
                      AttributeInfo& attributes,
-                     std::hash_set< OString, OStringHash >& propinterfaces)
+                     boost::unordered_set< OString, OStringHash >& propinterfaces)
 {
     OString typeName = codemaker::convertString(reader.getTypeName());
     if ( typeName.equals("com/sun/star/beans/XPropertySet") ||
@@ -196,8 +196,8 @@ void checkAttributes(TypeManager const & manager,
 
 void checkType(TypeManager const & manager,
                OString const & type,
-               std::hash_set< OString, OStringHash >& interfaceTypes,
-               std::hash_set< OString, OStringHash >& serviceTypes,
+               boost::unordered_set< OString, OStringHash >& interfaceTypes,
+               boost::unordered_set< OString, OStringHash >& serviceTypes,
                AttributeInfo& properties)
 {
     
@@ -290,8 +290,8 @@ void checkType(TypeManager const & manager,
 }
 
 void checkDefaultInterfaces(
-         std::hash_set< OString, OStringHash >& interfaces,
-         const std::hash_set< OString, OStringHash >& services,
+         boost::unordered_set< OString, OStringHash >& interfaces,
+         const boost::unordered_set< OString, OStringHash >& services,
        const OString & propertyhelper)
 {
     if ( services.empty() ) {
@@ -340,13 +340,13 @@ bool checkServiceProperties(TypeManager const & manager,
 OString checkPropertyHelper(
     ProgramOptions const & options,
     TypeManager const & manager,
-    const std::hash_set< OString, OStringHash >& services,
-    const std::hash_set< OString, OStringHash >& interfaces,
+    const boost::unordered_set< OString, OStringHash >& services,
+    const boost::unordered_set< OString, OStringHash >& interfaces,
     AttributeInfo& attributes,
-    std::hash_set< OString, OStringHash >& propinterfaces)
+    boost::unordered_set< OString, OStringHash >& propinterfaces)
 {
-    std::hash_set< OString, OStringHash >::const_iterator iter;
-    std::hash_set< OString, OStringHash >::const_iterator end;
+    boost::unordered_set< OString, OStringHash >::const_iterator iter;
+    boost::unordered_set< OString, OStringHash >::const_iterator end;
 
     if ( !services.empty() ) {
         iter = services.begin();
@@ -428,12 +428,12 @@ bool checkXComponentSupport(TypeManager const & manager,
 // if XComponent is directly specified, return true and remove it from the
 // supported interfaces list
 bool checkXComponentSupport(TypeManager const & manager,
-         std::hash_set< OString, OStringHash >& interfaces)
+         boost::unordered_set< OString, OStringHash >& interfaces)
 {
     if ( interfaces.empty() )
         return false;
         
-    std::hash_set< OString, OStringHash >::const_iterator iter =
+    boost::unordered_set< OString, OStringHash >::const_iterator iter =
         interfaces.begin();
     while ( iter != interfaces.end() ) {
         if ( (*iter).equals("com.sun.star.lang.XComponent") ) {
@@ -700,11 +700,11 @@ void generateFunctionParamterMap(std::ostream& o,
 void generateFunctionParameterMap(std::ostream& o,
          ProgramOptions const & options,
          TypeManager const & manager,
-         const std::hash_set< OString, OStringHash >& interfaces)
+         const boost::unordered_set< OString, OStringHash >& interfaces)
 {
     ::codemaker::GeneratedTypeSet generated;
     bool bFirst = true;
-    std::hash_set< OString, OStringHash >::const_iterator iter = interfaces.begin();
+    boost::unordered_set< OString, OStringHash >::const_iterator iter = interfaces.begin();
     while ( iter != interfaces.end() ) {
         typereg::Reader reader(manager.getTypeReader((*iter).replace('.','/')));
         if (!reader.isValid()) {
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.hxx b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
index 557addb..80b6d0d 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
@@ -34,7 +34,7 @@
 #include "codemaker/unotype.hxx"
 
 #include <fstream>
-#include <hash_set>
+#include <boost/unordered_set.hpp>
 #include <map>
 
 namespace skeletonmaker {
@@ -111,21 +111,21 @@ codemaker::UnoType::Sort decomposeResolveAndCheck(
 
 void checkType(TypeManager const & manager,
                rtl::OString const & type,
-               std::hash_set< rtl::OString, rtl::OStringHash >& interfaceTypes,
-               std::hash_set< rtl::OString, rtl::OStringHash >& serviceTypes,
+               boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaceTypes,
+               boost::unordered_set< rtl::OString, rtl::OStringHash >& serviceTypes,
                AttributeInfo& properties);
 
 void checkDefaultInterfaces(
-    std::hash_set< rtl::OString, rtl::OStringHash >& interfaces,
-    const std::hash_set< rtl::OString, rtl::OStringHash >& services,
+    boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaces,
+    const boost::unordered_set< rtl::OString, rtl::OStringHash >& services,
     const rtl::OString & propertyhelper);
 
 rtl::OString checkPropertyHelper(
     ProgramOptions const & options, TypeManager const & manager,
-    const std::hash_set< rtl::OString, rtl::OStringHash >& services,
-    const std::hash_set< rtl::OString, rtl::OStringHash >& interfaces,
+    const boost::unordered_set< rtl::OString, rtl::OStringHash >& services,
+    const boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaces,
     AttributeInfo& attributes,
-    std::hash_set< rtl::OString, rtl::OStringHash >& propinterfaces);
+    boost::unordered_set< rtl::OString, rtl::OStringHash >& propinterfaces);
 
 /**
    checks whether the return and parameters types are valid and allowed
@@ -151,7 +151,7 @@ void checkAddInTypes(TypeManager const & manager,
    @return true if XComponent have to be supported
 */
 bool checkXComponentSupport(TypeManager const & manager,
-         std::hash_set< rtl::OString, rtl::OStringHash >& interfaces);
+         boost::unordered_set< rtl::OString, rtl::OStringHash >& interfaces);
 
 
 sal_uInt16 checkAdditionalPropertyFlags(typereg::Reader const & reader,
@@ -161,7 +161,7 @@ sal_uInt16 checkAdditionalPropertyFlags(typereg::Reader const & reader,
 void generateFunctionParameterMap(std::ostream& o,
          ProgramOptions const & options,
          TypeManager const & manager,
-         const std::hash_set< ::rtl::OString, ::rtl::OStringHash >& interfaces);
+         const boost::unordered_set< ::rtl::OString, ::rtl::OStringHash >& interfaces);
 
 }
 


More information about the Libreoffice-commits mailing list