blob: 0f743e8a9c4268380eba963502d1409c5b151d82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#ifndef VARIABLES_MODLITERAL_H
#define VARIABLES_MODLITERAL_H
#include "../variables.h"
#include <list>
#include <visibility.h>
class DLL_PUBLIC VariableLiteral : public VariableImpl {
public:
VariableLiteral(const Glib::ustring & src, const VT_typeID format = DefaultType);
VariableLiteral(ScriptNodePtr);
virtual VariableType value(ExecContext * ec) const;
class Part;
typedef boost::intrusive_ptr<Part> PartCPtr;
typedef std::list<PartCPtr> Vals;
class Part : public IntrusivePtrBase {
public:
virtual void appendTo(ExecContext *, Glib::ustring & str) const = 0;
virtual VariableType value(ExecContext *) const = 0;
};
class TextPart : public Part {
public:
TextPart(const Glib::ustring & e);
void appendTo(ExecContext *, Glib::ustring & str) const;
VariableType value(ExecContext *) const;
const Glib::ustring txt;
};
class VarPart : public Part, public Variable {
public:
VarPart(ScriptNodePtr e);
void appendTo(ExecContext *, Glib::ustring & str) const;
VariableType value(ExecContext *) const;
};
private:
VariableType val;
Vals vals;
};
#endif
|