1 #ifndef CROMPISH_PAX_GROUP
2 #define CROMPISH_PAX_GROUP
42 {
reset(data_segment_size, boundaries, color); }
54 _data.
reset(data_segment_size);
59 virtual clonable *
clone()
const {
return octopi::cloner<bubble>(*
this); }
73 #ifdef CHECK_CROMPISH_PACKED_SIZE
74 int prior_len = packed_form.
length();
77 _bounds.
pack(packed_form);
79 #ifdef CHECK_CROMPISH_PACKED_SIZE
81 int new_len = packed_form.
length();
82 if (prior_len + predicted_size != new_len) {
89 return _data.
length() + 2 *
sizeof(int)
97 if (!_bounds.
unpack(packed_form))
return false;
a_sprintf is a specialization of astring that provides printf style support.
void reset(int number=0, const contents *initial_contents=NULL_POINTER)
Resizes this array and sets the contents from an array of contents.
int length() const
Returns the current reported length of the allocated C array.
Provides a dynamically resizable ASCII character string.
const char * s() const
synonym for observe. the 's' stands for "string", if that helps.
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.
virtual const char * class_name() const =0
Returns the bare name of this class as a constant character pointer.
bubble(int data_segment_size=0, const structures::string_array &boundaries=structures::string_array(), int color=0)
const structures::string_array & bubble_classing() const
virtual bool unpack(basis::byte_array &packed_form)
restores an infoton from a packed form.
basis::byte_array & data()
virtual void text_form(basis::base_string &to_show) const
requires derived infotons to be able to show their state as a string.
int packed_size() const
reports how large the infoton will be when packed.
virtual clonable * clone() const
must be provided to allow creation of a copy of this object.
void reset(int data_segment_size, const structures::string_array &boundaries, int color)
int non_data_overhead() const
virtual void pack(basis::byte_array &packed_form) const
stuffs the data in the infoton into the "packed_form".
bubbles_tentacle(bool backgrounded)
An infoton is an individual request parcel with accompanying information.
infoton(const structures::string_array &classifier)
creates an infoton with the "classifier".
provides prefab implementations for parts of the tentacle object.
tentacle_helper(const structures::string_array &classifier, bool backgrounded, int motivational_rate=tentacle::DEFAULT_RATE)
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.
basis::astring text_form() const
A synonym for the text_format() method.
#define deadly_error(c, f, i)
#define FUNCDEF(func_in)
FUNCDEF sets the name of a function (and plugs it into the callstack).
void attach(byte_array &packed_form, const byte_array &to_attach)
Packs a byte_array "to_attach" into "packed_form".
bool detach(byte_array &packed_form, byte_array &to_detach)
Unpacks a byte_array "to_detach" from "packed_form".
Automates some common tasks for tentacle implementations. This template provides some default impleme...