From: hama Date: Sun, 10 Aug 2014 00:40:26 +0000 (+0200) Subject: dayly work X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=7ea3d82a89e95cef0e43896c72d36b265cb91397;p=reqt dayly work --- diff --git a/rplcore/rplbytestorage.cpp b/rplcore/rplbytestorage.cpp index 0230073..4aca921 100644 --- a/rplcore/rplbytestorage.cpp +++ b/rplcore/rplbytestorage.cpp @@ -6,6 +6,14 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * + * @brief A very efficient storage for bytes and C strings. + */ +/** @file rplcore/rplbytestorage.hpp + * + * @brief Definitions for a a very efficient storage for bytes and C strings. + */ #include "rplcore/rplcore.hpp" @@ -148,11 +156,11 @@ uint8_t* RplByteStorage::allocateZeros(int size) } /** - * @brief Allocates a byte block. + * @brief Copy a byte block to a new allocated byte block. * - * @param size the size of the block to allocate - * - * @return a byte block (without a trailing '\0') + * @param source the source to copy + * @param size the size of the block to allocate + * @return a byte block (without a trailing '\0') */ uint8_t* RplByteStorage::allocateBytes(void* source, int size) { diff --git a/rplcore/rplcontainer.cpp b/rplcore/rplcontainer.cpp index 4a292ef..5760dda 100644 --- a/rplcore/rplcontainer.cpp +++ b/rplcore/rplcontainer.cpp @@ -7,6 +7,10 @@ */ #include "rplcore/rplcore.hpp" +/** @file + * @brief Implements a portable data container. + */ + /** @class RplContainer rplcontainer.hpp "rplcore/rplcontainer.hpp" * * @brief Implements a portable data container. diff --git a/rplcore/rplexception.cpp b/rplcore/rplexception.cpp index fac6605..16ffc29 100644 --- a/rplcore/rplexception.cpp +++ b/rplcore/rplexception.cpp @@ -7,12 +7,29 @@ */ /** @mainpage * - * The rplcore directory contains the basic classes of the rplqt source. - * - * If you want to use any of the rplqt sources these rplcore classes - * are necessary to include. + * @note A real public library for QT. + * + * This library contains the module groups + * + * + * Each module group has a central include file, which organizes the necessary + * include files. You had to include only the central include file. + * + * Example: + *

