libepp_nicbr
LaunchCreateCmd.H
1 /* ${copyright}$ */
2 /* $Id$ */
7 #ifndef __LAUNCH_CREATE_CMD_H__
8 #define __LAUNCH_CREATE_CMD_H__
9 
10 #include <string>
11 
12 #include "Launch.H"
13 #include "ClaimsNotice.H"
14 
15 using std::string;
16 
17 LIBEPP_NICBR_NS_BEGIN
18 
21 {
22 public:
24  class Type
25  {
26  public:
28  enum Value {
29  NONE,
30  APPLICATION,
31  REGISTRATION
32  };
33 
35 
39  static string toStr(const Value value)
40  {
41  switch (value) {
42  case NONE:
43  break;
44  case APPLICATION:
45  return "application";
46  case REGISTRATION:
47  return "registration";
48  }
49 
50  return "";
51  }
52 
54 
58  static Value fromStr(const string &value)
59  {
60  if (value == "application") {
61  return APPLICATION;
62 
63  } else if (value == "registration") {
64  return REGISTRATION;
65  }
66 
67  return NONE;
68  }
69  };
70 
71  // Default constructor
73  {
74  reset();
75  }
76 
78 
81  void set_type(const Type::Value type) { _type = type; }
82 
84 
87  Type::Value get_type() const { return _type; }
88 
90 
93  void set_phase(const LaunchPhase &phase) { _phase = phase; }
94 
96 
99  LaunchPhase get_phase() const { return _phase; }
100 
102 
105  void set_notice(const ClaimsNotice &notice) { _notice = notice; }
106 
108 
111  ClaimsNotice get_notice() const { return _notice; }
112 
114 
117  void set_codeMarks(const list<CodeMark> &codeMarks) { _codeMarks = codeMarks; }
118 
120 
123  list<CodeMark> get_codeMarks() const { return _codeMarks; }
124 
126 
129  void set_signedMarks(const list<SMD> &signedMarks)
130  {
131  _signedMarks = signedMarks;
132  }
133 
135 
138  list<SMD> get_signedMarks() const { return _signedMarks; }
139 
141 
144  void set_encodedSignedMarks(const list<EncodedSignedMark> &encodedSignedMarks)
145  {
146  _encodedSignedMarks =encodedSignedMarks;
147  }
148 
150 
153  list<EncodedSignedMark> get_encodedSignedMarks() { return _encodedSignedMarks; }
154 
156  void reset()
157  {
158  _type = Type::NONE;
159  _phase.reset();
160  _notice.reset();
161  _codeMarks.clear();
162  _signedMarks.clear();
163  _encodedSignedMarks.clear();
164  }
165 
166 private:
168  Type::Value _type;
169 
171  LaunchPhase _phase;
172 
174  ClaimsNotice _notice;
175 
177  list<CodeMark> _codeMarks;
178 
180  list<SMD> _signedMarks;
181 
183  list<EncodedSignedMark> _encodedSignedMarks;
184 };
185 
186 LIBEPP_NICBR_NS_END
187 
188 #endif // __LAUNCH_CREATE_CMD_H__
EPP Launch Phase Class.
Definition: Launch.H:121
void set_signedMarks(const list< SMD > &signedMarks)
Sets the signed mark list.
Definition: LaunchCreateCmd.H:129
list< EncodedSignedMark > get_encodedSignedMarks()
Returns the encoded signed mark list.
Definition: LaunchCreateCmd.H:153
EPP LaunchCreateCmd Class.
Definition: LaunchCreateCmd.H:20
EPP LaunchCreateCmd::Type Class.
Definition: LaunchCreateCmd.H:24
void set_phase(const LaunchPhase &phase)
Sets the phase of the launch.
Definition: LaunchCreateCmd.H:93
static string toStr(const Value value)
Convert type to text format.
Definition: LaunchCreateCmd.H:39
Type::Value get_type() const
Returns the expected type of object.
Definition: LaunchCreateCmd.H:87
EPP Launch Phase.
void reset()
Reset object attributes.
Definition: Launch.H:236
LaunchPhase get_phase() const
Returns the phase of the launch.
Definition: LaunchCreateCmd.H:99
EPP Notice Class.
Definition: ClaimsNotice.H:13
void set_notice(const ClaimsNotice &notice)
Sets the notice for Claims period.
Definition: LaunchCreateCmd.H:105
void set_encodedSignedMarks(const list< EncodedSignedMark > &encodedSignedMarks)
Sets the encoded signed mark list.
Definition: LaunchCreateCmd.H:144
list< CodeMark > get_codeMarks() const
Returns the code mark list.
Definition: LaunchCreateCmd.H:123
void set_type(const Type::Value type)
Sets the expected type of object.
Definition: LaunchCreateCmd.H:81
void reset()
Reset object attributes.
Definition: ClaimsNotice.H:73
list< SMD > get_signedMarks() const
Returns the signed mark list.
Definition: LaunchCreateCmd.H:138
static Value fromStr(const string &value)
Convert text type to value.
Definition: LaunchCreateCmd.H:58
Value
Possible type values.
Definition: LaunchCreateCmd.H:28
EPP Launch Phase.
void reset()
Reset object attributes.
Definition: LaunchCreateCmd.H:156
void set_codeMarks(const list< CodeMark > &codeMarks)
Sets the code mark list.
Definition: LaunchCreateCmd.H:117
ClaimsNotice get_notice() const
Returns the notice for Claims period.
Definition: LaunchCreateCmd.H:111