ANNA Suite  2020b
Multipurpose development suite for Telco applications
Codec.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_comm_Codec_hpp
10 #define anna_comm_Codec_hpp
11 
13 
14 namespace anna {
15 
16 class Second;
17 class Millisecond;
18 class Microsecond;
19 namespace comm {
20 
82 class Codec : public CompatCodec {
83 public:
93  explicit Codec(const Type type, const bool scramble = true) : CompatCodec(type, scramble) {;}
94 
106  const Variable* attach(const char* name, std::string& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
107 
119  const Variable* attach(const char* name, const char*& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
120 
132  const Variable* attach(const char* name, int& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
133 
145  const Variable* attach(const char* name, S64& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
146 
158  const Variable* attach(const char* name, bool& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
159 
171  const Variable* attach(const char* name, DataBlock& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
172 
184  const Variable* attach(const char* name, float& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
185 
197  const Variable* attach(const char* name, double& value) noexcept(false) { return CompatCodec::attach(name, size(), value); }
198 
210  const Variable* attach(const char* name, Second& value) noexcept(false);
211 
223  const Variable* attach(const char* name, Millisecond& value) noexcept(false);
224 
236  const Variable* attach(const char* name, Microsecond& value) noexcept(false);
237 };
238 
239 }
240 }
241 
242 #endif
Definition: CompatCodec.hpp:91
Definition: Millisecond.hpp:24
const Variable * attach(const char *name, const char *&value) noexcept(false)
Definition: Codec.hpp:119
Definition: Second.hpp:25
int64_t S64
Definition: defines.hpp:84
Definition: Variable.hpp:28
const Variable * attach(const char *name, double &value) noexcept(false)
Definition: Codec.hpp:197
Codec(const Type type, const bool scramble=true)
Definition: Codec.hpp:93
const Variable * attach(const char *name, std::string &value) noexcept(false)
Definition: Codec.hpp:106
const Variable * attach(const char *name, bool &value) noexcept(false)
Definition: Codec.hpp:158
const Variable * attach(const char *name, float &value) noexcept(false)
Definition: Codec.hpp:184
Definition: app.hpp:12
const Variable * attach(const char *name, S64 &value) noexcept(false)
Definition: Codec.hpp:145
const Variable * attach(const char *name, int &value) noexcept(false)
Definition: Codec.hpp:132
int size() const
Definition: CompatCodec.hpp:349
unsigned char Type
Definition: CompatCodec.hpp:134
const Variable * attach(const char *name, const short int id, std::string &value) noexcept(false)
const Variable * attach(const char *name, DataBlock &value) noexcept(false)
Definition: Codec.hpp:171
Definition: DataBlock.hpp:24
Definition: Codec.hpp:82
Definition: Microsecond.hpp:22