* Please send any updates to: fred@gruntose.com *
\*****************************************************************************/
-#include <mathematics/chaos.h>
-#include <structures/string_array.h>
#include <cromp/cromp_transaction.h>
#include <geometric/screen_rectangle.h>
+#include <mathematics/chaos.h>
#include <octopus/infoton.h>
#include <octopus/tentacle_helper.h>
+#include <structures/string_array.h>
using namespace geometric;
-class bubble : public infoton
+class bubble : public octopi::infoton
{
public:
bubble(int data_segment_size = 0, const screen_rectangle &boundaries
: infoton(bubble_classing()), _data()
{ reset(data_segment_size, boundaries, color); }
- const string_array &bubble_classing() {
- static astring bubbs[2] = { "bubble", "rubble" };
- static string_array barray(2, bubbs);
+ const structures::string_array &bubble_classing() {
+ static basis::astring bubbs[2] = { "bubble", "rubble" };
+ static structures::string_array barray(2, bubbs);
return barray;
}
int data_length() const { return _data.length(); }
- clonable *clone() const { return cloner<bubble>(*this); }
+ clonable *clone() const { return octopi::cloner<bubble>(*this); }
- byte_array &data() { return _data; }
+ basis::byte_array &data() { return _data; }
int non_data_overhead() const { return packed_size() - _data.length(); }
- virtual void pack(byte_array &packed_form) const {
+ virtual void text_form(basis::base_string &to_show) const {
+ to_show.assign(basis::a_sprintf("classing=%s, seg size=%d, color=%d, bounds=%s",
+ bubble_classing().text_form().s(), _data.length(), _bounds.text_form().s(), _color));
+ }
+
+ virtual void pack(basis::byte_array &packed_form) const {
structures::attach(packed_form, _color);
_bounds.pack(packed_form);
structures::attach(packed_form, _data);
+ 4 * sizeof(int); // packed screen rectangle.
}
- virtual bool unpack(byte_array &packed_form) {
+ virtual bool unpack(basis::byte_array &packed_form) {
if (!structures::detach(packed_form, _color)) return false;
if (!_bounds.unpack(packed_form)) return false;
if (!structures::detach(packed_form, _data)) return false;
private:
screen_rectangle _bounds;
int _color;
- byte_array _data;
+ basis::byte_array _data;
};
//////////////
-class bubbles_tentacle : public tentacle_helper<bubble>
+class bubbles_tentacle : public octopi::tentacle_helper<bubble>
{
public:
bubbles_tentacle(bool backgrounded)
- : tentacle_helper<bubble>(bubble().classifier(), backgrounded)
+ : octopi::tentacle_helper<bubble>(bubble().classifier(), backgrounded)
{}
};
#include <mathematics/chaos.h>
#include <basis/astring.h>
-#include <structures/set.h>
+#include <application/application_shell.h>
+#include <application/command_line.h>
+#include <application/hoople_main.h>
#include <cromp/cromp_client.h>
#include <processes/ethread.h>
#include <processes/thread_cabinet.h>
#include <octopus/entity_data_bin.h>
#include <octopus/entity_defs.h>
#include <octopus/infoton.h>
-#include <application/application_shell.h>
-#include <application/command_line.h>
#include <loggers/console_logger.h>
#include <loggers/file_logger.h>
+#include <loggers/program_wide_logger.h>
#include <filesystem/filename.h>
#include <processes/rendezvous.h>
-#include <structures/static_memory_gremlin.h>
#include <sockets/internet_address.h>
+#include <structures/static_memory_gremlin.h>
+#include <structures/set.h>
+#include <unit_test/unit_base.h>
#include <stdlib.h>
+using namespace application;
+using namespace basis;
+using namespace configuration;
+using namespace cromp;
+//using namespace mathematics;
+using namespace filesystem;
+using namespace loggers;
+using namespace octopi;
+using namespace processes;
+using namespace sockets;
+using namespace structures;
+using namespace textual;
+using namespace timely;
+using namespace unit_test;
+
#undef LOG
#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
#define BASE_LOG(s) EMERGENCY_LOG(program_wide_logger::get(), s)
-class cromp_client_tester : public application_shell
+class cromp_client_tester : virtual public unit_base, virtual public application_shell
{
public:
cromp_client_tester();