00001 /* 00002 global_content_obj.hpp 00003 00004 Object Definition and Implementation 00005 for global_content. 00006 00007 Copyright (C) 2006 by D.K. McCombs. 00008 W3 Systems Design 00009 00010 */ 00011 #ifndef global_content_HPP 00012 #define global_content_HPP 00013 00014 #include "read_write_base.hpp" 00015 00016 class global_content_Obj: public read_write_base 00017 { 00018 public: 00019 identifier id; 00020 llong site_id; 00021 string name; 00022 string content; 00023 global_content_Obj():read_write_base() 00024 ,id(0LL) 00025 ,site_id(0LL) 00026 ,name("") 00027 ,content("") 00028 { 00029 // set name 00030 data_name("global_content"); 00031 // add fields 00032 addDXMap( new llongXfer("id", &id )); 00033 addDXMap( new llongXfer("site_id", &site_id )); 00034 addDXMap( new stringXfer("name", &name )); 00035 addDXMap( new stringXfer("content", &content )); 00036 } 00037 /* 00038 bool ivalidate( void ) 00039 { 00040 name = ocString(name).remove("|"); 00041 content = htmlDecode( content ); 00042 return true; 00043 } 00044 bool uvalidate( changeMap & changes ) 00045 { 00046 name = ocString(name).remove("|"); 00047 content = htmlDecode( content ); 00048 return true; 00049 } 00050 00051 bool ssupplemental( void ) 00052 { 00053 name = ocString(name).remove("|"); 00054 content = htmlFixup( content ); 00055 return true; 00056 } 00057 00058 TODO: Add Event hooks for business logic 00059 ========================= 00060 // Done before any action - a false return prevents action 00061 virtual bool ivalidate( void ) { return true; } 00062 virtual bool uvalidate( changeMap & changes ) { return true; } 00063 virtual bool dvalidate( void ) { return true; } 00064 00065 // Done after any action - a false return sets a warning 00066 virtual bool isupplemental( void ){ return true; } 00067 virtual bool usupplemental( changeMap & changes ){ return true; } 00068 virtual bool dsupplemental( void ){ return true; } 00069 virtual bool ssupplemental( void ){ return true; } 00070 */ 00071 }; 00072 #endif 00073 00074 00075
1.5.5