diff --git a/hecl/Doxyfile b/hecl/Doxyfile index e84c12b42..0c927847d 100644 --- a/hecl/Doxyfile +++ b/hecl/Doxyfile @@ -44,7 +44,7 @@ PROJECT_NUMBER = # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "High-Level Extensible Combiner Language" +PROJECT_BRIEF = "High-Level Extensible Combiner Language and Resource Database" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 diff --git a/hecl/driver/CToolAdd.hpp b/hecl/driver/CToolAdd.hpp index 607441cbe..58b04dd00 100644 --- a/hecl/driver/CToolAdd.hpp +++ b/hecl/driver/CToolAdd.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_ADD +#define CTOOL_ADD #include "CToolBase.hpp" @@ -15,3 +14,5 @@ public: { } }; + +#endif // CTOOL_ADD diff --git a/hecl/driver/CToolBase.hpp b/hecl/driver/CToolBase.hpp index 57959188b..bb645c8b4 100644 --- a/hecl/driver/CToolBase.hpp +++ b/hecl/driver/CToolBase.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_BASE +#define CTOOL_BASE class CToolBase { @@ -12,3 +11,4 @@ public: virtual ~CToolBase() {} }; +#endif // CTOOL_BASE diff --git a/hecl/driver/CToolClean.hpp b/hecl/driver/CToolClean.hpp index 11e01ae30..1dfa2b4ab 100644 --- a/hecl/driver/CToolClean.hpp +++ b/hecl/driver/CToolClean.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_CLEAN +#define CTOOL_CLEAN #include "CToolBase.hpp" @@ -15,3 +14,5 @@ public: { } }; + +#endif // CTOOL_CLEAN diff --git a/hecl/driver/CToolCook.hpp b/hecl/driver/CToolCook.hpp index 974dcaf41..8bbfbc1b4 100644 --- a/hecl/driver/CToolCook.hpp +++ b/hecl/driver/CToolCook.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_COOK +#define CTOOL_COOK #include "CToolBase.hpp" @@ -15,3 +14,5 @@ public: { } }; + +#endif // CTOOL_COOK diff --git a/hecl/driver/CToolGroup.hpp b/hecl/driver/CToolGroup.hpp index c0f91781e..a28c0a89e 100644 --- a/hecl/driver/CToolGroup.hpp +++ b/hecl/driver/CToolGroup.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_GROUP +#define CTOOL_GROUP #include "CToolBase.hpp" @@ -15,3 +14,5 @@ public: { } }; + +#endif // CTOOL_GROUP diff --git a/hecl/driver/CToolHelp.hpp b/hecl/driver/CToolHelp.hpp index efca42988..0553f3538 100644 --- a/hecl/driver/CToolHelp.hpp +++ b/hecl/driver/CToolHelp.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_HELP +#define CTOOL_HELP #include "CToolBase.hpp" @@ -15,3 +14,5 @@ public: { } }; + +#endif // CTOOL_HELP diff --git a/hecl/driver/CToolInit.hpp b/hecl/driver/CToolInit.hpp index 341e431d8..f049e7f50 100644 --- a/hecl/driver/CToolInit.hpp +++ b/hecl/driver/CToolInit.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_INIT +#define CTOOL_INIT #include "CToolBase.hpp" @@ -15,3 +14,5 @@ public: { } }; + +#endif // CTOOL_INIT diff --git a/hecl/driver/CToolPackage.hpp b/hecl/driver/CToolPackage.hpp index 9532b465f..be33b7e5c 100644 --- a/hecl/driver/CToolPackage.hpp +++ b/hecl/driver/CToolPackage.hpp @@ -1,6 +1,5 @@ -#ifndef MAIN_CPP -#error This file may only be included from main.cpp -#endif +#ifndef CTOOL_PACKAGE +#define CTOOL_PACKAGE #include #include @@ -17,3 +16,5 @@ public: { } }; + +#endif // CTOOL_PACKAGE diff --git a/hecl/driver/main.cpp b/hecl/driver/main.cpp index 68e1c09be..318478441 100644 --- a/hecl/driver/main.cpp +++ b/hecl/driver/main.cpp @@ -3,6 +3,7 @@ #include #define MAIN_CPP +#include "CToolBase.hpp" #include "CToolInit.hpp" #include "CToolAdd.hpp" #include "CToolGroup.hpp" diff --git a/hecl/extra/hecl_autocomplete.sh b/hecl/extra/hecl_autocomplete.sh new file mode 100755 index 000000000..65be42b3e --- /dev/null +++ b/hecl/extra/hecl_autocomplete.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +_hecl () +{ + local word=${COMP_WORDS[COMP_CWORD]} + local filecmds=(init add group cook clean package) + + if [ $COMP_CWORD == 1 ] + then + COMPREPLY=($(compgen -W "${filecmds[*]} help" "${word}")) + return 0 + elif [ $COMP_CWORD == 2 ] + then + case ${COMP_WORDS[1]} in + init|add|group|cook|clean|package) + COMPREPLY=($(compgen -f -- "${word}")) + ;; + help) + COMPREPLY=($(compgen -W "${filecmds[*]}" "${word}")) + ;; + esac + fi +} + +complete -F _hecl hecl + diff --git a/hecl/include/HECLDatabase.hpp b/hecl/include/HECLDatabase.hpp index 30ee230f7..af906bd1b 100644 --- a/hecl/include/HECLDatabase.hpp +++ b/hecl/include/HECLDatabase.hpp @@ -296,6 +296,11 @@ public: std::function feedbackCb, bool recursive=false)=0; + /** + * @brief Interrupts a cook in progress (call from SIGINT handler) + */ + virtual void interruptCook()=0; + /** * @brief Delete cooked objects for file or directory * @param path file or directory of intermediates to clean @@ -304,11 +309,6 @@ public: */ virtual bool cleanPath(const std::string& path, bool recursive=false)=0; - /** - * @brief Interrupts a cook in progress (call from SIGINT handler) - */ - virtual void interruptCook()=0; - }; /**