include/BrOrgUpdateCmd.H

Go to the documentation of this file.
00001 /* ${copyright}$ */
00002 /* $Id: BrOrgUpdateCmd.H 789 2006-07-18 18:39:47Z cleber $ */
00007 #ifndef __BR_ORG_UPDATE_CMD_H__
00008 #define __BR_ORG_UPDATE_CMD_H__
00009 
00010 #include <string>
00011 #include <map>
00012 
00013 
00014 #include "libepp_nicbr.H"
00015 
00016 #include "ContactUpdateCmd.H"
00017 
00018 using std::string;
00019 using std::map;
00020 
00021 LIBEPP_NICBR_NS_BEGIN
00022 
00024 class BrOrgUpdateCmd : public ContactUpdateCmd
00025 {
00026 public:
00028   BrOrgUpdateCmd(bool reset = true) : ContactUpdateCmd(false)
00029   {
00030     if (reset) {
00031       this->reset();
00032     }
00033   }
00034 
00036 
00039   void set_organization(const string &organization)
00040   {
00041     _organization = organization;
00042   }
00043 
00045 
00048   string get_organization()
00049   {
00050     return _organization;
00051   }
00052 
00054 
00057   void set_responsible(const string &responsible) 
00058   {
00059     _responsible = responsible;
00060     _responsible_f = true;
00061   }
00062 
00064 
00067   string get_responsible() { return _responsible; };
00068 
00070 
00073   void set_responsible_f(bool responsible_f) 
00074   {
00075     _responsible_f = responsible_f;
00076   };
00077   
00079 
00082   bool get_responsible_f() 
00083   {
00084     return _responsible_f;
00085   };
00086 
00088 
00092   void insert_contact_add(const string &type, const string &id)
00093   {
00094     _contact_list_add[type] = id;
00095   }
00096 
00098 
00101   map< string, string, less<string> > get_contact_list_add()
00102   {
00103     return _contact_list_add;
00104   }
00105 
00107 
00111   void insert_contact_rem(const string &type, const string &id)
00112   {
00113     _contact_list_rem[type] = id;
00114   }
00115 
00117 
00120   map< string, string, less<string> > get_contact_list_rem()
00121   {
00122     return _contact_list_rem;
00123   }
00124 
00126   void reset()
00127   {
00128     ContactUpdateCmd::reset();
00129     _organization = "";
00130     _contact_list_add.clear();
00131     _contact_list_rem.clear();
00132     _responsible = "";
00133     _responsible_f = false;
00134   }
00135   
00136 protected:
00138   string _organization;
00139 
00141   string _responsible;
00142 
00144   bool _responsible_f;
00145 
00147   map<string, string, less<string> > _contact_list_add;
00148 
00150   map<string, string, less<string> > _contact_list_rem;
00151 };
00152 
00153 LIBEPP_NICBR_NS_END
00154 #endif //__BR_ORG_UPDATE_CMD_H__

Generated on Fri Jul 21 09:01:11 2006 for libepp_nicbr by  doxygen 1.4.6