OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
literals.hpp
Go to the documentation of this file.
1 #ifndef COMPILER_LITERALS_H_INCLUDED
2 #define COMPILER_LITERALS_H_INCLUDED
3 
4 #include <string>
5 #include <vector>
6 
8 
9 namespace Compiler
10 {
12 
13  class Literals
14  {
15  std::vector<Interpreter::Type_Integer> mIntegers;
16  std::vector<Interpreter::Type_Float> mFloats;
17  std::vector<std::string> mStrings;
18 
19  public:
20 
21  int getIntegerSize() const;
23 
24  int getFloatSize() const;
26 
27  int getStringSize() const;
29 
30  void append (std::vector<Interpreter::Type_Code>& code) const;
33 
36 
39 
40  int addString (const std::string& value);
42 
43  void clear();
45  };
46 }
47 
48 #endif
49 
int addInteger(Interpreter::Type_Integer value)
add integer liternal and return index.
Definition: literals.cpp:59
std::vector< Interpreter::Type_Float > mFloats
Definition: literals.hpp:16
int getFloatSize() const
Return size of float block (in bytes).
Definition: literals.cpp:12
void append(std::vector< Interpreter::Type_Code > &code) const
Definition: literals.cpp:31
std::vector< Interpreter::Type_Integer > mIntegers
Definition: literals.hpp:15
void clear()
remove all literals.
Definition: literals.cpp:86
int addFloat(Interpreter::Type_Float value)
add float literal and return value.
Definition: literals.cpp:68
int addString(const std::string &value)
add string literal and return value.
Definition: literals.cpp:77
int getIntegerSize() const
Return size of integer block (in bytes).
Definition: literals.cpp:7
std::vector< std::string > mStrings
Definition: literals.hpp:17
int getStringSize() const
Return size of string block (in bytes).
Definition: literals.cpp:17
int code
Definition: crashcatcher.cpp:70
Literal values.
Definition: literals.hpp:13
float Type_Float
Definition: types.hpp:16