#include <texttools.h>
An interface that provides multiple functions to load text, dox pages and code snippets.
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (TextToolsInterface, MAXON_REFERENCE_NONE, "net.sdktools.interfaces.texttools") | |
|
private |
|
static |
Fills the given array with the absolute path of all files found in the folder and its sub-folders.
[in] | folder | A folder to parse. |
[out] | files | A BaseArray filled with the paths to all files in the folder and sub-folders. |
|
static |
Reads the content of the given file.
[in] | file | The absolute path of the file to load. |
[out] | content | The content of the file. Each line is loaded as an element of the array. |
|
static |
Loads the Dox pages from the given files.
[in] | files | The files to check for Dox pages. |
[out] | doxPages | The array of found DoxPages |
[out] | issues | The array of issues found while searching for Dox pages. |
|
static |
Searches for the given symbol in the given file. E.g. "@section" to get the section ID and title.
[in] | line | The line of text or code. |
[in] | symbol | The symbol to search for. |
[out] | id | The id of the symbol. |
[out] | title | The title of the symbol. |
[out] | issues | Issues found while looking for the symbol. |
|
static |
Loads the code snippets in the given source code files.
[in] | files | An array of source code file paths. |
[out] | snippets | An array to store all found code snippets. |
[out] | issues | An array to store all issues found while searching for code snippets. |
|
static |
Loads all files from the paths defined in the given config file. Accepts: "DOX:c:\something" for Dox files. "SOURCE:c:\something" for source code files.
[in] | configFile | The text file containing absolute folder paths |
[out] | doxFiles | An array to store all files found in the "DOX" folder paths. |
[out] | sourceFiles | An array to store all files found in the "SOURCE" folder paths. |
|
static |
Checks for double spaces " " in the given line. Will not check for spaces at the beginning or end (applies Trim()).
[in] | text | The line to analyse. |
|
static |
Checks for double words like "This is the the source code."
[in] | text | The line to analyse. |
[out] | doubleWord | The first found double word. |
|
static |
Checks for a space " " at the end of the line.
[in] | text | The line to analyse. |
|
static |
Returns the deepest line-nesting. E.g. "X = A(B(C()), D())" returns 3.
[in] | text | The line to analyse. |
|
static |
Calculates the code nesting for the given line. Must be applied to every line of a code snippet.
[in] | text | The current line of code. |
[in,out] | nesting | The current nesting level. |
[in,out] | maxNesting | Current max. nesting level. If the current level is deeper, it is overwritten. |
|
static |
Calculates the cyclomatic complexity. Must be applied to every line of a code snippet.
[in] | text | The current line of code. |
[in,out] | complexity | The incremental complexity value. |
|
static |
Returns the complexity of an "if (" statement. Checks for ||, ==, !=, <=, >=
[in] | text | The current line of code. |