+ * #include "rplcore/rplcore.hpp"
+ * #include "rplexpr/rplexpr.hpp"
+ * 
+ * In this case all definitions of rplcore and rplexpr are available. + */ +/** @file + * @brief Generally usable exceptions. */ - #include "rplcore/rplcore.hpp" /** @class RplException rplexception.hpp "rplcore/rplexception.hpp" diff --git a/rplcore/rpllogger.cpp b/rplcore/rpllogger.cpp index 0499c1a..f85bcae 100644 --- a/rplcore/rpllogger.cpp +++ b/rplcore/rpllogger.cpp @@ -5,6 +5,10 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ + +/** @file + * A configurable logger for different output media. + */ #include "rplcore/rplcore.hpp" #include #include @@ -402,6 +406,11 @@ RplAppender* RplLogger::findAppender(const char* name) const { * @brief Builds the standard appender configured by a configuration file. * * @param config configuration file + * @param prefix the prefix of the key in the config file + * (in front of "name") + * @param defaultLogfilePrefix + * the prefix of the log file if no entry in the + * configuration file */ void RplLogger::buildStandardAppender(RplConfig* config, const char* prefix, diff --git a/rplcore/rplqstring.cpp b/rplcore/rplqstring.cpp index 90c156d..664a186 100644 --- a/rplcore/rplqstring.cpp +++ b/rplcore/rplqstring.cpp @@ -6,7 +6,9 @@ * The original sources can be found on https://github.com/republib. */ - +/** @file + * @brief Missed operation for QStrings. + */ #include "rplcore/rplcore.hpp" diff --git a/rplcore/rplstring.cpp b/rplcore/rplstring.cpp index da2c2c9..d98d746 100644 --- a/rplcore/rplstring.cpp +++ b/rplcore/rplstring.cpp @@ -5,6 +5,9 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Missed operation for QByteArrays. + */ #include "rplcore.hpp" /** @class RplString rplstring.hpp "rplcore/rplstring.hpp" diff --git a/rplcore/rplterminator.cpp b/rplcore/rplterminator.cpp index 6b373aa..9270bef 100644 --- a/rplcore/rplterminator.cpp +++ b/rplcore/rplterminator.cpp @@ -5,6 +5,9 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Implements a thread stopper. + */ #include "rplcore.hpp" enum { diff --git a/rplcore/rpltest.cpp b/rplcore/rpltest.cpp index 3440f71..340611b 100644 --- a/rplcore/rpltest.cpp +++ b/rplcore/rpltest.cpp @@ -5,6 +5,9 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief A testing tool like JUnit. + */ #include "rplcore/rplcore.hpp" #include "rpltest.hpp" @@ -338,6 +341,8 @@ bool RplTest::assertNotNull(const void* ptr, const char* file, int lineNo) { * * @param expected the file with the expected content * @param current the file with the current content + * @param file the source file (point of the comparison) + * @param lineNo the source position (point of the comparison) * @return true: the files are equal
* false: otherwise */ diff --git a/rplcore/rplwriter.cpp b/rplcore/rplwriter.cpp index eca58a6..835655f 100644 --- a/rplcore/rplwriter.cpp +++ b/rplcore/rplwriter.cpp @@ -6,6 +6,12 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief A writer to an output media. + * + * Implementation of the abstract base class RplWriter and + * the concrete derivation RplFileWriter. + */ #include "rplcore/rplcore.hpp" @@ -40,9 +46,9 @@ void RplWriter::close() { } /** - * @brief Puts a given count of '\t' to the output medium. + * @brief Puts a given count of "\t" to the output medium. * - * @param indent indention level, number of '\t' + * @param indent indention level, number of "\t" */ void RplWriter::indent(int indent) { @@ -86,8 +92,7 @@ void RplWriter::formatLine(const char* format, ...) * @brief Writes a line with indention to the output medium. * * @param indent indention level. Indention is limited to 20 - * @param format format string with placeholders like sprintf() - * @param ... variable arguments, values for the placeholders + * @param line the line to write */ void RplWriter::writeIndented(int indent, const char* line) { @@ -99,7 +104,8 @@ void RplWriter::writeIndented(int indent, const char* line) * @brief Writes a line with indention to the output medium. * * @param indent indention level. Indention is limited to 20 - * @param line line to write (without '\n') + * @param format format string with placeholders like sprintf + * @param ... the values for the placeholders (variable arguments) */ void RplWriter::formatIndented(int indent, const char* format, ...) { @@ -123,6 +129,7 @@ void RplWriter::formatIndented(int indent, const char* format, ...) * * @param filename the file's name * @param mode write mode, "w" for write or "a" for append + * @param eoln line end: "\n" or "\r\n" */ RplFileWriter::RplFileWriter(const char* filename, const char* mode, const char* eoln) : diff --git a/rplexpr/rplasclasses.cpp b/rplexpr/rplasclasses.cpp index 39ea4e3..479a387 100644 --- a/rplexpr/rplasclasses.cpp +++ b/rplexpr/rplasclasses.cpp @@ -6,6 +6,9 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Predefined classes of the virtual machine, e.g RplASInteger. + */ #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" @@ -437,6 +440,7 @@ bool RplASBoolean::boolValueOf(void*) const * @brief Returns a string representation of an instance. * * @param object the object to convert + * @param maxLength not used * @return a string describing the object */ QString RplASBoolean::toString(void* object, int) const @@ -504,6 +508,7 @@ bool RplASFloat::boolValueOf(void*) const * @brief Returns a string representation of an instance. * * @param object the object to convert + * @param maxLength not used * @return a string describing the object */ QString RplASFloat::toString(void* object, int) const @@ -544,6 +549,7 @@ bool RplASInteger::boolValueOf(void*) const * @brief Returns a string representation of an instance. * * @param object the object to convert + * @param maxLength the maximum length of the result * @return a string describing the object */ QString RplASInteger::toString(void* object, int maxLength) const @@ -616,6 +622,7 @@ bool RplASString::boolValueOf(void* object) const * @brief Returns a string representation of an instance. * * @param object the object to convert + * @param maxLength the maximum length of the result * @return a string describing the object */ QString RplASString::toString(void* object, int maxLength) const @@ -709,6 +716,7 @@ bool RplASList::boolValueOf(void* object) const * @brief Returns a string representation of an instance. * * @param object the object to convert + * @param maxLength unused * @return a string describing the object */ QString RplASList::toString(void* object, int maxLength) const @@ -809,6 +817,7 @@ bool RplASMap::boolValueOf(void* object) const * @brief Returns a string representation of an instance. * * @param object the object to convert + * @param maxLength maximal length of the result * @return a string describing the object */ QString RplASMap::toString(void* object, int maxLength) const @@ -868,7 +877,6 @@ RplVariable::RplVariable(const QString& name) : * * @param writer writes to output * @param indent nesting level: so many tabs will be used as prefix - * @param header NULL or the headline */ void RplVariable::dump(RplWriter& writer, int indent) { @@ -940,6 +948,11 @@ QString RplASVoid::toString(void*, int) const * @brief Implements a data type representing a calculated value. */ +/** + * @brief Constructor. + * + * @param tree the abstract syntax tree + */ RplASFormula::RplASFormula(RplASTree& tree) : RplASClass("Formula", tree) { @@ -950,7 +963,7 @@ RplASFormula::RplASFormula(RplASTree& tree) : * * In this case we do nothing. * - * @param formula ignored + * @param expr the result * @return */ void* RplASFormula::newValueInstance(void* expr) const @@ -1005,6 +1018,8 @@ QString RplASFormula::toString(void* object, int) const * @brief Constructor. * * @param name name of the user defined class + * @param position the position of the class definition + * @param tree the abstract syntax tree */ RplASUserClass::RplASUserClass(const QString& name, const RplSourcePosition* position, diff --git a/rplexpr/rplastree.cpp b/rplexpr/rplastree.cpp index 21a4789..c894d7a 100644 --- a/rplexpr/rplastree.cpp +++ b/rplexpr/rplastree.cpp @@ -5,6 +5,11 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * + * @brief Implementation of an Abstract Syntax Tree. + * + */ #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" @@ -54,12 +59,6 @@ void dumpMap(RplWriter& writer, RplASMapOfVariants& map, bool withEndOfLine) * @brief Implements a specific exception for the Abstract Syntax Tree. */ -/** - * @brief RplASException::RplASException - * @param message - */ - - /** * @brief Builds the message. * @@ -95,11 +94,7 @@ RplASException::RplASException(const RplSourcePosition* position, } /** - * @brief Builds the message. - * - * @param position describes the position of the error/warning - * @param format the reason of the exception - * @param varList the values for the placeholders in the format. + * @brief Constructor. */ RplASException::RplASException() : RplException("") @@ -347,7 +342,7 @@ void RplASVariant::setBool(bool value) /** * @brief Make the instance to a boolean value. * - * @param value the string value. + * @param string the string value. */ void RplASVariant::setString(const QString& string) { @@ -358,6 +353,7 @@ void RplASVariant::setString(const QString& string) /** * @brief Builds a string. * + * @param maxLength the maximum length of the result * @return the value as string */ QString RplASVariant::toString(int maxLength) const @@ -389,6 +385,7 @@ QString RplASVariant::toString(int maxLength) const * @brief Make the instance to an object. * * @param object the class specific value object. + * @param clazz the data type of the object */ void RplASVariant::setObject(void* object, const RplASClass* clazz) { @@ -760,6 +757,7 @@ const QString& RplASNamedValue::name() const * @brief Calculates the value. * * @param value In/OUT: the value of the instance + * @param frame not used * @return NULL */ RplASNode1* RplASNamedValue::calc(RplASVariant& , RplStackFrame* ) @@ -821,7 +819,7 @@ void RplASIndexedValue::dump(RplWriter& writer, int indent) * * @brief Implements variable definition for the Abstract Syntax Tree. * - * m_child: next statement
+ * m_child: next statement
* m_child2: named value (name + default value expression) * m_child3: initial value or NULL */ @@ -905,7 +903,7 @@ RplASNode1* RplASVarDefinition::calc(RplASVariant&) * * @brief Implements an statement consisting of an expression. * - * m_child: next statement
+ * m_child: next statement
* m_child2: expression */ @@ -1002,9 +1000,9 @@ void RplASNode1::setChild(RplASItem* child) /** * @brief Writes the internals of a statement list into a file. * - * @param writer writes to output media - * @param indent the indent level of the statement list - * @param chain the chain of statements to dump + * @param writer writes to output media + * @param indent the indent level of the statement list + * @param statements the chain of statements to dump */ void RplASNode1::dumpStatements(RplWriter& writer, int indent, RplASItem* statements) @@ -1228,9 +1226,9 @@ RplASItem* RplASNode6::child6() const } /** - * @brief Sets the child5. + * @brief Sets the child6. * - * @param child5 the new child3 + * @param child6 the new child6 */ void RplASNode6::setChild6(RplASItem* child6) { @@ -1246,6 +1244,9 @@ void RplASNode6::setChild6(RplASItem* child6) /** * @brief Constructor. + * + * @param op the operator id + * @param type the node type */ RplASUnaryOp::RplASUnaryOp(int op, RplASItemType type) : RplASNode1(type), @@ -1292,8 +1293,7 @@ void RplASUnaryOp::dump(RplWriter& writer, int indent) */ /** - * @brief RplASStatement::RplASStatement - * @param op + * @brief Constructor. */ RplASStatement::RplASStatement() { @@ -1379,7 +1379,7 @@ void RplASCondition::dump(RplWriter& writer, int indent) * If the condition is evaluated to true, the then-part will be executed. * Otherwise the else-part if it exists. * - * m_child: next statement
+ * m_child: next statement
* m_child2: condition
* m_child3: then part
* m_child4: else part or NULL
@@ -1449,7 +1449,7 @@ void RplASIf::dump(RplWriter& writer, int indent) * Then the condition will be tested. If true the body will be executed * and then the forwarding statement. * - * m_child: next statement
+ * m_child: next statement
* m_child2: body
* m_child3: iterator variable
* m_child4: container variable
@@ -1508,12 +1508,12 @@ void RplASForIterated::dump(RplWriter& writer, int indent) * The start and end value will be calculated. * The body will be executed so many times given by the start and end value. * - * m_child: next statement
+ * m_child: next statement
* m_child2: body
* m_child3: variable or NULL
* m_child4: start value or NULL
* m_child5: end value
- * m_child6: step value or NULL
+ * m_child6: step value or NULL * */ @@ -1587,7 +1587,7 @@ void RplASForCounted::dump(RplWriter& writer, int indent) * The while statement has an a condition and a body. * The body will be executed while the condition returns true. * - * m_child: next statement
+ * m_child: next statement
* m_child2: condition
* m_child3: body
*/ @@ -1646,7 +1646,7 @@ void RplASWhile::dump(RplWriter& writer, int indent) * The while statement has an a condition and a body. * The body will be executed while the condition returns true. * - * m_child: next statement
+ * m_child: next statement
* m_child2: condition
* m_child3: body
*/ @@ -1874,6 +1874,7 @@ void RplASTree::finishModule(const QString& name) /** * @brief Handles the start of a new class definition. * @param name name of the class/method + * @param type the symbol space type * @return the new symbol space */ RplSymbolSpace* RplASTree::startClassOrMethod(const QString& name, @@ -1975,7 +1976,7 @@ void RplASTree::dump(const char* filename, int flags, const char* header) * * @brief Implements a method or function call for the Abstract Syntax Tree. * - * m_child: next statement
+ * m_child: next statement
* m_child2: argument list
* m_child3: parent (variable, field ...) */ @@ -2053,7 +2054,7 @@ RplASArgument* RplASMethodCall::arg1() const * * @brief Implements a call of a method or function. * - * m_child: ???
+ * m_child: body * m_child2: argument list (or NULL) */ @@ -2118,14 +2119,14 @@ void RplASBinaryOp::dump(RplWriter& writer, int indent) * * The special case "function" (a method without class) is included. * - * m_child: body
+ * m_child: body
* m_child2: parameter list (or NULL) */ /** * @brief Constructor. * * @param name the method name - * @param type the method result type + * @param tree the abstract syntax tree */ RplASMethod::RplASMethod(const QString& name, RplASTree& tree) : RplASNode2(AST_METHOD), diff --git a/rplexpr/rplastree.hpp b/rplexpr/rplastree.hpp index cf36ecd..742d6be 100644 --- a/rplexpr/rplastree.hpp +++ b/rplexpr/rplastree.hpp @@ -43,7 +43,7 @@ enum RplASItemType { class RplASException : public RplException { public: RplASException(); - RplASException(const RplSourcePosition* position, const char* message, ...); + RplASException(const RplSourcePosition* position, const char* format, ...); protected: void build(const RplSourcePosition* position, const char* format, va_list varList); @@ -138,7 +138,6 @@ public: * * @param writer writes to output media * @param indent nesting level: so many tabs will be used as prefix - * @param header NULL or the headline */ virtual void dump(RplWriter& writer,int indent) = 0; public: @@ -552,6 +551,7 @@ public: * @brief Returns a string representation of an instance. * * @param object the object to convert + * @param maxLength the maximum length of the result (string) * @return a string describing the object */ virtual QString toString(void *object, int maxLength = 80) const = 0; diff --git a/rplexpr/rpllexer.cpp b/rplexpr/rpllexer.cpp index e8738cf..286f05b 100644 --- a/rplexpr/rpllexer.cpp +++ b/rplexpr/rpllexer.cpp @@ -5,6 +5,9 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Configurable scanner, wich separates syntactic symbols from an input media. + */ #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" @@ -19,10 +22,6 @@ RplLexer* RplLexer::m_active = NULL; * */ -/** - * @brief RplLexException::RplLexException - * @param message - */ /** * @brief Constructor. * @@ -317,13 +316,15 @@ static void charClassToCharInfo(const char* charClass, int flag, * @brief Constructor. * * @param source the input source handler - * @param keywords a string with all keywords delimited by ' '. + * @param keywords a string with all keywords delimited by " ". * Example: "if then else fi while do done" - * @param operators a string with the operators separated by blank or '\n'. - * '\n' separates the operators with the same priority. + * @param operators a string with the operators separated by blank or "\n". + * "\n" separates the operators with the same priority. * Lower position means lower priority + * @param rightAssociatives + * the operators which are right associative * @param comments a string with pairs of comment begin and end delimited - * by ' '. The comment end can be '\n' for line end. + * by " ". The comment end can be "\n" for line end. * Example: "/ * * / // \n" (ignore the blank in "* /") * @param firstCharsId string with the characters which are allowed as first * characters of an id diff --git a/rplexpr/rpllexer.hpp b/rplexpr/rpllexer.hpp index 5d23de7..68a4199 100644 --- a/rplexpr/rpllexer.hpp +++ b/rplexpr/rpllexer.hpp @@ -128,11 +128,11 @@ public: SF_TICK = 1 << 1, /// " can be a string delimiter SF_QUOTE = 1 << 2, - /// character escaping like in C: \ is + /// character escaping like in C: "\x" is "x" SF_C_ESCAPING = 1 << 3, - /// special characters like in C: \r \f \n \t \a + /// special characters like in C: "\r" "\f" "\n" "\t" "\a" SF_C_SPECIAL = 1 << 4, - /// characters can be written in hexadecimal notation: \x20 is ' ' + /// characters can be written in hexadecimal notation: "\x20" is " " SF_C_HEX_CHARS = 1 << 5, /// A delimiter inside a string must be doubled (like in Pascal) SF_DOUBLE_DELIM = 1 << 6, diff --git a/rplexpr/rplmfparser.cpp b/rplexpr/rplmfparser.cpp index 14e07e7..54db19f 100644 --- a/rplexpr/rplmfparser.cpp +++ b/rplexpr/rplmfparser.cpp @@ -6,6 +6,9 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief A parser for the language ML. + */ #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" @@ -155,10 +158,10 @@ RplASItem* RplMFParser::parseRepeat() * @brief Parses a for statement. * * Syntax: - * for [ ] [ from ] to [ step ] do - * od + * for [ VAR ] [ from START_EXPR ] to END_EXPR [ step STEP_EXPR ] do + * BODY od * - * for in do od + * for VAR in ITERABLE_EXPR do BODY od * * @post the token behind the do is read * @return the abstract syntax tree of the for statement @@ -208,8 +211,8 @@ RplASItem* RplMFParser::parseFor() * @brief Parses a variable definition. * * Syntax: - * Variable: { "const" | "lazy" }* id [ = ] [ ";" ] - * Parameter: { "const" | "lazy" }* id [ = ] { "," | ")" } + * Variable: { "const" | "lazy" }* TYPE id [ = EXPR ] [ ";" ] + * Parameter: { "const" | "lazy" }* TYPE id [ = EXPR ] { "," | ")" } * * @pre first token of the definition is read * @post token behind the definition is read: ';', ',', ')' @@ -352,7 +355,7 @@ RplASVariant* RplMFParser::tokenToVariant(RplToken* token, * @brief Parses a list. * * Syntax:
- * '[' [ [ ',' ...]] ']' + * '[' [ EXPR_1 [ ',' EXPR_2 ...]] ']' * * @pre '[' is the current token * @post the token behind the ']' is read @@ -398,7 +401,7 @@ RplASItem* RplMFParser::parseList() * @brief Parses a map. * * Syntax:
- * '{' [ ':' [ ',' ': ...]] '}' + * '{' [ STRING_EXPR_1 ':' EXPR_1 [ ',' STRING_EXPR_2 ': EXPR_2 ...]] '}' * * @pre '{' is the current token * @post the token behind the '}' is read diff --git a/rplexpr/rplparser.cpp b/rplexpr/rplparser.cpp index 4ed24f8..3ead4a5 100644 --- a/rplexpr/rplparser.cpp +++ b/rplexpr/rplparser.cpp @@ -6,6 +6,10 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Generally usable parts of an parser, e.g. error handling. + */ + #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" @@ -88,8 +92,7 @@ RplParser::RplParser(RplLexer& lexer, RplASTree& tree) : * @param prefix first char in the message: 'E' (error) or 'W' (warning) * @param location unique id of the error/warning message * @param position position of the error/warning - * @param format message with placeholdes like sprintf() - * @param varList the variable argument list + * @param message message with placeholdes like sprintf() */ void RplParser::addSimpleMessage(LevelTag prefix, int location, const RplSourcePosition* position, @@ -131,7 +134,7 @@ void RplParser::addMessage(LevelTag prefix, int location, * The exception will be catched at a position where error recovery can take place. * * @param location unique id of the error/warning message - * @param format message with placeholdes like sprintf() + * @param message error message */ void RplParser::syntaxError(int location, const char* message) diff --git a/rplexpr/rplsource.cpp b/rplexpr/rplsource.cpp index f694219..14a2894 100644 --- a/rplexpr/rplsource.cpp +++ b/rplexpr/rplsource.cpp @@ -5,6 +5,17 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ + +/** @file + * @brief Reading from several input media. + * + * The abstract base class RplReader and its concrete derivations + * RplStringReader, RplFileReader are used to read + * from one medium. + * The RplSource combines several readers and build a uniquely + * usable input stream. + */ + #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" @@ -103,7 +114,6 @@ RplSourcePosition::RplSourcePosition() : * @param unit name of the input source (normally a file) * @param lineNo line number inside the input source * @param colNo distance to the line start - * @param source parent: the source */ RplSourcePosition::RplSourcePosition(RplSourceUnit* unit, int lineNo, int colNo) : @@ -726,16 +736,17 @@ void RplStringReader::replaceSource(const QString& name, const QString& content) /** * @brief Constructor. * - * @param name name of the unit, the filename + * @param file name of the directory * @param reader the parent */ -RplFileSourceUnit::RplFileSourceUnit(const QDir& dir, +RplFileSourceUnit::RplFileSourceUnit(const QDir& file, RplFileReader* reader) : - RplSourceUnit(dir.absolutePath(), reader), + RplSourceUnit(file.absolutePath(), reader), m_currentPosition(0), - m_file(dir.absolutePath()), + m_file(file.absolutePath()), m_textStream(&m_file), - m_line() { + m_line() +{ } /** diff --git a/rplexpr/rplvm.cpp b/rplexpr/rplvm.cpp index 176a44d..249274b 100644 --- a/rplexpr/rplvm.cpp +++ b/rplexpr/rplvm.cpp @@ -6,6 +6,10 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * + * @brief Implements an interpreter of an abstract syntax tree. + */ #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" diff --git a/rplmath/rplenigma.cpp b/rplmath/rplenigma.cpp index 34efc19..ca21779 100644 --- a/rplmath/rplenigma.cpp +++ b/rplmath/rplenigma.cpp @@ -1,10 +1,15 @@ /* + * * Licence: * You can use and modify this file without any restriction. * There is no warranty. * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Implements encryption and decryption engines. + */ + #include "rplmath.hpp" /** @class RplEnigma::secret_t rplenigma.hpp "rplmath/rplenigma.hpp" diff --git a/rplmath/rplmatrix.cpp b/rplmath/rplmatrix.cpp index e6cf18f..d27e95d 100644 --- a/rplmath/rplmatrix.cpp +++ b/rplmath/rplmatrix.cpp @@ -5,6 +5,10 @@ * Author: hm */ +/** @file + * @brief Implements 2 dimensional matrices. + */ + #include "rplmath/rplmath.hpp" RplMatrixException::RplMatrixException(const RplMatrix& RplMatrix, @@ -38,6 +42,7 @@ RplMatrix::RplMatrix(const char* name) : * * @param rows number of rows * @param cols number of columns + * @param name the name of the matrix */ RplMatrix::RplMatrix(int rows, int cols, const char* name): m_rows(rows), @@ -73,7 +78,7 @@ RplMatrix::RplMatrix(const RplMatrix& source) : * * @param rows the row number * @param cols the column number - * @trows RplMatrixException + * @throws RplMatrixException */ void RplMatrix::checkDefinition(int rows, int cols) const { @@ -253,7 +258,7 @@ bool RplMatrix::operator ==(const RplMatrix& operand) const /** * Compares the instance with a given scalar. * - * @param operand the scalar to compare + * @param scalar the scalar to compare * @return true: all elements are equal to the scalar
* false: otherwise */ diff --git a/rplmath/rplrandom.cpp b/rplmath/rplrandom.cpp index 6bf00d5..581a0c9 100644 --- a/rplmath/rplrandom.cpp +++ b/rplmath/rplrandom.cpp @@ -5,6 +5,10 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ + +/** @file + * @brief Implements pseudo random generators. + */ #include "rplmath.hpp" /** @class RplRandom rplrandom.hpp "rplmath/rplrandom.hpp" diff --git a/rplnet/rpltcpclient.cpp b/rplnet/rpltcpclient.cpp index 981ab5a..b78c121 100644 --- a/rplnet/rpltcpclient.cpp +++ b/rplnet/rpltcpclient.cpp @@ -101,8 +101,6 @@ void RplTcpClient::handleError(QAbstractSocket::SocketError socketError) { * @brief Constructor. * * @param configurator delivers some connection parameters - * @param port 0 or the port of the server - * @param sleepMilliSec duration of a busy wait * @param logger the logger. If NULL a default logger will be used */ RplClientThread::RplClientThread(RplConfigurator& configurator, diff --git a/rplnet/rpltcpserver.cpp b/rplnet/rpltcpserver.cpp index e4533d9..d6ab519 100644 --- a/rplnet/rpltcpserver.cpp +++ b/rplnet/rpltcpserver.cpp @@ -105,7 +105,7 @@ qintptr RplTcpThread::getSocketDescriptor() const { * * @param configurator some parameters will be get from this configurator * @param taskHandler this handler reads from the tcp and interprets the content - * @param threadFacctory creates a thread for a new connection + * @param threadFactory creates a thread for a new connection * @param logger NULL or logger * @param parent NULL or the parent which deletes the childen */ diff --git a/unittests/rplastree_test.cpp b/unittests/rplastree_test.cpp index 22585f3..7786ab4 100644 --- a/unittests/rplastree_test.cpp +++ b/unittests/rplastree_test.cpp @@ -5,6 +5,12 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ + +/** @file + * @brief Unit test of the abstract syntax tree. + */ + + #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" #include "rplcore/rpltest.hpp" diff --git a/unittests/rplbytestorage_test.cpp b/unittests/rplbytestorage_test.cpp index 6c8ae4c..1245694 100644 --- a/unittests/rplbytestorage_test.cpp +++ b/unittests/rplbytestorage_test.cpp @@ -5,6 +5,10 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Unit test of the byte and C string storage. + */ + #include "rplcore/rplcore.hpp" #include "rplcore/rpltest.hpp" diff --git a/unittests/rpllexer_test.cpp b/unittests/rpllexer_test.cpp index 78780b6..3d9696e 100644 --- a/unittests/rpllexer_test.cpp +++ b/unittests/rpllexer_test.cpp @@ -6,6 +6,10 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Unit test of the syntax symbol extractor. + */ + #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" #include "rplcore/rpltest.hpp" diff --git a/unittests/rplmatrix_test.cpp b/unittests/rplmatrix_test.cpp index 896dfc0..b9a651d 100644 --- a/unittests/rplmatrix_test.cpp +++ b/unittests/rplmatrix_test.cpp @@ -4,6 +4,11 @@ * Created on: 29.05.2014 * Author: hm */ + +/** @file + * @brief Unit test of the matrices. + */ + #include "rplcore/rplcore.hpp" #include "rplmath/rplmath.hpp" #include "rplcore/rpltest.hpp" diff --git a/unittests/rplmfparser_test.cpp b/unittests/rplmfparser_test.cpp index 13edfaa..74d0300 100644 --- a/unittests/rplmfparser_test.cpp +++ b/unittests/rplmfparser_test.cpp @@ -5,6 +5,9 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Unit test of the parser for the language "MF". + */ #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" diff --git a/unittests/rplqstring_test.cpp b/unittests/rplqstring_test.cpp index a048ab7..bdadd09 100644 --- a/unittests/rplqstring_test.cpp +++ b/unittests/rplqstring_test.cpp @@ -5,6 +5,10 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Unit test of the QString tools. + */ + #include "rplcore/rplcore.hpp" #include "rplcore/rpltest.hpp" diff --git a/unittests/rplsource_test.cpp b/unittests/rplsource_test.cpp index 9d0a6cd..40cc892 100644 --- a/unittests/rplsource_test.cpp +++ b/unittests/rplsource_test.cpp @@ -6,6 +6,10 @@ * The original sources can be found on https://github.com/republib. */ +/** @file + * @brief Unit test of the input media reader. + */ + #include "rplcore/rplcore.hpp" #include "rplexpr/rplexpr.hpp" #include "rplcore/rpltest.hpp" diff --git a/unittests/rplstring_test.cpp b/unittests/rplstring_test.cpp index b32f701..975e529 100644 --- a/unittests/rplstring_test.cpp +++ b/unittests/rplstring_test.cpp @@ -5,7 +5,10 @@ * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ -// ------------------ + +/** @file + * @brief Unit test of the QByteArray tools. + */ #include "rplcore/rplcore.hpp" #include "rplcore/rpltest.hpp" /** diff --git a/unittests/rplwriter_test.cpp b/unittests/rplwriter_test.cpp index 5816301..b348982 100644 --- a/unittests/rplwriter_test.cpp +++ b/unittests/rplwriter_test.cpp @@ -1,10 +1,16 @@ /* + * * Licence: * You can use and modify this file without any restriction. * There is no warranty. * You also can use the licence from http://www.wtfpl.net/. * The original sources can be found on https://github.com/republib. */ + +/** @file + * @brief Unit test of the output media writers. + */ + #include "rplcore/rplcore.hpp" #include "rplcore/rpltest.hpp" /**