#ifndef __EXAMPLE__
#define __EXAMPLE__
#include "coid/coidsvc/coidsvc.h"
/* declaration of used structs with streaming operators implemented was excluded for clarity,
look here for the full version */
///Example decorated class
class example
{
cmd_interface * _cmdin;
FOO_STRUCT _fs;
public:
example() : _cmdin(NULL) {}
//some optional special functions, recognized by coidgen tool
net_fnc_s opcd accept_startup_params( cmd_interface & cmd ) {_cmdin = &cmd; return 0;}
net_fnc_s opcd accept_connect( const charstr & name, net_nolog const password & pwd ) {return 0;}
//user functions
net_fnc net_nolog opcd read1( net_out FOO_STRUCT & list ) {list = _fs; return 0;}
net_fnc net_nolog opcd read2( net_fetch FOO_STRUCT *& list ) {list = &_fs; return 0;}
net_fnc net_nolog opcd send( net_inout int & ref, const charstr & command, net_out binstreambuf & reply ) const
{
return 0;
}
net_fnc opcd remap_fnc( net_out net_remap(REMAP_EXAMPLE_clientside &) REMAP_EXAMPLE & arg ) {
arg.err_text = "Foo";
return 0;
}
//method available only in direct (client&server in the same process) mode
net_fnc_d opcd get_ptr( FOO_STRUCT ** f ) {*f = &_fs; return 0;}
};
#endif // !__EXAMPLE__