include/IpNetworkCreateCmd.H

Go to the documentation of this file.
00001 /* ${copyright}$ */
00002 /* $Id: IpNetworkCreateCmd.H 963 2008-12-11 15:31:29Z rafael $ */
00007 #ifndef __IPNETWORKCREATECMD_H__
00008 #define __IPNETWORKCREATECMD_H__
00009 
00010 #include <string>
00011 #include <vector>
00012 #include <map>
00013 
00014 #include "libepp_nicbr.H"
00015 
00016 #include "Command.H"
00017 
00018 using std::string;
00019 using std::map;
00020 using std::less;
00021 
00022 LIBEPP_NICBR_NS_BEGIN
00023 
00025 class IpNetworkCreateCmd : public Command
00026 {
00027 public:
00029   IpNetworkCreateCmd(bool reset = true) : Command(false)
00030   {
00031     if (reset) {
00032       this->reset();
00033     }
00034   }
00035 
00037 
00040   void set_ipRange(const IpRange &ipRange)
00041   {
00042     _ipRange = ipRange;
00043   }
00044 
00046 
00049   IpRange get_ipRange() const
00050   {
00051     return _ipRange;
00052   }
00053 
00055 
00058   void set_organization(const string &organization)
00059   {
00060     _organization = organization;
00061   }
00062 
00064 
00067   string get_organization() const
00068   {
00069     return _organization;
00070   }
00071 
00073 
00076   void set_asn(const int asn)
00077   {
00078     _asn = asn;
00079   }
00080 
00082 
00085   int get_asn() const
00086   {
00087     return _asn;
00088   }
00089 
00091 
00094   void set_allocType(const string &allocType)
00095   {
00096     _allocType = allocType;
00097   }
00098 
00100 
00103   string get_allocType() const
00104   {
00105     return _allocType;
00106   }
00107 
00109 
00113   void insert_contact(const string &type, const string &identification)
00114   {
00115     _contacts[type] = identification;
00116   }
00117 
00119 
00122   map< string, string, less<string> > get_contacts() { return _contacts; }
00123   
00125 
00128   void insert_reverseDns(const ReverseDns &reverseDns)
00129   {
00130     _reversesDns.push_back(reverseDns);
00131   }
00132 
00134 
00137   vector<ReverseDns> get_reversesDns() const
00138   {
00139     return _reversesDns;
00140   }
00141 
00142   void reset()
00143   {
00144     Command::reset();
00145     _ipRange.reset();
00146     _organization = "";
00147     _asn = 0;
00148     _allocType = "";
00149     _contacts.clear();
00150     _reversesDns.clear();
00151   }
00152 
00153 protected:
00155   IpRange _ipRange;
00156 
00158   string _organization;
00159   
00161   int _asn;
00162 
00164   string _allocType;
00165 
00167   map< string, string, less<string> > _contacts;
00168 
00170   vector<struct ReverseDns> _reversesDns;
00171 };
00172 
00173 LIBEPP_NICBR_NS_END
00174 #endif // __IPNETWORKCREATECMD_H__

Generated on Tue Mar 17 16:03:07 2009 for libepp_nicbr by  doxygen 1.4.7