ANNA Suite  2020b
Multipurpose development suite for Telco applications
ISDNNumber.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_diameter_helpers_tme_codectypes_ISDNNumber_hpp
10 #define anna_diameter_helpers_tme_codectypes_ISDNNumber_hpp
11 
12 
13 // Local
15 
16 #include <anna/config/defines.hpp> // isup_number_t
17 
18 
19 namespace anna {
20 
21 namespace diameter {
22 
23 namespace codec {
24 class Avp;
25 }
26 
27 namespace helpers {
28 
29 namespace tme {
30 
31 namespace codectypes {
32 
38 
39  isup_number_t a_isupNumber;
40 
41  // Only for derived diameter type:
42  void updateBasic() noexcept(false);
43 
44 public:
45 
46  // Class-specific ////////////////////////////////////////////////////////////////////////////////////
47  //
53  const isup_number_t& getIsupNumber() const { return a_isupNumber; }
54 
60  void setIsupNumber(const isup_number_t& isupNumber) { a_isupNumber = isupNumber; updateBasic(); }
61  //
63 
64  // gets
65 
66  std::string getFormatName() const { return "ISDNNumber"; }
67 
68  // helpers
69 
70  std::string asString() noexcept(false) {
71  return a_isupNumber.asString(false /* calling party number */);
72  }
73 
74 
75  // sets
76 
77  void decode(const char* buffer, const int size) noexcept(false);
78 
79 
80  // exports /////////////////////////////
81  using AvpData::getSize;
82  using AvpData::code;
83  //using OctetString::asPrintableString;
85  //using OctetString::asString;
87  //using OctetString::decode;
90 
91 };
92 
93 }
94 }
95 }
96 }
97 }
98 
99 #endif
100 
const isup_number_t & getIsupNumber() const
Definition: ISDNNumber.hpp:53
void setIsupNumber(const isup_number_t &isupNumber)
Definition: ISDNNumber.hpp:60
void fromPrintableString(const char *printableString) noexcept(false)
Definition: AvpData.hpp:224
Definition: OctetString.hpp:30
std::string asDataBlockString() noexcept(false)
Definition: AvpData.hpp:171
std::string asString(bool calledOrCalling)
Definition: defines.hpp:334
Definition: defines.hpp:152
std::string asHexString() noexcept(false)
Definition: AvpData.hpp:196
Definition: app.hpp:12
std::string getFormatName() const
Definition: ISDNNumber.hpp:66
void code(char *buffer, int &size) noexcept(false)
Definition: AvpData.hpp:147
std::string asString() noexcept(false)
Definition: ISDNNumber.hpp:70
void fromHexString(const std::string &hexString) noexcept(false)
Definition: AvpData.hpp:240