ANNA Suite
2020b
Multipurpose development suite for Telco applications
include
anna
core
util
TextVariable.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_core_util_TextVariable_hpp
10
#define anna_core_util_TextVariable_hpp
11
12
#include <
anna/core/util/Variable.hpp
>
13
#include <
anna/core/util/String.hpp
>
14
15
namespace
anna
{
16
17
class
DataBlock;
18
19
class
TextComposer;
20
24
class
TextVariable
:
public
Variable
{
25
public
:
30
TextVariable
&
operator=
(
const
int
value) noexcept(
false
) {
setValue
(value);
return
*
this
; }
31
36
TextVariable
&
operator=
(
const
char
* value) noexcept(
false
) {
setValue
(value);
return
*
this
; }
37
42
TextVariable
&
operator=
(
const
anna::String
& value) noexcept(
false
) {
setValue
(value.c_str());
return
*
this
; }
43
48
TextVariable
&
operator=
(
const
S64
value) noexcept(
false
) {
setValue
(value);
return
*
this
; }
49
54
TextVariable
&
operator=
(
const
float
value) noexcept(
false
) {
setValue
(value);
return
*
this
; }
55
60
TextVariable
&
operator=
(
const
double
value) noexcept(
false
) {
setValue
(value);
return
*
this
; }
61
62
protected
:
69
TextVariable
(
const
char
* name,
const
Type::_v
type,
const
anna::String
& expression);
70
71
72
private
:
73
const
anna::String
a_expression;
74
75
const
char
* compose(
DataBlock
&
buffer
)
const
noexcept(
false
);
76
77
friend
class
TextComposer
;
78
};
79
80
}
81
82
#endif
83
anna::TextVariable::TextVariable
TextVariable(const char *name, const Type::_v type, const anna::String &expression)
anna::TextComposer
Definition:
TextComposer.hpp:59
anna::Variable::buffer
void * buffer() const
Variable.hpp
anna::TextVariable
Definition:
TextVariable.hpp:24
String.hpp
anna::S64
int64_t S64
Definition:
defines.hpp:84
anna::String
Definition:
String.hpp:25
anna::TextVariable::operator=
TextVariable & operator=(const int value) noexcept(false)
Definition:
TextVariable.hpp:30
anna
Definition:
app.hpp:12
anna::Variable::Type::_v
_v
Definition:
Variable.hpp:31
anna::Variable::setValue
void setValue(const char *value) noexcept(false)
anna::Variable
Definition:
Variable.hpp:25
anna::DataBlock
Definition:
DataBlock.hpp:24
Generated on Mon Oct 30 2023 12:15:32 for ANNA Suite by
1.8.13