23 using namespace basis;
28 identity_infoton::identity_infoton()
29 :
infoton(identity_classifier()),
34 :
infoton(identity_classifier()),
41 _new_name(to_copy._new_name)
55 if (
this == &to_copy)
return *
this;
69 {
return cloner<identity_infoton>(*
this); }
Provides a dynamically resizable ASCII character string.
Defines the base class for all string processing objects in hoople.
virtual base_string & assign(const base_string &s)=0
Sets the contents of this string to "s".
A very common template for a dynamic array of bytes.
A clonable object knows how to make copy of itself.
Encapsulates just the action of identifying an octopus user.
virtual clonable * clone() const
must be provided to allow creation of a copy of this object.
static const structures::string_array & identity_classifier()
returns the classifier for this type of infoton.
identity_infoton & operator=(const identity_infoton &to_copy)
virtual ~identity_infoton()
virtual bool unpack(basis::byte_array &packed_form)
restores an infoton from a packed form.
virtual void pack(basis::byte_array &packed_form) const
stuffs the data in the infoton into the "packed_form".
virtual int packed_size() const
reports how large the infoton will be when packed.
An infoton is an individual request parcel with accompanying information.
virtual basis::astring text_form() const
local version just makes text_form() more functional.
const structures::string_array & classifier() const
this array of strings is the "name" for this infoton.
void set_classifier(const structures::string_array &new_classifier)
sets the infoton's classifier to the "new_classifier".
Provides a way of identifying users of an octopus object.
int packed_size() const
reports how large the packed entity will be.
virtual bool unpack(basis::byte_array &packed_form)
Restores the packable from the "packed_form".
basis::astring text_form() const
returns a readable form of the identifier.
virtual void pack(basis::byte_array &packed_form) const
Creates a packed form of the packable object in "packed_form".
An array of strings with some additional helpful methods.
The guards collection helps in testing preconditions and reporting errors.
SAFE_STATIC_CONST(string_array, identity_infoton::identity_classifier,(1, identity_classifier_strings)) int identity_infoton
const astring identity_classifier_strings[]
A dynamic container class that holds any kind of object via pointers.