OWBI1::CIMUrl Class Reference

The CIMUrl is an abstract data type that represents a Uniform resource locator. More...

#include <OWBI1_CIMUrl.hpp>

Inheritance diagram for OWBI1::CIMUrl:

Inheritance graph
[legend]
Collaboration diagram for OWBI1::CIMUrl:

Collaboration graph
[legend]
List of all members.

Public Types

typedef COWIntrusiveReference<
URLData > CIMUrl::* 
safe_bool

Public Member Functions

 CIMUrl ()
 Create a new CIMUrl object.
 CIMUrl (CIMNULL_t)
 Create a NULL CIMUrl object.
 CIMUrl (const String &spec)
 Create a new CIMUrl object from a URL string (i.e.
 CIMUrl (const String &protocol, const String &host, const String &file, Int32 port=0)
 Create a new CIMUrl object.
 CIMUrl (const CIMUrl &arg)
 Copy constructor.
 CIMUrl (const CIMUrl &context, const String &spec)
 Create a new CIMUrl object.
 ~CIMUrl ()
 Destroy this CIMUrl object.
virtual void setNull ()
 Set this to a null object.
CIMUrloperator= (const CIMUrl &arg)
 Assignment operator.
 operator safe_bool () const
bool operator! () const
bool equals (const CIMUrl &arg) const
 Check this CIMUrl object against another for equality.
bool operator== (const CIMUrl &arg) const
 Equality operator.
bool operator!= (const CIMUrl &arg) const
 Inequality operator.
String getSpec () const
String getProtocol () const
CIMUrlsetProtocol (const String &protocol)
 Set the protocol component of the url.
String getHost () const
CIMUrlsetHost (const String &host)
 Set the host component of the URL.
Int32 getPort () const
String getFile () const
String getRef () const
bool sameFile (const CIMUrl &arg) const
 Determine if the file component of this URL is the same as the file component on another URL.
bool isLocal () const
virtual void readObject (std::istream &istrm)
 Read this object from an input stream.
virtual void writeObject (std::ostream &ostrm) const
 Write this object to an output stream.
virtual String toString () const
virtual String toMOF () const

Private Member Functions

void setLocalHost ()
void setComponents ()
void buildSpec ()
void checkRef ()
void setDefaultValues ()

Private Attributes

COWIntrusiveReference< URLDatam_pdata

Friends

bool operator< (const CIMUrl::URLData &x, const CIMUrl::URLData &y)
OWBI1_OWBI1PROVIFC_API bool operator< (const CIMUrl &lhs, const CIMUrl &rhs)

Classes

struct  URLData

Detailed Description

The CIMUrl is an abstract data type that represents a Uniform resource locator.

CIMUrl objects are ref counted and copy on write.

Definition at line 52 of file OWBI1_CIMUrl.hpp.


Member Typedef Documentation

typedef COWIntrusiveReference<URLData> CIMUrl::* OWBI1::CIMUrl::safe_bool
 

Definition at line 113 of file OWBI1_CIMUrl.hpp.


Constructor & Destructor Documentation

OWBI1::CIMUrl::CIMUrl  ) 
 

Create a new CIMUrl object.

Definition at line 78 of file OWBI1_CIMUrl.cpp.

References setDefaultValues().

OWBI1::CIMUrl::CIMUrl CIMNULL_t   )  [explicit]
 

Create a NULL CIMUrl object.

Definition at line 85 of file OWBI1_CIMUrl.cpp.

OWBI1::CIMUrl::CIMUrl const String spec  )  [explicit]
 

Create a new CIMUrl object from a URL string (i.e.

http://localhost:5988/cimom)

Parameters:
spec The string that contains the URL

Definition at line 91 of file OWBI1_CIMUrl.cpp.

References m_pdata, and setComponents().

OWBI1::CIMUrl::CIMUrl const String protocol,
const String host,
const String file,
Int32  port = 0
 

Create a new CIMUrl object.

Parameters:
protocol The protocol component of the url (i.e. http, https)
host The host component of the URL (i.e. calder.com)
file The file component of the URL
port The port component of the URL

Definition at line 99 of file OWBI1_CIMUrl.cpp.

References m_pdata, and setDefaultValues().

OWBI1::CIMUrl::CIMUrl const CIMUrl arg  ) 
 

Copy constructor.

Parameters:
arg The CIMUrl object to make this object a copy of.

Definition at line 132 of file OWBI1_CIMUrl.cpp.

OWBI1::CIMUrl::CIMUrl const CIMUrl context,
const String spec
 

Create a new CIMUrl object.

Creates an CIMUrl by parsing the specification spec within a specified context. If the context argument is not null and the spec argument is a partial URL specification, then any of the strings missing components are inherited from the context argument.

Parameters:
context The CIMUrl that will provide the missing components
spec The String representation of the URL

Definition at line 111 of file OWBI1_CIMUrl.cpp.

References context, m_pdata, and setComponents().

OWBI1::CIMUrl::~CIMUrl  ) 
 

Destroy this CIMUrl object.

Definition at line 137 of file OWBI1_CIMUrl.cpp.


Member Function Documentation

void OWBI1::CIMUrl::buildSpec  )  [private]
 

Definition at line 328 of file OWBI1_CIMUrl.cpp.

References m_pdata.

Referenced by setHost(), and setProtocol().

void OWBI1::CIMUrl::checkRef  )  [private]
 

Definition at line 313 of file OWBI1_CIMUrl.cpp.

References m_pdata, and OWBI1::String::npos.

bool OWBI1::CIMUrl::equals const CIMUrl arg  )  const
 

Check this CIMUrl object against another for equality.

Parameters:
arg The CIMUrl object to check for equality against.
Returns:
true If arg is equal to this CIMUrl object. Otherwise false.

Definition at line 236 of file OWBI1_CIMUrl.cpp.

References m_pdata.

String OWBI1::CIMUrl::getFile  )  const
 

Returns:
The file component of the URL

Definition at line 167 of file OWBI1_CIMUrl.cpp.

References m_pdata.

String OWBI1::CIMUrl::getHost  )  const
 

Returns:
The host component of the URL

Definition at line 161 of file OWBI1_CIMUrl.cpp.

References m_pdata.

Int32 OWBI1::CIMUrl::getPort  )  const
 

Returns:
The port component of the URL

Definition at line 164 of file OWBI1_CIMUrl.cpp.

References m_pdata.

String OWBI1::CIMUrl::getProtocol  )  const
 

Returns:
The protocol component of the URL

Definition at line 158 of file OWBI1_CIMUrl.cpp.

References m_pdata.

String OWBI1::CIMUrl::getRef  )  const
 

Returns:
The reference data portion of the URL

Definition at line 170 of file OWBI1_CIMUrl.cpp.

References m_pdata.

String OWBI1::CIMUrl::getSpec  )  const
 

Returns:
The String representation of the entire URL

Definition at line 155 of file OWBI1_CIMUrl.cpp.

References m_pdata.

bool OWBI1::CIMUrl::isLocal  )  const
 

Returns:
true if this URL reference a resource on the local machine.

Definition at line 173 of file OWBI1_CIMUrl.cpp.

References m_pdata.

Referenced by OWBI1::CIMObjectPath::toString().

OWBI1::CIMUrl::operator safe_bool  )  const [inline]
 

Definition at line 114 of file OWBI1_CIMUrl.hpp.

References m_pdata.

bool OWBI1::CIMUrl::operator!  )  const [inline]
 

Definition at line 116 of file OWBI1_CIMUrl.hpp.

bool OWBI1::CIMUrl::operator!= const CIMUrl arg  )  const [inline]
 

Inequality operator.

Parameters:
arg The CIMUrl object to check for inequality against.
Returns:
true If arg is non equal to this CIMUrl object. Otherwise false.

Definition at line 137 of file OWBI1_CIMUrl.hpp.

CIMUrl & OWBI1::CIMUrl::operator= const CIMUrl arg  ) 
 

Assignment operator.

Parameters:
arg The CIMUrl object to assign to this one.
Returns:
A reference to this CIMUrl object.

Definition at line 142 of file OWBI1_CIMUrl.cpp.

