00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _OASYS_TCL_LIST_SERIALIZE_H_
00018 #define _OASYS_TCL_LIST_SERIALIZE_H_
00019
00020 #include <tcl.h>
00021 #include "Serialize.h"
00022
00023 namespace oasys {
00024
00032 class TclListSerialize : public SerializeAction {
00033 public:
00037 enum {
00038 KEEP_SINGLETON_SUBLISTS = 1,
00039 };
00040
00044 TclListSerialize(Tcl_Interp* interp, Tcl_Obj* list_obj,
00045 context_t context, int options);
00046
00050 ~TclListSerialize();
00051
00055 int action(const SerializableObject* const_object)
00056 {
00057 SerializableObject* object = (SerializableObject*)const_object;
00058 return SerializeAction::action(object);
00059 }
00060
00063 void process(const char* name, u_int64_t* i);
00064 void process(const char* name, u_int32_t* i);
00065 void process(const char* name, u_int16_t* i);
00066 void process(const char* name, u_int8_t* i);
00067 void process(const char* name, bool* b);
00068 void process(const char* name, u_char* bp, u_int32_t len);
00069 void process(const char* name, u_char** bp, u_int32_t* lenp, int flags);
00070 void process(const char* name, std::string* s);
00071 void process(const char* name, SerializableObject* object);
00073
00074 private:
00075 Tcl_Interp* interp_;
00076 Tcl_Obj* list_obj_;
00077 };
00078
00079 }
00080
00081 #endif