00001 /* ${copyright}$ */ 00002 /* $Id: BrOrgCreateCmd.H 1040 2009-10-01 17:49:12Z fneves $ */ 00006 #ifndef __BR_ORG_CREATE_CMD_H__ 00007 #define __BR_ORG_CREATE_CMD_H__ 00008 00009 #include <string> 00010 #include <map> 00011 00012 #include "libepp_nicbr.H" 00013 00014 #include "ContactCreateCmd.H" 00015 00016 using std::string; 00017 using std::map; 00018 using std::less; 00019 00020 LIBEPP_NICBR_NS_BEGIN 00021 00023 class BrOrgCreateCmd : public ContactCreateCmd 00024 { 00025 public: 00027 BrOrgCreateCmd(bool reset = true) : ContactCreateCmd(false) 00028 { 00029 if (reset) { 00030 this->reset(); 00031 } 00032 } 00033 00035 00038 void set_organization(const string &organization) 00039 { 00040 _organization = organization; 00041 } 00042 00044 00047 string get_organization() const 00048 { 00049 return _organization; 00050 } 00051 00053 00056 void set_responsible(const string &responsible) 00057 { 00058 _responsible = responsible; 00059 _responsible_f = true; 00060 } 00061 00063 00066 string get_responsible() const 00067 { 00068 return _responsible; 00069 } 00070 00072 00075 void set_responsible_f(const bool responsible_f) 00076 { 00077 _responsible_f = responsible_f; 00078 } 00079 00081 00084 bool get_responsible_f() const 00085 { 00086 return _responsible_f; 00087 } 00088 00090 00094 void insert_contact(const string &type, const string &id) 00095 { 00096 _contact_list[type] = id; 00097 } 00098 00100 00103 map< string, string, less<string> > get_contact_list() const 00104 { 00105 return _contact_list; 00106 } 00107 00109 void reset() 00110 { 00111 ContactCreateCmd::reset(); 00112 _organization = ""; 00113 _responsible = ""; 00114 _responsible_f = false; 00115 _contact_list.clear(); 00116 } 00117 00118 protected: 00120 string _organization; 00121 00123 string _responsible; 00124 00126 bool _responsible_f; 00127 00129 map<string, string, less<string> > _contact_list; 00130 }; 00131 00132 LIBEPP_NICBR_NS_END 00133 #endif //__BR_ORG_CREATE_CMD_H__