Public Member Functions | Private Attributes | Friends

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.inl.

  : uri_ (0),
    localName_ (0),
    qName_ (0),
    type_ (0),
    value_ (0)
{
}

ACEXML_INLINE ACEXML_Attribute::ACEXML_Attribute ( const ACEXML_Attribute attr  ) 

Copy constructor.

Definition at line 19 of file AttributesImpl.inl.

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.inl.

ACEXML_INLINE ACEXML_Attribute::~ACEXML_Attribute ( void   ) 

Destructor.

Definition at line 43 of file AttributesImpl.inl.

{
  delete[] this->uri_;
  delete[] this->localName_;
  delete[] this->qName_;
  delete[] this->type_;
  delete[] this->value_;
}


Member Function Documentation

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::localName ( void   )  const

Get localName_.

Definition at line 66 of file AttributesImpl.inl.

{
  return this->localName_;
}

ACEXML_INLINE void ACEXML_Attribute::localName ( const ACEXML_Char localName  ) 

Set localName_.

Definition at line 72 of file AttributesImpl.inl.

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

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

Comparison operator.

Definition at line 146 of file AttributesImpl.inl.

{
  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);

}

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

Assignment operator.

Definition at line 132 of file AttributesImpl.inl.

{
  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 const ACEXML_Char * ACEXML_Attribute::qName ( void   )  const

Get qName_.

Definition at line 79 of file AttributesImpl.inl.

{
  return this->qName_;
}

ACEXML_INLINE void ACEXML_Attribute::qName ( const ACEXML_Char qName  ) 

Set qName_.

Definition at line 85 of file AttributesImpl.inl.

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

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.inl.

{
  this->uri (uri);
  this->qName (qName);
  this->localName (localName);
  this->type (type);
  this->value (value);
}

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::type ( void   )  const

Get type_.

Definition at line 92 of file AttributesImpl.inl.

{
  return this->type_;
}

ACEXML_INLINE void ACEXML_Attribute::type ( const ACEXML_Char type  ) 

Set type_.

Definition at line 98 of file AttributesImpl.inl.

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

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::uri ( void   )  const

Get uri_.

Definition at line 53 of file AttributesImpl.inl.

{
  return this->uri_;
}

ACEXML_INLINE void ACEXML_Attribute::uri ( const ACEXML_Char uri  ) 

Set uri_.

Definition at line 59 of file AttributesImpl.inl.

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

ACEXML_INLINE void ACEXML_Attribute::value ( const ACEXML_Char value  ) 

Set value_.

Definition at line 111 of file AttributesImpl.inl.

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

ACEXML_INLINE const ACEXML_Char * ACEXML_Attribute::value ( void   )  const

Get value_.

Definition at line 105 of file AttributesImpl.inl.

{
  return this->value_;
}


Friends And Related Function Documentation

friend class ACEXML_AttributesImpl [friend]

Definition at line 43 of file AttributesImpl.h.


Member Data Documentation

Definition at line 108 of file AttributesImpl.h.

Definition at line 109 of file AttributesImpl.h.

Definition at line 110 of file AttributesImpl.h.

Namespace URI of an attribute.

Definition at line 106 of file AttributesImpl.h.

Definition at line 111 of file AttributesImpl.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines