OW_NAMESPACE::CIMUrl Class Reference

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

#include <OW_CIMUrl.hpp>

Inheritance diagram for OW_NAMESPACE::CIMUrl:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::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)
OW_COMMON_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 OW_CIMUrl.hpp.


Member Typedef Documentation

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

Definition at line 113 of file OW_CIMUrl.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::CIMUrl::CIMUrl  ) 
 

Create a new CIMUrl object.

Definition at line 78 of file OW_CIMUrl.cpp.

References setDefaultValues().

OW_NAMESPACE::CIMUrl::CIMUrl CIMNULL_t   )  [explicit]
 

Create a NULL CIMUrl object.

Definition at line 85 of file OW_CIMUrl.cpp.

OW_NAMESPACE::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 OW_CIMUrl.cpp.

References m_pdata, and setComponents().

OW_NAMESPACE::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 OW_CIMUrl.cpp.

References m_pdata, and setDefaultValues().

OW_NAMESPACE::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 OW_CIMUrl.cpp.

OW_NAMESPACE::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 OW_CIMUrl.cpp.

References context, m_pdata, and setComponents().

OW_NAMESPACE::CIMUrl::~CIMUrl  ) 
 

Destroy this CIMUrl object.

Definition at line 137 of file OW_CIMUrl.cpp.


Member Function Documentation

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

Definition at line 328 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by setHost(), and setProtocol().

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

Definition at line 313 of file OW_CIMUrl.cpp.

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

bool OW_NAMESPACE::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 OW_CIMUrl.cpp.

References m_pdata.

String OW_NAMESPACE::CIMUrl::getFile  )  const
 

Returns:
The file component of the URL

Definition at line 167 of file OW_CIMUrl.cpp.

References m_pdata.

String OW_NAMESPACE::CIMUrl::getHost  )  const
 

Returns:
The host component of the URL

Definition at line 161 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by OW_NAMESPACE::objectPathAsKeyString().

Int32 OW_NAMESPACE::CIMUrl::getPort  )  const
 

Returns:
The port component of the URL

Definition at line 164 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by OW_NAMESPACE::objectPathAsKeyString().

String OW_NAMESPACE::CIMUrl::getProtocol  )  const
 

Returns:
The protocol component of the URL

Definition at line 158 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by OW_NAMESPACE::objectPathAsKeyString().

String OW_NAMESPACE::CIMUrl::getRef  )  const
 

Returns:
The reference data portion of the URL

Definition at line 170 of file OW_CIMUrl.cpp.

References m_pdata.

String OW_NAMESPACE::CIMUrl::getSpec  )  const
 

Returns:
The String representation of the entire URL

Definition at line 155 of file OW_CIMUrl.cpp.

References m_pdata.

bool OW_NAMESPACE::CIMUrl::isLocal  )  const
 

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

Definition at line 173 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by OW_NAMESPACE::objectPathAsKeyString(), and OW_NAMESPACE::CIMObjectPath::toString().

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

Definition at line 114 of file OW_CIMUrl.hpp.

References m_pdata.

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

Definition at line 116 of file OW_CIMUrl.hpp.

bool OW_NAMESPACE::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 OW_CIMUrl.hpp.

CIMUrl & OW_NAMESPACE::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 OW_CIMUrl.cpp.

References m_pdata.

bool OW_NAMESPACE::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 OW_CIMUrl.hpp.

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

Read this object from an input stream.

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

Implements OW_NAMESPACE::SerializableIFC.

bool OW_NAMESPACE::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 OW_CIMUrl.cpp.

References m_pdata.

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

Definition at line 257 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by CIMUrl().

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

Definition at line 195 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by CIMUrl().

CIMUrl & OW_NAMESPACE::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 OW_CIMUrl.cpp.

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

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

Definition at line 180 of file OW_CIMUrl.cpp.

References m_pdata.

Referenced by setHost().

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

Set this to a null object.

Implements OW_NAMESPACE::CIMBase.

Definition at line 149 of file OW_CIMUrl.cpp.

References m_pdata.

CIMUrl & OW_NAMESPACE::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 OW_CIMUrl.cpp.

References buildSpec(), and m_pdata.

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

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

Implements OW_NAMESPACE::CIMBase.

Definition at line 377 of file OW_CIMUrl.cpp.

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

Returns:
The string representation of this CIMUrl object.

Implements OW_NAMESPACE::CIMBase.

Definition at line 176 of file OW_CIMUrl.cpp.

References m_pdata.

virtual void OW_NAMESPACE::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 OW_NAMESPACE::SerializableIFC.


Friends And Related Function Documentation

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

Definition at line 379 of file OW_CIMUrl.cpp.

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

Definition at line 72 of file OW_CIMUrl.cpp.


Member Data Documentation

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

Definition at line 216 of file OW_CIMUrl.hpp.

Referenced by buildSpec(), checkRef(), CIMUrl(), equals(), getFile(), getHost(), getPort(), getProtocol(), getRef(), getSpec(), isLocal(), operator safe_bool(), OW_NAMESPACE::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:12:42 2006 for openwbem by  doxygen 1.4.6