References m_pdata.

bool OWBI1::CIMUrl::operator== const CIMUrl arg  )  const [inline]
 

Equality operator.

Parameters:
arg The CIMUrl object to check for equality against.
Returns:
true If arg is equal to this CIMUrl object. Otherwise false.

Definition at line 129 of file OWBI1_CIMUrl.hpp.

virtual void OWBI1::CIMUrl::readObject std::istream &  istrm  )  [virtual]
 

Read this object from an input stream.

Parameters:
istrm The input stream to read this object from.

Implements OWBI1::SerializableIFC.

bool OWBI1::CIMUrl::sameFile const CIMUrl arg  )  const
 

Determine if the file component of this URL is the same as the file component on another URL.

Parameters:
arg The CIMUrl object to compare the file component of.
Returns:
true if this file component are the same. Otherwise false.

Definition at line 247 of file OWBI1_CIMUrl.cpp.

References m_pdata.

void OWBI1::CIMUrl::setComponents  )  [private]
 

Definition at line 257 of file OWBI1_CIMUrl.cpp.

References m_pdata.

Referenced by CIMUrl().

void OWBI1::CIMUrl::setDefaultValues  )  [private]
 

Definition at line 195 of file OWBI1_CIMUrl.cpp.

References m_pdata.

Referenced by CIMUrl().

CIMUrl & OWBI1::CIMUrl::setHost const String host  ) 
 

Set the host component of the URL.

Parameters:
host The new host component for this CIMUrl object.
Returns:
a reference to *this

Definition at line 218 of file OWBI1_CIMUrl.cpp.

References buildSpec(), m_pdata, and setLocalHost().

void OWBI1::CIMUrl::setLocalHost  )  [private]
 

Definition at line 180 of file OWBI1_CIMUrl.cpp.

References m_pdata.

Referenced by setHost().

void OWBI1::CIMUrl::setNull  )  [virtual]
 

Set this to a null object.

Implements OWBI1::CIMBase.

Definition at line 149 of file OWBI1_CIMUrl.cpp.

References m_pdata.

CIMUrl & OWBI1::CIMUrl::setProtocol const String protocol  ) 
 

Set the protocol component of the url.

Parameters:
protocol The new protocol component for the url
Returns:
a reference to *this

Definition at line 227 of file OWBI1_CIMUrl.cpp.

References buildSpec(), and m_pdata.

String OWBI1::CIMUrl::toMOF  )  const [virtual]
 

Returns:
The MOF representation of this CIMUrl object as an String.

Implements OWBI1::CIMBase.

Definition at line 377 of file OWBI1_CIMUrl.cpp.

String OWBI1::CIMUrl::toString  )  const [virtual]
 

Returns:
The string representation of this CIMUrl object.

Implements OWBI1::CIMBase.

Definition at line 176 of file OWBI1_CIMUrl.cpp.

References m_pdata.

virtual void OWBI1::CIMUrl::writeObject std::ostream &  ostrm  )  const [virtual]
 

Write this object to an output stream.

Parameters:
ostrm The output stream to write this object to.

Implements OWBI1::SerializableIFC.


Friends And Related Function Documentation

OWBI1_OWBI1PROVIFC_API bool operator< const CIMUrl lhs,
const CIMUrl rhs
[friend]
 

Definition at line 379 of file OWBI1_CIMUrl.cpp.

bool operator< const CIMUrl::URLData x,
const CIMUrl::URLData y
[friend]
 

Definition at line 72 of file OWBI1_CIMUrl.cpp.


Member Data Documentation

COWIntrusiveReference<URLData> OWBI1::CIMUrl::m_pdata [private]
 

Definition at line 216 of file OWBI1_CIMUrl.hpp.

Referenced by buildSpec(), checkRef(), CIMUrl(), equals(), getFile(), getHost(), getPort(), getProtocol(), getRef(), getSpec(), isLocal(), operator safe_bool(), OWBI1::operator<(), operator=(), sameFile(), setComponents(), setDefaultValues(), setHost(), setLocalHost(), setNull(), setProtocol(), and toString().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:18:18 2006 for openwbem by  doxygen 1.4.6