aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt47
-rw-r--r--cli/main.cpp18
-rw-r--r--dicealias.h2
-rw-r--r--diceparser.h11
-rw-r--r--die.h2
-rw-r--r--result/stringresult.h2
6 files changed, 38 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b654ea2..e8b4c5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,11 +3,6 @@ cmake_minimum_required(VERSION 2.8)
project(dice)
-#/net/rnd/src/qt/qt-everywhere-enterprise-src-5.3.0/linux-x86_64-gcc-4.7.2/lib/cmake
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
-#${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
-
-
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
@@ -15,20 +10,15 @@ set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library
find_package(Qt5Core)
-
set(EXECUTABLE_OUTPUT_PATH bin/)
+
include_directories(${Qt5Core_INCLUDES})
add_definitions(${Qt5Core_DEFINITIONS})
set(MODE "cli")
-#file (
-# GLOB_RECURSE
-# source_files
-# *.cpp
-# result/*
-# node/*
-#)
+
+
add_executable(
dice
diceparser.cpp
@@ -43,27 +33,28 @@ add_executable(
result/stringresult.cpp
result/diceresult.cpp
node/countexecutenode.cpp
-node/dicerollernode.cpp
-node/executionnode.cpp
-node/explosedicenode.cpp
-node/helpnode.cpp
-node/jumpbackwardnode.cpp
-node/keepdiceexecnode.cpp
-node/listaliasnode.cpp
-node/listsetrollnode.cpp
-node/numbernode.cpp
-node/parenthesesnode.cpp
-node/rerolldicenode.cpp
-node/scalaroperatornode.cpp
-node/sortresult.cpp
-node/startingnode.cpp
-cli/main.cpp
+ node/dicerollernode.cpp
+ node/executionnode.cpp
+ node/explosedicenode.cpp
+ node/helpnode.cpp
+ node/jumpbackwardnode.cpp
+ node/keepdiceexecnode.cpp
+ node/listaliasnode.cpp
+ node/listsetrollnode.cpp
+ node/numbernode.cpp
+ node/parenthesesnode.cpp
+ node/rerolldicenode.cpp
+ node/scalaroperatornode.cpp
+ node/sortresult.cpp
+ node/startingnode.cpp
+ cli/main.cpp
)
#add_executable(dice cli/main.cpp)
target_link_libraries(dice ${Qt5Core_LIBRARIES})
+INSTALL_TARGETS(/bin dice)
#qt5_use_modules()
diff --git a/cli/main.cpp b/cli/main.cpp
index 2c4ddfa..f005cc3 100644
--- a/cli/main.cpp
+++ b/cli/main.cpp
@@ -26,6 +26,20 @@
#include <QCommandLineOption>
#include <QTextStream>
+/**
+ * @page Dice
+ * The cli for DiceParser the new dice system from rolisteam.
+ * @section Build and install
+ * To build this program, type these command:
+ * - mkdir build
+ * - cd build
+ * - cmake ../
+ * - make
+ * - make install
+ * @return
+ */
+
+
QTextStream out(stdout, QIODevice::WriteOnly);
@@ -156,9 +170,9 @@ Options:\n\
int main(int argc, char *argv[])
{
- QCoreApplication app(argc,argv);
+ /*QCoreApplication app(argc,argv);
QCoreApplication::setApplicationName("dice");
- QCoreApplication::setApplicationVersion("1.0");
+ QCoreApplication::setApplicationVersion("1.0");*/
QStringList commands;
diff --git a/dicealias.h b/dicealias.h
index ebf7a02..5acca46 100644
--- a/dicealias.h
+++ b/dicealias.h
@@ -24,7 +24,7 @@
#include <QString>
/**
- * @brief The DiceAlias class
+ * @brief The DiceAlias class is dedicated to store aliases, alias is mainly two QString. The Alias and its replacement. The replacement can be a simple QString or a RegExp.
*/
class DiceAlias
{
diff --git a/diceparser.h b/diceparser.h
index 717630e..17f8e1c 100644
--- a/diceparser.h
+++ b/diceparser.h
@@ -58,7 +58,6 @@ class ExploseDiceNode;
*
*/
-class Dice;
/**
* @brief The DiceParser class facade class, it receives a command and return a DiceResult class (not yet implemented).
*/
@@ -293,14 +292,4 @@ private:
ParsingToolBox* m_parsingToolbox;
};
-/**
- * @brief The Dice class is a basic class to store dice. (May not be required any more).
- */
-class Dice
-{
-public:
- DiceParser::DiceOperator m_diceOp;
- int m_faces;
-};
-
#endif // DICEPARSER_H
diff --git a/die.h b/die.h
index c9ed28a..6b640b7 100644
--- a/die.h
+++ b/die.h
@@ -25,7 +25,7 @@
#include <QList>
/**
- * @brief The Die class
+ * @brief The Die class implements all methods required from a die. You must set the Faces first, then you can roll it and roll it again, to add or replace the previous result.
*/
class Die
{
diff --git a/result/stringresult.h b/result/stringresult.h
index 4a9a4a4..5a6b26c 100644
--- a/result/stringresult.h
+++ b/result/stringresult.h
@@ -4,7 +4,7 @@
#include <QString>
#include "result.h"
/**
- * @brief The StringResult class
+ * @brief The StringResult class stores command result for String.
*/
class StringResult : public Result
{