summaryrefslogtreecommitdiff
path: root/ACE/ace/XML_Utils
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/XML_Utils')
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/Traversal.hpp2
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/Traversal.ipp9
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/TypeInfo.hpp1
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/TypeInfo.ipp6
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/Types.hpp4
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/Types.ipp7
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/Writer.hpp2
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/Writer.ipp9
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/id_map.hpp26
-rw-r--r--ACE/ace/XML_Utils/XSCRT/Elements.hpp172
10 files changed, 29 insertions, 209 deletions
diff --git a/ACE/ace/XML_Utils/XMLSchema/Traversal.hpp b/ACE/ace/XML_Utils/XMLSchema/Traversal.hpp
index 970e0a6d3eb..3fc320640ac 100644
--- a/ACE/ace/XML_Utils/XMLSchema/Traversal.hpp
+++ b/ACE/ace/XML_Utils/XMLSchema/Traversal.hpp
@@ -69,6 +69,4 @@ namespace XMLSchema
}
}
-#include <ace/XML_Utils/XMLSchema/Traversal.ipp>
-
#endif // XMLSCHEMA_TRAVERSAL_HPP
diff --git a/ACE/ace/XML_Utils/XMLSchema/Traversal.ipp b/ACE/ace/XML_Utils/XMLSchema/Traversal.ipp
deleted file mode 100644
index c96910a60a5..00000000000
--- a/ACE/ace/XML_Utils/XMLSchema/Traversal.ipp
+++ /dev/null
@@ -1,9 +0,0 @@
-// file : XMLSchema/Traversal.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-
-namespace XMLSchema
-{
- namespace Traversal
- {
- }
-}
diff --git a/ACE/ace/XML_Utils/XMLSchema/TypeInfo.hpp b/ACE/ace/XML_Utils/XMLSchema/TypeInfo.hpp
index 2016982b73b..75da2c30ad6 100644
--- a/ACE/ace/XML_Utils/XMLSchema/TypeInfo.hpp
+++ b/ACE/ace/XML_Utils/XMLSchema/TypeInfo.hpp
@@ -14,7 +14,6 @@ namespace XMLSchema
};
}
-#include <ace/XML_Utils/XMLSchema/TypeInfo.ipp>
#include <ace/XML_Utils/XMLSchema/TypeInfo.tpp>
#endif // XMLSCHEMA_TYPE_INFO_HPP
diff --git a/ACE/ace/XML_Utils/XMLSchema/TypeInfo.ipp b/ACE/ace/XML_Utils/XMLSchema/TypeInfo.ipp
deleted file mode 100644
index 20cce1f97be..00000000000
--- a/ACE/ace/XML_Utils/XMLSchema/TypeInfo.ipp
+++ /dev/null
@@ -1,6 +0,0 @@
-// file : XMLSchema/TypeInfo.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-
-namespace XMLSchema
-{
-}
diff --git a/ACE/ace/XML_Utils/XMLSchema/Types.hpp b/ACE/ace/XML_Utils/XMLSchema/Types.hpp
index 9027786a834..966c588fd3e 100644
--- a/ACE/ace/XML_Utils/XMLSchema/Types.hpp
+++ b/ACE/ace/XML_Utils/XMLSchema/Types.hpp
@@ -57,8 +57,6 @@ namespace XMLSchema
typedef basic_string<C> Base__ ;
public:
- // typedef ACE_Refcounted_Auto_Ptr < string, ACE_Null_Mutex > _ptr;
-
//@@ VC6 does not inject XSCRT::Type into the scope so I have
// to qualify it all the time.
//
@@ -662,6 +660,4 @@ namespace XMLSchema
};
}
-#include "ace/XML_Utils/XMLSchema/Types.ipp"
-
#endif // XMLSCHEMA_TYPES_HPP
diff --git a/ACE/ace/XML_Utils/XMLSchema/Types.ipp b/ACE/ace/XML_Utils/XMLSchema/Types.ipp
deleted file mode 100644
index b39e46a39ee..00000000000
--- a/ACE/ace/XML_Utils/XMLSchema/Types.ipp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XMLSchema/Types.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-
-namespace XMLSchema
-{
-
-}
diff --git a/ACE/ace/XML_Utils/XMLSchema/Writer.hpp b/ACE/ace/XML_Utils/XMLSchema/Writer.hpp
index 781432b8fda..5a12ce2ff2a 100644
--- a/ACE/ace/XML_Utils/XMLSchema/Writer.hpp
+++ b/ACE/ace/XML_Utils/XMLSchema/Writer.hpp
@@ -151,6 +151,4 @@ namespace XMLSchema
}
}
-#include <ace/XML_Utils/XMLSchema/Writer.ipp>
-
#endif // XMLSCHEMA_WRITER_HPP
diff --git a/ACE/ace/XML_Utils/XMLSchema/Writer.ipp b/ACE/ace/XML_Utils/XMLSchema/Writer.ipp
deleted file mode 100644
index 98078da9298..00000000000
--- a/ACE/ace/XML_Utils/XMLSchema/Writer.ipp
+++ /dev/null
@@ -1,9 +0,0 @@
-// file : XMLSchema/Writer.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-
-namespace XMLSchema
-{
- namespace Writer
- {
- }
-}
diff --git a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp
index 6cdcbe45a13..559d461665f 100644
--- a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp
+++ b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp
@@ -89,7 +89,6 @@
{
throw NULL_PTR_Entry();
}
- return;
}
// Add an IDREF to the IDREF map
@@ -103,7 +102,6 @@
{
throw NULL_PTR_Entry();
}
- return;
}
void resolve_single_idref (const std::basic_string<ACE_TCHAR>& idref, ::XSCRT::Type * element)
@@ -124,27 +122,23 @@
//Note: The pointer is of type "XSCRT::Type*"
void resolve_idref ( void )
{
- //Declare iterators to navigate the maps
- ID_Map::id_iterator id_iterator;
- ID_Map::idref_iterator idref_iterator;
-
- for (idref_iterator = this->idref_map_.begin();
+ // Declare iterators to navigate the maps
+ for (ID_Map::idref_iterator idref_iterator = this->idref_map_.begin();
idref_iterator != this->idref_map_.end();
++idref_iterator)
{
//Find the ID that matches the IDREF element
- id_iterator = this->id_map_.find(idref_iterator->first);
+ ID_Map::id_iterator id_iterator = this->id_map_.find(idref_iterator->first);
if (id_iterator != this->id_map_.end())
{
- //Add the IDREF identifier and the reference to the
- //identified object
+ // Add the IDREF identifier and the reference to the
+ // identified object
std::basic_string<ACE_TCHAR> temp_id = id_iterator->first;
idref_iterator->second->set_idref(temp_id, id_iterator->second);
}
else
{
- std::basic_string<ACE_TCHAR> temp (idref_iterator->first);
- throw Unresolved_IDREF(temp);
+ throw Unresolved_IDREF(idref_iterator->first);
}
}
}
@@ -156,11 +150,11 @@
}
private:
- //id_map_: maps the ID string to the element with the
- // ID attribute
+ /// Maps the ID string to the element with the
+ /// ID attribute
ID_MAP id_map_;
- //idref_map_: multimap that maps the IDREF string to the
- // element with the IDREF attribute
+ /// Multimap that maps the IDREF string to the
+ /// element with the IDREF attribute
IDREF_MAP idref_map_;
};
diff --git a/ACE/ace/XML_Utils/XSCRT/Elements.hpp b/ACE/ace/XML_Utils/XSCRT/Elements.hpp
index 601e0f9f338..dcf8844eb65 100644
--- a/ACE/ace/XML_Utils/XSCRT/Elements.hpp
+++ b/ACE/ace/XML_Utils/XSCRT/Elements.hpp
@@ -28,7 +28,6 @@ namespace XSCRT
class Type
{
public:
-
virtual ~Type (void)
{
}
@@ -152,8 +151,7 @@ namespace XSCRT
map_ = std::auto_ptr<Map_> (new Map_);
}
- if (!map_->insert (
- std::pair<IdentityProvider const*, Type*> (&id, t)).second)
+ if (!map_->insert (std::pair<IdentityProvider const*, Type*> (&id, t)).second)
{
throw 1;
}
@@ -197,12 +195,24 @@ namespace XSCRT
return 0;
}
- //Get and set methods for the idref_map_ data member
+ /// Get and set methods for the idref_map_ data member
Type* get_idref (const char* name)
{
std::basic_string<ACE_TCHAR> name_string (ACE_TEXT_CHAR_TO_TCHAR(name));
- std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i =
- this->idref_map_.find(name_string);
+ std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i = this->idref_map_.find(name_string);
+ if (i != idref_map_.end())
+ {
+ return i->second;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ Type* get_idref (const std::basic_string<ACE_TCHAR>& name)
+ {
+ std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i = this->idref_map_.find(name);
if (i != idref_map_.end())
{
return i->second;
@@ -216,8 +226,7 @@ namespace XSCRT
Type* get_idref (const wchar_t *name)
{
std::basic_string<ACE_TCHAR> name_string (ACE_TEXT_WCHAR_TO_TCHAR(name));
- std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i =
- this->idref_map_.find(name_string);
+ std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i = this->idref_map_.find(name_string);
if (i != idref_map_.end())
{
return i->second;
@@ -228,16 +237,14 @@ namespace XSCRT
}
}
-
- void set_idref (std::basic_string<ACE_TCHAR> name, Type* new_idref)
+ void set_idref (const std::basic_string<ACE_TCHAR>& name, Type* new_idref)
{
this->idref_map_.insert(std::pair<std::basic_string<ACE_TCHAR>,Type*>(name, new_idref));
- return;
}
private:
- //Data member to handle unbounded IDREF attributes and elements
+ // Data member to handle unbounded IDREF attributes and elements
std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*> idref_map_;
Type* container_;
@@ -267,9 +274,6 @@ namespace XSCRT
public:
// Trait for marshaling a FundamentalType X
typedef X CDR_Type__;
-#if !defined (__BORLANDC__) || (__BORLANDC__ >= 0x620)
- typedef ACE_Refcounted_Auto_Ptr < FundamentalType, ACE_Null_Mutex > _ptr;
-#endif /* !__BORLANDC__ */
FundamentalType ()
{
@@ -318,13 +322,6 @@ namespace XSCRT
X x_;
};
-#if !((defined (__GNUC__) && (__GNUC__ == 3 && (__GNUC_MINOR__ < 3))) || \
- (defined (__BORLANDC__) && (__BORLANDC__ < 0x620)) || \
- (defined (__SUNPRO_CC) && (__SUNPRO_CC <= 0x5100)))
-
- // Stuff for normal compilers.
- //
-
// Specialization for `signed char'
//
//
@@ -391,137 +388,6 @@ namespace XSCRT
x_ = static_cast<unsigned char> (t);
}
-#else
-
- // Stuff for broken VC6 & gcc < 3.3. Don't like what you see - use better
- // compiler!
- //
-
- // Specialization for signed char.
- //
- template <>
- class FundamentalType<signed char> : public Type
- {
- public:
- FundamentalType ()
- {
- }
-
- template<typename C>
- FundamentalType (XML::Element<C> const& e)
- {
- std::basic_stringstream<C> s;
- s << e.value ();
-
- short t;
- s >> t;
-
- x_ = static_cast<signed char> (t);
- }
-
- template<typename C>
- FundamentalType (XML::Attribute<C> const& a)
- {
- std::basic_stringstream<C> s;
- s << a.value ();
-
- short t;
- s >> t;
-
- x_ = static_cast<signed char> (t);
- }
-
- FundamentalType (signed char const& x)
- : x_ (x)
- {
- }
-
- FundamentalType&
- operator= (signed char const& x)
- {
- x_ = x;
- return *this;
- }
-
- public:
- operator signed char const& () const
- {
- return x_;
- }
-
- operator signed char& ()
- {
- return x_;
- }
-
- protected:
- signed char x_;
- };
-
- // Specialization for unsigned char.
- //
- template <>
- class FundamentalType<unsigned char> : public Type
- {
- public:
- FundamentalType ()
- {
- }
-
- template<typename C>
- FundamentalType (XML::Element<C> const& e)
- {
- std::basic_stringstream<C> s;
- s << e.value ();
-
- unsigned short t;
- s >> t;
-
- x_ = static_cast<unsigned char> (t);
- }
-
- template<typename C>
- FundamentalType (XML::Attribute<C> const& a)
- {
- std::basic_stringstream<C> s;
- s << a.value ();
-
- unsigned short t;
- s >> t;
-
- x_ = static_cast<unsigned char> (t);
- }
-
- FundamentalType (unsigned char const& x)
- : x_ (x)
- {
- }
-
- FundamentalType&
- operator= (unsigned char const& x)
- {
- x_ = x;
- return *this;
- }
-
- public:
- operator unsigned char const& () const
- {
- return x_;
- }
-
- operator unsigned char& ()
- {
- return x_;
- }
-
- protected:
- unsigned char x_;
- };
-
-#endif
-
-
// Specialization for bool.
//
//