libepp_nicbr
IpNetworkCreateCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: IpNetworkCreateCmd.H 1271 2014-12-05 11:49:00Z gustavo $ */
7 #ifndef __IPNETWORKCREATECMD_H__
8 #define __IPNETWORKCREATECMD_H__
9 
10 #include <string>
11 #include <vector>
12 #include <list>
13 #include <map>
14 
15 #include "libepp_nicbr.H"
16 
17 #include "Command.H"
18 #include "ReverseDSInfo.H"
19 
20 using std::string;
21 using std::map;
22 using std::less;
23 using std::list;
24 
25 LIBEPP_NICBR_NS_BEGIN
26 
29 {
30 public:
32  IpNetworkCreateCmd(bool reset = true) : Command(false)
33  {
34  if (reset) {
35  this->reset();
36  }
37  }
38 
40 
43  void set_ipRange(const IpRange &ipRange)
44  {
45  _ipRange = ipRange;
46  }
47 
49 
53  {
54  return _ipRange;
55  }
56 
58 
61  void set_organization(const string &organization)
62  {
63  _organization = organization;
64  }
65 
67 
70  string get_organization() const
71  {
72  return _organization;
73  }
74 
76 
79  void set_asn(const int asn)
80  {
81  _asn = asn;
82  }
83 
85 
88  int get_asn() const
89  {
90  return _asn;
91  }
92 
94 
97  void set_allocType(const string &allocType)
98  {
99  _allocType = allocType;
100  }
101 
103 
106  string get_allocType() const
107  {
108  return _allocType;
109  }
110 
112 
115  void set_reserveComment(const string &reserveComment)
116  {
117  _reserveComment = reserveComment;
118  }
119 
121 
124  string get_reserveComment() const
125  {
126  return _reserveComment;
127  }
128 
130 
133  void set_reserveType(const string &reserveType)
134  {
135  _reserveType = reserveType;
136  }
137 
139 
142  string get_reserveType() const
143  {
144  return _reserveType;
145  }
146 
148 
152  void insert_contact(const string &type, const string &identification)
153  {
154  _contacts[type] = identification;
155  }
156 
158 
161  map< string, string, less<string> > get_contacts() const
162  {
163  return _contacts;
164  }
165 
167 
170  void insert_reverseDns(const ReverseDns &reverseDns)
171  {
172  _reversesDns.push_back(reverseDns);
173  }
174 
176 
179  vector<ReverseDns> get_reversesDns() const
180  {
181  return _reversesDns;
182  }
183 
185 
188  void add_dsInfo(const ReverseDSInfo &ds_info)
189  {
190  _ds_list.push_back(ds_info);
191  }
192 
194 
197  list<ReverseDSInfo> get_dsInfo() const
198  {
199  return _ds_list;
200  }
201 
202  virtual void reset()
203  {
204  Command::reset();
205  _ipRange.reset();
206  _organization = "";
207  _asn = 0;
208  _allocType = "";
209  _contacts.clear();
210  _reversesDns.clear();
211  _ds_list.clear();
212  }
213 
214 protected:
217 
220 
222  int _asn;
223 
225  string _allocType;
226 
228  string _reserveType;
229 
232 
234  map< string, string, less<string> > _contacts;
235 
237  vector<struct ReverseDns> _reversesDns;
238 
240  list<ReverseDSInfo> _ds_list;
241 };
242 
243 LIBEPP_NICBR_NS_END
244 #endif // __IPNETWORKCREATECMD_H__
string _organization
organization associated with the ip range
Definition: IpNetworkCreateCmd.H:219
void set_organization(const string &organization)
Sets organization.
Definition: IpNetworkCreateCmd.H:61
int get_asn() const
Returns asn.
Definition: IpNetworkCreateCmd.H:88
void add_dsInfo(const ReverseDSInfo &ds_info)
Adds DS information.
Definition: IpNetworkCreateCmd.H:188
string get_reserveType() const
Returns reservation type.
Definition: IpNetworkCreateCmd.H:142
list< ReverseDSInfo > get_dsInfo() const
Returns DS information list.
Definition: IpNetworkCreateCmd.H:197
EPP/DNSSEC DS information class for reverse DNS.
Project defines.
string get_organization() const
Returns organization associated with the ip range.
Definition: IpNetworkCreateCmd.H:70
void insert_reverseDns(const ReverseDns &reverseDns)
Sets reverse dns.
Definition: IpNetworkCreateCmd.H:170
Describes IpRange structure.
Definition: CommonData.H:192
string _allocType
allocation type
Definition: IpNetworkCreateCmd.H:225
void set_reserveType(const string &reserveType)
Sets reservation type.
Definition: IpNetworkCreateCmd.H:133
string _reserveComment
comments for reservation
Definition: IpNetworkCreateCmd.H:231
IpNetworkCreateCmd(bool reset=true)
Default constructor.
Definition: IpNetworkCreateCmd.H:32
IpRange get_ipRange() const
Returns ip range.
Definition: IpNetworkCreateCmd.H:52
void set_reserveComment(const string &reserveComment)
Sets reservation comments.
Definition: IpNetworkCreateCmd.H:115
IpRange _ipRange
ip range
Definition: IpNetworkCreateCmd.H:216
string _reserveType
reservation type
Definition: IpNetworkCreateCmd.H:228
string get_reserveComment() const
Returns reservation comments.
Definition: IpNetworkCreateCmd.H:124
map< string, string, less< string > > get_contacts() const
Returns map of other contacts.
Definition: IpNetworkCreateCmd.H:161
void set_ipRange(const IpRange &ipRange)
Sets ip range.
Definition: IpNetworkCreateCmd.H:43
void set_allocType(const string &allocType)
Sets allocation type.
Definition: IpNetworkCreateCmd.H:97
EPP IpNetworkCreateCmd Class.
Definition: IpNetworkCreateCmd.H:28
vector< ReverseDns > get_reversesDns() const
Returns reverses dns.
Definition: IpNetworkCreateCmd.H:179
void reset()
Reset object attributes.
Definition: Command.H:33
vector< struct ReverseDns > _reversesDns
delegation information for the ip range
Definition: IpNetworkCreateCmd.H:237
EPP Command Class.
Definition: Command.H:18
string get_allocType() const
Returns allocation type.
Definition: IpNetworkCreateCmd.H:106
EPP Command Class.
int _asn
autonomous system number that manages the ip range
Definition: IpNetworkCreateCmd.H:222
void set_asn(const int asn)
Sets asn.
Definition: IpNetworkCreateCmd.H:79
void insert_contact(const string &type, const string &identification)
Inserts a contact in the map of other contacts.
Definition: IpNetworkCreateCmd.H:152
Reverse DSInfo Class.
Definition: ReverseDSInfo.H:16
list< ReverseDSInfo > _ds_list
DS info.
Definition: IpNetworkCreateCmd.H:240
map< string, string, less< string > > _contacts
other contact objects
Definition: IpNetworkCreateCmd.H:234