C++ Class Mapped Google Protocol Buffer Message (五)

2014-11-24 01:21:35 · 作者: · 浏览: 29
ransient
std::string e164_;

#ifdef N_ODB
T_InformTerConfig ter_config_;
T_InformSysStatus sys_status_;
T_InformConfStatus conf_status_;
T_VideoOption video_option_;
T_Message lastRecvMsg_;
T_SetupSoftware software_version_;
bool is_recv_sys_status_;
#endif
};

#pragma db object callback(dbevent) table("tblUser")
class CFocusUser : public CFocusEntity
{
friend class odb::access;
public:
CFocusUser();
~CFocusUser();

const std::string & GetPassword() const { return password_; }
void SetPassword(const std::string & val) { password_ = val; }

void dbevent( odb::callback_event e, odb::database& db );
void dbevent( odb::callback_event e, odb::database& db ) const;
#ifdef N_ODB
virtual shared_ptr CreateBuild();
#endif
protected:

private:
std::string password_;
};
#endif

#ifndef __FOCUS_ENTITY_H__
#define __FOCUS_ENTITY_H__


#include
#include
#include

#include
#include
#include

#ifdef N_ODB
#include
#include
#include "Focus3800B.h"
#include "EntityBuild.h"
#endif
using std::tr1::shared_ptr;
using std::tr1::enable_shared_from_this;
using std::tr1::weak_ptr;
using std::tr1::dynamic_pointer_cast;

class CFocusEntity;
class CFocusZone;
class CFocusTerminal;
class CFocusUser;

inline shared_ptr toZone( const shared_ptr & en)
{
return dynamic_pointer_cast(en);
}
inline shared_ptr toTerminal( const shared_ptr & en)
{
return dynamic_pointer_cast(en);
}
inline shared_ptr toUser( const shared_ptr & en)
{
return dynamic_pointer_cast(en);
}
enum MsgNumPCtoTer {
terminal_config = 1,
network_basic_config = 2,
timenow_config = 3,
video_source_config = 16,
video_output_config = 17,
video_option_config = 18,
network_advanced_config = 19,
compatibility_config = 20,
network_dial_config = 21,
fire_wall_config = 22,
communication_config = 23,
video_config = 24,
e1_config = 25,
web_config = 26,
command_config = 27,
camera_select = 256,
camera_advance = 257,
camera_advance_active = 258,
camera_up = 259,
camera_down = 260,
camera_left = 261,
camera_right = 262,
camera_near = 263,
camera_far = 264,
floor_apply = 512,
chair_apply = 513,
chair_release = 514,
chair_viewed = 515,
timer_preview = 516,
auto_switch_time = 517,
broacast_local = 518,
force_exit = 519,
volume_set = 520,
mute_in_set = 521,
mute_out_set = 522,
dualstream_set = 523,
conf_call_set = 524,
accept_in_call = 525,
reject_in_call = 526,
conf_drop = 527,
phone_modify = 528,
phone_add = 529,
feec_apply = 530,
phone_histroy_del = 531,
picture_show = 532,
near_key = 533,
far_key = 534,
OK_key = 535,
Ping = 768,
video_loop = 769,
restore = 770,
out_test = 771,
login_console = 1024,
logout_console = 1025,
restart = 1281
};

#pragma db object polymorphic callback(dbevent) table("tblEntity")
class CFocusEntity : public enable_shared_from_this
{
friend class odb::access;
public:
CFocusEntity();
virtual ~CFocusEntity();
unsigned int GetId() const { return id_; }
void SetId(unsigned int val) { id_ = val; }

const std::string & GetName() const { return name_; }
void SetName(const std::string & val) { name_ = val; }

shared_ptr GetParent() const;
void SetParent(const shared_ptr & val) { parent_ = val; }

virtual void dbevent( odb::callback_event e, odb::database& db );
virtual void dbevent( odb::callback_event e, odb::d