00001 /* ${copyright}$ */ 00002 /* $Id: BrOrgCreateCmd.H 791 2006-07-18 20:53:00Z cesar $ */ 00007 #ifndef __BR_ORG_CREATE_CMD_H__ 00008 #define __BR_ORG_CREATE_CMD_H__ 00009 00010 #include <string> 00011 #include <map> 00012 00013 00014 #include "libepp_nicbr.H" 00015 00016 #include "ContactCreateCmd.H" 00017 00018 using std::string; 00019 using std::map; 00020 using std::less; 00021 00022 LIBEPP_NICBR_NS_BEGIN 00023 00025 class BrOrgCreateCmd : public ContactCreateCmd 00026 { 00027 public: 00029 BrOrgCreateCmd(bool reset = true) : ContactCreateCmd(false) 00030 { 00031 if (reset) { 00032 this->reset(); 00033 } 00034 } 00035 00037 00040 void set_organization(const string &organization) 00041 { 00042 _organization = organization; 00043 } 00044 00046 00049 string get_organization() 00050 { 00051 return _organization; 00052 } 00053 00055 00058 void set_responsible(const string &responsible) 00059 { 00060 _responsible = responsible; 00061 _responsible_f = true; 00062 } 00063 00065 00068 string get_responsible() 00069 { 00070 return _responsible; 00071 } 00072 00074 00077 void set_responsible_f(bool responsible_f) 00078 { 00079 _responsible_f = responsible_f; 00080 } 00081 00083 00086 bool get_responsible_f() 00087 { 00088 return _responsible_f; 00089 } 00090 00092 00096 void insert_contact(const string &type, const string &id) 00097 { 00098 _contact_list[type] = id; 00099 } 00100 00102 00105 map< string, string, less<string> > get_contact_list() 00106 { 00107 return _contact_list; 00108 } 00109 00111 void reset() 00112 { 00113 ContactCreateCmd::reset(); 00114 _organization = ""; 00115 _responsible = ""; 00116 _responsible_f = false; 00117 _contact_list.clear(); 00118 } 00119 00120 protected: 00122 string _organization; 00123 00125 string _responsible; 00126 00128 bool _responsible_f; 00129 00131 map<string, string, less<string> > _contact_list; 00132 }; 00133 00134 LIBEPP_NICBR_NS_END 00135 #endif //__BR_ORG_CREATE_CMD_H__