ACEXML_Attribute Class Reference

ACEXML_Attribute defines the data structure of an attribute. More...

#include <ACEXML/common/AttributesImpl.h>

List of all members.

Public Member Functions

 ACEXML_Attribute (void)
 Default constructor.

 ACEXML_Attribute (const ACEXML_Attribute &attr)
 Copy constructor.

 ACEXML_Attribute (const ACEXML_Char *uri, const ACEXML_Char *localName, const ACEXML_Char *qName, const ACEXML_Char *type, const ACEXML_Char *value)
 Initialize all constructor.

 ~ACEXML_Attribute (void)
 Destructor.

void setAttribute (const ACEXML_Char *uri, const ACEXML_Char *localName, const ACEXML_Char *qName, const ACEXML_Char *type, const ACEXML_Char *value)
 Set all members.

const ACEXML_Charuri (void) const
 Get uri_.

void uri (const ACEXML_Char *uri)
 Set uri_.

const ACEXML_CharlocalName (void) const
 Get localName_.

void localName (const ACEXML_Char *localName)
 Set localName_.

const ACEXML_CharqName (void) const
 Get qName_.

void qName (const ACEXML_Char *qName)
 Set qName_.

const ACEXML_Chartype (void) const
 Get type_.

void type (const ACEXML_Char *type)
 Set type_.

const ACEXML_Charvalue (void) const
 Get value_.

void value (const ACEXML_Char *value)
 Set value_.

ACEXML_Attributeoperator= (const ACEXML_Attribute &rhs)
 Assignment operator.

bool operator!= (const ACEXML_Attribute &rhs) const
 Comparison operator.


Private Attributes

ACEXML_Charuri_
 Namespace URI of an attribute.

ACEXML_CharlocalName_
ACEXML_CharqName_
ACEXML_Chartype_
ACEXML_Charvalue_

Friends

class ACEXML_AttributesImpl


Detailed Description

ACEXML_Attribute defines the data structure of an attribute.

See also:
ACEXML_AttributesImpl

Definition at line 40 of file AttributesImpl.h.


Constructor & Destructor Documentation

ACEXML_INLINE ACEXML_Attribute::ACEXML_Attribute void   ) 
 

Default constructor.

Definition at line 9 of file AttributesImpl.i.

00010   : uri_ (0),
00011     localName_ (0),
00012     qName_ (0),
00013     type_ (0),
00014     value_ (0)
00015 {
00016 }

ACEXML_INLINE ACEXML_Attribute::ACEXML_Attribute const ACEXML_Attribute attr  ) 
 

Copy constructor.

Definition at line 19 of file AttributesImpl.i.

00020   : uri_ (ACE::strnew (attr.uri_)),
00021     localName_ (ACE::strnew (attr.localName_)),
00022     qName_ (ACE::strnew (attr.qName_)),
00023     type_ (ACE::strnew (attr.type_)),
00024     value_ (ACE::strnew (attr.value_))
00025 {
00026 }

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
 

Initialize all constructor.

Definition at line 29 of file AttributesImpl.i.

References ACEXML_Char.

00034   : uri_ (ACE::strnew (uri)),
00035     localName_ (ACE::strnew (localName)),
00036     qName_ (ACE::strnew (qName)),
00037     type_ (ACE::strnew (type)),
00038     value_ (ACE::strnew (value))
00039 {
00040 }

ACEXML_INLINE ACEXML_Attribute::~ACEXML_Attribute void   ) 
 

Destructor.

Definition at line 43 of file AttributesImpl.i.

References localName_, qName_, and uri_.

00044 {
00045   delete[] this->uri_;
00046   delete[] this->localName_;
00047   delete[] this->qName_;
00048   delete[] this->type_;
00049   delete[] this->value_;
00050 }


Member Function Documentation

ACEXML_INLINE void ACEXML_Attribute::localName const ACEXML_Char localName  ) 
 

Set localName_.

Definition at line 72 of file AttributesImpl.i.

References ACEXML_Char, localName_, and ACE::strnew().

00073 {
00074   delete[] this->localName_;
00075   this->localName_ = ACE::strnew (localName);
00076 }

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::localName void   )  const
 

Get localName_.

Definition at line 66 of file AttributesImpl.i.

References localName_.

Referenced by ACEXML_AttributesImpl::addAttribute(), operator!=(), operator=(), and setAttribute().

00067 {
00068   return this->localName_;
00069 }

ACEXML_INLINE bool ACEXML_Attribute::operator!= const ACEXML_Attribute rhs  )  const
 

Comparison operator.

Definition at line 146 of file AttributesImpl.i.

References localName(), qName(), ACE_OS::strcmp(), type(), uri(), and value().

00147 {
00148   return (ACE_OS::strcmp (this->uri_, rhs.uri ()) == 0 &&
00149           ACE_OS::strcmp (this->localName_, rhs.localName ()) == 0 &&
00150           ACE_OS::strcmp (this->qName_, rhs .qName ()) == 0 &&
00151           ACE_OS::strcmp (this->type_, rhs.type ()) == 0 &&
00152           ACE_OS::strcmp (this->value_, rhs.value ()) == 0 ? false : true);
00153 
00154 }

ACEXML_INLINE ACEXML_Attribute & ACEXML_Attribute::operator= const ACEXML_Attribute rhs  ) 
 

Assignment operator.

Definition at line 132 of file AttributesImpl.i.

References localName(), qName(), type(), uri(), and value().

00133 {
00134   if (this != &rhs)             // Check for self assignment
00135     {
00136       this->uri (rhs.uri ());
00137       this->qName (rhs.qName ());
00138       this->localName (rhs.localName ());
00139       this->type (rhs.type ());
00140       this->value (rhs.value ());
00141     }
00142   return *this;
00143 }

ACEXML_INLINE void ACEXML_Attribute::qName const ACEXML_Char qName  ) 
 

Set qName_.

Definition at line 85 of file AttributesImpl.i.

References ACEXML_Char, qName_, and ACE::strnew().

00086 {
00087   delete[] this->qName_;
00088   this->qName_ = ACE::strnew (qName);
00089 }

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::qName void   )  const
 

Get qName_.

Definition at line 79 of file AttributesImpl.i.

References qName_.

Referenced by ACEXML_AttributesImpl::addAttribute(), operator!=(), operator=(), and setAttribute().

00080 {
00081   return this->qName_;
00082 }

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
 

Set all members.

Definition at line 118 of file AttributesImpl.i.

References ACEXML_Char, localName(), qName(), type(), uri(), and value().

00123 {
00124   this->uri (uri);
00125   this->qName (qName);
00126   this->localName (localName);
00127   this->type (type);
00128   this->value (value);
00129 }

ACEXML_INLINE void ACEXML_Attribute::type const ACEXML_Char type  ) 
 

Set type_.

Definition at line 98 of file AttributesImpl.i.

References ACEXML_Char, and ACE::strnew().

00099 {
00100   delete[] this->type_;
00101   this->type_ = ACE::strnew (type);
00102 }

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::type void   )  const
 

Get type_.

Definition at line 92 of file AttributesImpl.i.

Referenced by operator!=(), operator=(), and setAttribute().

00093 {
00094   return this->type_;
00095 }

ACEXML_INLINE void ACEXML_Attribute::uri const ACEXML_Char uri  ) 
 

Set uri_.

Definition at line 59 of file AttributesImpl.i.

References ACEXML_Char, ACE::strnew(), and uri_.

00060 {
00061   delete[] this->uri_;
00062   this->uri_ = ACE::strnew (uri);
00063 }

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::uri void   )  const
 

Get uri_.

Definition at line 53 of file AttributesImpl.i.

References uri_.

Referenced by ACEXML_AttributesImpl::addAttribute(), operator!=(), operator=(), and setAttribute().

00054 {
00055   return this->uri_;
00056 }

ACEXML_INLINE void ACEXML_Attribute::value const ACEXML_Char value  ) 
 

Set value_.

Definition at line 111 of file AttributesImpl.i.

References ACEXML_Char, and ACE::strnew().

00112 {
00113   delete[] this->value_;
00114   this->value_ = ACE::strnew (value);
00115 }

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::value void   )  const
 

Get value_.

Definition at line 105 of file AttributesImpl.i.

Referenced by operator!=(), operator=(), and setAttribute().

00106 {
00107   return this->value_;
00108 }


Friends And Related Function Documentation

friend class ACEXML_AttributesImpl [friend]
 

Definition at line 43 of file AttributesImpl.h.


Member Data Documentation

ACEXML_Char* ACEXML_Attribute::localName_ [private]
 

Definition at line 108 of file AttributesImpl.h.

Referenced by localName(), and ~ACEXML_Attribute().

ACEXML_Char* ACEXML_Attribute::qName_ [private]
 

Definition at line 109 of file AttributesImpl.h.

Referenced by qName(), and ~ACEXML_Attribute().

ACEXML_Char* ACEXML_Attribute::type_ [private]
 

Definition at line 110 of file AttributesImpl.h.

ACEXML_Char* ACEXML_Attribute::uri_ [private]
 

Namespace URI of an attribute.

Definition at line 106 of file AttributesImpl.h.

Referenced by uri(), and ~ACEXML_Attribute().

ACEXML_Char* ACEXML_Attribute::value_ [private]
 

Definition at line 111 of file AttributesImpl.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:47:42 2006 for ACEXML by doxygen 1.3.6