Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

AttributesImpl.i

Go to the documentation of this file.
00001 // -*- C++ -*-  $Id: AttributesImpl.i,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00002 
00003 #include "ace/ACE.h"
00004 
00005 ACEXML_INLINE
00006 ACEXML_Attribute::ACEXML_Attribute (void)
00007   : uri_ (0),
00008     localName_ (0),
00009     qName_ (0),
00010     type_ (0),
00011     value_ (0)
00012 {
00013 }
00014 
00015 ACEXML_INLINE
00016 ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Attribute &attr)
00017   : uri_ (ACE::strnew (attr.uri_)),
00018     localName_ (ACE::strnew (attr.localName_)),
00019     qName_ (ACE::strnew (attr.qName_)),
00020     type_ (ACE::strnew (attr.type_)),
00021     value_ (ACE::strnew (attr.value_))
00022 {
00023 }
00024 
00025 ACEXML_INLINE
00026 ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Char *uri,
00027                                     const ACEXML_Char *localName,
00028                                     const ACEXML_Char *qName,
00029                                     const ACEXML_Char *type,
00030                                     const ACEXML_Char *value)
00031   : uri_ (ACE::strnew (uri)),
00032     localName_ (ACE::strnew (localName)),
00033     qName_ (ACE::strnew (qName)),
00034     type_ (ACE::strnew (type)),
00035     value_ (ACE::strnew (value))
00036 {
00037 }
00038 
00039 ACEXML_INLINE
00040 ACEXML_Attribute::~ACEXML_Attribute (void)
00041 {
00042   delete[] this->uri_;
00043   delete[] this->localName_;
00044   delete[] this->qName_;
00045   delete[] this->type_;
00046   delete[] this->value_;
00047 }
00048 
00049 ACEXML_INLINE const ACEXML_Char *
00050 ACEXML_Attribute::uri (void) const
00051 {
00052   return this->uri_;
00053 }
00054 
00055 ACEXML_INLINE void
00056 ACEXML_Attribute::uri (const ACEXML_Char *uri)
00057 {
00058   delete[] this->uri_;
00059   this->uri_ = ACE::strnew (uri);
00060 }
00061 
00062 ACEXML_INLINE const ACEXML_Char *
00063 ACEXML_Attribute::localName (void) const
00064 {
00065   return this->localName_;
00066 }
00067 
00068 ACEXML_INLINE void
00069 ACEXML_Attribute::localName (const ACEXML_Char *localName)
00070 {
00071   delete[] this->localName_;
00072   this->localName_ = ACE::strnew (localName);
00073 }
00074 
00075 ACEXML_INLINE const ACEXML_Char *
00076 ACEXML_Attribute::qName (void) const
00077 {
00078   return this->qName_;
00079 }
00080 
00081 ACEXML_INLINE void
00082 ACEXML_Attribute::qName (const ACEXML_Char *qName)
00083 {
00084   delete[] this->qName_;
00085   this->qName_ = ACE::strnew (qName);
00086 }
00087 
00088 ACEXML_INLINE const ACEXML_Char *
00089 ACEXML_Attribute::type (void) const
00090 {
00091   return this->type_;
00092 }
00093 
00094 ACEXML_INLINE void
00095 ACEXML_Attribute::type (const ACEXML_Char *type)
00096 {
00097   delete[] this->type_;
00098   this->type_ = ACE::strnew (type);
00099 }
00100 
00101 ACEXML_INLINE const ACEXML_Char *
00102 ACEXML_Attribute::value (void) const
00103 {
00104   return this->value_;
00105 }
00106 
00107 ACEXML_INLINE void
00108 ACEXML_Attribute::value (const ACEXML_Char *value)
00109 {
00110   delete[] this->value_;
00111   this->value_ = ACE::strnew (value);
00112 }
00113 
00114 ACEXML_INLINE void
00115 ACEXML_Attribute::setAttribute (const ACEXML_Char *uri,
00116                                 const ACEXML_Char *localName,
00117                                 const ACEXML_Char *qName,
00118                                 const ACEXML_Char *type,
00119                                 const ACEXML_Char *value)
00120 {
00121   this->uri (uri);
00122   this->qName (qName);
00123   this->localName (localName);
00124   this->type (type);
00125   this->value (value);
00126 }
00127 
00128 ACEXML_INLINE ACEXML_Attribute &
00129 ACEXML_Attribute::operator= (const ACEXML_Attribute &rhs)
00130 {
00131   if (this != &rhs)             // Check for self assignment
00132     {
00133       this->uri (rhs.uri ());
00134       this->qName (rhs.qName ());
00135       this->localName (rhs.localName ());
00136       this->type (rhs.type ());
00137       this->value (rhs.value ());
00138     }
00139   return *this;
00140 }
00141 
00142 ACEXML_INLINE int
00143 ACEXML_Attribute::operator!= (const ACEXML_Attribute &rhs) const
00144 {
00145   return (ACE_OS::strcmp (this->uri_, rhs.uri ()) == 0 &&
00146           ACE_OS::strcmp (this->localName_, rhs.localName ()) == 0 &&
00147           ACE_OS::strcmp (this->qName_, rhs .qName ()) == 0 &&
00148           ACE_OS::strcmp (this->type_, rhs.type ()) == 0 &&
00149           ACE_OS::strcmp (this->value_, rhs.value ()) == 0 ? 0 : 1);
00150 
00151 }

Generated on Mon Jun 16 13:23:19 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002