From 30102243920c57c8c73120186ef6f23d00357499 Mon Sep 17 00:00:00 2001 From: "William R. Otte" Date: Thu, 27 Jul 2006 20:43:46 +0000 Subject: Thu Jul 27 20:30:26 UTC 2006 William R. Otte --- ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp | 2 +- ACE/ACEXML/apps/svcconf/Svcconf_Handler.h | 2 +- ACE/ACEXML/apps/svcconf/Svcconf_Handler.i | 133 ----------- ACE/ACEXML/apps/svcconf/Svcconf_Handler.inl | 133 +++++++++++ ACE/ACEXML/common/AttributesImpl.cpp | 2 +- ACE/ACEXML/common/AttributesImpl.h | 2 +- ACE/ACEXML/common/AttributesImpl.i | 154 ------------ ACE/ACEXML/common/AttributesImpl.inl | 154 ++++++++++++ ACE/ACEXML/common/Env.cpp | 2 +- ACE/ACEXML/common/Env.h | 2 +- ACE/ACEXML/common/Env.i | 25 -- ACE/ACEXML/common/Env.inl | 25 ++ ACE/ACEXML/common/Exception.cpp | 2 +- ACE/ACEXML/common/Exception.h | 2 +- ACE/ACEXML/common/Exception.i | 13 -- ACE/ACEXML/common/Exception.inl | 13 ++ ACE/ACEXML/common/LocatorImpl.cpp | 2 +- ACE/ACEXML/common/LocatorImpl.h | 2 +- ACE/ACEXML/common/LocatorImpl.i | 65 ------ ACE/ACEXML/common/LocatorImpl.inl | 65 ++++++ ACE/ACEXML/common/SAXExceptions.cpp | 2 +- ACE/ACEXML/common/SAXExceptions.h | 2 +- ACE/ACEXML/common/SAXExceptions.i | 57 ----- ACE/ACEXML/common/SAXExceptions.inl | 57 +++++ ACE/ACEXML/common/XMLFilterImpl.cpp | 2 +- ACE/ACEXML/common/XMLFilterImpl.h | 2 +- ACE/ACEXML/common/XMLFilterImpl.i | 14 -- ACE/ACEXML/common/XMLFilterImpl.inl | 14 ++ ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.cpp | 2 +- ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.h | 2 +- ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.i | 13 -- ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.inl | 13 ++ ACE/ACEXML/parser/debug_validator/Element_Tree.cpp | 2 +- ACE/ACEXML/parser/debug_validator/Element_Tree.h | 2 +- ACE/ACEXML/parser/debug_validator/Element_Tree.i | 92 -------- ACE/ACEXML/parser/debug_validator/Element_Tree.inl | 92 ++++++++ ACE/ACEXML/parser/parser/Entity_Manager.cpp | 2 +- ACE/ACEXML/parser/parser/Entity_Manager.h | 2 +- ACE/ACEXML/parser/parser/Entity_Manager.i | 66 ------ ACE/ACEXML/parser/parser/Entity_Manager.inl | 66 ++++++ ACE/ACEXML/parser/parser/Parser.cpp | 2 +- ACE/ACEXML/parser/parser/Parser.h | 2 +- ACE/ACEXML/parser/parser/Parser.i | 257 --------------------- ACE/ACEXML/parser/parser/Parser.inl | 257 +++++++++++++++++++++ 44 files changed, 911 insertions(+), 911 deletions(-) delete mode 100644 ACE/ACEXML/apps/svcconf/Svcconf_Handler.i create mode 100644 ACE/ACEXML/apps/svcconf/Svcconf_Handler.inl delete mode 100644 ACE/ACEXML/common/AttributesImpl.i create mode 100644 ACE/ACEXML/common/AttributesImpl.inl delete mode 100644 ACE/ACEXML/common/Env.i create mode 100644 ACE/ACEXML/common/Env.inl delete mode 100644 ACE/ACEXML/common/Exception.i create mode 100644 ACE/ACEXML/common/Exception.inl delete mode 100644 ACE/ACEXML/common/LocatorImpl.i create mode 100644 ACE/ACEXML/common/LocatorImpl.inl delete mode 100644 ACE/ACEXML/common/SAXExceptions.i create mode 100644 ACE/ACEXML/common/SAXExceptions.inl delete mode 100644 ACE/ACEXML/common/XMLFilterImpl.i create mode 100644 ACE/ACEXML/common/XMLFilterImpl.inl delete mode 100644 ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.i create mode 100644 ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.inl delete mode 100644 ACE/ACEXML/parser/debug_validator/Element_Tree.i create mode 100644 ACE/ACEXML/parser/debug_validator/Element_Tree.inl delete mode 100644 ACE/ACEXML/parser/parser/Entity_Manager.i create mode 100644 ACE/ACEXML/parser/parser/Entity_Manager.inl delete mode 100644 ACE/ACEXML/parser/parser/Parser.i create mode 100644 ACE/ACEXML/parser/parser/Parser.inl (limited to 'ACE/ACEXML') diff --git a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp index f9105555580..2b0d9d39718 100644 --- a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp +++ b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.cpp @@ -15,7 +15,7 @@ #if (ACE_USES_CLASSIC_SVC_CONF == 0) #if !defined (__ACEXML_INLINE__) -# include "Svcconf_Handler.i" +# include "Svcconf_Handler.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_Svcconf_Handler::ACEXML_Svcconf_Handler (void) diff --git a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h index c9093f9bd7a..87ae16b1e46 100644 --- a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h +++ b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.h @@ -284,7 +284,7 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "Svcconf_Handler.i" +# include "Svcconf_Handler.inl" #endif /* __ACEXML_INLINE__ */ #endif /* ACE_USES_CLASSIC_SVC_CONF == 0 */ diff --git a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.i b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.i deleted file mode 100644 index 605dec5f2f7..00000000000 --- a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.i +++ /dev/null @@ -1,133 +0,0 @@ -// -*- C++ -*- $Id$ - -ACE_INLINE -ACE_Parsed_Info::ACE_Parsed_Info () - : name_ (0), - service_type_ (ACE_Service_Type::INVALID_TYPE), - active_ (1), - path_ (0), - init_func_ (0), - init_params_ (0) -{ -} - -ACE_INLINE -ACE_Parsed_Info::~ACE_Parsed_Info () -{ - delete[] this->name_; - delete[] this->path_; - delete[] this->init_func_; - delete[] this->init_params_; -} - -ACE_INLINE int -ACE_Parsed_Info::name (const ACEXML_Char *n) -{ - if (this->name_ == 0) - { - this->name_ = ACE::strnew (n); - return 0; - } - return -1; -} - -ACE_INLINE const ACEXML_Char * -ACE_Parsed_Info::name (void) -{ - return this->name_; -} - -ACE_INLINE int -ACE_Parsed_Info::service_type (int type) -{ - if (this->service_type_ == -1) - { - this->service_type_ = type; - return 0; - } - return -1; -} - -ACE_INLINE int -ACE_Parsed_Info::service_type (void) -{ - return this->service_type_; -} - -ACE_INLINE int -ACE_Parsed_Info::active (int a) -{ - this->active_ = a; - return 0; -} - -ACE_INLINE int -ACE_Parsed_Info::active (void) -{ - return this->active_; -} - -ACE_INLINE int -ACE_Parsed_Info::path (const ACEXML_Char *p) -{ - if (this->path_ == 0) - { - this->path_ = ACE::strnew (p); - return 0; - } - return -1; -} - -ACE_INLINE const ACEXML_Char * -ACE_Parsed_Info::path (void) -{ - return this->path_; -} - -ACE_INLINE int -ACE_Parsed_Info::init_func (const ACEXML_Char *n) -{ - if (this->init_func_ == 0) - { - this->init_func_ = ACE::strnew (n); - return 0; - } - return -1; -} - -ACE_INLINE const ACEXML_Char * -ACE_Parsed_Info::init_func (void) -{ - return this->init_func_; -} - -ACE_INLINE int -ACE_Parsed_Info::init_params (const ACEXML_Char *n) -{ - if (this->init_params_ == 0) - { - this->init_params_ = ACE::strnew (n); - return 0; - } - return -1; -} - -ACE_INLINE const ACEXML_Char * -ACE_Parsed_Info::init_params (void) -{ - return this->init_params_; -} - -ACE_INLINE void -ACE_Parsed_Info::reset (void) -{ - delete[] this->name_; - this->name_ = 0; - this->service_type_ = -1; - delete[] this->path_; - this->path_ = 0; - delete[] this->init_func_; - this->init_func_ = 0; - delete[] this->init_params_; - this->init_params_ = 0; -} diff --git a/ACE/ACEXML/apps/svcconf/Svcconf_Handler.inl b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.inl new file mode 100644 index 00000000000..605dec5f2f7 --- /dev/null +++ b/ACE/ACEXML/apps/svcconf/Svcconf_Handler.inl @@ -0,0 +1,133 @@ +// -*- C++ -*- $Id$ + +ACE_INLINE +ACE_Parsed_Info::ACE_Parsed_Info () + : name_ (0), + service_type_ (ACE_Service_Type::INVALID_TYPE), + active_ (1), + path_ (0), + init_func_ (0), + init_params_ (0) +{ +} + +ACE_INLINE +ACE_Parsed_Info::~ACE_Parsed_Info () +{ + delete[] this->name_; + delete[] this->path_; + delete[] this->init_func_; + delete[] this->init_params_; +} + +ACE_INLINE int +ACE_Parsed_Info::name (const ACEXML_Char *n) +{ + if (this->name_ == 0) + { + this->name_ = ACE::strnew (n); + return 0; + } + return -1; +} + +ACE_INLINE const ACEXML_Char * +ACE_Parsed_Info::name (void) +{ + return this->name_; +} + +ACE_INLINE int +ACE_Parsed_Info::service_type (int type) +{ + if (this->service_type_ == -1) + { + this->service_type_ = type; + return 0; + } + return -1; +} + +ACE_INLINE int +ACE_Parsed_Info::service_type (void) +{ + return this->service_type_; +} + +ACE_INLINE int +ACE_Parsed_Info::active (int a) +{ + this->active_ = a; + return 0; +} + +ACE_INLINE int +ACE_Parsed_Info::active (void) +{ + return this->active_; +} + +ACE_INLINE int +ACE_Parsed_Info::path (const ACEXML_Char *p) +{ + if (this->path_ == 0) + { + this->path_ = ACE::strnew (p); + return 0; + } + return -1; +} + +ACE_INLINE const ACEXML_Char * +ACE_Parsed_Info::path (void) +{ + return this->path_; +} + +ACE_INLINE int +ACE_Parsed_Info::init_func (const ACEXML_Char *n) +{ + if (this->init_func_ == 0) + { + this->init_func_ = ACE::strnew (n); + return 0; + } + return -1; +} + +ACE_INLINE const ACEXML_Char * +ACE_Parsed_Info::init_func (void) +{ + return this->init_func_; +} + +ACE_INLINE int +ACE_Parsed_Info::init_params (const ACEXML_Char *n) +{ + if (this->init_params_ == 0) + { + this->init_params_ = ACE::strnew (n); + return 0; + } + return -1; +} + +ACE_INLINE const ACEXML_Char * +ACE_Parsed_Info::init_params (void) +{ + return this->init_params_; +} + +ACE_INLINE void +ACE_Parsed_Info::reset (void) +{ + delete[] this->name_; + this->name_ = 0; + this->service_type_ = -1; + delete[] this->path_; + this->path_ = 0; + delete[] this->init_func_; + this->init_func_ = 0; + delete[] this->init_params_; + this->init_params_ = 0; +} diff --git a/ACE/ACEXML/common/AttributesImpl.cpp b/ACE/ACEXML/common/AttributesImpl.cpp index a11d34c52e2..b436c4e5f79 100644 --- a/ACE/ACEXML/common/AttributesImpl.cpp +++ b/ACE/ACEXML/common/AttributesImpl.cpp @@ -3,7 +3,7 @@ #include "ACEXML/common/AttributesImpl.h" #if !defined (__ACEXML_INLINE__) -# include "ACEXML/common/AttributesImpl.i" +# include "ACEXML/common/AttributesImpl.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_AttributesImpl::ACEXML_AttributesImpl (int size) diff --git a/ACE/ACEXML/common/AttributesImpl.h b/ACE/ACEXML/common/AttributesImpl.h index 85c48ed1c2e..f6ee26e7785 100644 --- a/ACE/ACEXML/common/AttributesImpl.h +++ b/ACE/ACEXML/common/AttributesImpl.h @@ -301,7 +301,7 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/common/AttributesImpl.i" +# include "ACEXML/common/AttributesImpl.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/common/AttributesImpl.i b/ACE/ACEXML/common/AttributesImpl.i deleted file mode 100644 index 75fc288950d..00000000000 --- a/ACE/ACEXML/common/AttributesImpl.i +++ /dev/null @@ -1,154 +0,0 @@ -// -*- C++ -*- -// -//$Id$ - -#include "ace/ACE.h" -#include "ace/OS_NS_string.h" - -ACEXML_INLINE -ACEXML_Attribute::ACEXML_Attribute (void) - : uri_ (0), - localName_ (0), - qName_ (0), - type_ (0), - value_ (0) -{ -} - -ACEXML_INLINE -ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Attribute &attr) - : uri_ (ACE::strnew (attr.uri_)), - localName_ (ACE::strnew (attr.localName_)), - qName_ (ACE::strnew (attr.qName_)), - type_ (ACE::strnew (attr.type_)), - value_ (ACE::strnew (attr.value_)) -{ -} - -ACEXML_INLINE -ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Char *uri, - const ACEXML_Char *localName, - const ACEXML_Char *qName, - const ACEXML_Char *type, - const ACEXML_Char *value) - : uri_ (ACE::strnew (uri)), - localName_ (ACE::strnew (localName)), - qName_ (ACE::strnew (qName)), - type_ (ACE::strnew (type)), - value_ (ACE::strnew (value)) -{ -} - -ACEXML_INLINE -ACEXML_Attribute::~ACEXML_Attribute (void) -{ - delete[] this->uri_; - delete[] this->localName_; - delete[] this->qName_; - delete[] this->type_; - delete[] this->value_; -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_Attribute::uri (void) const -{ - return this->uri_; -} - -ACEXML_INLINE void -ACEXML_Attribute::uri (const ACEXML_Char *uri) -{ - delete[] this->uri_; - this->uri_ = ACE::strnew (uri); -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_Attribute::localName (void) const -{ - return this->localName_; -} - -ACEXML_INLINE void -ACEXML_Attribute::localName (const ACEXML_Char *localName) -{ - delete[] this->localName_; - this->localName_ = ACE::strnew (localName); -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_Attribute::qName (void) const -{ - return this->qName_; -} - -ACEXML_INLINE void -ACEXML_Attribute::qName (const ACEXML_Char *qName) -{ - delete[] this->qName_; - this->qName_ = ACE::strnew (qName); -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_Attribute::type (void) const -{ - return this->type_; -} - -ACEXML_INLINE void -ACEXML_Attribute::type (const ACEXML_Char *type) -{ - delete[] this->type_; - this->type_ = ACE::strnew (type); -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_Attribute::value (void) const -{ - return this->value_; -} - -ACEXML_INLINE void -ACEXML_Attribute::value (const ACEXML_Char *value) -{ - delete[] this->value_; - this->value_ = ACE::strnew (value); -} - -ACEXML_INLINE void -ACEXML_Attribute::setAttribute (const ACEXML_Char *uri, - const ACEXML_Char *localName, - const ACEXML_Char *qName, - const ACEXML_Char *type, - const ACEXML_Char *value) -{ - this->uri (uri); - this->qName (qName); - this->localName (localName); - this->type (type); - this->value (value); -} - -ACEXML_INLINE ACEXML_Attribute & -ACEXML_Attribute::operator= (const ACEXML_Attribute &rhs) -{ - if (this != &rhs) // Check for self assignment - { - this->uri (rhs.uri ()); - this->qName (rhs.qName ()); - this->localName (rhs.localName ()); - this->type (rhs.type ()); - this->value (rhs.value ()); - } - return *this; -} - -ACEXML_INLINE bool -ACEXML_Attribute::operator!= (const ACEXML_Attribute &rhs) const -{ - return (ACE_OS::strcmp (this->uri_, rhs.uri ()) == 0 && - ACE_OS::strcmp (this->localName_, rhs.localName ()) == 0 && - ACE_OS::strcmp (this->qName_, rhs .qName ()) == 0 && - ACE_OS::strcmp (this->type_, rhs.type ()) == 0 && - ACE_OS::strcmp (this->value_, rhs.value ()) == 0 ? false : true); - -} diff --git a/ACE/ACEXML/common/AttributesImpl.inl b/ACE/ACEXML/common/AttributesImpl.inl new file mode 100644 index 00000000000..75fc288950d --- /dev/null +++ b/ACE/ACEXML/common/AttributesImpl.inl @@ -0,0 +1,154 @@ +// -*- C++ -*- +// +//$Id$ + +#include "ace/ACE.h" +#include "ace/OS_NS_string.h" + +ACEXML_INLINE +ACEXML_Attribute::ACEXML_Attribute (void) + : uri_ (0), + localName_ (0), + qName_ (0), + type_ (0), + value_ (0) +{ +} + +ACEXML_INLINE +ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Attribute &attr) + : uri_ (ACE::strnew (attr.uri_)), + localName_ (ACE::strnew (attr.localName_)), + qName_ (ACE::strnew (attr.qName_)), + type_ (ACE::strnew (attr.type_)), + value_ (ACE::strnew (attr.value_)) +{ +} + +ACEXML_INLINE +ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Char *uri, + const ACEXML_Char *localName, + const ACEXML_Char *qName, + const ACEXML_Char *type, + const ACEXML_Char *value) + : uri_ (ACE::strnew (uri)), + localName_ (ACE::strnew (localName)), + qName_ (ACE::strnew (qName)), + type_ (ACE::strnew (type)), + value_ (ACE::strnew (value)) +{ +} + +ACEXML_INLINE +ACEXML_Attribute::~ACEXML_Attribute (void) +{ + delete[] this->uri_; + delete[] this->localName_; + delete[] this->qName_; + delete[] this->type_; + delete[] this->value_; +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_Attribute::uri (void) const +{ + return this->uri_; +} + +ACEXML_INLINE void +ACEXML_Attribute::uri (const ACEXML_Char *uri) +{ + delete[] this->uri_; + this->uri_ = ACE::strnew (uri); +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_Attribute::localName (void) const +{ + return this->localName_; +} + +ACEXML_INLINE void +ACEXML_Attribute::localName (const ACEXML_Char *localName) +{ + delete[] this->localName_; + this->localName_ = ACE::strnew (localName); +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_Attribute::qName (void) const +{ + return this->qName_; +} + +ACEXML_INLINE void +ACEXML_Attribute::qName (const ACEXML_Char *qName) +{ + delete[] this->qName_; + this->qName_ = ACE::strnew (qName); +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_Attribute::type (void) const +{ + return this->type_; +} + +ACEXML_INLINE void +ACEXML_Attribute::type (const ACEXML_Char *type) +{ + delete[] this->type_; + this->type_ = ACE::strnew (type); +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_Attribute::value (void) const +{ + return this->value_; +} + +ACEXML_INLINE void +ACEXML_Attribute::value (const ACEXML_Char *value) +{ + delete[] this->value_; + this->value_ = ACE::strnew (value); +} + +ACEXML_INLINE void +ACEXML_Attribute::setAttribute (const ACEXML_Char *uri, + const ACEXML_Char *localName, + const ACEXML_Char *qName, + const ACEXML_Char *type, + const ACEXML_Char *value) +{ + this->uri (uri); + this->qName (qName); + this->localName (localName); + this->type (type); + this->value (value); +} + +ACEXML_INLINE ACEXML_Attribute & +ACEXML_Attribute::operator= (const ACEXML_Attribute &rhs) +{ + if (this != &rhs) // Check for self assignment + { + this->uri (rhs.uri ()); + this->qName (rhs.qName ()); + this->localName (rhs.localName ()); + this->type (rhs.type ()); + this->value (rhs.value ()); + } + return *this; +} + +ACEXML_INLINE bool +ACEXML_Attribute::operator!= (const ACEXML_Attribute &rhs) const +{ + return (ACE_OS::strcmp (this->uri_, rhs.uri ()) == 0 && + ACE_OS::strcmp (this->localName_, rhs.localName ()) == 0 && + ACE_OS::strcmp (this->qName_, rhs .qName ()) == 0 && + ACE_OS::strcmp (this->type_, rhs.type ()) == 0 && + ACE_OS::strcmp (this->value_, rhs.value ()) == 0 ? false : true); + +} diff --git a/ACE/ACEXML/common/Env.cpp b/ACE/ACEXML/common/Env.cpp index 6d1ce2158d6..e5014a06714 100644 --- a/ACE/ACEXML/common/Env.cpp +++ b/ACE/ACEXML/common/Env.cpp @@ -3,7 +3,7 @@ #include "ACEXML/common/Env.h" #if !defined (__ACEXML_INLINE__) -# include "ACEXML/common/Env.i" +# include "ACEXML/common/Env.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_Env::ACEXML_Env (void) diff --git a/ACE/ACEXML/common/Env.h b/ACE/ACEXML/common/Env.h index c17bba6a4bc..ee8aa59768d 100644 --- a/ACE/ACEXML/common/Env.h +++ b/ACE/ACEXML/common/Env.h @@ -64,7 +64,7 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/common/Env.i" +# include "ACEXML/common/Env.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/common/Env.i b/ACE/ACEXML/common/Env.i deleted file mode 100644 index 95c3f41c8aa..00000000000 --- a/ACE/ACEXML/common/Env.i +++ /dev/null @@ -1,25 +0,0 @@ -// -*- C++ -*- $Id$ - -#include "ace/Log_Msg.h" /* to get ACE_ASSERT */ -#include "ACEXML/common/Exception.h" - -ACEXML_INLINE ACEXML_Exception * -ACEXML_Env::exception (void) const -{ - return this->exception_; -} - -ACEXML_INLINE void -ACEXML_Env::exception (ACEXML_Exception *ex) -{ - ACE_ASSERT (ex != this->exception_); - this->clear(); - this->exception_ = ex; -} - -ACEXML_INLINE void -ACEXML_Env::clear (void) -{ - delete this->exception_; - this->exception_ = 0; -} diff --git a/ACE/ACEXML/common/Env.inl b/ACE/ACEXML/common/Env.inl new file mode 100644 index 00000000000..95c3f41c8aa --- /dev/null +++ b/ACE/ACEXML/common/Env.inl @@ -0,0 +1,25 @@ +// -*- C++ -*- $Id$ + +#include "ace/Log_Msg.h" /* to get ACE_ASSERT */ +#include "ACEXML/common/Exception.h" + +ACEXML_INLINE ACEXML_Exception * +ACEXML_Env::exception (void) const +{ + return this->exception_; +} + +ACEXML_INLINE void +ACEXML_Env::exception (ACEXML_Exception *ex) +{ + ACE_ASSERT (ex != this->exception_); + this->clear(); + this->exception_ = ex; +} + +ACEXML_INLINE void +ACEXML_Env::clear (void) +{ + delete this->exception_; + this->exception_ = 0; +} diff --git a/ACE/ACEXML/common/Exception.cpp b/ACE/ACEXML/common/Exception.cpp index 65d3c373091..5aec3654b36 100644 --- a/ACE/ACEXML/common/Exception.cpp +++ b/ACE/ACEXML/common/Exception.cpp @@ -10,7 +10,7 @@ const ACEXML_Char *ACEXML_Exception::exception_name_ = ACE_TEXT ("ACEXML_Excepti const ACEXML_Char *ACEXML_Exception::null_ = ACE_TEXT (""); #if !defined (__ACEXML_INLINE__) -# include "ACEXML/common/Exception.i" +# include "ACEXML/common/Exception.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_Exception::ACEXML_Exception() diff --git a/ACE/ACEXML/common/Exception.h b/ACE/ACEXML/common/Exception.h index 09995b473fa..bfa5b0ace62 100644 --- a/ACE/ACEXML/common/Exception.h +++ b/ACE/ACEXML/common/Exception.h @@ -79,7 +79,7 @@ protected: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/common/Exception.i" +# include "ACEXML/common/Exception.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/common/Exception.i b/ACE/ACEXML/common/Exception.i deleted file mode 100644 index e2d97fa37ea..00000000000 --- a/ACE/ACEXML/common/Exception.i +++ /dev/null @@ -1,13 +0,0 @@ -// -*- C++ -*- $Id$ - -ACEXML_INLINE const ACEXML_Char * -ACEXML_Exception::id (void) const -{ - return ACEXML_Exception::exception_name_; -} - -ACEXML_INLINE ACEXML_Exception* -ACEXML_Exception::_downcast (ACEXML_Exception* x) -{ - return x; -} diff --git a/ACE/ACEXML/common/Exception.inl b/ACE/ACEXML/common/Exception.inl new file mode 100644 index 00000000000..e2d97fa37ea --- /dev/null +++ b/ACE/ACEXML/common/Exception.inl @@ -0,0 +1,13 @@ +// -*- C++ -*- $Id$ + +ACEXML_INLINE const ACEXML_Char * +ACEXML_Exception::id (void) const +{ + return ACEXML_Exception::exception_name_; +} + +ACEXML_INLINE ACEXML_Exception* +ACEXML_Exception::_downcast (ACEXML_Exception* x) +{ + return x; +} diff --git a/ACE/ACEXML/common/LocatorImpl.cpp b/ACE/ACEXML/common/LocatorImpl.cpp index 7b98f9178e1..6139985b2fd 100644 --- a/ACE/ACEXML/common/LocatorImpl.cpp +++ b/ACE/ACEXML/common/LocatorImpl.cpp @@ -3,7 +3,7 @@ #include "ACEXML/common/LocatorImpl.h" #if !defined (__ACEXML_INLINE__) -# include "ACEXML/common/LocatorImpl.i" +# include "ACEXML/common/LocatorImpl.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_LocatorImpl::ACEXML_LocatorImpl (void) diff --git a/ACE/ACEXML/common/LocatorImpl.h b/ACE/ACEXML/common/LocatorImpl.h index e5209e13b8d..46a7092c84f 100644 --- a/ACE/ACEXML/common/LocatorImpl.h +++ b/ACE/ACEXML/common/LocatorImpl.h @@ -151,7 +151,7 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/common/LocatorImpl.i" +# include "ACEXML/common/LocatorImpl.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/common/LocatorImpl.i b/ACE/ACEXML/common/LocatorImpl.i deleted file mode 100644 index 808a8bd4ac4..00000000000 --- a/ACE/ACEXML/common/LocatorImpl.i +++ /dev/null @@ -1,65 +0,0 @@ -// -*- C++ -*- $Id$ - -#include "ace/ACE.h" - -ACEXML_INLINE void -ACEXML_LocatorImpl::setColumnNumber (int cn) -{ - this->columnNumber_ = cn; -} - -ACEXML_INLINE void -ACEXML_LocatorImpl::setLineNumber (int ln) -{ - this->lineNumber_ = ln; -} - -ACEXML_INLINE int -ACEXML_LocatorImpl::getColumnNumber (void) const -{ - return this->columnNumber_; -} - -ACEXML_INLINE int -ACEXML_LocatorImpl::getLineNumber (void) const -{ - return this->lineNumber_; -} - -ACEXML_INLINE void -ACEXML_LocatorImpl::setPublicId (const ACEXML_Char *id) -{ - delete[] this->publicId_; - this->publicId_ = ACE::strnew (id); -} - -ACEXML_INLINE void -ACEXML_LocatorImpl::setSystemId (const ACEXML_Char *id) -{ - delete[] this->systemId_; - this->systemId_ = ACE::strnew (id); -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_LocatorImpl::getPublicId (void) const -{ - return this->publicId_; -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_LocatorImpl::getSystemId (void) const -{ - return this->systemId_; -} - -ACEXML_INLINE void -ACEXML_LocatorImpl::incrLineNumber () -{ - ++this->lineNumber_; -} - -ACEXML_INLINE void -ACEXML_LocatorImpl::incrColumnNumber () -{ - ++this->columnNumber_; -} diff --git a/ACE/ACEXML/common/LocatorImpl.inl b/ACE/ACEXML/common/LocatorImpl.inl new file mode 100644 index 00000000000..808a8bd4ac4 --- /dev/null +++ b/ACE/ACEXML/common/LocatorImpl.inl @@ -0,0 +1,65 @@ +// -*- C++ -*- $Id$ + +#include "ace/ACE.h" + +ACEXML_INLINE void +ACEXML_LocatorImpl::setColumnNumber (int cn) +{ + this->columnNumber_ = cn; +} + +ACEXML_INLINE void +ACEXML_LocatorImpl::setLineNumber (int ln) +{ + this->lineNumber_ = ln; +} + +ACEXML_INLINE int +ACEXML_LocatorImpl::getColumnNumber (void) const +{ + return this->columnNumber_; +} + +ACEXML_INLINE int +ACEXML_LocatorImpl::getLineNumber (void) const +{ + return this->lineNumber_; +} + +ACEXML_INLINE void +ACEXML_LocatorImpl::setPublicId (const ACEXML_Char *id) +{ + delete[] this->publicId_; + this->publicId_ = ACE::strnew (id); +} + +ACEXML_INLINE void +ACEXML_LocatorImpl::setSystemId (const ACEXML_Char *id) +{ + delete[] this->systemId_; + this->systemId_ = ACE::strnew (id); +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_LocatorImpl::getPublicId (void) const +{ + return this->publicId_; +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_LocatorImpl::getSystemId (void) const +{ + return this->systemId_; +} + +ACEXML_INLINE void +ACEXML_LocatorImpl::incrLineNumber () +{ + ++this->lineNumber_; +} + +ACEXML_INLINE void +ACEXML_LocatorImpl::incrColumnNumber () +{ + ++this->columnNumber_; +} diff --git a/ACE/ACEXML/common/SAXExceptions.cpp b/ACE/ACEXML/common/SAXExceptions.cpp index 0e1cbd2a827..89e0cb99ed3 100644 --- a/ACE/ACEXML/common/SAXExceptions.cpp +++ b/ACE/ACEXML/common/SAXExceptions.cpp @@ -15,7 +15,7 @@ const ACEXML_Char *ACEXML_SAXNotRecognizedException::exception_name_ = ACE_TEXT const ACEXML_Char *ACEXML_SAXParseException::exception_name_ = ACE_TEXT ("ACEXML_SAXParseException"); #if !defined (__ACEXML_INLINE__) -# include "ACEXML/common/SAXExceptions.i" +# include "ACEXML/common/SAXExceptions.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_SAXException::ACEXML_SAXException (void) diff --git a/ACE/ACEXML/common/SAXExceptions.h b/ACE/ACEXML/common/SAXExceptions.h index d4965c93ee6..5740c0b7760 100644 --- a/ACE/ACEXML/common/SAXExceptions.h +++ b/ACE/ACEXML/common/SAXExceptions.h @@ -200,7 +200,7 @@ protected: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/common/SAXExceptions.i" +# include "ACEXML/common/SAXExceptions.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/common/SAXExceptions.i b/ACE/ACEXML/common/SAXExceptions.i deleted file mode 100644 index 3aee40632b5..00000000000 --- a/ACE/ACEXML/common/SAXExceptions.i +++ /dev/null @@ -1,57 +0,0 @@ -// -*- C++ -*- $Id$ - -ACEXML_INLINE const ACEXML_Char * -ACEXML_SAXException::message (void) -{ - return (this->message_ == 0 ? - ACEXML_Exception::null_ : - this->message_); -} - -ACEXML_INLINE void -ACEXML_SAXException::_raise (void) -{ - ACEXML_RAISE (*this); -} - -ACEXML_INLINE void -ACEXML_SAXNotSupportedException::_raise (void) -{ - ACEXML_RAISE (*this); -} - -ACEXML_INLINE void -ACEXML_SAXNotRecognizedException::_raise (void) -{ - ACEXML_RAISE (*this); -} - -ACEXML_INLINE void -ACEXML_SAXParseException::_raise (void) -{ - ACEXML_RAISE (*this); -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_SAXException::id (void) const -{ - return ACEXML_SAXException::exception_name_; -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_SAXNotSupportedException::id (void) const -{ - return ACEXML_SAXNotSupportedException::exception_name_; -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_SAXNotRecognizedException::id (void) const -{ - return ACEXML_SAXNotRecognizedException::exception_name_; -} - -ACEXML_INLINE const ACEXML_Char * -ACEXML_SAXParseException::id (void) const -{ - return ACEXML_SAXParseException::exception_name_; -} diff --git a/ACE/ACEXML/common/SAXExceptions.inl b/ACE/ACEXML/common/SAXExceptions.inl new file mode 100644 index 00000000000..3aee40632b5 --- /dev/null +++ b/ACE/ACEXML/common/SAXExceptions.inl @@ -0,0 +1,57 @@ +// -*- C++ -*- $Id$ + +ACEXML_INLINE const ACEXML_Char * +ACEXML_SAXException::message (void) +{ + return (this->message_ == 0 ? + ACEXML_Exception::null_ : + this->message_); +} + +ACEXML_INLINE void +ACEXML_SAXException::_raise (void) +{ + ACEXML_RAISE (*this); +} + +ACEXML_INLINE void +ACEXML_SAXNotSupportedException::_raise (void) +{ + ACEXML_RAISE (*this); +} + +ACEXML_INLINE void +ACEXML_SAXNotRecognizedException::_raise (void) +{ + ACEXML_RAISE (*this); +} + +ACEXML_INLINE void +ACEXML_SAXParseException::_raise (void) +{ + ACEXML_RAISE (*this); +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_SAXException::id (void) const +{ + return ACEXML_SAXException::exception_name_; +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_SAXNotSupportedException::id (void) const +{ + return ACEXML_SAXNotSupportedException::exception_name_; +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_SAXNotRecognizedException::id (void) const +{ + return ACEXML_SAXNotRecognizedException::exception_name_; +} + +ACEXML_INLINE const ACEXML_Char * +ACEXML_SAXParseException::id (void) const +{ + return ACEXML_SAXParseException::exception_name_; +} diff --git a/ACE/ACEXML/common/XMLFilterImpl.cpp b/ACE/ACEXML/common/XMLFilterImpl.cpp index 300c6b7ea4b..288814546ca 100644 --- a/ACE/ACEXML/common/XMLFilterImpl.cpp +++ b/ACE/ACEXML/common/XMLFilterImpl.cpp @@ -3,7 +3,7 @@ #include "ACEXML/common/XMLFilterImpl.h" #if !defined (__ACEXML_INLINE__) -# include "ACEXML/common/XMLFilterImpl.i" +# include "ACEXML/common/XMLFilterImpl.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_XMLFilterImpl::ACEXML_XMLFilterImpl (void) diff --git a/ACE/ACEXML/common/XMLFilterImpl.h b/ACE/ACEXML/common/XMLFilterImpl.h index 52963580636..5c1823dfe3e 100644 --- a/ACE/ACEXML/common/XMLFilterImpl.h +++ b/ACE/ACEXML/common/XMLFilterImpl.h @@ -286,7 +286,7 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/common/XMLFilterImpl.i" +# include "ACEXML/common/XMLFilterImpl.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/common/XMLFilterImpl.i b/ACE/ACEXML/common/XMLFilterImpl.i deleted file mode 100644 index 4be2ceeceea..00000000000 --- a/ACE/ACEXML/common/XMLFilterImpl.i +++ /dev/null @@ -1,14 +0,0 @@ -// -*- C++ -*- $Id$ - -ACEXML_INLINE int -ACEXML_XMLFilterImpl::setupParser (void) -{ - if (this->parent_ == 0) - return -1; - - this->parent_->setEntityResolver (this); - this->parent_->setDTDHandler (this); - this->parent_->setContentHandler (this); - this->parent_->setErrorHandler (this); - return 0; -} diff --git a/ACE/ACEXML/common/XMLFilterImpl.inl b/ACE/ACEXML/common/XMLFilterImpl.inl new file mode 100644 index 00000000000..4be2ceeceea --- /dev/null +++ b/ACE/ACEXML/common/XMLFilterImpl.inl @@ -0,0 +1,14 @@ +// -*- C++ -*- $Id$ + +ACEXML_INLINE int +ACEXML_XMLFilterImpl::setupParser (void) +{ + if (this->parent_ == 0) + return -1; + + this->parent_->setEntityResolver (this); + this->parent_->setDTDHandler (this); + this->parent_->setContentHandler (this); + this->parent_->setErrorHandler (this); + return 0; +} diff --git a/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.cpp b/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.cpp index 3dfeb5a182a..3388a1492b3 100644 --- a/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.cpp +++ b/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.cpp @@ -5,7 +5,7 @@ #include "ace/Log_Msg.h" #if !defined (__ACEXML_INLINE__) -# include "SAXPrint_Handler.i" +# include "SAXPrint_Handler.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_SAXPrint_Handler::ACEXML_SAXPrint_Handler (const ACEXML_Char* filename) diff --git a/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.h b/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.h index 612dd406c06..8b79fff5692 100644 --- a/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.h +++ b/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.h @@ -190,6 +190,6 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "SAXPrint_Handler.i" +# include "SAXPrint_Handler.inl" #endif /* __ACEXML_INLINE__ */ #endif /* ACEXML_SAXPRINT_HANDLER_H */ diff --git a/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.i b/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.i deleted file mode 100644 index 2102291ea68..00000000000 --- a/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.i +++ /dev/null @@ -1,13 +0,0 @@ -// -*- C++ -*- $Id$ - -ACEXML_INLINE void -ACEXML_SAXPrint_Handler::inc_indent (void) -{ - this->indent_ += 1; -} - -ACEXML_INLINE void -ACEXML_SAXPrint_Handler::dec_indent (void) -{ - this->indent_ -= 1; -} diff --git a/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.inl b/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.inl new file mode 100644 index 00000000000..2102291ea68 --- /dev/null +++ b/ACE/ACEXML/examples/SAXPrint/SAXPrint_Handler.inl @@ -0,0 +1,13 @@ +// -*- C++ -*- $Id$ + +ACEXML_INLINE void +ACEXML_SAXPrint_Handler::inc_indent (void) +{ + this->indent_ += 1; +} + +ACEXML_INLINE void +ACEXML_SAXPrint_Handler::dec_indent (void) +{ + this->indent_ -= 1; +} diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp b/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp index e9275061b52..e584e22dd62 100644 --- a/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp +++ b/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp @@ -3,7 +3,7 @@ #include "ACEXML/parser/debug_validator/Element_Tree.h" #if !defined (__ACEXML_INLINE__) -# include "ACEXML/parser/debug_validator/Element_Tree.i" +# include "ACEXML/parser/debug_validator/Element_Tree.inl" #endif /* __ACEXML_INLINE__ */ ACEXML_Element_Tree_Node::~ACEXML_Element_Tree_Node () diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.h b/ACE/ACEXML/parser/debug_validator/Element_Tree.h index a4efdbf1318..4738b5de2f4 100644 --- a/ACE/ACEXML/parser/debug_validator/Element_Tree.h +++ b/ACE/ACEXML/parser/debug_validator/Element_Tree.h @@ -152,7 +152,7 @@ protected: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/parser/debug_validator/Element_Tree.i" +# include "ACEXML/parser/debug_validator/Element_Tree.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.i b/ACE/ACEXML/parser/debug_validator/Element_Tree.i deleted file mode 100644 index 4b408835403..00000000000 --- a/ACE/ACEXML/parser/debug_validator/Element_Tree.i +++ /dev/null @@ -1,92 +0,0 @@ -// $Id$ - -ACEXML_INLINE -ACEXML_Element_Tree_Node::ACEXML_Element_Tree_Node () - : next_ (0) -{ -} - -ACEXML_INLINE ACEXML_Element_Tree_Node * -ACEXML_Element_Tree_Node::next () -{ - return this->next_; -} - -ACEXML_INLINE void -ACEXML_Element_Tree_Node::next (ACEXML_Element_Tree_Node * n) -{ - this->next_ = n; -} - -ACEXML_INLINE -ACEXML_Element_Tree_Name_Node::ACEXML_Element_Tree_Name_Node (const ACEXML_Char *name, - int release) - : name_ (name, 0, release) -{ -} - -ACEXML_INLINE void -ACEXML_Element_Tree_Name_Node::set (const ACEXML_Char *name, - int release) -{ - this->name_.set (name, release); -} - -ACEXML_INLINE -ACEXML_Element_Tree_List_Node::ACEXML_Element_Tree_List_Node (void) - : type_ (SEQUENCE), - head_ (0), - tail_ (0), - pop_next_ (0) -{ -} - -ACEXML_INLINE ACEXML_Element_Tree_List_Node::LIST_TYPE -ACEXML_Element_Tree_List_Node::get (void) -{ - return this->type_; -} - -ACEXML_INLINE int -ACEXML_Element_Tree_List_Node::set (ACEXML_Element_Tree_List_Node::LIST_TYPE type) -{ - this->type_ = type; - return 0; -} - -ACEXML_INLINE -ACEXML_Element_Tree_List_Stack::ACEXML_Element_Tree_List_Stack (void) - : top_ (0) -{ -} - -ACEXML_INLINE ACEXML_Element_Tree_List_Node * -ACEXML_Element_Tree_List_Stack::top () -{ - return this->top_; -} - -ACEXML_INLINE void -ACEXML_Element_Tree_List_Stack::push (ACEXML_Element_Tree_List_Node *n) -{ - n->pop_next_ = this->top_; - this->top_ = n; -} - -ACEXML_INLINE ACEXML_Element_Tree_List_Node * -ACEXML_Element_Tree_List_Stack::pop () -{ - if (this->top_ != 0) - { - ACEXML_Element_Tree_List_Node *ptr = this->top_; - this->top_ = this->top_->pop_next_; - return ptr; - } - return 0; -} - -ACEXML_INLINE int -ACEXML_Element_Tree_List_Stack::empty () -{ - return this->top_ == 0; -} diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.inl b/ACE/ACEXML/parser/debug_validator/Element_Tree.inl new file mode 100644 index 00000000000..4b408835403 --- /dev/null +++ b/ACE/ACEXML/parser/debug_validator/Element_Tree.inl @@ -0,0 +1,92 @@ +// $Id$ + +ACEXML_INLINE +ACEXML_Element_Tree_Node::ACEXML_Element_Tree_Node () + : next_ (0) +{ +} + +ACEXML_INLINE ACEXML_Element_Tree_Node * +ACEXML_Element_Tree_Node::next () +{ + return this->next_; +} + +ACEXML_INLINE void +ACEXML_Element_Tree_Node::next (ACEXML_Element_Tree_Node * n) +{ + this->next_ = n; +} + +ACEXML_INLINE +ACEXML_Element_Tree_Name_Node::ACEXML_Element_Tree_Name_Node (const ACEXML_Char *name, + int release) + : name_ (name, 0, release) +{ +} + +ACEXML_INLINE void +ACEXML_Element_Tree_Name_Node::set (const ACEXML_Char *name, + int release) +{ + this->name_.set (name, release); +} + +ACEXML_INLINE +ACEXML_Element_Tree_List_Node::ACEXML_Element_Tree_List_Node (void) + : type_ (SEQUENCE), + head_ (0), + tail_ (0), + pop_next_ (0) +{ +} + +ACEXML_INLINE ACEXML_Element_Tree_List_Node::LIST_TYPE +ACEXML_Element_Tree_List_Node::get (void) +{ + return this->type_; +} + +ACEXML_INLINE int +ACEXML_Element_Tree_List_Node::set (ACEXML_Element_Tree_List_Node::LIST_TYPE type) +{ + this->type_ = type; + return 0; +} + +ACEXML_INLINE +ACEXML_Element_Tree_List_Stack::ACEXML_Element_Tree_List_Stack (void) + : top_ (0) +{ +} + +ACEXML_INLINE ACEXML_Element_Tree_List_Node * +ACEXML_Element_Tree_List_Stack::top () +{ + return this->top_; +} + +ACEXML_INLINE void +ACEXML_Element_Tree_List_Stack::push (ACEXML_Element_Tree_List_Node *n) +{ + n->pop_next_ = this->top_; + this->top_ = n; +} + +ACEXML_INLINE ACEXML_Element_Tree_List_Node * +ACEXML_Element_Tree_List_Stack::pop () +{ + if (this->top_ != 0) + { + ACEXML_Element_Tree_List_Node *ptr = this->top_; + this->top_ = this->top_->pop_next_; + return ptr; + } + return 0; +} + +ACEXML_INLINE int +ACEXML_Element_Tree_List_Stack::empty () +{ + return this->top_ == 0; +} diff --git a/ACE/ACEXML/parser/parser/Entity_Manager.cpp b/ACE/ACEXML/parser/parser/Entity_Manager.cpp index cbc20c00fec..0f27707ae72 100644 --- a/ACE/ACEXML/parser/parser/Entity_Manager.cpp +++ b/ACE/ACEXML/parser/parser/Entity_Manager.cpp @@ -3,7 +3,7 @@ #include "ACEXML/parser/parser/Entity_Manager.h" #if !defined (__ACEXML_INLINE__) -# include "ACEXML/parser/parser/Entity_Manager.i" +# include "ACEXML/parser/parser/Entity_Manager.inl" #endif /* __ACEXML_INLINE__ */ diff --git a/ACE/ACEXML/parser/parser/Entity_Manager.h b/ACE/ACEXML/parser/parser/Entity_Manager.h index 9e264bf8d5e..e97233a6146 100644 --- a/ACE/ACEXML/parser/parser/Entity_Manager.h +++ b/ACE/ACEXML/parser/parser/Entity_Manager.h @@ -92,7 +92,7 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/parser/parser/Entity_Manager.i" +# include "ACEXML/parser/parser/Entity_Manager.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/parser/parser/Entity_Manager.i b/ACE/ACEXML/parser/parser/Entity_Manager.i deleted file mode 100644 index 05b258e980e..00000000000 --- a/ACE/ACEXML/parser/parser/Entity_Manager.i +++ /dev/null @@ -1,66 +0,0 @@ -// $Id$ - -ACEXML_INLINE int -ACEXML_Entity_Manager::add_entity (const ACEXML_Char *ref, - const ACEXML_Char *v) -{ - if (!this->entities_ ) - ACE_NEW_RETURN (this->entities_, ACEXML_ENTITIES_MANAGER, -1); - ACEXML_String name (ref, 0, 0); - ACEXML_String value (v, 0, 0); - return this->entities_->bind (name, value); -} - -ACEXML_INLINE const ACEXML_Char* -ACEXML_Entity_Manager::resolve_entity (const ACEXML_Char *ref) -{ - if (!this->entities_) - return 0; - - ACEXML_ENTITY_ENTRY *entry = 0; - - if (this->entities_->find (ACEXML_String (ref, 0, 0), - entry) == 0) - return entry->int_id_.c_str(); - return 0; -} - -ACEXML_INLINE int -ACEXML_Entity_Manager::resolve_entity (const ACEXML_Char* ref, - ACEXML_Char*& systemId, - ACEXML_Char*& publicId) -{ - if (!this->entities_) - return 0; - - publicId = systemId = 0; - ACEXML_ENTITY_ENTRY_ITERATOR iter (*this->entities_, ref); - ACEXML_ENTITY_ENTRY_ITERATOR end (*this->entities_, ref, 1); - - if (iter != end) - { - systemId = const_cast ((*iter).int_id_.c_str()); - ++iter; - if (iter != end) - publicId = const_cast ((*iter).int_id_.c_str()); - return 0; - } - return -1; -} - -ACEXML_INLINE int -ACEXML_Entity_Manager::reset (void) -{ - delete this->entities_; - this->entities_ = 0; - return 0; -} - - -ACEXML_INLINE size_t -ACEXML_Entity_Manager::size (void) const -{ - if (!this->entities_) - return 0; - return this->entities_->current_size(); -} diff --git a/ACE/ACEXML/parser/parser/Entity_Manager.inl b/ACE/ACEXML/parser/parser/Entity_Manager.inl new file mode 100644 index 00000000000..05b258e980e --- /dev/null +++ b/ACE/ACEXML/parser/parser/Entity_Manager.inl @@ -0,0 +1,66 @@ +// $Id$ + +ACEXML_INLINE int +ACEXML_Entity_Manager::add_entity (const ACEXML_Char *ref, + const ACEXML_Char *v) +{ + if (!this->entities_ ) + ACE_NEW_RETURN (this->entities_, ACEXML_ENTITIES_MANAGER, -1); + ACEXML_String name (ref, 0, 0); + ACEXML_String value (v, 0, 0); + return this->entities_->bind (name, value); +} + +ACEXML_INLINE const ACEXML_Char* +ACEXML_Entity_Manager::resolve_entity (const ACEXML_Char *ref) +{ + if (!this->entities_) + return 0; + + ACEXML_ENTITY_ENTRY *entry = 0; + + if (this->entities_->find (ACEXML_String (ref, 0, 0), + entry) == 0) + return entry->int_id_.c_str(); + return 0; +} + +ACEXML_INLINE int +ACEXML_Entity_Manager::resolve_entity (const ACEXML_Char* ref, + ACEXML_Char*& systemId, + ACEXML_Char*& publicId) +{ + if (!this->entities_) + return 0; + + publicId = systemId = 0; + ACEXML_ENTITY_ENTRY_ITERATOR iter (*this->entities_, ref); + ACEXML_ENTITY_ENTRY_ITERATOR end (*this->entities_, ref, 1); + + if (iter != end) + { + systemId = const_cast ((*iter).int_id_.c_str()); + ++iter; + if (iter != end) + publicId = const_cast ((*iter).int_id_.c_str()); + return 0; + } + return -1; +} + +ACEXML_INLINE int +ACEXML_Entity_Manager::reset (void) +{ + delete this->entities_; + this->entities_ = 0; + return 0; +} + + +ACEXML_INLINE size_t +ACEXML_Entity_Manager::size (void) const +{ + if (!this->entities_) + return 0; + return this->entities_->current_size(); +} diff --git a/ACE/ACEXML/parser/parser/Parser.cpp b/ACE/ACEXML/parser/parser/Parser.cpp index 8aed213da69..a31343049fa 100644 --- a/ACE/ACEXML/parser/parser/Parser.cpp +++ b/ACE/ACEXML/parser/parser/Parser.cpp @@ -3,7 +3,7 @@ #include "ACEXML/parser/parser/Parser.h" #if !defined (__ACEXML_INLINE__) -# include "ACEXML/parser/parser/Parser.i" +# include "ACEXML/parser/parser/Parser.inl" #endif /* __ACEXML_INLINE__ */ #include "ace/ACE.h" diff --git a/ACE/ACEXML/parser/parser/Parser.h b/ACE/ACEXML/parser/parser/Parser.h index 0fbbcb31fc6..2e697236fe6 100644 --- a/ACE/ACEXML/parser/parser/Parser.h +++ b/ACE/ACEXML/parser/parser/Parser.h @@ -896,7 +896,7 @@ private: }; #if defined (__ACEXML_INLINE__) -# include "ACEXML/parser/parser/Parser.i" +# include "ACEXML/parser/parser/Parser.inl" #endif /* __ACEXML_INLINE__ */ #include /**/ "ace/post.h" diff --git a/ACE/ACEXML/parser/parser/Parser.i b/ACE/ACEXML/parser/parser/Parser.i deleted file mode 100644 index 97896a68388..00000000000 --- a/ACE/ACEXML/parser/parser/Parser.i +++ /dev/null @@ -1,257 +0,0 @@ -//============================================================================= -/** - * @file Parser.i - * - * $Id$ - * - * @author Nanbor Wang - */ -//============================================================================= - -ACEXML_INLINE ACEXML_ContentHandler * -ACEXML_Parser::getContentHandler (void) const -{ - return this->content_handler_; -} - -ACEXML_INLINE ACEXML_DTDHandler * -ACEXML_Parser::getDTDHandler (void) const -{ - return this->dtd_handler_; -} - -ACEXML_INLINE ACEXML_EntityResolver * -ACEXML_Parser::getEntityResolver (void) const -{ - return this->entity_resolver_; -} - -ACEXML_INLINE ACEXML_ErrorHandler * -ACEXML_Parser::getErrorHandler (void) const -{ - return this->error_handler_; -} - -ACEXML_INLINE void -ACEXML_Parser::setContentHandler (ACEXML_ContentHandler *handler) -{ - this->content_handler_ = handler; -} - -ACEXML_INLINE void -ACEXML_Parser::setDTDHandler (ACEXML_DTDHandler *handler) -{ - this->dtd_handler_ = handler; -} - -ACEXML_INLINE void -ACEXML_Parser::setEntityResolver (ACEXML_EntityResolver *resolver) -{ - this->entity_resolver_ = resolver; -} - -ACEXML_INLINE void -ACEXML_Parser::setErrorHandler (ACEXML_ErrorHandler *handler) -{ - this->error_handler_ = handler; -} - -ACEXML_INLINE int -ACEXML_Parser::isChar (ACEXML_UCS4 c) const -{ - return (c == 0x9 || c == 0xA || c == 0xD || - c >= 0x20 && c <= 0xD7FF || - c >= 0xE000 && c <= 0xFFFD || - c >= 0x10000 && c <= 0x10FFFF); -} - -ACEXML_INLINE int -ACEXML_Parser::isCharRef (const ACEXML_Char c) const - { - return ((c >= 'a' && c <= 'f') || - (c >= 'A' && c <= 'F')); -} - -ACEXML_INLINE int -ACEXML_Parser::isNormalDigit (const ACEXML_Char c) const -{ - return (c >= '\x30' && c <= '\x39'); -} - -ACEXML_INLINE int -ACEXML_Parser::isBasechar (const ACEXML_Char c) const -{ -#if defined (ACE_USES_WCHAR) - return ACEXML_ParserInt::isBasechar_i (c); -#else - return ACEXML_ParserInt::base_char_table_[(int) c]; -#endif /* ACE_USES_WCHAR */ -} - -ACEXML_INLINE int -ACEXML_Parser::isIdeographic (const ACEXML_Char c) const -{ -#if defined (ACE_USES_WCHAR) - return ACEXML_ParserInt::isIdeographic_i (c); -#else - ACE_UNUSED_ARG (c); - return 0; -#endif /* ACE_USES_WCHAR */ -} - -ACEXML_INLINE int -ACEXML_Parser::isCombiningchar (const ACEXML_Char c) const -{ -#if defined (ACE_USES_WCHAR) - return ACEXML_ParserInt::isCombiningchar_i (c); -#else - ACE_UNUSED_ARG (c); - return 0; -#endif /* ACE_USES_WCHAR */ - } - -ACEXML_INLINE int -ACEXML_Parser::isDigit (const ACEXML_Char c) const -{ -#if defined (ACE_USES_WCHAR) - return ACEXML_ParserInt::isDigit_i (c); -#else - return (this->isNormalDigit (c)); -#endif /* ACE_USES_WCHAR */ -} - -ACEXML_INLINE int -ACEXML_Parser::isExtender (const ACEXML_Char c) const -{ -#if defined (ACE_USES_WCHAR) - return ACEXML_ParserInt::isExtender_i (c); -#else - return (c == '\xB7'); -#endif /* ACE_USES_WCHAR */ -} - -ACEXML_INLINE int -ACEXML_Parser::isLetter (const ACEXML_Char c) const -{ - return (this->isBasechar (c) || this->isIdeographic (c)); -} - -ACEXML_INLINE int -ACEXML_Parser::isNameChar (const ACEXML_Char c) const -{ - return (this->isLetter (c) || this->isDigit (c) || c == '.' || c == '-' || - c == '_' || c == ':' || this->isCombiningchar (c) || - this->isExtender (c)); -} - -ACEXML_INLINE int -ACEXML_Parser::isPubidChar (const ACEXML_Char c) const -{ - return (c == '\x20' || c == '\x0D' || c == '\x0A' || - (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || c == '-' || c == '\'' || c == '(' || - c == ')' || c == '+' || c == ',' || c == '.' || c == '/' || - c == ':' || c == '=' || c == '?' || c == ';' || c == '!' || - c == '*' || c == '#' || c == '@' || c == '$' || c == '_' || - c == '%'); -} - - -ACEXML_INLINE int -ACEXML_Parser::is_whitespace (const ACEXML_Char c) const -{ - switch (c) - { - case '\x0A': case '\x20': - case '\x09': case '\x0D': - return 1; - default: - return 0; - } -} - -ACEXML_INLINE ACEXML_Char -ACEXML_Parser::skip_whitespace (void) -{ - ACEXML_Char ch = this->get(); - while (this->is_whitespace (ch)) - ch = this->get (); - return ch; -} - - -ACEXML_INLINE int -ACEXML_Parser::skip_whitespace_count (ACEXML_Char *peeky) -{ - int wscount = 0; - ACEXML_Char dummy; - ACEXML_Char &forward = (peeky == 0 ? dummy : *peeky); - - for (;this->is_whitespace ((forward = this->peek ())); ++wscount) - this->get (); - return wscount; -} - -ACEXML_INLINE int -ACEXML_Parser::skip_equal (void) -{ - if (this->skip_whitespace() != '=') - return -1; - while (this->is_whitespace (this->peek())) - this->get(); - return 0; -} - -ACEXML_INLINE ACEXML_Char -ACEXML_Parser::get (void) -{ - ACEXML_Char ch = 0; - const ACEXML_InputSource* ip = this->current_->getInputSource(); - ACEXML_CharStream* instream = ip->getCharStream(); - - if (instream->get (ch) != -1) - { - this->current_->getLocator()->incrColumnNumber(); - // Normalize white-space - if (ch == '\x0D') - { - if (instream->peek() == 0x0A) - instream->get (ch); - ch = '\x0A'; - } - if (ch == '\x0A') - { - // Reset column number and increment Line Number. - this->current_->getLocator()->incrLineNumber(); - this->current_->getLocator()->setColumnNumber (0); - } - return ch; - } - return 0; -} - -ACEXML_INLINE ACEXML_Char -ACEXML_Parser::peek (void) -{ - // Using an extra level of indirection so we can - // manage document location in the future. - ACEXML_Char ch = 0; - const ACEXML_InputSource* ip = this->current_->getInputSource(); - ACEXML_CharStream* instream = ip->getCharStream(); - ch = static_cast (instream->peek ()); - return (ch > 0 ? ch : 0); -} - -ACEXML_INLINE int -ACEXML_Parser::parse_token (const ACEXML_Char* keyword) -{ - if (keyword == 0) - return -1; - const ACEXML_Char* ptr = keyword; - for (; *ptr != 0 && (this->get() == *ptr); ++ptr) - ; - if (*ptr == 0) - return 0; - else - return -1; -} diff --git a/ACE/ACEXML/parser/parser/Parser.inl b/ACE/ACEXML/parser/parser/Parser.inl new file mode 100644 index 00000000000..97896a68388 --- /dev/null +++ b/ACE/ACEXML/parser/parser/Parser.inl @@ -0,0 +1,257 @@ +//============================================================================= +/** + * @file Parser.i + * + * $Id$ + * + * @author Nanbor Wang + */ +//============================================================================= + +ACEXML_INLINE ACEXML_ContentHandler * +ACEXML_Parser::getContentHandler (void) const +{ + return this->content_handler_; +} + +ACEXML_INLINE ACEXML_DTDHandler * +ACEXML_Parser::getDTDHandler (void) const +{ + return this->dtd_handler_; +} + +ACEXML_INLINE ACEXML_EntityResolver * +ACEXML_Parser::getEntityResolver (void) const +{ + return this->entity_resolver_; +} + +ACEXML_INLINE ACEXML_ErrorHandler * +ACEXML_Parser::getErrorHandler (void) const +{ + return this->error_handler_; +} + +ACEXML_INLINE void +ACEXML_Parser::setContentHandler (ACEXML_ContentHandler *handler) +{ + this->content_handler_ = handler; +} + +ACEXML_INLINE void +ACEXML_Parser::setDTDHandler (ACEXML_DTDHandler *handler) +{ + this->dtd_handler_ = handler; +} + +ACEXML_INLINE void +ACEXML_Parser::setEntityResolver (ACEXML_EntityResolver *resolver) +{ + this->entity_resolver_ = resolver; +} + +ACEXML_INLINE void +ACEXML_Parser::setErrorHandler (ACEXML_ErrorHandler *handler) +{ + this->error_handler_ = handler; +} + +ACEXML_INLINE int +ACEXML_Parser::isChar (ACEXML_UCS4 c) const +{ + return (c == 0x9 || c == 0xA || c == 0xD || + c >= 0x20 && c <= 0xD7FF || + c >= 0xE000 && c <= 0xFFFD || + c >= 0x10000 && c <= 0x10FFFF); +} + +ACEXML_INLINE int +ACEXML_Parser::isCharRef (const ACEXML_Char c) const + { + return ((c >= 'a' && c <= 'f') || + (c >= 'A' && c <= 'F')); +} + +ACEXML_INLINE int +ACEXML_Parser::isNormalDigit (const ACEXML_Char c) const +{ + return (c >= '\x30' && c <= '\x39'); +} + +ACEXML_INLINE int +ACEXML_Parser::isBasechar (const ACEXML_Char c) const +{ +#if defined (ACE_USES_WCHAR) + return ACEXML_ParserInt::isBasechar_i (c); +#else + return ACEXML_ParserInt::base_char_table_[(int) c]; +#endif /* ACE_USES_WCHAR */ +} + +ACEXML_INLINE int +ACEXML_Parser::isIdeographic (const ACEXML_Char c) const +{ +#if defined (ACE_USES_WCHAR) + return ACEXML_ParserInt::isIdeographic_i (c); +#else + ACE_UNUSED_ARG (c); + return 0; +#endif /* ACE_USES_WCHAR */ +} + +ACEXML_INLINE int +ACEXML_Parser::isCombiningchar (const ACEXML_Char c) const +{ +#if defined (ACE_USES_WCHAR) + return ACEXML_ParserInt::isCombiningchar_i (c); +#else + ACE_UNUSED_ARG (c); + return 0; +#endif /* ACE_USES_WCHAR */ + } + +ACEXML_INLINE int +ACEXML_Parser::isDigit (const ACEXML_Char c) const +{ +#if defined (ACE_USES_WCHAR) + return ACEXML_ParserInt::isDigit_i (c); +#else + return (this->isNormalDigit (c)); +#endif /* ACE_USES_WCHAR */ +} + +ACEXML_INLINE int +ACEXML_Parser::isExtender (const ACEXML_Char c) const +{ +#if defined (ACE_USES_WCHAR) + return ACEXML_ParserInt::isExtender_i (c); +#else + return (c == '\xB7'); +#endif /* ACE_USES_WCHAR */ +} + +ACEXML_INLINE int +ACEXML_Parser::isLetter (const ACEXML_Char c) const +{ + return (this->isBasechar (c) || this->isIdeographic (c)); +} + +ACEXML_INLINE int +ACEXML_Parser::isNameChar (const ACEXML_Char c) const +{ + return (this->isLetter (c) || this->isDigit (c) || c == '.' || c == '-' || + c == '_' || c == ':' || this->isCombiningchar (c) || + this->isExtender (c)); +} + +ACEXML_INLINE int +ACEXML_Parser::isPubidChar (const ACEXML_Char c) const +{ + return (c == '\x20' || c == '\x0D' || c == '\x0A' || + (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || c == '-' || c == '\'' || c == '(' || + c == ')' || c == '+' || c == ',' || c == '.' || c == '/' || + c == ':' || c == '=' || c == '?' || c == ';' || c == '!' || + c == '*' || c == '#' || c == '@' || c == '$' || c == '_' || + c == '%'); +} + + +ACEXML_INLINE int +ACEXML_Parser::is_whitespace (const ACEXML_Char c) const +{ + switch (c) + { + case '\x0A': case '\x20': + case '\x09': case '\x0D': + return 1; + default: + return 0; + } +} + +ACEXML_INLINE ACEXML_Char +ACEXML_Parser::skip_whitespace (void) +{ + ACEXML_Char ch = this->get(); + while (this->is_whitespace (ch)) + ch = this->get (); + return ch; +} + + +ACEXML_INLINE int +ACEXML_Parser::skip_whitespace_count (ACEXML_Char *peeky) +{ + int wscount = 0; + ACEXML_Char dummy; + ACEXML_Char &forward = (peeky == 0 ? dummy : *peeky); + + for (;this->is_whitespace ((forward = this->peek ())); ++wscount) + this->get (); + return wscount; +} + +ACEXML_INLINE int +ACEXML_Parser::skip_equal (void) +{ + if (this->skip_whitespace() != '=') + return -1; + while (this->is_whitespace (this->peek())) + this->get(); + return 0; +} + +ACEXML_INLINE ACEXML_Char +ACEXML_Parser::get (void) +{ + ACEXML_Char ch = 0; + const ACEXML_InputSource* ip = this->current_->getInputSource(); + ACEXML_CharStream* instream = ip->getCharStream(); + + if (instream->get (ch) != -1) + { + this->current_->getLocator()->incrColumnNumber(); + // Normalize white-space + if (ch == '\x0D') + { + if (instream->peek() == 0x0A) + instream->get (ch); + ch = '\x0A'; + } + if (ch == '\x0A') + { + // Reset column number and increment Line Number. + this->current_->getLocator()->incrLineNumber(); + this->current_->getLocator()->setColumnNumber (0); + } + return ch; + } + return 0; +} + +ACEXML_INLINE ACEXML_Char +ACEXML_Parser::peek (void) +{ + // Using an extra level of indirection so we can + // manage document location in the future. + ACEXML_Char ch = 0; + const ACEXML_InputSource* ip = this->current_->getInputSource(); + ACEXML_CharStream* instream = ip->getCharStream(); + ch = static_cast (instream->peek ()); + return (ch > 0 ? ch : 0); +} + +ACEXML_INLINE int +ACEXML_Parser::parse_token (const ACEXML_Char* keyword) +{ + if (keyword == 0) + return -1; + const ACEXML_Char* ptr = keyword; + for (; *ptr != 0 && (this->get() == *ptr); ++ptr) + ; + if (*ptr == 0) + return 0; + else + return -1; +} -- cgit v1.2.1