summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkinnebrew <jkinnebrew@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-09-15 18:01:52 +0000
committerjkinnebrew <jkinnebrew@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-09-15 18:01:52 +0000
commit7189cbe785bd0e397ddc86ba31edaa5fb6037f48 (patch)
treefe2bc63aa7f8916b2c4dcc66385abc152f7af1cb
parent5d20dee17c18a8282f64195f078367290d8478ae (diff)
downloadATCD-7189cbe785bd0e397ddc86ba31edaa5fb6037f48.tar.gz
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/CIAO_XML_Utils_Export.h54
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/Exceptions.h39
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/Functors.h137
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/Utils.mpc.old16
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.cpp72
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.h65
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XML_Helper.cpp239
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XML_Helper.h86
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.cpp55
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.h66
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XercesString.cpp143
-rw-r--r--SA_POP/Standalone/XML_Utils/Utils/XercesString.h150
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.hpp72
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.ipp10
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.tpp11
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.hpp22
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.ipp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.tpp97
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Types.hpp584
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Types.ipp8
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Types.tpp9
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Writer.hpp162
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Writer.ipp10
-rw-r--r--SA_POP/Standalone/XML_Utils/XMLSchema/Writer.tpp10
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Elements.hpp653
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Elements.ipp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Elements.tpp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.hpp182
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.ipp141
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Parser.hpp67
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Parser.ipp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Parser.tpp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Traversal.hpp275
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Traversal.ipp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Traversal.tpp195
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Writer.hpp81
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Writer.ipp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/Writer.tpp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/XML.hpp500
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/XML.ipp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/XML.tpp7
-rw-r--r--SA_POP/Standalone/XML_Utils/XSCRT/XMLSchema.hpp564
42 files changed, 0 insertions, 4845 deletions
diff --git a/SA_POP/Standalone/XML_Utils/Utils/CIAO_XML_Utils_Export.h b/SA_POP/Standalone/XML_Utils/Utils/CIAO_XML_Utils_Export.h
deleted file mode 100644
index f4f3ec3a1cd..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/CIAO_XML_Utils_Export.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl CIAO_XML_Utils
-// ------------------------------
-#ifndef CIAO_XML_UTILS_EXPORT_H
-#define CIAO_XML_UTILS_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if !defined (CIAO_XML_UTILS_HAS_DLL)
-# define CIAO_XML_UTILS_HAS_DLL 1
-#endif /* ! CIAO_XML_UTILS_HAS_DLL */
-
-#if defined (CIAO_XML_UTILS_HAS_DLL) && (CIAO_XML_UTILS_HAS_DLL == 1)
-# if defined (CIAO_XML_UTILS_BUILD_DLL)
-# define CIAO_XML_Utils_Export ACE_Proper_Export_Flag
-# define CIAO_XML_UTILS_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define CIAO_XML_UTILS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* CIAO_XML_UTILS_BUILD_DLL */
-# define CIAO_XML_Utils_Export ACE_Proper_Import_Flag
-# define CIAO_XML_UTILS_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define CIAO_XML_UTILS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* CIAO_XML_UTILS_BUILD_DLL */
-#else /* CIAO_XML_UTILS_HAS_DLL == 1 */
-# define CIAO_XML_Utils_Export
-# define CIAO_XML_UTILS_SINGLETON_DECLARATION(T)
-# define CIAO_XML_UTILS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* CIAO_XML_UTILS_HAS_DLL == 1 */
-
-// Set CIAO_XML_UTILS_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (CIAO_XML_UTILS_NTRACE)
-# if (ACE_NTRACE == 1)
-# define CIAO_XML_UTILS_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define CIAO_XML_UTILS_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !CIAO_XML_UTILS_NTRACE */
-
-#if (CIAO_XML_UTILS_NTRACE == 1)
-# define CIAO_XML_UTILS_TRACE(X)
-#else /* (CIAO_XML_UTILS_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define CIAO_XML_UTILS_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (CIAO_XML_UTILS_NTRACE == 1) */
-
-#endif /* CIAO_XML_UTILS_EXPORT_H */
-
-// End of auto generated file.
diff --git a/SA_POP/Standalone/XML_Utils/Utils/Exceptions.h b/SA_POP/Standalone/XML_Utils/Utils/Exceptions.h
deleted file mode 100644
index 649f9d47306..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/Exceptions.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// $Id$
-/**
- * @file Exceptions.h
- * @author William Otte <wotte@dre.vanderbilt.edu>
- *
- * Defines exceptions that may be thrown during the XSC<=>IDL translation process.
- */
-#include <string>
-
-namespace CIAO
-{
- namespace Config_Handlers
- {
- struct Parse_Error
- {
- Parse_Error (const std::string &reason)
- : reason_ (reason)
- {
- }
-
- std::string reason_;
- };
-
- struct Plan_Error
- {
- Plan_Error (const std::string &reason)
- : reason_ (reason)
- {
- }
-
- std::string reason_;
- };
-
- }
-}
-
-
-
-
diff --git a/SA_POP/Standalone/XML_Utils/Utils/Functors.h b/SA_POP/Standalone/XML_Utils/Utils/Functors.h
deleted file mode 100644
index fca6f560f7f..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/Functors.h
+++ /dev/null
@@ -1,137 +0,0 @@
-#ifndef CONFIG_HANDLERS_FUNCTORS_H
-#define CONFIG_HANDLERS_FUNCTORS_H
-
-/**
- * @file Functors.h
- * @author William Otte <wotte@dre.vanderbilt.edu>
- *
- * Functors useful in the config handlers
- */
-#include <iterator>
-
-#include "tao/Basic_Types.h" // For CORBA::ULong
-#include "tao/StringSeqC.h"
-
-#include "XMLSchema/Types.hpp"
-namespace CIAO
-{
- namespace Config_Handlers
- {
- template <typename Seq_Type, typename T>
- class Sequence_Iterator :
- public std::iterator <std::forward_iterator_tag, //iterator type
- T, // Type pointed to by the iterator
- CORBA::ULong> // Distance type
- {
- public:
- Sequence_Iterator (void)
- : pos_ (0),
- seq_ (0)
- {
- }
-
- Sequence_Iterator (const Seq_Type &seq, CORBA::ULong pos = 0)
- : pos_ (pos),
- seq_ (&seq)
- {
- }
-
- Sequence_Iterator (const Sequence_Iterator &s)
- {
- *this = s;
- }
-
- Sequence_Iterator& operator= (const Sequence_Iterator &s)
- {
- this->seq_ = s.seq_;
- this->pos_ = s.pos_;
- return *this;
- }
-
- bool operator== (Sequence_Iterator &s)
- {
- return (this->seq_ == s.seq_) && (this->pos_ == s.pos_);
- }
-
- bool operator!= (Sequence_Iterator &s)
- {
- return !(*this == s);
- }
-
- T& operator* (void)
- {
- return (*seq_)[pos_];
- }
-
- T& operator-> (void)
- {
- return *(*this);
- }
-
- // Prefix operator
- Sequence_Iterator& operator++ ()
- {
- ++pos_;
- return *this;
- }
-
- Sequence_Iterator& operator++ (int)
- {
- Sequence_Iterator ans (*this);
- ++(*this);
- return ans;
- }
-
- private:
- CORBA::ULong pos_;
- Seq_Type *seq_;
- };
-
- template <typename Source,
- typename Dest,
- typename Dest_Type,
- void (*Func)(const Source &, Dest_Type &)>
- struct Sequence_Handler
- {
- Sequence_Handler (Dest &dest, CORBA::ULong pos = 0)
- : dest_ (dest),
- pos_ (pos)
- {
- }
-
- void operator() (const Source &src)
- {
- Func (src, dest_[pos_++]);
- }
-
- private:
- Dest &dest_;
- CORBA::ULong pos_;
- };
-
- template <typename Dest, typename Dest_Type>
- struct String_Seq_Handler
- {
- String_Seq_Handler (Dest &dest, CORBA::ULong pos = 0)
- : dest_ (dest),
- pos_ (pos)
- {
- }
-
- void operator() (const ::XMLSchema::string<ACE_TCHAR> &src)
- {
- dest_[pos_++] = src.c_str ();
- }
-
- private:
- Dest &dest_;
- CORBA::ULong pos_;
- };
-
- typedef String_Seq_Handler < ::CORBA::StringSeq,
- ::CORBA::String_var > String_Seq_Functor;
-
- }
-}
-
-#endif /* CONFIG_HANDLERS_FUNCTORS_H */
diff --git a/SA_POP/Standalone/XML_Utils/Utils/Utils.mpc.old b/SA_POP/Standalone/XML_Utils/Utils/Utils.mpc.old
deleted file mode 100644
index 359af0af27a..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/Utils.mpc.old
+++ /dev/null
@@ -1,16 +0,0 @@
-// $Id$
-
-project (CIAO_XML_Utils) : acelib, xerces {
- includes += $(CIAO_ROOT)/tools/Config_Handlers
- sharedname += CIAO_XML_Utils
- dynamicflags = CIAO_XML_UTILS_BUILD_DLL
- macros += XML_USE_PTHREADS
- requires += exceptions
-
- Source_Files {
- XML_Schema_Resolver.cpp
- XML_Error_Handler.cpp
- XML_Helper.cpp
- XercesString.cpp
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.cpp b/SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.cpp
deleted file mode 100644
index 3d350174759..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id$
-
-#include "XML_Error_Handler.h"
-#include "ace/Log_Msg.h"
-#include "ace/Auto_Ptr.h"
-#include <xercesc/util/XMLString.hpp>
-#include <xercesc/dom/DOMLocator.hpp>
-#include "XercesString.h"
-
-using xercesc::XMLString;
-
-namespace CIAO
-{
- namespace Config_Handlers
- {
- XML_Error_Handler::XML_Error_Handler (void)
- : errors_ (false)
- {
- }
-
- XML_Error_Handler::~XML_Error_Handler()
- {
- }
-
-
- bool
- XML_Error_Handler::handleError (const DOMError& domError)
- {
- this->errors_ = true;
-
- if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t), Warning "));
- else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t), Error "));
- else
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t), Fatal Error "));
- char *msg =
- XMLString::transcode (domError.getMessage ());
-
- ACE_Auto_Basic_Array_Ptr<char> cleanup_msg (msg);
-
- char *file =
- XMLString::transcode (domError.getLocation ()->getURI ());
-
- ACE_Auto_Basic_Array_Ptr<char> cleanup_file (file);
-
- ACE_DEBUG ((LM_DEBUG,
- "%s at line %d and column %d in file %s\n",
- msg,
- domError.getLocation ()->getLineNumber (),
- domError.getLocation ()->getColumnNumber (),
- file));
-
- return true;
- }
-
- void
- XML_Error_Handler::resetErrors (void)
- {
- this->errors_ = false;
- }
-
- bool
- XML_Error_Handler::getErrors (void) const
- {
- return this->errors_;
- }
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.h b/SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.h
deleted file mode 100644
index 0f5f0760da5..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XML_Error_Handler.h
+++ /dev/null
@@ -1,65 +0,0 @@
-//==============================================================
-/**
- * @file XML_Error_Handler.h
- *
- * $Id$
- *
- * @brief Error handler for Xerces
- *
- * @author Bala Natarajan <bala@dre.vanderbilt.edu>
- */
-//================================================================
-#ifndef CIAO_CONFIG_HANLDERS_ERROR_HANDLER_H
-#define CIAO_CONFIG_HANLDERS_ERROR_HANDLER_H
-
-#include /**/ "ace/pre.h"
-
-//#include "CIAO_XML_Utils_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include <xercesc/dom/DOMErrorHandler.hpp>
-
-using xercesc::DOMErrorHandler;
-using xercesc::DOMError;
-
-namespace CIAO
-{
- namespace Config_Handlers
- {
- /**
- * @class XML_Error_Hander
- *
- * @brief Error handler for XERCES
- *
- */
- class XML_Error_Handler
- : public DOMErrorHandler
- {
- public:
-
- XML_Error_Handler (void);
-
- ~XML_Error_Handler (void);
-
- bool handleError (const DOMError& domError);
-
- void resetErrors (void);
-
- bool getErrors(void) const;
-
- private :
- // Disallow copying
- XML_Error_Handler (const XML_Error_Handler&);
- XML_Error_Handler& operator= (const XML_Error_Handler&);
-
- bool errors_;
- };
- }
-}
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_CONFIG_HANLDERS_ERROR_HANDLER_H*/
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XML_Helper.cpp b/SA_POP/Standalone/XML_Utils/Utils/XML_Helper.cpp
deleted file mode 100644
index 2adcfa91e15..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XML_Helper.cpp
+++ /dev/null
@@ -1,239 +0,0 @@
-//$Id$
-#include "XML_Helper.h"
-#include "ace/Auto_Ptr.h"
-#include "ace/Log_Msg.h"
-#include "xercesc/util/XMLUniDefs.hpp"
-#include "xercesc/dom/DOM.hpp"
-#include "XML_Error_Handler.h"
-#include "XML_Schema_Resolver.h"
-#include "xercesc/framework/LocalFileFormatTarget.hpp"
-#include "XercesString.h"
-
-namespace CIAO
-{
- namespace Config_Handlers
- {
- using xercesc::XMLException;
- using xercesc::XMLString;
- using xercesc::DOMImplementation;
- using xercesc::DOMImplementationRegistry;
- using xercesc::DOMBuilder;
- using xercesc::DOMImplementationLS;
- using xercesc::XMLUni;
- using xercesc::DOMDocument;
- using xercesc::DOMException;
-
- XML_Helper::XML_Helper (void)
- : initialized_ (false)
- {
- this->init_parser ();
- }
-
- XML_Helper::~XML_Helper (void)
- {
- this->terminate_parser ();
- }
-
- bool
- XML_Helper::is_initialized (void) const
- {
- return this->initialized_ == true;
- }
-
- void
- XML_Helper::init_parser (void)
- {
- if (this->initialized_)
- return;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Initializing the Xerces runtime \n"));
- // Initialize the Xerces run-time
- try
- {
- xercesc::XMLPlatformUtils::Initialize();
- }
- catch (const XMLException& e)
- {
- char* message =
- XMLString::transcode (e.getMessage());
- ACE_Auto_Basic_Array_Ptr<char> cleanup_message (message);
-
- throw;
- }
- catch (...)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Some other exception,"
- " returning\n"));
-
- return;
- }
-
- // Instantiate the DOM parser.
- static const XMLCh gLS[] = { xercesc::chLatin_L,
- xercesc::chLatin_S,
- xercesc::chNull };
-
- // Get an implementation of the Load-Store (LS) interface
- // and cache it for later use
- impl_ =
- DOMImplementationRegistry::getDOMImplementation(gLS);
-
- this->initialized_ = true;
- return;
- }
-
-//*************CHANGED NAME SO DOESN'T CONFLICT WITH SIGNATURE OF create_dom() WITH THE ADDED <path> PARAMETER************************************************************************************************************
- XERCES_CPP_NAMESPACE::DOMDocument *
- XML_Helper::create_empty_dom (const ACE_TCHAR *root,
- const ACE_TCHAR *ns)
- {
- if (root == 0 || ns == 0)
- return 0;
-
- return this->impl_->createDocument (XStr (ns),
- XStr (root),
- 0);
- }
-
-//*************ADDED <path> PARAMETER************************************************************************************************************
- XERCES_CPP_NAMESPACE::DOMDocument *
- XML_Helper::create_dom (const ACE_TCHAR *url, const ACE_TCHAR *path)
- {
-
- if (url == 0)
- return impl_->createDocument(
- XStr ("http://www.omg.org/DeploymentPlan"),
- XStr ("deploymentPlan"),
- 0);
-
- try
- {
-
- // Create a DOMBuilder
- DOMBuilder* parser =
- impl_->createDOMBuilder (DOMImplementationLS::MODE_SYNCHRONOUS,
- 0);
-
- // Discard comment nodes in the document
- parser->setFeature (XMLUni::fgDOMComments, false);
-
- // Disable datatype normalization. The XML 1.0 attribute value
- // normalization always occurs though.
- parser->setFeature (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded sustitution text will be
- // created.
- parser->setFeature (XMLUni::fgDOMEntities, false);
-
- // Perform Namespace processing.
- parser->setFeature (XMLUni::fgDOMNamespaces, true);
-
- // Perform Validation
- parser->setFeature (XMLUni::fgDOMValidation, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- parser->setFeature (XMLUni::fgDOMWhitespaceInElementContent, false);
-
- // Enable the parser's schema support.
- parser->setFeature (XMLUni::fgXercesSchema, true);
-
- // Enable full schema constraint checking, including checking which
- // may be time-consuming or memory intensive. Currently, particle
- // unique attribution constraint checking and particle derivation
- // restriction checking are controlled by this option.
- parser->setFeature (XMLUni::fgXercesSchemaFullChecking, true);
-
- // The parser will treat validation error as fatal and will exit.
- parser->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
-
- XML_Error_Handler handler;
-
- parser->setErrorHandler (&handler);
-
-//**************CHANGED FROM resolver() DEFAULT CONSTRUCTOR to resolver(path)****************************************************************************************************************************************************
- CIAO_Schema_Resolver resolver (path);
-// CIAO_Schema_Resolver resolver;
-
- parser->setEntityResolver (&resolver);
-
- DOMDocument* doc = parser->parseURI (url);
-
- if (handler.getErrors ())
- throw 0;
-
- return doc;
- }
- catch (const DOMException& e)
- {
- const unsigned int maxChars = 2047;
- XMLCh errText[maxChars + 1];
-
- if (DOMImplementation::loadDOMExceptionMsg (e.code,
- errText,
- maxChars))
- {
- char* message =
- XMLString::transcode (errText);
- ACE_Auto_Basic_Array_Ptr<char> cleanup_message (message);
- }
- return 0;
-
- }
- catch (const XMLException& e)
- {
- char* message = XMLString::transcode (e.getMessage());
- ACE_Auto_Basic_Array_Ptr<char> cleanup_message (message);
- throw 0;
- }
- catch (...)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Caught an unknown exception \n"));
- throw 0;
- }
-
- return 0;
- }
-
- void
- XML_Helper::terminate_parser (void)
- {
- try
- {
- xercesc::XMLPlatformUtils::Terminate();
- }
- catch (const XMLException& e)
- {
- char* message =
- XMLString::transcode (e.getMessage());
- ACE_Auto_Basic_Array_Ptr<char> cleanup_message (message);
- throw;
- }
-
- this->initialized_ = false;
- return;
- }
-
- bool XML_Helper::write_DOM (XERCES_CPP_NAMESPACE::DOMDocument *doc,
- const ACE_TCHAR *file)
- {
- bool retn;
- XERCES_CPP_NAMESPACE::DOMWriter *writer = impl_->createDOMWriter();
-
- if (writer->canSetFeature (XMLUni::fgDOMWRTFormatPrettyPrint,
- true))
- writer->setFeature (XMLUni::fgDOMWRTFormatPrettyPrint, true);
-
- xercesc::XMLFormatTarget* ft (new xercesc::LocalFileFormatTarget(file));
- retn = writer->writeNode(ft, *doc);
- delete writer;
- delete ft;
- return retn;
- }
-
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XML_Helper.h b/SA_POP/Standalone/XML_Utils/Utils/XML_Helper.h
deleted file mode 100644
index 46efe485377..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XML_Helper.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// $Id$
-//============================================================
-/**
- * @file XML_Helper.h
- *
- * @brief Some helper functions for XML
- *
- * @author Bala Natarajan <bala@dre.vanderbilt.edu>
- */
-//============================================================
-#ifndef CIAO_CONFIG_HANDLERS_XML_HELPER_H
-#define CIAO_CONFIG_HANDLERS_XML_HELPER_H
-#include /**/ "ace/pre.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "ace/Singleton.h"
-#include "ace/Null_Mutex.h"
-
-#include "xercesc/util/XercesDefs.hpp"
-
-namespace XERCES_CPP_NAMESPACE
-{
- class DOMDocument;
- class DOMWriter;
- class DOMImplementation;
-}
-
-
-namespace CIAO
-{
- namespace Config_Handlers
- {
- /**
- * @class XML_Helper
- *
- * @brief Helper class for some routine XML stuff.
- */
- class XML_Helper
- {
- public:
- XML_Helper (void);
-
- ~XML_Helper (void);
-
- /// Create a DOM tree
- XERCES_CPP_NAMESPACE::DOMDocument *
-//*************ADDED <path> PARAMETER to create_dom()************************************************************************************************************
- create_dom (const ACE_TCHAR *uri, const ACE_TCHAR *path);
-
-//*************CHANGED NAME SO DOESN'T CONFLICT WITH SIGNATURE OF create_dom() WITH THE ADDED <path> PARAMETER************************************************************************************************************
- XERCES_CPP_NAMESPACE::DOMDocument *
- create_empty_dom (const ACE_TCHAR *root,
- const ACE_TCHAR *ns);
-
- //Writes out a DOMDocument to an XML file
- bool write_DOM (XERCES_CPP_NAMESPACE::DOMDocument *doc,
- const ACE_TCHAR *file);
-
- bool is_initialized (void) const;
-
- protected:
- /// Intialize the parser
- void init_parser (void);
-
- /// Terminate the parser
- void terminate_parser (void);
-
- private:
- bool initialized_;
- XERCES_CPP_NAMESPACE::DOMImplementation *impl_;
- };
-
-/* CIAO_XML_UTILS_SINGLETON_DECLARE (ACE_Singleton,
- XML_Helper,
- ACE_Null_Mutex);
-
- typedef ACE_Singleton < XML_Helper, ACE_Null_Mutex > XML_Helper_Singleton;
-#define XML_HELPER XML_Helper_Singleton::instance ()*/
- }
-}
-
-
-#include /**/ "ace/post.h"
-#endif/*CIAO_CONFIG_HANDLERS_XML_HELPER_H*/
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.cpp b/SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.cpp
deleted file mode 100644
index 269e95ab425..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// $Id$
-#include "XML_Schema_Resolver.h"
-#include "XercesString.h"
-#include "ace/Env_Value_T.h"
-#include <xercesc/framework/LocalFileInputSource.hpp>
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-using xercesc::Wrapper4InputSource;
-using xercesc::LocalFileInputSource;
-
-
-namespace CIAO
-{
- namespace Config_Handlers
- {
- CIAO_Schema_Resolver::CIAO_Schema_Resolver (void)
- {
- this->base_path_ = this->resolve_from_environment ();
- }
-
- CIAO_Schema_Resolver::CIAO_Schema_Resolver (const char *path)
- {
- if (path == 0)
- this->base_path_ = this->resolve_from_environment ();
- else
- this->base_path_ = path;
- }
-
- /// This function is called by the Xerces infrastructure to
- /// actually resolve the location of a schema.
- DOMInputSource *
- CIAO_Schema_Resolver::resolveEntity (const XMLCh *const publicId,
- const XMLCh *const systemId,
- const XMLCh *const baseURI)
- {
- ACE_UNUSED_ARG (baseURI);
- ACE_UNUSED_ARG (publicId);
-
- XStr path (this->base_path_.c_str ());
- path.append (systemId);
-
- // Ownership of these objects is given to other people.
- return new Wrapper4InputSource (new LocalFileInputSource (path));
- }
-
- std::string
- CIAO_Schema_Resolver::resolve_from_environment (void)
- {
- ACE_Env_Value <const char *> path ("CIAO_ROOT", "");
-
- std::string retval (path);
- return retval += "/docs/schema/";
- }
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.h b/SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.h
deleted file mode 100644
index 4219c280a83..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XML_Schema_Resolver.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file XML_Schema_Resolver.h
- * @author Will Otte <wotte@dre.vanderbilt.edu>
- *
- * $Id$
- *
- * Resolves schema locations.
- */
-
-#ifndef CIAO_CONFIG_HANDLERS_XML_SCHEAM_RESOLVER_H
-#define CIAO_CONFIG_HANDLERS_XML_SCHEAM_RESOLVER_H
-#include /**/ "ace/pre.h"
-
-//#include "CIAO_XML_Utils_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include <xercesc/dom/DOMEntityResolver.hpp>
-#include <xercesc/dom/DOMInputSource.hpp>
-
-#include <string>
-
-using xercesc::DOMEntityResolver;
-using xercesc::DOMInputSource;
-
-namespace CIAO
-{
- namespace Config_Handlers
- {
- /**
- * @class CIAO_Schema_Resolver
- * @brief Resolves schema locations for CIAO.
- */
- class CIAO_Schema_Resolver
- : public virtual DOMEntityResolver
- {
- public:
- /// This constructor locates the schema in the default location
- /// from CIAO_ROOT/docs/schema.
- CIAO_Schema_Resolver (void);
-
- /// If this constructor is passed a nonempty string, it locates
- /// the schema in that path, otherwise its behavior is the same
- /// as the default constructor.
- CIAO_Schema_Resolver (const char *path);
-
- /// This function is called by the Xerces infrastructure to
- /// actually resolve the location of a schema.
- virtual DOMInputSource * resolveEntity (const XMLCh *const publicId,
- const XMLCh *const systemId,
- const XMLCh *const baseURI);
-
- private:
- std::string resolve_from_environment (void);
-
- std::string base_path_;
- };
- }
-}
-
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_CONFIG_HANDLERS_XML_SCHEAM_RESOLVER_H */
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XercesString.cpp b/SA_POP/Standalone/XML_Utils/Utils/XercesString.cpp
deleted file mode 100644
index 8901675a8b1..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XercesString.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// $Id$
-
-#include <ostream>
-
-#include "XercesString.h"
-using xercesc::XMLString;
-
-namespace CIAO
-{
-namespace Config_Handlers
-{
-
- XStr::XStr (const char* str)
- : _wstr(0)
- {
- _wstr = XMLString::transcode(str);
- }
-
- XStr::XStr (XMLCh *wstr)
- : _wstr(wstr)
- {
-
- }
-
- XStr::XStr (const XMLCh* wstr)
- : _wstr(0)
- {
- _wstr = XMLString::replicate(wstr);
- }
-
- XStr::XStr (const XStr &right)
- : _wstr(0)
- {
- _wstr = XMLString::replicate(right._wstr);
- }
-
- XStr& XStr::operator= (const XStr& rhs)
- {
- if (&rhs == this)
- return *this;
- XStr temp (rhs);
- ACE_Swap<XMLCh*>::swap (this->_wstr, temp._wstr);
- return *this;
- }
-
- XStr::~XStr ()
- {
- if (_wstr)
- XMLString::release(&_wstr);
- }
-
- const XMLCh* XStr::begin () const
- {
- return _wstr;
- }
-
- const XMLCh* XStr::end () const
- {
- return _wstr + size();
- }
-
- bool XStr::append(const XMLCh *tail)
- {
- int iTailLen = XMLString::stringLen(tail);
- int iWorkLen = XMLString::stringLen(_wstr);
- XMLCh *result = new XMLCh[ iWorkLen + iTailLen + 1 ];
- bool bOK = result != 0;
- if (bOK)
- {
- XMLCh *target = result;
- XMLString::moveChars(target, _wstr, iWorkLen);
- target += iWorkLen;
- XMLString::moveChars(target, tail, iTailLen);
- target += iTailLen;
- *target++ = 0;
- XMLString::release(&_wstr);
- _wstr = result;
- }
- return bOK;
- }
-
- bool XStr::erase(const XMLCh *head, const XMLCh *tail)
- {
- bool bOK = head <= tail && head >= begin() && tail <= end();
- if (bOK)
- {
- XMLCh *result = new XMLCh[ size() - (tail - head) + 1 ];
- XMLCh *target = result;
- bOK = target != NULL;
- if (bOK)
- {
- const XMLCh *cursor = begin();
-
- while (cursor != head) *target++ = *cursor++;
- cursor = tail;
- while ( cursor != end() ) *target++ = *cursor++;
- *target ++ = 0;
- XMLString::release(&_wstr);
- _wstr = result;
- }
- }
- return bOK;
- }
-
- int XStr::size () const
- {
- return XMLString::stringLen(_wstr);
- }
-
- XMLCh XStr::operator [] (const int i)
- {
- return _wstr[i];
- }
-
- XMLCh XStr::operator [] (const int i) const
- {
- return _wstr[i];
- }
-
- bool operator== (const XStr& lhs, const XStr& rhs)
- {
- return XMLString::compareIString (lhs,rhs) == 0;
- }
-
- bool operator!= (const XStr& lhs, const XStr& rhs)
- {
- return !operator==(lhs, rhs);
- }
-
-
- std::ostream&
- operator<< (std::ostream& o, XStr const& str)
- {
- char* s = XMLString::transcode (str);
-
- o << s;
-
- XMLString::release (&s); // idiots?
- return o;
- }
-
-}
-}
diff --git a/SA_POP/Standalone/XML_Utils/Utils/XercesString.h b/SA_POP/Standalone/XML_Utils/Utils/XercesString.h
deleted file mode 100644
index 4c26c5419b9..00000000000
--- a/SA_POP/Standalone/XML_Utils/Utils/XercesString.h
+++ /dev/null
@@ -1,150 +0,0 @@
-// $Id$
-
-
-
-#ifndef _XERCESSTRING_H
-
-#define _XERCESSTRING_H
-
-
-
-#include /**/ "ace/pre.h"
-
-
-
-#include "ace/Swap.h"
-
-
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-
-#pragma once
-
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-
-#include <iosfwd>
-
-
-
-#include <xercesc/util/XMLString.hpp>
-
-
-
-// Utility class that provides a std::string like facade to XMLString.
-
-// Doesn't implement all of the methods of std::string.
-
-//#include "CIAO_XML_Utils_Export.h"
-
-namespace CIAO
-
-{
-
-namespace Config_Handlers
-
-{
-
-
-
- class XStr
-
- {
-
- public:
-
- XStr() : _wstr(0L) { };
-
-
-
- XStr (const char* str);
-
-
-
- XStr (XMLCh* wstr);
-
-
-
- XStr (const XMLCh* wstr);
-
-
-
- XStr (const XStr& copy);
-
-
-
- XStr& operator= (const XStr& rhs);
-
-
-
- ~XStr();
-
-
-
- const XMLCh* begin() const;
-
-
-
- const XMLCh* end() const;
-
-
-
- bool append(const XMLCh* tail);
-
-
-
- bool erase (const XMLCh* head, const XMLCh* tail);
-
-
-
- int size() const;
-
-
-
- XMLCh operator [] (const int i);
-
-
-
- XMLCh operator [] (const int i) const;
-
-
-
- operator const XMLCh* () const { return _wstr; };
-
-
-
- private:
-
-
-
- XMLCh* _wstr; // Internal representation
-
-
-
- };
-
-
-
- bool operator== (const XStr& lhs, const XStr& rhs);
-
- bool operator!= (const XStr& lhs, const XStr& rhs);
-
-
-
- std::ostream&
-
- operator<< (std::ostream& o, XStr const& str);
-
-
-
-}
-
-}
-
-#include /**/ "ace/post.h"
-
-
-
-#endif /* _XERCESSTRING_H */
-
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.hpp b/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.hpp
deleted file mode 100644
index b435bb4370f..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// file : XMLSchema/Traversal.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XMLSCHEMA_TRAVERSAL_HPP
-#define XMLSCHEMA_TRAVERSAL_HPP
-
-#include <XSCRT/Traversal.hpp>
-#include <XMLSchema/Types.hpp>
-
-namespace XMLSchema
-{
- namespace Traversal
- {
- // Automatic traversal of IDREFs.
- //
- //
- struct IDREF :
- XSCRT::Traversal::Traverser<XMLSchema::IDREF_Base, XSCRT::Type>
- {
- virtual void
- traverse (XMLSchema::IDREF_Base& r)
- {
- if (r.get ()) dispatch (*(r.get ()));
- }
-
- virtual void
- traverse (XMLSchema::IDREF_Base const& r)
- {
- if (r.get ()) dispatch (*(r.get ()));
- }
- };
-
-
- template <typename T>
- struct Traverser : XSCRT::Traversal::Traverser<T, XSCRT::Type>
- {
- };
-
- typedef Traverser<byte> byte;
- typedef Traverser<unsignedByte> unsignedByte;
-
- typedef Traverser<short_> short_;
- typedef Traverser<unsignedShort> unsignedShort;
-
- typedef Traverser<int_> int_;
- typedef Traverser<unsignedInt> unsignedInt;
-
- typedef Traverser<long_> long_;
- typedef Traverser<unsignedLong> unsignedLong;
-
- typedef Traverser<boolean> boolean;
-
- typedef Traverser<float_> float_;
- typedef Traverser<double_> double_;
-
- template <typename C>
- struct string : Traverser<XMLSchema::string<C> >
- {
- };
-
- template <typename C>
- struct ID : Traverser<XMLSchema::ID<C> >
- {
- };
- }
-}
-
-#include <XMLSchema/Traversal.ipp>
-#include <XMLSchema/Traversal.tpp>
-
-#endif // XMLSCHEMA_TRAVERSAL_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.ipp b/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.ipp
deleted file mode 100644
index 436787813dd..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.ipp
+++ /dev/null
@@ -1,10 +0,0 @@
-// file : XMLSchema/Traversal.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
- namespace Traversal
- {
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.tpp b/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.tpp
deleted file mode 100644
index 67d4c4ad21a..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Traversal.tpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// file : XMLSchema/Traversal.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
- namespace Traversal
- {
-
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.hpp b/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.hpp
deleted file mode 100644
index e4fa52dbb9c..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// file : XMLSchema/TypeInfo.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XMLSCHEMA_TYPE_INFO_HPP
-#define XMLSCHEMA_TYPE_INFO_HPP
-
-#include <XSCRT/ExtendedTypeInfo.hpp>
-
-namespace XMLSchema
-{
- template <typename C>
- struct TypeInfoInitializer
- {
- TypeInfoInitializer (XSCRT::ExtendedTypeInfoMap&);
- };
-}
-
-#include <XMLSchema/TypeInfo.ipp>
-#include <XMLSchema/TypeInfo.tpp>
-
-#endif // XMLSCHEMA_TYPE_INFO_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.ipp b/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.ipp
deleted file mode 100644
index 947e37d2ae3..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.ipp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XMLSchema/TypeInfo.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.tpp b/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.tpp
deleted file mode 100644
index 6ead5b8f7b2..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/TypeInfo.tpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// file : XMLSchema/TypeInfo.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
- //@@ VC6
- //
- template<typename T>
- void
- add_info (XSCRT::ExtendedTypeInfoMap& map, T*)
- {
- using XSCRT::TypeId;
- using XSCRT::ExtendedTypeInfo;
-
- TypeId id (typeid (T));
- ExtendedTypeInfo info (id);
-
- info.add_base (ExtendedTypeInfo::Access::public_,
- false,
- typeid (XSCRT::Type));
-
- map.insert (std::make_pair (id, info));
- }
-
-
- template <typename C>
- inline
- TypeInfoInitializer<C>::
- TypeInfoInitializer (XSCRT::ExtendedTypeInfoMap& map)
- {
- using XSCRT::TypeId;
- using XSCRT::ExtendedTypeInfo;
-
- // XSCRT::Type
- //
- {
- TypeId id (typeid (XSCRT::Type));
- map.insert (std::make_pair (id, ExtendedTypeInfo (id)));
- }
-
- //@@ VC6
-
- add_info<byte> (map, 0);
- add_info<unsignedByte> (map, 0);
-
- add_info<short_> (map, 0);
- add_info<unsignedShort> (map, 0);
-
- add_info<int_> (map, 0);
- add_info<unsignedInt> (map, 0);
-
- add_info<long_> (map, 0);
- add_info<unsignedLong> (map, 0);
-
- add_info<boolean> (map, 0);
-
- add_info<float_> (map, 0);;
- add_info<double_> (map, 0);
-
- add_info<string<C> > (map, 0);
-
- add_info<normalizedString<C> > (map, 0);
- add_info<token<C> > (map, 0);
- add_info<NMTOKEN<C> > (map, 0);
- add_info<Name<C> > (map, 0);
- add_info<NCName<C> > (map, 0);
-
- add_info<ID<C> > (map, 0);
-
- // IDREF_Base
- //
- {
- TypeId id (typeid (IDREF_Base));
- ExtendedTypeInfo info (id);
-
- info.add_base (ExtendedTypeInfo::Access::public_,
- false,
- typeid (XSCRT::Type));
-
- map.insert (std::make_pair (id, info));
- }
-
- // IDREF
- //
- {
- TypeId id (typeid (IDREF<C>));
- ExtendedTypeInfo info (id);
-
- info.add_base (ExtendedTypeInfo::Access::public_,
- false,
- typeid (IDREF_Base));
-
- map.insert (std::make_pair (id, info));
- }
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Types.hpp b/SA_POP/Standalone/XML_Utils/XMLSchema/Types.hpp
deleted file mode 100644
index 0ef2db213f3..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Types.hpp
+++ /dev/null
@@ -1,584 +0,0 @@
-// file : XMLSchema/Types.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XMLSCHEMA_TYPES_HPP
-#define XMLSCHEMA_TYPES_HPP
-
-#include <string>
-#include "XSCRT/Elements.hpp"
-
-#include "ace/Basic_Types.h"
-/**
- * @@ HACK: VC7
- *
- * Disabled the warning about using this in the base member initialization section.
- * Our use in this file is fine.
- */
-#ifdef _MSC_VER
-# pragma warning ( disable: 4355 )
-#endif
-namespace XMLSchema
-{
- typedef XSCRT::FundamentalType<ACE_INT8> byte;
- typedef XSCRT::FundamentalType<ACE_UINT8> unsignedByte;
-
- typedef XSCRT::FundamentalType<ACE_INT16> short_;
- typedef XSCRT::FundamentalType<ACE_UINT16> unsignedShort;
-
- typedef XSCRT::FundamentalType<ACE_INT32> int_;
- typedef XSCRT::FundamentalType<ACE_UINT32> unsignedInt;
-
- //@@ VC6
-#if defined (_MSC_VER) && (_MSC_VER < 1300)
-
- typedef XSCRT::FundamentalType<__int64> long_;
- typedef XSCRT::FundamentalType<unsigned __int64> unsignedLong;
-
-#else
-
- typedef XSCRT::FundamentalType<ACE_INT64> long_;
- typedef XSCRT::FundamentalType<ACE_UINT64> unsignedLong;
-
-#endif
-
- //@@ It would be nice to use some arbitrary-length integer class.
- //
- typedef long_ decimal;
- typedef decimal integer;
- typedef integer nonPositiveInteger;
- typedef integer nonNegativeInteger;
- typedef nonNegativeInteger positiveInteger;
- typedef nonPositiveInteger negativeInteger;
-
-
- typedef XSCRT::FundamentalType<bool> boolean;
-
- typedef XSCRT::FundamentalType<float> float_;
- typedef XSCRT::FundamentalType<double> double_;
-
- // Just to make GCC 3.3 and other broken compilers shutup.
- //
- using std::basic_string;
-
-
- template <typename C>
- class string : public XSCRT::Type, public basic_string<C>
- {
- protected:
- typedef basic_string<C> Base__ ;
-
- public:
-
- //@@ VC6 does not inject XSCRT::Type into the scope so I have
- // to qualify it all the time.
- //
-
- string ()
- {
- }
-
- string (XSCRT::XML::Element<C> const& e)
- : Base__ (e.value ())
- {
- }
-
- string (XSCRT::XML::Attribute<C> const& a)
- : Base__ (a.value ())
- {
- }
-
- string (Base__ const& x)
- : Base__ (x)
- {
- }
-
- string (C const* x)
- : Base__ (x)
- {
- }
-
- string&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class normalizedString : public string<C>
- {
- protected:
- typedef typename string<C>::Base__ Base__;
-
- public:
- normalizedString ()
- {
- }
-
- normalizedString (XSCRT::XML::Element<C> const& e)
- : string<C> (e)
- {
- }
-
- normalizedString (XSCRT::XML::Attribute<C> const& a)
- : string<C> (a)
- {
- }
-
- normalizedString (Base__ const& x)
- : string<C> (x)
- {
- }
-
- normalizedString (C const* x)
- : string<C> (x)
- {
- }
-
- normalizedString&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class token : public normalizedString<C>
- {
- protected:
- typedef typename normalizedString<C>::Base__ Base__;
-
- public:
- token ()
- {
- }
-
- token (XSCRT::XML::Element<C> const& e)
- : normalizedString<C> (e)
- {
- }
-
- token (XSCRT::XML::Attribute<C> const& a)
- : normalizedString<C> (a)
- {
- }
-
- token (Base__ const& x)
- : normalizedString<C> (x)
- {
- }
-
- token (C const* x)
- : normalizedString<C> (x)
- {
- }
-
- token&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class NMTOKEN : public token<C>
- {
- protected:
- typedef typename token<C>::Base__ Base__;
-
- public:
- NMTOKEN ()
- {
- }
-
- NMTOKEN (XSCRT::XML::Element<C> const& e)
- : token<C> (e)
- {
- }
-
- NMTOKEN (XSCRT::XML::Attribute<C> const& a)
- : token<C> (a)
- {
- }
-
- NMTOKEN (Base__ const& x)
- : token<C> (x)
- {
- }
-
- NMTOKEN (C const* x)
- : token<C> (x)
- {
- }
-
- NMTOKEN&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
- template <typename C>
- class Name: public token<C>
- {
- protected:
- typedef typename token<C>::Base__ Base__;
-
- public:
- Name()
- {
- }
-
- Name(XSCRT::XML::Element<C> const& e)
- : token<C> (e)
- {
- }
-
- Name(XSCRT::XML::Attribute<C> const& a)
- : token<C> (a)
- {
- }
-
- Name(Base__ const& x)
- : token<C> (x)
- {
- }
-
- Name (C const* x)
- : token<C> (x)
- {
- }
-
- Name&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class NCName: public Name<C>
- {
- protected:
- typedef typename Name<C>::Base__ Base__;
-
- public:
- NCName()
- {
- }
-
- NCName(XSCRT::XML::Element<C> const& e)
- : Name<C> (e)
- {
- }
-
- NCName(XSCRT::XML::Attribute<C> const& a)
- : Name<C> (a)
- {
- }
-
- NCName(Base__ const& x)
- : Name<C> (x)
- {
- }
-
- NCName (C const* x)
- : Name<C> (x)
- {
- }
-
- NCName&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
- template <typename C>
- struct IdentityProvider : XSCRT::IdentityProvider
- {
- IdentityProvider (NCName<C> const& id)
- : id_ (id)
- {
- }
-
- virtual bool
- before (XSCRT::IdentityProvider const& y) const
- {
- return id_ < dynamic_cast<IdentityProvider const&> (y).id_;
- }
-
- private:
- NCName<C> const& id_;
-
- private:
- IdentityProvider (IdentityProvider const&);
-
- IdentityProvider&
- operator= (IdentityProvider const&);
- };
-
-
- template <typename C>
- class ID : public NCName<C>
- {
- protected:
- typedef typename NCName<C>::Base__ Base__;
-
- public:
- ~ID()
- {
- unregister_id ();
- }
-
- ID ()
- : id_provider_ (*this)
- {
- }
-
- ID (XSCRT::XML::Element<C> const& e)
- : NCName<C> (e), id_provider_ (*this)
- {
- }
-
- ID (XSCRT::XML::Attribute<C> const& a)
- : NCName<C> (a), id_provider_ (*this)
- {
- }
-
- ID (ID const& x)
- : NCName<C> (x), id_provider_ (*this)
- {
- }
-
- ID (Base__ const& x)
- : NCName<C> (x), id_provider_ (*this)
- {
- }
-
- ID (C const* x)
- : NCName<C> (x), id_provider_ (*this)
- {
- }
-
- ID&
- operator= (Base__ const& x)
- {
- unregister_id ();
-
- static_cast<NCName<C>&>(*this) = x;
-
- register_id ();
-
- return *this;
- }
-
- ID&
- operator= (ID const& x)
- {
- unregister_id ();
-
- static_cast<NCName<C>&>(*this) = static_cast<NCName<C> const&>(x);
-
- register_id ();
-
- return *this;
- }
-
- public:
- using NCName<C>::container;
-
- virtual void
- container (XSCRT::Type* c)
- {
- unregister_id ();
-
- NCName<C>::container (c);
-
- register_id ();
- }
-
- private:
- using NCName<C>::empty;
- using NCName<C>::root;
-
- void
- register_id ()
- {
- if (NCName<C>::container () != this && !empty ())
- {
- //std::wcerr << "registering " << container ()
- // << " as '" << *this
- // << "' on " << container () << std::endl;
- NCName<C>::container ()->register_id (id_provider_,
- NCName<C>::container ());
- }
- }
-
- void
- unregister_id ()
- {
- if (NCName<C>::container () != this && !empty ())
- {
- //std::wcerr << "un-registering " << container ()
- // << " as '" << *this
- // << "' on " << container () << std::endl;
- NCName<C>::container ()->unregister_id (id_provider_);
- }
- }
-
- private:
- IdentityProvider<C> id_provider_;
- };
-
- struct IDREF_Base : public XSCRT::Type
- {
- virtual XSCRT::Type const*
- get () const = 0;
-
- virtual XSCRT::Type*
- get () = 0;
- };
-
- template <typename C>
- class IDREF : public IDREF_Base
- {
- public:
- IDREF ()
- : id_provider_ (id_)
- {
- }
-
- IDREF (XSCRT::XML::Element<C> const& e)
- : id_ (e), id_provider_ (id_)
- {
- }
-
- IDREF (XSCRT::XML::Attribute<C> const& a)
- : id_ (a), id_provider_ (id_)
- {
- }
-
- IDREF (IDREF const& x)
- : XMLSchema::IDREF_Base (),
- id_ (x.id_), id_provider_ (id_)
- {
- }
-
- IDREF (basic_string<C> const& id)
- : id_ (id), id_provider_ (id_)
- {
- }
-
- IDREF (C const* id)
- : id_ (id), id_provider_ (id_)
- {
- }
-
- IDREF&
- operator= (IDREF const& x)
- {
- id_ = x.id_;
- return *this;
- }
-
- IDREF&
- operator= (basic_string<C> const& x)
- {
- id_ = x;
- return *this;
- }
-
- public:
- NCName<C>
- id () const
- {
- return id_;
- }
-
- public:
- XSCRT::Type const*
- operator-> () const
- {
- return get ();
- }
-
- XSCRT::Type*
- operator-> ()
- {
- return get ();
- }
-
- XSCRT::Type const&
- operator* () const
- {
- return *(get ());
- }
-
- XSCRT::Type&
- operator* ()
- {
- return *(get ());
- }
-
- virtual XSCRT::Type const*
- get () const
- {
- if (!id_.empty () && container () != this)
- {
- return root ()->lookup_id (id_provider_);
- }
- else
- {
- return 0;
- }
- }
-
- virtual XSCRT::Type*
- get ()
- {
- if (!id_.empty () && container () != this)
- {
- return root ()->lookup_id (id_provider_);
- }
- else
- {
- return 0;
- }
- }
-
- // conversion to bool
- //
- typedef void (IDREF::*bool_convertable)();
-
- operator bool_convertable () const
- {
- return get () ? &IDREF::true_ : 0;
- }
-
- private:
- void true_ ()
- {
- }
-
- private:
- NCName<C> id_;
- IdentityProvider<C> id_provider_;
- };
-}
-
-#include "XMLSchema/Types.ipp"
-#include "XMLSchema/Types.tpp"
-
-#endif // XMLSCHEMA_TYPES_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Types.ipp b/SA_POP/Standalone/XML_Utils/XMLSchema/Types.ipp
deleted file mode 100644
index 410eeda8167..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Types.ipp
+++ /dev/null
@@ -1,8 +0,0 @@
-// file : XMLSchema/Types.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
-
-}
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Types.tpp b/SA_POP/Standalone/XML_Utils/XMLSchema/Types.tpp
deleted file mode 100644
index edd10f817f0..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Types.tpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// file : XMLSchema/Types.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
-
-}
-
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.hpp b/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.hpp
deleted file mode 100644
index fb2122fafd1..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.hpp
+++ /dev/null
@@ -1,162 +0,0 @@
-// file : XMLSchema/Writer.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XMLSCHEMA_WRITER_HPP
-#define XMLSCHEMA_WRITER_HPP
-
-#include <sstream>
-
-#include <XSCRT/Writer.hpp>
-
-#include <XMLSchema/Types.hpp>
-#include <XMLSchema/Traversal.hpp>
-
-#include <iostream>
-
-namespace XMLSchema
-{
- namespace Writer
- {
- template <typename T, typename C>
- struct FundamentalType : Traversal::Traverser<T>,
- virtual XSCRT::Writer<C>
- {
- FundamentalType (XSCRT::XML::Element<C>& e)
- : XSCRT::Writer<C> (e)
- {
- }
-
- using XSCRT::Writer<C>::top_;
- using XSCRT::Writer<C>::attr_;
-
- virtual void
- traverse (T const& o)
- {
- using namespace XSCRT::XML;
-
- std::basic_ostringstream<C> os;
-
- os << o;
-
- if (Attribute<C>* a = attr_ ())
- {
- a->value (os.str ());
- }
- else
- {
- top_().value (os.str ());
- }
- }
-
- protected:
- virtual void
- traverse (T &t)
- {
- Traversal::Traverser<T>::traverse (t);
- }
-
- FundamentalType ()
- {
- }
- };
-
- template<typename C>
- struct FundamentalType <XSCRT::FundamentalType<bool>, C> :
- Traversal::Traverser<XSCRT::FundamentalType<bool> >,
- virtual XSCRT::Writer<C>
- {
- FundamentalType (XSCRT::XML::Element<C> &e)
- : XSCRT::Writer<C> (e)
- {
- }
-
- using XSCRT::Writer<C>::top_;
- using XSCRT::Writer<C>::attr_;
-
- virtual void
- traverse (XSCRT::FundamentalType<bool> const &o)
- {
- using namespace XSCRT::XML;
-
- std::basic_ostringstream<C> os;
-
- if (o)
- {
- os << "true";
- }
- else
- {
- os << "false";
- }
-
- if (Attribute<C>* a = attr_ ())
- {
- a->value (os.str ());
- }
- else
- {
- top_().value (os.str ());
- }
- }
-
- protected:
- virtual void
- traverse (XSCRT::FundamentalType<bool> &t)
- {
- Traversal::Traverser<XSCRT::FundamentalType<bool> >::traverse (t);
- }
-
- FundamentalType ()
- {
- }
- };
-
-
- template <typename C>
- struct IDREF : Traversal::Traverser<XMLSchema::IDREF<C> >,
- virtual XSCRT::Writer<C>
- {
- IDREF (XSCRT::XML::Element<C>& e)
- : XSCRT::Writer<C> (e)
- {
- }
-
- using XSCRT::Writer<C>::top_;
- using XSCRT::Writer<C>::attr_;
-
- virtual void
- traverse (
- typename Traversal::Traverser<XMLSchema::IDREF<C> >::Type const& o)
- {
- using namespace XSCRT::XML;
-
- if (Attribute<C>* a = attr_ ())
- {
- a->value (o.id ());
- }
- else
- {
- top_().value (o.id ());
- }
- }
-
- protected:
-
- virtual void
- traverse (typename Traversal::Traverser<XMLSchema::IDREF<C> >::Type &o)
- {
- Traversal::Traverser<XMLSchema::IDREF<C> >::traverse (o);
- }
-
- IDREF ()
- {
- }
- };
- }
-}
-
-#include <XMLSchema/Writer.ipp>
-#include <XMLSchema/Writer.tpp>
-
-#endif // XMLSCHEMA_WRITER_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.ipp b/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.ipp
deleted file mode 100644
index 2b7c9a4b939..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.ipp
+++ /dev/null
@@ -1,10 +0,0 @@
-// file : XMLSchema/Writer.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
- namespace Writer
- {
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.tpp b/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.tpp
deleted file mode 100644
index 6c57de04d81..00000000000
--- a/SA_POP/Standalone/XML_Utils/XMLSchema/Writer.tpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// file : XMLSchema/Writer.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XMLSchema
-{
- namespace Writer
- {
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Elements.hpp b/SA_POP/Standalone/XML_Utils/XSCRT/Elements.hpp
deleted file mode 100644
index 06d6801d83d..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Elements.hpp
+++ /dev/null
@@ -1,653 +0,0 @@
-// file : XSCRT/Elements.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XSCRT_ELEMENTS_HPP
-#define XSCRT_ELEMENTS_HPP
-
-#include <map>
-#include <string>
-#include <sstream>
-// #include <iostream> //@@ tmp
-
-#include "XSCRT/Parser.hpp"
-
-#if defined (_MSC_VER) && (_MSC_VER < 1300)
-
-
-// Stuff for broken VC6. Don't like what you see - use better compiler!
-//
-
-
-inline
-std::wistream&
-operator>> (std::wistream& is, __int64& v)
-{
- long t;
- is >> t;
- v = t;
- return is;
-}
-
-inline
-std::wistream&
-operator>> (std::wistream& is, unsigned __int64& v)
-{
- unsigned long t;
- is >> t;
- v = t;
- return is;
-}
-
-inline
-std::wostream&
-operator<< (std::wostream& os, __int64 const& v)
-{
- os << long (v);
- return os;
-}
-
-inline
-std::wostream&
-operator<< (std::wostream& os, unsigned __int64 const& v)
-{
- os << unsigned long (v);
- return os;
-}
-
-inline
-std::istream&
-operator>> (std::istream& is, __int64& v)
-{
- long t;
- is >> t;
- v = t;
- return is;
-}
-
-inline
-std::istream&
-operator>> (std::istream& is, unsigned __int64& v)
-{
- unsigned long t;
- is >> t;
- v = t;
- return is;
-}
-
-inline
-std::ostream&
-operator<< (std::ostream& os, __int64 const& v)
-{
- os << long (v);
- return os;
-}
-
-inline
-std::ostream&
-operator<< (std::ostream& os, unsigned __int64 const& v)
-{
- os << unsigned long (v);
- return os;
-}
-
-#endif
-
-namespace XSCRT
-{
- struct IdentityProvider
- {
- virtual ~IdentityProvider (void) {}
-
- virtual bool before (IdentityProvider const&) const = 0;
- };
-
- class Type
- {
- public:
- virtual ~Type ()
- {
- }
-
- protected:
- Type ()
- : container_ (0)
- {
- }
-
- template <typename C>
- Type (XML::Element<C> const&)
- : container_ (0)
- {
- }
-
- template <typename C>
- Type (XML::Attribute<C> const&)
- : container_ (0)
- {
- }
-
- Type (Type const&)
- : container_ (0)
- {
- }
-
- Type&
- operator= (Type const&)
- {
- //@@ I don't need this.
- //if (map_.get ()) map_->clear (); // Flush the map.
- return *this;
- }
-
- public:
- Type const*
- container () const
- {
- return container_ ? container_ : this;
- }
-
- Type*
- container ()
- {
- return container_ ? container_ : this;
- }
-
-
- Type const*
- root () const
- {
- Type const* r = container ();
-
- //@@ VC6 can't handle this inside the loop.
- //
- Type const* c = r->container ();
-
- for (; c != r; c = c->container ()) r = c;
-
- return r;
- }
-
- Type*
- root ()
- {
- Type* r = container ();
-
- for (Type* c = r->container (); c != r; c = c->container ()) r = c;
-
- return r;
- }
-
- //@@
- //protected:
-
- public:
- virtual void
- container (Type* c)
- {
- if (container_ == c) return;
-
- // Revoke registrations from our old container.
- //
- if (container_ != 0 && map_.get ())
- {
- for (Map_::iterator i (map_->begin ()); i != map_->end (); ++i)
- {
- //std::wcerr << "revoking " << i->second
- // << " to " << container_ << std::endl;
-
- container_->unregister_id (*(i->first));
- }
- }
-
- // Copy registrations to our new container.
- //
- if (c != 0 && map_.get ())
- {
- for (Map_::iterator i (map_->begin ()); i != map_->end (); ++i)
- {
- //std::wcerr << "copying " << i->second
- // << " to " << c << std::endl;
-
- c->register_id (*(i->first), i->second);
- }
- }
-
- container_ = c;
- }
-
- //@@
- //protected:
-
- public:
- void
- register_id (IdentityProvider const& id, Type* t)
- {
- if (map_.get () == 0)
- {
- map_ = std::auto_ptr<Map_> (new Map_);
- }
-
- if (!map_->insert (
- std::pair<IdentityProvider const*, Type*> (&id, t)).second)
- {
- throw 1;
- }
-
- if (container () != this) container ()->register_id (id, t);
- }
-
- void
- unregister_id (IdentityProvider const& id)
- {
- if (map_.get ())
- {
- Map_::iterator it (map_->find (&id));
-
- if (it != map_->end ())
- {
- map_->erase (it);
-
- if (container () != this) container ()->unregister_id (id);
-
- return;
- }
- }
-
- throw 1;
- }
-
- Type*
- lookup_id (IdentityProvider const& id) const
- {
- if (map_.get ())
- {
- Map_::const_iterator it (map_->find (&id));
-
- if (it != map_->end ())
- {
- return it->second;
- }
- }
-
- return 0;
- }
-
-
- private:
- Type* container_;
-
- struct IdentityComparator
- {
- bool operator () (IdentityProvider const* x,
- IdentityProvider const* y) const
- {
- return x->before (*y);
- }
- };
-
- typedef
- std::map<IdentityProvider const*, Type*, IdentityComparator>
- Map_;
-
- std::auto_ptr<Map_> map_;
- };
-
- // Fundamental types template.
- //
- //
- template <typename X>
- class FundamentalType : public Type
- {
- public:
- FundamentalType ()
- {
- }
-
- template<typename C>
- FundamentalType (XML::Element<C> const& e)
- {
- std::basic_stringstream<C> s;
- s << e.value ();
- s >> x_;
- }
-
- template<typename C>
- FundamentalType (XML::Attribute<C> const& a)
- {
- std::basic_stringstream<C> s;
- s << a.value ();
- s >> x_;
- }
-
- FundamentalType (X const& x)
- : x_ (x)
- {
- }
-
- FundamentalType&
- operator= (X const& x)
- {
- x_ = x;
- return *this;
- }
-
- public:
-
- operator X const& () const
- {
- return x_;
- }
- /*
- operator X& ()
- {
- return x_;
- }
- */
- protected:
- X x_;
- };
-
-#if (!defined (_MSC_VER) || (_MSC_VER >= 1300)) && \
- (__GNUC__ > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ > 2)))
-
-
- // Stuff for normal compilers.
- //
-
- // Specialization for `signed char'
- //
- //
- template<>
- template<typename C>
- inline
- FundamentalType<signed char>::
- 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<>
- template<typename C>
- inline
- FundamentalType<signed char>::
- FundamentalType (XML::Attribute<C> const& a)
- {
- std::basic_stringstream<C> s;
- s << a.value ();
-
- short t;
- s >> t;
-
- x_ = static_cast<signed char> (t);
- }
-
- // Specialization for `unsigned char'
- //
- //
- template<>
- template<typename C>
- inline
- FundamentalType<unsigned char>::
- 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<>
- template<typename C>
- inline
- FundamentalType<unsigned char>::
- 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);
- }
-
-#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.
- //
- //
-
-#if !defined (_MSC_VER) || (_MSC_VER >= 1300)
-
- template<>
- template<>
- inline
- FundamentalType<bool>::
- FundamentalType (XML::Element<char> const& e)
- {
- x_ = (e.value () == "true") || (e.value () == "1");
- }
-
- template<>
- template<>
- inline
- FundamentalType<bool>::
- FundamentalType (XML::Element<wchar_t> const& e)
- {
- x_ = (e.value () == L"true") || (e.value () == L"1");
- }
-
- template<>
- template<>
- inline
- FundamentalType<bool>::
- FundamentalType (XML::Attribute<char> const& a)
- {
- x_ = (a.value () == "true") || (a.value () == "1");
- }
-
- template<>
- template<>
- inline
- FundamentalType<bool>::
- FundamentalType (XML::Attribute<wchar_t> const& a)
- {
- x_ = (a.value () == L"true") || (a.value () == L"1");
- }
-
-#else
-
- template <>
- class FundamentalType<bool> : public Type
- {
- public:
- FundamentalType ()
- {
- }
-
- template<typename C>
- FundamentalType (XML::Element<C> const& e)
- {
- x_ = (e.value ()[0] == 't') || (e.value ()[0] == '1');
- }
-
- template<typename C>
- FundamentalType (XML::Attribute<C> const& a)
- {
- x_ = (a.value ()[0] == 't') || (a.value ()[0] == '1');
- }
-
- FundamentalType (bool const& x)
- : x_ (x)
- {
- }
-
- FundamentalType&
- operator= (bool const& x)
- {
- x_ = x;
- return *this;
- }
-
- public:
- operator bool const& () const
- {
- return x_;
- }
-
- operator bool& ()
- {
- return x_;
- }
-
- protected:
- bool x_;
- };
-
-#endif
-
-}
-
-#include "XSCRT/Elements.ipp"
-#include "XSCRT/Elements.tpp"
-
-#endif // XSCRT_ELEMENTS_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Elements.ipp b/SA_POP/Standalone/XML_Utils/XSCRT/Elements.ipp
deleted file mode 100644
index 414f03eb031..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Elements.ipp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSC/Elements.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSC
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Elements.tpp b/SA_POP/Standalone/XML_Utils/XSCRT/Elements.tpp
deleted file mode 100644
index 7539a36d75f..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Elements.tpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSC/Elements.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSC
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.hpp b/SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.hpp
deleted file mode 100644
index 51f1930eea9..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.hpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// file : XSCRT/ExtendedTypeInfo.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XSCRT_EXTENDED_TYPE_INFO_HPP
-#define XSCRT_EXTENDED_TYPE_INFO_HPP
-
-#include <map>
-#include <vector>
-#include <typeinfo>
-
-namespace XSCRT
-{
- //
- //
- //
- class TypeId
- {
- public:
- template<typename T>
- TypeId (T const& t);
-
- TypeId (std::type_info const& tid);
-
- public:
- bool
- operator == (TypeId const& other) const;
-
- bool
- operator != (TypeId const& other) const;
-
- bool
- operator < (TypeId const& other) const;
-
- /*
- friend std::ostream&
- operator << (std::ostream& os, TypeId const& t);
- */
-
- public:
- char const*
- name () const
- {
- return tid_->name ();
- }
-
- private:
- std::type_info const* tid_;
- };
-
-
- //
- //
- //
- class ExtendedTypeInfo
- {
- public:
-
- //
- //
- //
- struct Access
- {
- enum Value
- {
- private_,
- protected_,
- public_
- };
- };
-
-
- //
- //
- //
- class BaseInfo
- {
- public:
- BaseInfo (Access::Value access, bool virtual_base, TypeId const& tid);
-
- public:
- ExtendedTypeInfo const&
- type_info () const;
-
- Access::Value
- access () const;
-
- bool
- virtual_base () const;
-
- private:
- TypeId tid_;
- mutable ExtendedTypeInfo const* ti_;
- bool virtual_base_;
- Access::Value access_;
- };
-
- private:
- typedef
- std::vector<BaseInfo>
- BaseInfoList;
-
- public:
- typedef
- BaseInfoList::const_iterator
- BaseIterator;
-
- public:
- ExtendedTypeInfo (TypeId const& tid);
-
- TypeId
- type_id () const;
-
- BaseIterator
- begin_base () const;
-
- BaseIterator
- end_base () const;
-
- void
- add_base (Access::Value access, bool virtual_base, TypeId const& tid);
-
- private:
- TypeId tid_;
- BaseInfoList base_;
- };
-
- typedef
- std::map<TypeId, ExtendedTypeInfo>
- ExtendedTypeInfoMap;
-
-
- ExtendedTypeInfoMap&
- extended_type_info_map ();
-
-
- class NotAvailable {};
-
-
- template<typename T>
- ExtendedTypeInfo const&
- extended_type_info (T const& t)
- {
- return extended_type_info (typeid (t));
- }
-
- template<typename T>
- ExtendedTypeInfo const&
- extended_type_info ()
- {
- return extended_type_info (typeid (T));
- }
-
- //@@ Had to use function template specialization because VC6
- // cannot handle simply overloaded functions.
- //
-
- template <>
- inline
- ExtendedTypeInfo const&
- extended_type_info<TypeId> (TypeId const& tid)
- {
- ExtendedTypeInfoMap::const_iterator i (
- extended_type_info_map ().find (tid));
-
- if (i == extended_type_info_map ().end ()) throw NotAvailable ();
-
- return i->second;
- }
-
- template <>
- inline
- ExtendedTypeInfo const&
- extended_type_info<std::type_info> (std::type_info const& tid)
- {
- return extended_type_info (TypeId (tid));
- }
-}
-
-#include <XSCRT/ExtendedTypeInfo.ipp>
-
-#endif // XSCRT_EXTENDED_TYPE_INFO_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.ipp b/SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.ipp
deleted file mode 100644
index 6745c9ad28c..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/ExtendedTypeInfo.ipp
+++ /dev/null
@@ -1,141 +0,0 @@
-// file : XSCRT/ExtendedTypeInfo.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-
-/*
- * @@HACK: Visual Studio.
- * I think the return value for operator== for type_info
- * in VC7 (perhaps others) is int when is should be bool.
- * This causes a warning about converting the return value from
- * int to bool.
- */
-#ifdef _MSC_VER
-# pragma warning( disable: 4800 )
-#endif
-
-namespace XSCRT
-{
- // TypeId
- //
- //
- inline
- TypeId::
- TypeId (std::type_info const& tid)
- : tid_ (&tid)
- {
- }
-
- inline
- bool TypeId::
- operator == (TypeId const& other) const
- {
- return *tid_ == *other.tid_;
- }
-
- inline
- bool TypeId::
- operator != (TypeId const& other) const
- {
- return *tid_ != *other.tid_;
- }
-
- inline
- bool TypeId::
- operator < (TypeId const& other) const
- {
- return tid_->before (*other.tid_);
- }
-
-
- // ExtendedTypeInfo::BaseInfo
- //
- //
-
- inline
- ExtendedTypeInfo::BaseInfo::
- BaseInfo (Access::Value access, bool virtual_base, TypeId const& tid)
- : tid_ (tid),
- ti_ (0),
- virtual_base_ (virtual_base),
- access_ (access)
- {
- }
-
- inline
- ExtendedTypeInfo const& ExtendedTypeInfo::BaseInfo::
- type_info () const
- {
- if (ti_ == 0) ti_ = &(extended_type_info (tid_));
-
- return *ti_;
- }
-
-
- inline
- ExtendedTypeInfo::Access::Value ExtendedTypeInfo::BaseInfo::
- access () const
- {
- return access_;
- }
-
- inline
- bool ExtendedTypeInfo::BaseInfo::
- virtual_base () const
- {
- return virtual_base_;
- }
-
-
- // ExtendedTypeInfo
- //
- //
- inline
- ExtendedTypeInfo::
- ExtendedTypeInfo (TypeId const& tid)
- : tid_ (tid)
- {
- }
-
- inline
- TypeId ExtendedTypeInfo::
- type_id () const
- {
- return tid_;
- }
-
- inline
- ExtendedTypeInfo::BaseIterator ExtendedTypeInfo::
- begin_base () const
- {
- return base_.begin ();
- }
-
-
- inline
- ExtendedTypeInfo::BaseIterator ExtendedTypeInfo::
- end_base () const
- {
- return base_.end ();
- }
-
- inline
- void ExtendedTypeInfo::
- add_base (Access::Value access, bool virtual_base, TypeId const& tid)
- {
- base_.push_back (BaseInfo (access, virtual_base, tid));
- }
-
- // ExtendedTypeInfoMap
- //
- //
-
- inline
- ExtendedTypeInfoMap&
- extended_type_info_map ()
- {
- static ExtendedTypeInfoMap extended_type_info_map_;
-
- return extended_type_info_map_;
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Parser.hpp b/SA_POP/Standalone/XML_Utils/XSCRT/Parser.hpp
deleted file mode 100644
index 5fa1e827f8d..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Parser.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-// file : XSCRT/Parser.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XSCRT_PARSER_HPP
-#define XSCRT_PARSER_HPP
-
-#include <string>
-
-#include "XSCRT/XML.hpp"
-
-namespace XSCRT
-{
- template <typename C>
- class Parser
- {
- public:
- Parser (XML::Element<C> const& e)
- : e_ (e.dom_element ()->getChildNodes ()), ei_ (0),
- a_ (e.dom_element ()->getAttributes ()), ai_ (0)
- {
- }
-
- bool
- more_elements () const
- {
- return e_->getLength () > ei_;
- }
-
- XML::Element<C>
- next_element ()
- {
- return XML::Element<C> (XML::dom_cast <xercesc::DOMElement*> (e_->item (ei_++)));
- }
-
- bool
- more_attributes () const
- {
- return a_->getLength () > ai_;
- }
-
- XML::Attribute<C>
- next_attribute ()
- {
- return XML::Attribute<C> (
- XML::dom_cast <xercesc::DOMAttr*> (a_->item (ai_++)));
- }
-
- private:
- xercesc::DOMNodeList const* e_;
- unsigned long ei_;
-
- xercesc::DOMNamedNodeMap const* a_;
- unsigned long ai_;
-
- private:
- Parser (Parser const&);
-
- void
- operator= (Parser const&);
- };
-}
-
-#include "XSCRT/Parser.ipp"
-#include "XSCRT/Parser.tpp"
-
-#endif // XSCRT_PARSER_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Parser.ipp b/SA_POP/Standalone/XML_Utils/XSCRT/Parser.ipp
deleted file mode 100644
index f7de09602ae..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Parser.ipp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSCRT/Parser.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Parser.tpp b/SA_POP/Standalone/XML_Utils/XSCRT/Parser.tpp
deleted file mode 100644
index 75b9f48eb1f..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Parser.tpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSCRT/Parser.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.hpp b/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.hpp
deleted file mode 100644
index f66b6be1ab6..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.hpp
+++ /dev/null
@@ -1,275 +0,0 @@
-// file : XSCRT/Traversal.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XSCRT_TRAVERSAL_HPP
-#define XSCRT_TRAVERSAL_HPP
-
-#include <map>
-#include <set>
-#include <vector>
-
-// #include <iostream>
-// using std::wcerr;
-// using std::endl;
-
-#include "XSCRT/ExtendedTypeInfo.hpp"
-
-namespace XSCRT
-{
- namespace Traversal
- {
- //
- //
- //
- template<typename B>
- class TraverserBase
- {
- protected:
- virtual
- ~TraverserBase ();
-
- //@@ VC6
- public:
- virtual void
- trampoline (B& n) = 0;
-
- virtual void
- trampoline (B const& n) = 0;
-
- /*@@ VC6
- template <typename X>
- friend class DispatcherBase;
- */
- };
-
-
- //
- //
- //
- template <typename B>
- class DispatcherBase
- {
- public:
- virtual
- ~DispatcherBase ();
-
- virtual void
- dispatch (B& n);
-
- virtual void
- dispatch (B const& n);
-
- void
- map (TypeId id, TraverserBase<B>& t)
- {
- //wcerr << "map for " << id.name () << " to " << &t
- // << " in " << &traversal_map_ << endl;
-
- //@@ VC6
- Traversers& traversers = traversal_map_[id];
- traversers.push_back (&t);
- }
-
- public:
- typedef
- std::vector<TraverserBase<B>*>
- Traversers;
-
- typedef
- std::map<TypeId, Traversers>
- TraversalMap;
-
- typedef
- typename TraversalMap::const_iterator
- Iterator;
-
- Iterator
- begin () const
- {
- return traversal_map_.begin ();
- }
-
- Iterator
- end () const
- {
- return traversal_map_.end ();
- }
-
- private:
- struct TypeInfoComparator
- {
- bool
- operator () (ExtendedTypeInfo const& x,
- ExtendedTypeInfo const& y) const
- {
- return x.type_id () < y.type_id ();
- }
- };
-
- typedef
- std::map<ExtendedTypeInfo, unsigned long, TypeInfoComparator>
- LevelMap;
-
- typedef
- std::set<ExtendedTypeInfo, TypeInfoComparator>
- TypeInfoSet;
-
- static unsigned long
- compute_levels (ExtendedTypeInfo const& ti,
- unsigned long cur,
- LevelMap& map);
-
- static void
- flatten_tree (ExtendedTypeInfo const& ti, TypeInfoSet& set);
-
- private:
- TraversalMap traversal_map_;
- };
-
-
- //
- //
- //
- template <typename B>
- class Dispatcher : public virtual DispatcherBase<B>
- {
- public:
- Dispatcher ()
- : merge_ (true)
- {
- }
-
- void
- traverser (DispatcherBase<B>& d)
- {
- for (typename DispatcherBase<B>::Iterator
- i (d.begin ()), end (d.end ());
- i != end; ++i)
- {
- for (typename DispatcherBase<B>::Traversers::const_iterator
- t (i->second.begin ()), end (i->second.end ());
- t != end; ++t)
- {
- dispatcher_.map (i->first, **t);
- }
- }
- }
-
- public:
- virtual void
- dispatch (B& n)
- {
- merge ();
- dispatcher_.dispatch (n);
- }
-
- virtual void
- dispatch (B const& n)
- {
- merge ();
- dispatcher_.dispatch (n);
- }
-
- using DispatcherBase<B>::begin;
- using DispatcherBase<B>::end;
-
- private:
- void
- merge ()
- {
- if (merge_)
- {
- for (typename DispatcherBase<B>::Iterator
- i (begin ()), e (end ()); i != e; ++i)
- {
- for (typename DispatcherBase<B>::Traversers::const_iterator
- t (i->second.begin ()), e (i->second.end ()); t != e; ++t)
- {
- dispatcher_.map (i->first, **t);
- }
- }
-
- merge_ = false;
- }
- }
-
- protected:
- // DispatcherBase<B>&
- // traverser ()
- // {
- // return dispatcher_;
- // }
-
- template <typename X, typename A, typename I>
- void
- iterate_and_dispatch (I begin, I end, X& x, void (X::*next)(A&), A& a)
- {
- for (; begin != end;)
- {
- dispatch (*begin);
-
- if (++begin != end) (x.*next) (a);
- }
- }
-
- private:
- bool merge_;
- DispatcherBase<B> dispatcher_;
- };
-
-
-
- //
- //
- //
- template <typename T, typename B>
- struct Traverser : TraverserBase<B>, virtual Dispatcher<B>
- {
- typedef
- T
- Type;
-
- Traverser ()
- {
- map (typeid (Type), *this);
- }
-
- virtual void
- traverse (Type&)
- {
- abort ();
- }
-
- virtual void
- traverse (Type const&)
- {
- abort ();
- }
-
- protected:
- virtual void
- trampoline (B& n)
- {
- //wcerr << "trampoline for " << &n << " to type "
- // << typeid (Type).name () << endl;
-
- traverse (dynamic_cast<Type&> (n));
- }
-
- virtual void
- trampoline (B const& n)
- {
- //wcerr << "trampoline for " << &n << " to type "
- // << typeid (Type).name () << endl;
-
- traverse (dynamic_cast<Type const&> (n));
- }
- };
- }
-}
-
-#include <XSCRT/Traversal.ipp>
-#include <XSCRT/Traversal.tpp>
-
-#endif // XSCRT_TRAVERSAL_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.ipp b/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.ipp
deleted file mode 100644
index bc2a462334a..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.ipp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSCRT/Traversal.ixx
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.tpp b/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.tpp
deleted file mode 100644
index b798178621b..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Traversal.tpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// file : XSCRT/Traversal.txx
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
- namespace Traversal
- {
- // TraverserBase
- //
- //
-
- template<typename B>
- TraverserBase<B>::
- ~TraverserBase ()
- {
- }
-
- // DispatcherBase
- //
- //
-
- template <typename B>
- DispatcherBase<B>::
- ~DispatcherBase ()
- {
- }
-
- //@@ merge after dropping VC6
- //
- //
- template <typename B>
- void DispatcherBase<B>::
- dispatch (B& n)
- {
- LevelMap levels;
-
- //@@ VC6
- ExtendedTypeInfo const& ti = extended_type_info (n);
-
- unsigned long max = compute_levels (ti, 0, levels);
-
-
- //wcerr << "starting dispatch process for "
- // << typeid (n).name () << " with "
- // << max << " levels" << endl;
-
- for (unsigned long l = 0; l < max + 1; ++l)
- {
- TypeInfoSet dispatched;
-
- for (typename LevelMap::const_iterator
- i (levels.begin ()), e (levels.end ());
- i != e; ++i)
- {
- if (i->second == l)
- {
- typename TraversalMap::const_iterator v (
- traversal_map_.find (i->first.type_id ()));
-
- if (v != traversal_map_.end ())
- {
- //wcerr << "dispatching traversers for "
- // << typeid (n).name () << " as "
- // << i->first.type_id ().name () << endl;
-
- //@@ VC6
- Traversers const& traversers = v->second;
- for (typename Traversers::const_iterator
- ti (traversers.begin ()), te (traversers.end ());
- ti != te; ++ti)
- {
- (*ti)->trampoline (n);
- }
-
- flatten_tree (i->first, dispatched);
- }
- }
- }
-
- // Remove traversed types from the level map.
- //
- //@@ VC6
- {
- for (typename TypeInfoSet::const_iterator i = dispatched.begin ();
- i != dispatched.end ();
- ++i)
- {
- levels.erase (*i);
- }
- }
- }
- }
-
- template <typename B>
- void DispatcherBase<B>::
- dispatch (B const& n)
- {
- LevelMap levels;
-
- //@@ VC6
- ExtendedTypeInfo const& ti = extended_type_info (n);
-
- unsigned long max = compute_levels (ti, 0, levels);
-
-
- //wcerr << "starting dispatch process for "
- // << typeid (n).name () << " with "
- // << max << " levels" << endl;
-
- //wcerr << "using " << &traversal_map_ << " traversal map" << endl;
-
- for (unsigned long l = 0; l < max + 1; ++l)
- {
- TypeInfoSet dispatched;
-
- for (typename LevelMap::const_iterator
- i (levels.begin ()), e (levels.end ());
- i != e; ++i)
- {
- if (i->second == l)
- {
- typename TraversalMap::const_iterator v (
- traversal_map_.find (i->first.type_id ()));
-
- if (v != traversal_map_.end ())
- {
- //wcerr << "dispatching traversers for "
- // << typeid (n).name () << " as "
- // << i->first.type_id ().name () << endl;
-
- //@@ VC6
- Traversers const& traversers = v->second;
- for (typename Traversers::const_iterator
- ti (traversers.begin ()), te (traversers.end ());
- ti != te; ++ti)
- {
- (*ti)->trampoline (n);
- }
-
- flatten_tree (i->first, dispatched);
- }
- }
- }
-
- // Remove traversed types from the level map.
- //
- //@@ VC6
- {
- for (typename TypeInfoSet::const_iterator i = dispatched.begin ();
- i != dispatched.end ();
- ++i)
- {
- levels.erase (*i);
- }
- }
- }
- }
-
- template <typename B>
- unsigned long DispatcherBase<B>::
- compute_levels (ExtendedTypeInfo const& ti,
- unsigned long cur,
- LevelMap& map)
- {
- unsigned long ret = cur;
-
- if (map.find (ti) == map.end () || map[ti] < cur) map[ti] = cur;
-
- for (ExtendedTypeInfo::BaseIterator i = ti.begin_base ();
- i != ti.end_base ();
- i++)
- {
- unsigned long t = compute_levels (i->type_info (), cur + 1, map);
- if (t > ret) ret = t;
- }
-
- return ret;
- }
-
- template <typename B>
- void DispatcherBase<B>::
- flatten_tree (ExtendedTypeInfo const& ti, TypeInfoSet& set)
- {
- set.insert (ti);
-
- for (ExtendedTypeInfo::BaseIterator i = ti.begin_base ();
- i != ti.end_base ();
- i++)
- {
- flatten_tree (i->type_info (), set);
- }
- }
- }
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Writer.hpp b/SA_POP/Standalone/XML_Utils/XSCRT/Writer.hpp
deleted file mode 100644
index 6fdd82f6f3e..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Writer.hpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// file : XSCRT/Writer.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XSCRT_WRITER_HPP
-#define XSCRT_WRITER_HPP
-
-#include <stack>
-#include <string>
-
-#include "XSCRT/XML.hpp"
-
-namespace XSCRT
-{
- template <typename C>
- class Writer
- {
- public:
- Writer (XML::Element<C>& e)
- : attr__ (0)
- {
- push_ (e);
- }
-
- protected:
- // This c-tor should never be called.
- //
- Writer ()
- {
- abort ();
- }
-
- public:
- void
- push_ (XML::Element<C> const& e)
- {
- stack_.push (e);
- }
-
- void
- pop_ ()
- {
- stack_.pop ();
- }
-
- XML::Element<C>&
- top_ ()
- {
- return stack_.top ();
- }
-
- public:
- XML::Attribute<C>*
- attr_ ()
- {
- return attr__;
- }
-
- void
- attr_ (XML::Attribute<C>* a)
- {
- attr__ = a;
- }
-
- private:
- std::stack<XML::Element<C> > stack_;
-
- XML::Attribute<C>* attr__;
-
- private:
- Writer (Writer const&);
-
- void
- operator= (Writer const&);
- };
-}
-
-#include <XSCRT/Writer.ipp>
-#include <XSCRT/Writer.tpp>
-
-#endif // XSCRT_WRITER_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Writer.ipp b/SA_POP/Standalone/XML_Utils/XSCRT/Writer.ipp
deleted file mode 100644
index caa9fc99235..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Writer.ipp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSCRT/Writer.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/Writer.tpp b/SA_POP/Standalone/XML_Utils/XSCRT/Writer.tpp
deleted file mode 100644
index 8593004687f..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/Writer.tpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSCRT/Writer.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/XML.hpp b/SA_POP/Standalone/XML_Utils/XSCRT/XML.hpp
deleted file mode 100644
index 588cb61dc84..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/XML.hpp
+++ /dev/null
@@ -1,500 +0,0 @@
-// file : XSCRT/XML.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-
-#ifndef XSCRT_XML_HPP
-#define XSCRT_XML_HPP
-
-#include <string>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLString.hpp>
-
-
-//@@ VC6
-#if defined (_MSC_VER) && (_MSC_VER < 1300)
-
-namespace std
-{
- typedef ::size_t size_t;
-}
-#endif
-
-namespace XSCRT
-{
- namespace XML
- {
- //@@ VC6
- //
- template <typename C>
- std::basic_string<C>
- transcode (XMLCh const* s, C*);
-
- template <typename C>
- XMLCh*
- transcode (std::basic_string<C> const& s);
-
- //
- //
- //
- class string
- {
- public :
- template <typename C>
- string (std::basic_string<C> const& s)
- : s_ (XSCRT::XML::transcode<C> (s))
- {
- }
-
- template <typename C>
- string (C const* s)
- : s_ (XSCRT::XML::transcode<C> (s))
- {
- }
-
- ~string ()
- {
- delete[] s_;
- }
-
- XMLCh const*
- c_str () const
- {
- return s_;
- }
-
- private :
- XMLCh* s_;
- };
-
-
- template <>
- inline
- std::basic_string<char>
- transcode<char> (XMLCh const* s, char*)
- {
- if (s == 0) return std::basic_string<char> ();
-
- char* buf = xercesc::XMLString::transcode (s);
-
- std::basic_string<char> r (buf);
-
- xercesc::XMLString::release (&buf);
-
- return r;
- }
-
- template <>
- inline
- std::basic_string<wchar_t>
- transcode<wchar_t> (XMLCh const* s, wchar_t*)
- {
- if (s == 0) return std::basic_string<wchar_t> ();
-
- // std::wcerr << s << std::endl;
-
- std::basic_string<wchar_t> r (xercesc::XMLString::stringLen (s), L'0');
-
- for (std::size_t i (0); *s != XMLCh (0); ++s, ++i)
- {
- r[i] = *s;
- }
-
- return r;
- }
-
- template <>
- inline
- XMLCh*
- transcode (std::basic_string<char> const& s)
- {
- return xercesc::XMLString::transcode (s.c_str ());
- }
-
- template <>
- inline
- XMLCh*
- transcode (std::basic_string<wchar_t> const& s)
- {
- //@@ VC6
- std::size_t l = s.length ();
-
- //@@ VC6
- XMLCh* r = new XMLCh[l + 1];
- XMLCh* ir = r;
-
- for (std::size_t i (0); i < l; ++ir, ++i)
- {
- *ir = static_cast<XMLCh>(s[i]);
- //std::wcerr << s[i] << "->" << *ir << std::endl;
- }
-
- *ir = XMLCh (0);
-
- // std::wcerr << r << std::endl;
-
- return r;
- }
-
-
- template <typename C>
- class Element;
-
- template <typename C>
- std::basic_string<C>
- ns_prefix (std::basic_string<C> const& ns, Element<C> const& e);
-
- // Casting helpers, made necessary by the Xerces project's braindead
- // avoidance of RTTI.
- template <typename DERIVED> struct dom_traits;
-
- // Specializations for different node types
- template <>
- struct dom_traits<xercesc::DOMElement *>
- {
- enum { node_type = xercesc::DOMNode::ELEMENT_NODE };
- };
-
- template <>
- struct dom_traits<xercesc::DOMAttr *>
- {
- enum { node_type = xercesc::DOMNode::ATTRIBUTE_NODE };
- };
-
- template <typename DERIVED_PTR>
- DERIVED_PTR dom_cast (xercesc::DOMNode *node)
- {
- DERIVED_PTR elem = 0;
- if ((node != 0) &&
- (node->getNodeType () == dom_traits<DERIVED_PTR>::node_type))
- {
- elem = reinterpret_cast <DERIVED_PTR> (node);
- }
- return elem;
- }
-
- template <typename C>
- class Element
- {
- typedef std::basic_string<C> string_;
-
- public:
- Element (xercesc::DOMElement const* e)
- : e_ (0),
- ce_ (e),
- name_ (transcode<C> (e->getLocalName (), 0)),
- namespace__ (transcode<C> (e->getNamespaceURI (), 0))
- {
- }
-
- Element (xercesc::DOMElement* e)
- : e_ (e),
- ce_ (e),
- name_ (transcode<C> (e->getLocalName (), 0)),
- namespace__ (transcode<C> (e->getNamespaceURI (), 0))
- {
- }
-
- Element (string_ const& name, Element& parent)
- : e_ (0),
- ce_ (0),
- name_ (name)
- {
- xercesc::DOMDocument* doc (
- parent.dom_element ()->getOwnerDocument ());
-
- e_ = doc->createElement (string (name).c_str ());
-
- parent.dom_element ()->appendChild (e_);
-
- ce_ = e_;
- }
-
- Element (string_ const& name, string_ const& ns, Element& parent)
- : e_ (0),
- ce_ (0),
- name_ (name),
- namespace__ (ns)
- {
- string_ prefix (ns_prefix (ns, parent));
-
- xercesc::DOMDocument* doc (
- parent.dom_element ()->getOwnerDocument ());
-
- e_ = doc->createElementNS (
- string (ns).c_str (),
- string (prefix.empty ()
- ? name
- : prefix + string_ (1, ':') + name).c_str ());
-
- parent.dom_element ()->appendChild (e_);
-
- ce_ = e_;
- }
-
- public:
- string_
- name () const
- {
- return name_;
- }
-
- string_
- namespace_ () const
- {
- return namespace__;
- }
-
- public:
- Element<C>
- parent () const
- {
- return dom_cast <xercesc::DOMElement const*>(ce_->getParentNode ());
- }
-
- public:
- string_
- value () const
- {
- return XML::transcode<C> (dom_element ()->getTextContent (), 0);
- }
-
- void
- value (string_ const& v)
- {
- xercesc::DOMText* text (
- dom_element ()->getOwnerDocument ()->createTextNode(
- string (v).c_str ()));
-
- dom_element ()->appendChild (text);
- }
-
- public:
- string_
- operator[] (string_ const& s) const
- {
- //@@ VC6
- XMLCh const* value = ce_->getAttribute (string (s).c_str ());
-
- return transcode<C> (value, 0);
- }
-
- public:
- xercesc::DOMElement const*
- dom_element () const
- {
- return ce_;
- }
-
- xercesc::DOMElement*
- dom_element ()
- {
- return e_;
- }
-
- private:
- xercesc::DOMElement* e_;
- xercesc::DOMElement const* ce_;
-
- string_ name_;
- string_ namespace__;
- };
-
-
- template <typename C>
- class Attribute
- {
- typedef std::basic_string<C> string_;
-
- public:
- Attribute (xercesc::DOMAttr const* a)
- : a_ (0),
- ca_ (a),
- name_ (transcode<C> (a->getLocalName (), 0)),
- value_ (transcode<C> (a->getValue (), 0))
- {
- }
-
- Attribute (xercesc::DOMAttr* a)
- : a_ (a),
- ca_ (a),
- name_ (transcode<C> (a->getLocalName (), 0)),
- value_ (transcode<C> (a->getValue (), 0))
- {
- }
-
- Attribute (string_ const& name,
- string_ const& v,
- Element<C>& parent)
- : a_ (0),
- ca_ (0),
- name_ (name),
- value_ ()
- {
- xercesc::DOMDocument* doc (
- parent.dom_element ()->getOwnerDocument ());
-
- a_ = doc->createAttribute (string (name).c_str ());
-
- value (v);
-
- parent.dom_element ()->setAttributeNode (a_);
-
- ca_ = a_;
- }
-
- Attribute (string_ const& name,
- string_ const& ns,
- string_ const& v,
- Element<C>& parent)
- : a_ (0),
- ca_ (0),
- name_ (name),
- value_ ()
- {
- string_ prefix (ns_prefix (ns, parent));
-
- xercesc::DOMDocument* doc (
- parent.dom_element ()->getOwnerDocument ());
-
- a_ = doc->createAttributeNS (
- string (ns).c_str (),
- string (prefix.empty ()
- ? name
- : prefix + string_ (1, ':') + name).c_str ());
-
- value (v);
-
- parent.dom_element ()->setAttributeNodeNS (a_);
-
- ca_ = a_;
- }
-
- string_
- name () const
- {
- return name_;
- }
-
- string_
- value () const
- {
- return value_;
- }
-
- void
- value (string_ const& v)
- {
- value_ = v;
- a_->setValue (string (v).c_str ());
- }
-
- public:
- xercesc::DOMAttr const*
- dom_attribute () const
- {
- return ca_;
- }
-
- xercesc::DOMAttr*
- dom_attribute ()
- {
- return a_;
- }
-
- private:
-
- private:
- xercesc::DOMAttr* a_;
- xercesc::DOMAttr const* ca_;
-
- string_ name_;
- string_ value_;
- };
-
- template <typename C>
- std::basic_string<C>
- prefix (std::basic_string<C> const& n)
- {
- std::size_t i (0);
- while (i < n.length () && n[i] != ':') ++i;
-
- //std::wcerr << "prefix " << n << " "
- // << std::wstring (n, i == n.length () ? i : 0, i) << std::endl;
-
- return std::basic_string<C> (n, i == n.length () ? i : 0, i);
- }
-
- template <typename C>
- std::basic_string<C>
- uq_name (std::basic_string<C> const& n)
- {
- std::size_t i (0);
- while (i < n.length () && n[i] != ':') ++i;
-
- return std::basic_string<C> (n.c_str () + (i == n.length () ? 0 : i + 1));
- }
-
- template <typename C>
- std::basic_string<C>
- ns_name (Element<C> const& e, std::basic_string<C> const& n)
- {
- std::basic_string<C> wp (prefix (n));
-
- //@@ VC6
- XMLCh const* xns = e.dom_element ()->lookupNamespaceURI (
- wp.empty () ? 0 : string (wp).c_str ());
-
-
- std::basic_string<C> ns (
- xns ? transcode<C> (xns, 0) : std::basic_string<C> ());
-
- return ns;
-
- }
-
- template <typename C>
- std::basic_string<C>
- fq_name (Element<C> const& e, std::basic_string<C> const& n)
- {
- std::basic_string<C> ns (ns_name (e, n));
- std::basic_string<C> un (uq_name (n));
-
- return ns.empty () ? un : (ns + C ('#') + un);
- }
-
- class no_prefix {};
-
- template <typename C>
- std::basic_string<C>
- ns_prefix (std::basic_string<C> const& ns, Element<C> const& e)
- {
- string xns (ns);
-
- XMLCh const* p (
- e.dom_element ()->lookupNamespacePrefix (xns.c_str (), false));
-
- if (p == 0)
- {
- bool r (e.dom_element ()->isDefaultNamespace (xns.c_str ()));
-
- if (r)
- {
- return std::basic_string<C> ();
- }
- else
- {
- throw no_prefix ();
- }
- }
-
- return transcode<C> (p, 0);
- }
- }
-}
-
-#include "XSCRT/XML.ipp"
-#include "XSCRT/XML.tpp"
-
-#endif // XSCRT_XML_HPP
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/XML.ipp b/SA_POP/Standalone/XML_Utils/XSCRT/XML.ipp
deleted file mode 100644
index 4a7b83efd1c..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/XML.ipp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSCRT/XML.ipp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/XML.tpp b/SA_POP/Standalone/XML_Utils/XSCRT/XML.tpp
deleted file mode 100644
index 63023a05d28..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/XML.tpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// file : XSCRT/XML.tpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-namespace XSCRT
-{
-}
diff --git a/SA_POP/Standalone/XML_Utils/XSCRT/XMLSchema.hpp b/SA_POP/Standalone/XML_Utils/XSCRT/XMLSchema.hpp
deleted file mode 100644
index 31bad0bc207..00000000000
--- a/SA_POP/Standalone/XML_Utils/XSCRT/XMLSchema.hpp
+++ /dev/null
@@ -1,564 +0,0 @@
-// file : XSCRT/XMLSchema.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef XSCRT_XMLSCHEMA_HPP
-#define XSCRT_XMLSCHEMA_HPP
-
-#include <string>
-// #include <iostream> //@@ tmp
-
-#include "XSCRT/Elements.hpp"
-
-namespace XMLSchema
-{
- typedef XSCRT::FundamentalType<signed char> byte;
- typedef XSCRT::FundamentalType<unsigned char> unsignedByte;
-
- typedef XSCRT::FundamentalType<short> short_;
- typedef XSCRT::FundamentalType<unsigned short> unsignedShort;
-
- typedef XSCRT::FundamentalType<int> int_;
- typedef XSCRT::FundamentalType<unsigned int> unsignedInt;
-
- //@@ VC6
-#if defined (_MSC_VER) && (_MSC_VER < 1300)
-
- typedef XSCRT::FundamentalType<__int64> long_;
- typedef XSCRT::FundamentalType<unsigned __int64> unsignedLong;
-
-#else
-
- typedef XSCRT::FundamentalType<long long> long_;
- typedef XSCRT::FundamentalType<unsigned long long> unsignedLong;
-
-#endif
-
- //@@ It would be nice to use some arbitrary-length integer class.
- //
- typedef long_ decimal;
- typedef decimal integer;
- typedef integer nonPositiveInteger;
- typedef integer nonNegativeInteger;
- typedef nonNegativeInteger positiveInteger;
- typedef nonPositiveInteger negativeInteger;
-
-
- typedef XSCRT::FundamentalType<bool> boolean;
-
- typedef XSCRT::FundamentalType<float> float_;
- typedef XSCRT::FundamentalType<double> double_;
-
- // Just to make GCC 3.3 and other broken compilers shutup.
- //
- using std::basic_string;
-
-
- template <typename C>
- class string : public XSCRT::Type, public basic_string<C>
- {
- protected:
- typedef basic_string<C> Base__ ;
-
- public:
-
- //@@ VC6 does not inject XSCRT::Type into the scope so I have
- // to qualify it all the time.
- //
-
- string ()
- {
- }
-
- string (XSCRT::XML::Element<C> const& e)
- : Base__ (e.value ())
- {
- }
-
- string (XSCRT::XML::Attribute<C> const& a)
- : Base__ (a.value ())
- {
- }
-
- string (Base__ const& x)
- : Base__ (x)
- {
- }
-
- string&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class normalizedString : public string<C>
- {
- protected:
- typedef typename string<C>::Base__ Base__;
-
- public:
- normalizedString ()
- {
- }
-
- normalizedString (XSCRT::XML::Element<C> const& e)
- : string<C> (e)
- {
- }
-
- normalizedString (XSCRT::XML::Attribute<C> const& a)
- : string<C> (a)
- {
- }
-
- normalizedString (Base__ const& x)
- : string<C> (x)
- {
- }
-
- normalizedString&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class token : public normalizedString<C>
- {
- protected:
- typedef typename normalizedString<C>::Base__ Base__;
-
- public:
- token ()
- {
- }
-
- token (XSCRT::XML::Element<C> const& e)
- : normalizedString<C> (e)
- {
- }
-
- token (XSCRT::XML::Attribute<C> const& a)
- : normalizedString<C> (a)
- {
- }
-
- token (Base__ const& x)
- : normalizedString<C> (x)
- {
- }
-
- token&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class NMTOKEN : public token<C>
- {
- protected:
- typedef typename token<C>::Base__ Base__;
-
- public:
- NMTOKEN ()
- {
- }
-
- NMTOKEN (XSCRT::XML::Element<C> const& e)
- : token<C> (e)
- {
- }
-
- NMTOKEN (XSCRT::XML::Attribute<C> const& a)
- : token<C> (a)
- {
- }
-
- NMTOKEN (Base__ const& x)
- : token<C> (x)
- {
- }
-
- NMTOKEN&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
- template <typename C>
- class Name: public token<C>
- {
- protected:
- typedef typename token<C>::Base__ Base__;
-
- public:
- Name()
- {
- }
-
- Name(XSCRT::XML::Element<C> const& e)
- : token<C> (e)
- {
- }
-
- Name(XSCRT::XML::Attribute<C> const& a)
- : token<C> (a)
- {
- }
-
- Name(Base__ const& x)
- : token<C> (x)
- {
- }
-
- Name&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
-
- template <typename C>
- class NCName: public Name<C>
- {
- protected:
- typedef typename Name<C>::Base__ Base__;
-
- public:
- NCName()
- {
- }
-
- NCName(XSCRT::XML::Element<C> const& e)
- : Name<C> (e)
- {
- }
-
- NCName(XSCRT::XML::Attribute<C> const& a)
- : Name<C> (a)
- {
- }
-
- NCName(Base__ const& x)
- : Name<C> (x)
- {
- }
-
- NCName&
- operator= (Base__ const& x)
- {
- static_cast<Base__&> (*this) = x;
- return *this;
- }
- };
-
- template <typename C>
- struct IdentityProvider : XSCRT::IdentityProvider
- {
- IdentityProvider (NCName<C> const& id)
- : id_ (id)
- {
- }
-
- virtual bool
- before (XSCRT::IdentityProvider const& y) const
- {
- return id_ < dynamic_cast<IdentityProvider const&> (y).id_;
- }
-
- private:
- NCName<C> const& id_;
-
- private:
- IdentityProvider (IdentityProvider const&);
-
- IdentityProvider&
- operator= (IdentityProvider const&);
- };
-
-
- template <typename C>
- class ID : public NCName<C>
- {
- protected:
- typedef typename NCName<C>::Base__ Base__;
-
- public:
- ~ID()
- {
- unregister_id ();
- }
-
- ID ()
- : id_provider_ (*this)
- {
- }
-
- ID (XSCRT::XML::Element<C> const& e)
- : NCName<C> (e), id_provider_ (*this)
- {
- }
-
- ID (XSCRT::XML::Attribute<C> const& a)
- : NCName<C> (a), id_provider_ (*this)
- {
- }
-
- ID (ID const& x)
- : NCName<C> (x), id_provider_ (*this)
- {
- }
-
- ID (Base__ const& x)
- : NCName<C> (x), id_provider_ (*this)
- {
- }
-
- ID&
- operator= (Base__ const& x)
- {
- unregister_id ();
-
- static_cast<NCName<C>&>(*this) = x;
-
- register_id ();
-
- return *this;
- }
-
- ID&
- operator= (ID const& x)
- {
- unregister_id ();
-
- static_cast<NCName<C>&>(*this) = static_cast<NCName<C> const&>(x);
-
- register_id ();
-
- return *this;
- }
-
- public:
- using NCName<C>::container;
-
- virtual void
- container (XSCRT::Type* c)
- {
- unregister_id ();
-
- NCName<C>::container (c);
-
- register_id ();
- }
-
- private:
- using NCName<C>::empty;
- using NCName<C>::root;
-
- void
- register_id ()
- {
- if (container () != this && !empty ())
- {
- //std::wcerr << "registering " << container ()
- // << " as '" << *this
- // << "' on " << container () << std::endl;
- container ()->register_id (id_provider_, container ());
- }
- }
-
- void
- unregister_id ()
- {
- if (container () != this && !empty ())
- {
- //std::wcerr << "un-registering " << container ()
- // << " as '" << *this
- // << "' on " << container () << std::endl;
- container ()->unregister_id (id_provider_);
- }
- }
-
- private:
- IdentityProvider<C> id_provider_;
- };
-
- struct IDREF_Base : public XSCRT::Type
- {
- virtual XSCRT::Type*
- get () const = 0;
- };
-
- template <typename C>
- class IDREF : public IDREF_Base
- {
- public:
- IDREF ()
- : id_provider_ (id_)
- {
- }
-
- IDREF (XSCRT::XML::Element<C> const& e)
- : id_ (e), id_provider_ (id_)
- {
- }
-
- IDREF (XSCRT::XML::Attribute<C> const& a)
- : id_ (a), id_provider_ (id_)
- {
- }
-
- IDREF (IDREF const& x)
- : id_ (x.id_), id_provider_ (id_)
- {
- }
-
- IDREF (basic_string<C> const& id)
- : id_ (id), id_provider_ (id_)
- {
- }
-
- IDREF&
- operator= (IDREF const& x)
- {
- id_ = x.id_;
- return *this;
- }
-
- IDREF&
- operator= (basic_string<C> const& x)
- {
- id_ = x;
- return *this;
- }
-
- public:
- XSCRT::Type*
- operator-> () const
- {
- return get ();
- }
-
- XSCRT::Type&
- operator* () const
- {
- return *(get ());
- }
-
- virtual XSCRT::Type*
- get () const
- {
- if (!id_.empty () && container () != this)
- {
- return root ()->lookup_id (id_provider_);
- }
- else
- {
- return 0;
- }
- }
-
- // conversion to bool
- //
- typedef XSCRT::Type* (IDREF::*bool_convertable)() const;
-
- operator bool_convertable () const
- {
- return get () ? &IDREF::operator-> : 0;
- }
-
- private:
- NCName<C> id_;
- IdentityProvider<C> id_provider_;
- };
-}
-
-// Traversal
-//
-//
-
-#include "XSCRT/Traversal.hpp"
-
-namespace XMLSchema
-{
- namespace Traversal
- {
- template <typename T>
- struct Traverser : XSCRT::Traversal::Traverser<T, XSCRT::Type>,
- XSCRT::Traversal::Traverser<IDREF_Base, XSCRT::Type>
- {
- typedef
- T
- Type;
-
- virtual void
- traverse (XMLSchema::IDREF_Base& r)
- {
- if (r.get ()) dispatch (*(r.get ()));
- }
- };
-
- typedef Traverser<byte> byte;
- typedef Traverser<unsignedByte> unsignedByte;
-
- typedef Traverser<short_> short_;
- typedef Traverser<unsignedShort> unsignedShort;
-
- typedef Traverser<int_> int_;
- typedef Traverser<unsignedInt> unsignedInt;
-
- typedef Traverser<long_> long_;
- typedef Traverser<unsignedLong> unsignedLong;
-
- typedef Traverser<boolean> boolean;
-
- typedef Traverser<float_> float_;
- typedef Traverser<double_> double_;
-
- template <typename C>
- struct string : Traverser<XMLSchema::string<C> >
- {
- };
-
- template <typename C>
- struct ID : Traverser<XMLSchema::ID<C> >
- {
- };
- }
-}
-
-
-// ExtendedTypeInfo for XML Schema types
-//
-//
-
-#include "XSCRT/ExtendedTypeInfo.hpp"
-
-namespace XMLSchema
-{
- template <typename C>
- struct TypeInfoInitializer
- {
- TypeInfoInitializer (XSCRT::ExtendedTypeInfoMap&);
- };
-}
-
-#include "XSCRT/XMLSchema.ipp"
-#include "XSCRT/XMLSchema.tpp"
-
-#endif // XSCRT_XMLSCHEMA_HPP