A macro to deprecate functions. More...
Namespaces | |
__DataExchange_internal | |
The namespace with classes used in the implementation. | |
Classes | |
class | CircularDependencyException |
The exception thrown when DependencySorter finds a circular dependency. More... | |
struct | CommentPosition |
A structure keeping the position of C/C++ comments in a string. More... | |
class | DataDownloader |
The class used to download data. More... | |
class | DataStream |
extend QwtArraySeriesData in order to append data incrementally More... | |
class | DataStreamPlot |
The DataStreamPlot display a series of data streams into the plot storing all the history of the data pushed into the DataStreamPlot during time. More... | |
class | DataStreamsWidget |
this widget display one or more DataStreamPlot and utility toolbar for interacting with them More... | |
class | DataUploader |
The class used to upload data. More... | |
class | DataUploaderDownloader |
A class for bi-directional communication. More... | |
class | DatumToUpload |
The class used to implement RAII for data uploading. More... | |
class | DependencySorter |
A class to return data sorted by dependency. More... | |
class | Downloader |
class | GlobalUploaderDownloader |
The class to create or remove associations and to wake all sleeping uploaders and downloaders. More... | |
class | Intervals |
The class modelling intervals of floating point values. More... | |
class | InvalidNewDatumAvailableBehaviorException |
The exception thrown when using invalid combinations of NewDatumAvailableBehavior and objects for notifications. More... | |
class | Logger |
Logger class provides methods for logging messages. More... | |
class | NewDatumEvent |
The event sent to downloader when a new datum is ready. More... | |
class | NewDatumNotifiable |
The interface for classes that want to be notified when a new datum is available. More... | |
class | OptionParser |
A command line option parser. More... | |
class | RandomGenerator |
Random Generator Utility Class. More... | |
class | RandomGeneratorPrivate |
class | ResourceVector |
A vector that can be used as a resource. More... | |
class | RuntimeUserException |
A generic exception the user can throw at runtime. More... | |
class | SimpleInterval |
A class modelling a range of real values. More... | |
class | SimpleTimer |
SimpleTimer object. More... | |
class | StandardLibraryException |
An exception thrown when we catch standard library exceptions in a worker thread. More... | |
struct | StringPosition |
A structure keeping the position of C/C++ strings or characters in a program. More... | |
class | ThreadOperation |
interface for describing an operation to do for the WorkerThread More... | |
class | UnknownException |
The exception stored when an unknown exception is thrown by a ThreadOperation. More... | |
class | UploaderDownloaderAssociationNotPresentException |
The exception thrown when trying to create a datum or download without an uploader/downloader association in place. More... | |
class | UploaderDownloaderAssociationNotUniqueException |
The exception thrown when the association between uploader and downloader is not 1:1. More... | |
class | WorkerThread |
the supporting thread in order to run operations on a different thread instead of the GUI thread More... | |
Typedefs | |
typedef QList< CommentPosition > | CommentsPositions |
A list of positions of comments. More... | |
typedef float | real |
Abstraction on the type of real numbers. More... | |
typedef QList< StringPosition > | StringsPositions |
A list of positions of strings. More... | |
Functions | |
bool FARSA_UTIL_API | initUtilitiesLib () |
template void | Intervals::intersect< const farsa::SimpleInterval * > (const farsa::SimpleInterval *otherBegin, const farsa::SimpleInterval *otherEnd) |
template void | Intervals::subtract< const farsa::SimpleInterval * > (const farsa::SimpleInterval *otherBegin, const farsa::SimpleInterval *otherEnd) |
template void | Intervals::unite< const farsa::SimpleInterval * > (const farsa::SimpleInterval *otherBegin, const farsa::SimpleInterval *otherEnd) |
FARSA_UTIL_TEMPLATE float | invLinearMap (float x, float min=-10, float max=10, float outMin=-1, float outMax=1) |
Inversed Linear mapping from [min,max] to [outMin, outMax]. More... | |
FARSA_UTIL_TEMPLATE float | linearMap (float x, float min=-10, float max=10, float outMin=-1, float outMax=1) |
Linear mapping from [min,max] to [outMin, outMax]. More... | |
template<class T , class U > | |
FARSA_UTIL_TEMPLATE const T | max (const T &t1, const U &t2) |
Template for max calculation. More... | |
template<class T , class U > | |
FARSA_UTIL_TEMPLATE const T | min (const T &t1, const U &t2) |
Template for min calculation. More... | |
void FARSA_UTIL_TEMPLATE | msleep (unsigned int msec) |
A simple function to sleep for the given amount of milliseconds. More... | |
FARSA_UTIL_TEMPLATE real | normalizeDegree (real x) |
Restricts the angle between -180° and 180° More... | |
FARSA_UTIL_TEMPLATE real | normalizeDegree0360 (real x) |
Restricts the angle between 0.0° and 360° More... | |
FARSA_UTIL_TEMPLATE real | normalizeRad (real x) |
Restricts the angle between -PI_GRECO and PI_GRECO. More... | |
FARSA_UTIL_TEMPLATE real | normalizeRad02pi (real x) |
Restricts the angle between 0.0 and 2.0 * PI_GRECO. More... | |
FARSA_UTIL_TEMPLATE real | ramp (real minv, real maxv, real value) |
Clamps the value of a variable in the given range. More... | |
QString | removeComments (const QString &program, CommentsPositions *commentsPos=NULL, StringsPositions *stringsPos=NULL) |
A simple function to remove all C and C++ comments from a program. More... | |
void FARSA_UTIL_TEMPLATE | throwUserRuntimeError (QString reason) |
The helper function to throw an exception of type RuntimeUserException. More... | |
FARSA_UTIL_TEMPLATE real | toDegree (real x) |
Converts radians to degrees. More... | |
FARSA_UTIL_TEMPLATE real | toRad (real x) |
Converts degrees to radians. More... | |
Variables | |
FARSA_UTIL_API RandomGenerator * | globalRNG |
inizializzazione di globalRND al caricamento della libreria More... | |
static const bool | utilitiesLibInitializer = initUtilitiesLib() |
Detailed Description
A macro to deprecate functions.
Typedef Documentation
typedef QList<CommentPosition> CommentsPositions |
A list of positions of comments.
Definition at line 119 of file farsamiscutilities.h.
typedef float real |
Abstraction on the type of real numbers.
For Now the library cannot be compiled with double precision
Definition at line 45 of file mathutils.h.
typedef QList<StringPosition> StringsPositions |
A list of positions of strings.
Definition at line 206 of file farsamiscutilities.h.
Function Documentation
|
inline |
A simple function to sleep for the given amount of milliseconds.
- Parameters
-
msec the amout of milliseconds to sleep
Definition at line 39 of file simpletimer.h.
QString FARSA_UTIL_API removeComments | ( | const QString & | program, |
CommentsPositions * | commentsPos = NULL , |
||
StringsPositions * | stringsPos = NULL |
||
) |
A simple function to remove all C and C++ comments from a program.
This function can also returns the position of removed comments and of strings/characters
- Parameters
-
program the program to parse commentsPos if not NULL the list is filled with the position of all comments in the parsed program. The comments are in the order in which they appear in the file stringsPos if not NULL the list is filled with the position of all strings and characters in the parsed program. The strings are in the order in which they appear in the file
- Returns
- the parsed program
Definition at line 27 of file farsamiscutilities.cpp.
References CommentPosition::CComment, StringPosition::Character, CommentPosition::CppComment, CommentPosition::originalEnd, StringPosition::originalEnd, CommentPosition::originalStart, StringPosition::originalStart, StringPosition::parsedEnd, CommentPosition::parsedPosition, StringPosition::parsedStart, StringPosition::String, CommentPosition::type, and StringPosition::type.
|
inline |
The helper function to throw an exception of type RuntimeUserException.
This helper function takes a QString parameter instead of char* to ease throwing an exception of type RuntimeUserException (see class description)
- Parameters
-
reason the description of why the exception was thrown
Definition at line 157 of file utilitiesexceptions.h.