string_set Class Reference

A simple object that wraps a templated set of strings. More...

#include <set.h>

Inheritance diagram for string_set:

Inheritance graph
[legend]
Collaboration diagram for string_set:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 string_set ()
 Constructs an empty set of strings.
 string_set (const basis::set< istring > &to_copy)
 Constructs a copy of the "to_copy" array.
 string_set (const string_array &to_copy)
 IMPLEMENT_CLASS_NAME ("string_set")
bool operator== (const string_set &compare) const
 operator string_array () const
virtual void pack (byte_array &packed_form) const
 Creates a packed form of the packable object in "packed_form".
virtual bool unpack (byte_array &packed_form)
 Restores the packable from the "packed_form".
virtual int packed_size () const
 Estimates the space needed for the packed structure.

Detailed Description

A simple object that wraps a templated set of strings.

Definition at line 165 of file set.h.


Constructor & Destructor Documentation

string_set::string_set (  )  [inline]

Constructs an empty set of strings.

Definition at line 169 of file set.h.

string_set::string_set ( const basis::set< istring > &  to_copy  )  [inline]

Constructs a copy of the "to_copy" array.

Definition at line 171 of file set.h.

string_set::string_set ( const string_array to_copy  )  [inline]

Definition at line 174 of file set.h.

References basis::set< istring >::add(), and array< contents >::length().


Member Function Documentation

string_set::IMPLEMENT_CLASS_NAME ( "string_set"   ) 

bool string_set::operator== ( const string_set compare  )  const [inline]

Definition at line 181 of file set.h.

References compare(), basis::set< istring >::elements(), and array< istring >::get().

string_set::operator string_array (  )  const [inline]

Definition at line 187 of file set.h.

References array< istring >::get(), and array< istring >::length().

virtual void string_set::pack ( byte_array packed_form  )  const [inline, virtual]

Creates a packed form of the packable object in "packed_form".

This must append to the data in "packed_form" rather than clearing prior contents.

Implements packable.

Definition at line 194 of file set.h.

References basis::pack().

Referenced by manifest_chunk::pack().

virtual bool string_set::unpack ( byte_array packed_form  )  [inline, virtual]

Restores the packable from the "packed_form".

This object becomes the unpacked form, and therefore must lose any of its prior contents that depend on the data in "packed_form". This is up to the derived unpack function to figure out. The "packed_form" is modified by extracting all of the pieces that are used for this object; the remainder stays in "packed_form". true is returned if the unpacking was successful.

Implements packable.

Definition at line 196 of file set.h.

References basis::unpack().

Referenced by manifest_chunk::unpack().

virtual int string_set::packed_size (  )  const [inline, virtual]

Estimates the space needed for the packed structure.

Reimplemented from packable.

Definition at line 198 of file set.h.

References array< istring >::get(), istring::length(), and array< istring >::length().


The documentation for this class was generated from the following file:
Generated on Tue Aug 19 05:12:38 2008 for HOOPLE Libraries by  doxygen 1.5.1