--- /dev/null
+//auto-generated code, do not change
+#include "elamvalue.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elambinary.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamboolengine.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamcharclass.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamengine.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamvalue.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamexpression.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamfloatengine.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamintengine.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamfloatengine.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamvalue.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamstringengine.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamexpression.h"
--- /dev/null
+//auto-generated code, do not change
+#include "elamunary.h"
namespace ELAM {
-///returns version information about ELAM
-inline QString versionInfo(){return "0.2 alpha";}
};
#include <QVariant>
#include "../dptr/dptr_base.h"
+#include "elamglobal.h"
#include <functional>
You can use the methods of this class to change the routines that handle the operator and the types on which it operates. Instances of this class are implicitly shared - meaning calls on a copy of an instance are also visible on the original and all other copies.
*/
-class BinaryOperator
+class ELAM_EXPORT BinaryOperator
{
DECLARE_SHARED_DPTR(d);
public:
This engine type plays nicely with ELAM::IntEngine
*/
-class BoolEngine:public Engine
+class ELAM_EXPORT BoolEngine:public Engine
{
public:
///instantiates a pre-configured engine
- both surrounding another operator combine the operation with assignment (e.g. a+=b is equivalent to a=a+b)
*/
-class CharacterClassSettings
+class ELAM_EXPORT CharacterClassSettings
{
DECLARE_SHARED_DPTR(d)
public:
namespace ELAM {
+///returns version information about ELAM
+ELAM_EXPORT QString versionInfo();
class Engine;
Methods of this class are used to evaluate expressions into final values.
*/
-class Engine:public QObject
+class ELAM_EXPORT Engine:public QObject
{
Q_OBJECT
DECLARE_DPTR(d);
/**Represents a single token in a parsed expression.
Tokens are pretty stupid themselves - they just know their type, position, their original piece of text and an optional value (literals). They are used by the engine and expressions to transform text into executable expressions.*/
-class Token
+class ELAM_EXPORT Token
{
DECLARE_SHARED_DPTR(d)
public:
};
///makes tokens accessable to qDebug()
-QDebug& operator<<(QDebug,const Token&);
+ELAM_EXPORT QDebug& operator<<(QDebug,const Token&);
///makes tokens accessable to qDebug()
-QDebug& operator<<(QDebug,const QList<Token>&);
+ELAM_EXPORT QDebug& operator<<(QDebug,const QList<Token>&);
class Engine;
/**Represents an expression in the context of its engine.
An expression always has an engine as context and stores a hierarchy of operations (also expressions) to perform when called to evaluate. Expressions may become invalid if constants, functions, or operators change between the time they are created and the time they are evaluated.
*/
-class Expression
+class ELAM_EXPORT Expression
{
DECLARE_SHARED_DPTR(d)
public:
};
///makes expressions accessable to qDebug()
-QDebug& operator<<(QDebug,const Expression&);
+ELAM_EXPORT QDebug& operator<<(QDebug,const Expression&);
//end of namespace
};
Per default only the float versions are pre-installed. Use IntEngine::configureIntEngine or IntFloatEngine to have both.
*/
-class FloatEngine:public Engine
+class ELAM_EXPORT FloatEngine:public Engine
{
public:
///instantiates a pre-initialized engine
};
///an engine with integer and float math pre-installed, see IntEngine and FloatEngine
-class IntFloatEngine:public Engine
+class ELAM_EXPORT IntFloatEngine:public Engine
{
public:
///instantiates a pre-installed engine
--- /dev/null
+//ELAM global definitions header
+//
+// (c) Konrad Rosenbaum, 2012
+// protected under the GNU LGPL v3 or at your option any newer
+
+#ifndef ELAM_GLOBAL_H
+#define ELAM_GLOBAL_H
+
+//export for DLL
+#include <QtCore/QtGlobal>
+
+#if defined(ELAM_LIBRARY_BUILD)
+# define ELAM_EXPORT Q_DECL_EXPORT
+#else
+# define ELAM_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif
namespace ELAM {
///integer math enabled engine
-class IntEngine:public Engine
+class ELAM_EXPORT IntEngine:public Engine
{
public:
///instantiates a pre-configured engine
namespace ELAM {
///integer math enabled engine
-class StringEngine:public Engine
+class ELAM_EXPORT StringEngine:public Engine
{
public:
///instantiates a pre-configured engine
You can use the methods of this class to change the routines that handle the operator and the types on which it operates. Instances of this class are implicitly shared - meaning calls on a copy of an instance are also visible on the original and all other copies.
*/
-class UnaryOperator
+class ELAM_EXPORT UnaryOperator
{
DECLARE_SHARED_DPTR(d);
public:
#include <QPair>
#include <QPoint>
+#include "elamglobal.h"
+
namespace ELAM {
/** \brief A character position inside a text/string that is being evaluated.
A position consists of line and column. The top left position in a text is assumed to be line 1 column 1. Any position with line and/or column less than zero is considered invalid.
This class is completely inline and as such should be quite fast.*/
-class Position
+class ELAM_EXPORT Position
{
public:
///converts a pair of ints to a position
private:
int mline,mcol;
};
-QDebug&operator<<(QDebug,const Position&);
+ELAM_EXPORT QDebug&operator<<(QDebug,const Position&);
/**Objects of this class represent an exception in the evaluation of an ELAM expression.*/
-class Exception
+class ELAM_EXPORT Exception
{
public:
///Type of Exception
Position mpos;
};
-QDebug&operator<<(QDebug,const Exception&);
+ELAM_EXPORT QDebug&operator<<(QDebug,const Exception&);
/**this type is not actually used, its ID is used as a fallback to tell operators, functions and engines that any supported type can be used*/
-class AnyType
+class ELAM_EXPORT AnyType
{
public:
///returns the meta type ID of the ANY type
TEMPLATE = lib
TARGET = elam
DESTDIR = ..
-CONFIG += staticlib create_prl
+CONFIG += dll create_prl
QT -= gui
OBJECTS_DIR = .ctmp
MOC_DIR = .ctmp
RCC_DIR = .ctmp
-
+DEFINES += ELAM_LIBRARY_BUILD
+VERSION = 0.3.0
HEADERS += \
elam.h \
elamboolengine.cpp \
elamstringengine.cpp
-INCLUDEPATH += .
-DEPENDPATH += .
+INCLUDEPATH += . ../include
+DEPENDPATH += . ../include ../dptr
QMAKE_CXXFLAGS+=-std=gnu++0x
\ No newline at end of file
#include "../dptr/dptr.h"
namespace ELAM {
+
+ELAM_EXPORT QString versionInfo(){return "0.3 alpha";}
///////////////////////////////////////////////////////////////////////////////
// Engine