00001 /* ${copyright}$ */ 00002 /* $Id: AsnCreateCmd.H 986 2008-12-30 12:32:38Z eduardo $ */ 00007 #ifndef __ASNCREATECMD_H__ 00008 #define __ASNCREATECMD_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 AsnCreateCmd : public Command 00024 { 00025 public: 00027 AsnCreateCmd(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(const string &type, const string &identification) 00076 { 00077 _contacts[type] = identification; 00078 } 00079 00081 00084 map< string, string, less<string> > get_contacts() { return _contacts; } 00085 00086 void reset() 00087 { 00088 Command::reset(); 00089 _asn = 0; 00090 _organization = ""; 00091 _contacts.clear(); 00092 } 00093 00094 protected: 00096 int _asn; 00097 00099 string _organization; 00100 00102 map< string, string, less<string> > _contacts; 00103 }; 00104 00105 LIBEPP_NICBR_NS_END 00106 #endif // __ASNCREATECMD_H__