17 using namespace basis;
25 _original_id(original_id),
26 _original_classifier(original_classifier),
63 if (!
detach(packed_form, val))
return false;
a_sprintf is a specialization of astring that provides printf style support.
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.
Outcomes describe the state of completion for an operation.
int packed_size() const
a convenience function for those packing outcomes.
An infoton is an individual request parcel with accompanying information.
virtual basis::astring text_form() const
local version just makes text_form() more functional.
Identifies requests made on an octopus by users.
int packed_size() const
reports how large the packed id will be.
virtual void pack(basis::byte_array &packed_form) const
Creates a packed form of the packable object in "packed_form".
basis::astring text_form() const
human readable form of the request.
virtual bool unpack(basis::byte_array &packed_form)
Restores the packable from the "packed_form".
unhandled_request(const octopus_request_id &id=octopus_request_id(), const structures::string_array &original_classifier=structures::string_array(), const basis::outcome &reason=basis::common::NO_HANDLER)
virtual int packed_size() const
reports how large the infoton will be when packed.
octopus_request_id _original_id
the failed request's identifier.
virtual clonable * clone() const
must be provided to allow creation of a copy of this object.
static structures::string_array the_classifier()
the classifier for unknown infotons makes unhandled requests unique.
virtual void pack(basis::byte_array &packed_form) const
stuffs the data in the infoton into the "packed_form".
virtual bool unpack(basis::byte_array &packed_form)
restores an infoton from a packed form.
basis::outcome _reason
the reason why this request was provided.
structures::string_array _original_classifier
the original name of the request.
An array of strings with some additional helpful methods.
virtual void pack(basis::byte_array &packed_form) const
Packs this string array into the "packed_form" byte array.
virtual bool unpack(basis::byte_array &packed_form)
Unpacks a string array from the "packed_form" byte array.
virtual int packed_size() const
Returns the number of bytes this string array would consume if packed.
#define NULL_POINTER
The value representing a pointer to nothing.
The guards collection helps in testing preconditions and reporting errors.
void attach(byte_array &packed_form, const char *to_attach)
Packs a character string "to_attach" into "packed_form".
bool detach(byte_array &packed_form, astring &to_detach)
Unpacks a character string "to_attach" from "packed_form".
A dynamic container class that holds any kind of object via pointers.
string_array(1, math_list))) const char *addr_list[]