00001
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00032
00033 #ifndef GROOVX_TCL_IO_OBJWRITER_H_UTC20051108233828_DEFINED
00034 #define GROOVX_TCL_IO_OBJWRITER_H_UTC20051108233828_DEFINED
00035
00036 #include "io/writer.h"
00037 #include "tcl/obj.h"
00038
00039 namespace tcl
00040 {
00041 class obj_writer;
00042 }
00043
00044 class tcl::obj_writer : public io::writer
00045 {
00046 public:
00047 obj_writer();
00048
00050 virtual ~obj_writer() throw();
00051
00052 tcl::obj get_obj() const { return m_obj; }
00053
00055 virtual void write_char(const char* name, char val);
00056
00058 virtual void write_int(const char* name, int val);
00059
00061 virtual void write_bool(const char* name, bool val);
00062
00064 virtual void write_double(const char* name, double val);
00065
00067 virtual void write_value_obj(const char* name, const rutz::value& v);
00068
00070 virtual void write_byte_array(const char* name,
00071 const unsigned char* data,
00072 unsigned int length);
00073
00075 virtual void write_object(const char* name,
00076 nub::soft_ref<const io::serializable> obj);
00077
00083 virtual void write_owned_object(const char* name,
00084 nub::ref<const io::serializable> obj);
00085
00091 virtual void write_base_class(const char* base_class_name,
00092 nub::ref<const io::serializable> base_part);
00093
00098 virtual void write_root(const io::serializable* root);
00099
00100 protected:
00102 virtual void write_cstring(const char* name, const char* val);
00103
00104 private:
00105 tcl::obj m_obj;
00106 };
00107
00108 static const char __attribute__((used)) vcid_groovx_tcl_io_objwriter_h_utc20051108233828[] = "$Id: objwriter.h 10065 2007-04-12 05:54:56Z rjpeters $ $HeadURL: file:
00109 #endif // !GROOVX_TCL_IO_OBJWRITER_H_UTC20051108233828DEFINED