Scopira 20080306

Object I/O

Serializable objects are able to convert themselves to/from a series of primitive types. Programmers may then utilize the flexibility of the flow architecture to then store objects in various places, such as ASCII text files, binary files, in memory, or even over a network connection. By stacking and connecting filtering flows to an end flow, the possibilities are limitless. For an object to be serializable it must:

An example of scopira::core::register_flow:

  #include <scopira/core/register.h>

  class yournamespace::yourclass : public virtual scopira::tool::object
  {
    public:
      virtual bool load(scopira::tool::iobjflow_i& in) {
        // load self from in
      }
      virtual void save(scopira::tool::oobjflow_i& out) const {
        // write self to out
      }
  };

  // place one of these in the .cpp file of your class
  static scopira::core::register_flow<yournamespace::yourclass> r1("yournamespace::yourclass");