AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.3.2
AMPS::Field Class Reference

Field represents the value of a single field in a Message. More...

#include <Field.hpp>

Inherited by AMPS::BookmarkRange.

Public Member Functions

bool empty () const
 Returns 'true' if empty, 'false' otherwise.
 
 operator std::string () const
 Conversion operator to std::string. More...
 
bool operator== (const Field &rhs_) const
 Comparison operator Returns `true' if self and rhs are equivalent, `false' otherwise. More...
 
bool operator== (const char *rhs_) const
 String comparison operator Returns `true' if self and rhs are equivalent, `false' otherwise. More...
 
bool operator!= (const Field &rhs_) const
 Comparison operator Returns true if self and rhs are not equivalent. More...
 
bool operator!= (const char *rhs_) const
 String comparison operator Returns true if self and rhs are not equivalent. More...
 
bool operator!= (const std::string &rhs_) const
 String comparison operator Returns `true' if self and rhs are not equivalent. More...
 
bool operator== (const std::string &rhs_) const
 String comparison operator Returns `true' if self and rhs are equivalent. More...
 
void deepCopy (const Field &orig_)
 Makes self a deep copy of the original field. More...
 
Field deepCopy () const
 Makes a deep copy of self, returns it.
 
void clear ()
 Deletes the data associated with this Field, should only be used on Fields that were created as deepCopy of other Fields. More...
 
const char * data () const
 Returns the (non-null-terminated) data underlying this field.
 
size_t len () const
 Returns the length of the data underlying this field.
 

Detailed Description

Field represents the value of a single field in a Message.

Field has limited string functionality, but doesn't require a copy of the data to be made until you want to copy it out to your own std::string.

Member Function Documentation

void AMPS::Field::clear ( void  )
inline

Deletes the data associated with this Field, should only be used on Fields that were created as deepCopy of other Fields.

void AMPS::Field::deepCopy ( const Field orig_)
inline

Makes self a deep copy of the original field.

Parameters
orig_Field to copy
AMPS::Field::operator std::string ( ) const
inline

Conversion operator to std::string.

Makes a copy of the data in self.

bool AMPS::Field::operator!= ( const Field rhs_) const
inline

Comparison operator Returns true if self and rhs are not equivalent.

Parameters
rhs_Field to compare against.
bool AMPS::Field::operator!= ( const char *  rhs_) const
inline

String comparison operator Returns true if self and rhs are not equivalent.

Parameters
rhs_Null-terminated string to compare against.
bool AMPS::Field::operator!= ( const std::string &  rhs_) const
inline

String comparison operator Returns `true' if self and rhs are not equivalent.

Parameters
rhs_std::string to compare against.
bool AMPS::Field::operator== ( const Field rhs_) const
inline

Comparison operator Returns `true' if self and rhs are equivalent, `false' otherwise.

Parameters
rhs_Field to compare against.
bool AMPS::Field::operator== ( const char *  rhs_) const
inline

String comparison operator Returns `true' if self and rhs are equivalent, `false' otherwise.

Parameters
rhs_Null-terminated string to compare against.
bool AMPS::Field::operator== ( const std::string &  rhs_) const
inline

String comparison operator Returns `true' if self and rhs are equivalent.

Parameters
rhs_std::string to compare against.

The documentation for this class was generated from the following files: