]> feistymeow.org Git - feisty_meow.git/commitdiff
closer to goodness
authorFred T. Hamster <fred@feistymeow.org>
Sat, 14 Feb 2026 10:29:08 +0000 (05:29 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Sat, 14 Feb 2026 10:29:08 +0000 (05:29 -0500)
having a weird issue with a const method call from another const method.  urgh.

octopi/library/tests_cromp/crompish_pax.h
octopi/library/tests_cromp/test_cromp_client.cpp

index 6072a491f7eac914c42b715d1d421659615b942b..869211a12d5e7afd2d1adba6c1b1005c16fdfa45 100644 (file)
 * 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
@@ -39,9 +39,9 @@ public:
   : 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;
   }
 
@@ -54,13 +54,18 @@ public:
 
   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);
@@ -72,7 +77,7 @@ public:
         + 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;
@@ -82,16 +87,16 @@ public:
 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)
   {}
 };
 
index 5aa36c9f7cd2b444ee0a88c47d565ec40c69b45a..e7ced1ee9cf3a8ea51b5c7a58ec0f69edd0115c2 100644 (file)
@@ -17,7 +17,9 @@
 #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)
 
@@ -107,7 +125,7 @@ const int CHANCE_OF_RECONSTRUCT = 14;
 #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();