00001
00002
00007 #ifndef __ASNUPDATECMD_H__
00008 #define __ASNUPDATECMD_H__
00009
00010 #include <map>
00011 #include <string>
00012
00013 #include "libepp_nicbr.H"
00014
00015 #include "Command.H"
00016
00017 using std::map;
00018 using std::string;
00019
00020 LIBEPP_NICBR_NS_BEGIN
00021
00023 class AsnUpdateCmd : public Command
00024 {
00025 public:
00027 AsnUpdateCmd(bool reset = true) : Command(false)
00028 {
00029 if (reset) {
00030 this->reset();
00031 }
00032 }
00033
00035
00038 void set_asn(const int asn)
00039 {
00040 _asn = asn;
00041 }
00042
00044
00047 int get_asn() const
00048 {
00049 return _asn;
00050 }
00051
00053
00056 void set_organization(const string &organization)
00057 {
00058 _organization = organization;
00059 }
00060
00062
00065 string get_organization() const
00066 {
00067 return _organization;
00068 }
00069
00071
00075 void insert_contact_add(const string &type, const string &identification)
00076 {
00077 _contacts_add[type] = identification;
00078 }
00079
00081
00084 map< string, string, less<string> > get_contacts_add() const
00085 {
00086 return _contacts_add;
00087 }
00088
00090
00094 void insert_contact_rem(const string &type, const string &identification)
00095 {
00096 _contacts_rem[type] = identification;
00097 }
00098
00100
00103 map< string, string, less<string> > get_contacts_rem() const
00104 {
00105 return _contacts_rem;
00106 }
00107
00108 void reset()
00109 {
00110 Command::reset();
00111 _asn = 0;
00112 _organization = "";
00113 _contacts_add.clear();
00114 _contacts_rem.clear();
00115 }
00116
00117 protected:
00119 int _asn;
00120
00122 string _organization;
00123
00125 map< string, string, less<string> > _contacts_add;
00126
00128 map< string, string, less<string> > _contacts_rem;
00129 };
00130
00131 LIBEPP_NICBR_NS_END
00132 #endif // __ASNUPDATECMD_H__