Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf Namespace Reference

Namespaces

namespace  Gii
 
namespace  gmi
 
namespace  lnx
 
namespace  qt
 
namespace  Ui
 
namespace  win
 

Classes

class  AcquisitionControl
 
class  AcquisitionControlPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
class  AcquisitionControlPropertyPage
 
class  AcquisitionEmulator
 Implements a repetitive signal acquisition emulator. More...
 
class  ActionButton
 
class  ActionButtonPlugin
 Interface class to create a sf::ActionButton custom widget. More...
 
class  AddItemDialog
 
struct  Allocator
 Memory allocator class. More...
 
class  AmplitudePalette
 
class  ApplicationSettings
 Keeps the application up-to-date with changes in the settings file. More...
 
class  AppModuleAction
 Holds a single application module action. More...
 
class  AppModuleActions
 
class  AppModuleFileType
 
class  AppModuleInterface
 Base/Interface class for application modules. More...
 
class  AscanGraph
 
class  AscanGraphPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
class  AscanPropertyPage
 
class  BscanGraph
 
class  BscanGraphPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
class  BscanPropertyPage
 
class  BufferChopper
 Chops a buffer up in to smaller pieces. More...
 
class  BufferStitcher
 Stitches a buffer from a multiple of writes. More...
 
class  CaptureListModel
 List model implementation on captured output stream data. More...
 
class  ClientConnection
 Class handling the connection exchanging data using a QIODevice. More...
 
class  CodeEditor
 
class  CodeEditorAppModule
 
class  CommonItemDelegate
 Allows a list model to determine the editor for a field. More...
 
class  Condition
 Wrapper for the pthread_cond mechanism. More...
 
class  ContainerPropertyPage
 
class  ConversionDialog
 
class  ConversionListModel
 List model for manipulating the passed script manager. More...
 
class  debug_ostream
 Debug output stream. More...
 
class  Draw
 Contains functions for drawing general stuff for graphs. More...
 
class  DrawWidget
 
class  DrawWidgetPlugin
 Interface class to create a sf::DrawWidget custom widget. More...
 
struct  DynamicLibraryInfo
 Information on a dynamic library file using the _DL_INFORMATION macro. More...
 
class  Editor
 
class  EditorPlugin
 Interface class to create a sf::DrawWidget custom widget. More...
 
class  EditorPropertyPage
 
class  ElapseTimer
 Timer for turning true when a certain amount of time has passed. More...
 
class  EventCounter
 
class  Exception
 Exception implementation. More...
 
class  ExceptionBase
 Exception implementation inherited from std::exception. More...
 
class  ExceptionSystemCall
 Exception implementation for system calls failing within a wrapper class. More...
 
class  FileFindObject
 
class  FileMappedStorage
 This class provides storing of huge amounts of data using file mapping.
Mapping only what is needed into memory. More...
 
class  FindReplaceDialog
 Find and replace dialog for a QPlainTextEdit widget. More...
 
class  FollowersDialog
 
class  FollowersListModel
 List model for manipulating the passed script manager. More...
 
class  FormBuilder
 Derived class to be able to prevent some properties to be stored when written to file. More...
 
class  FormDialog
 
class  GiiCustomWidgets
 Implementation of interface class for the creation of GII custom widgets. More...
 
class  GiiScriptInterpreter
 Script extending and linking the script to the generic information interface elements. More...
 
class  GlobalShortcut
 The GlobalShortcut class provides a global shortcut aka "hotkey". More...
 
class  Graph
 Class for drawing a graph having optional rulers and grid. More...
 
struct  group_t
 
class  HierarchyViewer
 
class  HintWindow
 Floating window like tool tip available to the script engine as well. More...
 
class  IdPropertyList
 Class making checking of widgets Information ID's easier. More...
 
class  IFileMapper
 class for file mapping More...
 
class  InformationBase
 Base class for all generic information objects to be able to put them in a typed list together. More...
 
class  InformationIdEdit
 Line edit having a button. More...
 
class  InformationIdEditPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
class  InformationItemModel
 Item model for viewing Variables in a tree view. More...
 
class  InformationMonitor
 Dialog showing the information on a single sf::Variable or sf::ResultData instance. More...
 
class  InformationPacket
 Packet manipulation class. More...
 
class  InformationSelectDialog
 
class  InformationServer
 
class  InformationService
 Implements a connection between to application exporting and importing generic information. More...
 
class  InformationTypes
 Base class for all generic information objects to be able to put them in a typed list together. More...
 
class  IniProfile
 Class for reading and writing ini-profiles. More...
 
class  IniProfileObject
 
class  IniProfileSettings
 
class  IntervalTimer
 Timer class that has fixed time intervals at which it becomes true. More...
 
class  JsHighlighter
 
class  LayoutButton
 
class  LayoutButtonPlugin
 Interface class to create a sf::LayoutButton custom widget. More...
 
class  LayoutData
 
class  LayoutEditor
 
class  LayoutEditorAppModule
 
class  LayoutEditorPropertyPage
 
class  LayoutTabs
 Widget for editing sf::Variable value types integer, floating point and single line string. More...
 
class  LayoutTabsPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
class  LineBuffer
 Special std::streambuf class for capturing lines. More...
 
class  ListenerList
 Base class used as container for classes having listeners created by sf::TListener template. More...
 
class  Locale
 Sets the numeric locale for a specific scope. More...
 
class  Md5Hash
 Class replacing obsolete SSL 3.0 library MD5 functionality. More...
 
class  MiscCustomWidgets
 Implementation of interface class for the creation of Misc custom widgets. More...
 
class  MiscellaneousPropertyPage
 
class  ModuleConfiguration
 
class  ModuleConfigurationDialog
 
class  MultiDocInterface
 Interface for MDI document widgets handling files. More...
 
class  MultiDocInterfaceSignals
 Class to connect signals to the clients of a document. More...
 
class  Mutex
 Lightweight intra process thread synchronization. More...
 
class  notify_exception
 
class  ObjectExtension
 Interface class to multiple inherit when the sf::FormWriter class needs to be restricted in writing object properties. More...
 
class  ObjectHierarchyModel
 Item model for viewing Variables in a tree view. More...
 
class  ObjectPropertyModel
 List model for QObject properties. More...
 
class  PaletteColors
 Type to hold palette colors. More...
 
class  PaletteInterface
 Base class for the interface. More...
 
class  PaletteServer
 Server for color palettes used in images for coloring on basis of index. More...
 
class  PaletteServerPropertyPage
 
struct  passwd_t
 
class  PerformanceTimer
 High resolution timer for testing performance. More...
 
class  Persistent
 
class  PlainTextEditMdi
 
class  PositionPropertyPage
 
class  ProjectAppModule
 
class  ProjectConfig
 
class  ProjectPropertyPage
 
class  PropertyPage
 Widget to create a page in a PropertySheet dialog. More...
 
class  PropertyPagePlugin
 Interface class to create a sf::DrawWidget custom widget. More...
 
class  PropertySheetDialog
 Dialog containing multiple property pages. More...
 
class  QtSync
 QSync provides a interface to build classes that act like monitors. More...
 
class  QtThreadClosure
 Class for creating Qt threads easier. More...
 
class  Quaterion
 Generic type Quaternion. More...
 
struct  RANGE
 
class  Range
 Class to manage 64-bit integer ranges. More...
 
class  RangeManager
 This class manages range requests made by clients identified by ID's in the ranges.
More...
 
struct  Rect2DStruct
 
class  Resource
 Class for accessing resources like SVG images as a QIcon. More...
 
class  ResultData
 Class for creating and referencing global created data called result data. This class allows linking of member functions of other classes to handle events generated by the data server and client. More...
 
class  ResultDataHandler
 Class used to give a ResultData instance access to virtual method of a derived class. More...
 
struct  ResultDataReference
 
class  ResultDataRequester
 Handles requests and events for indexed data sources. More...
 
class  ResultDataScriptObject
 Script object for exporting GII parameters to a script object. More...
 
class  ResultDataStatic
 Base class of the sf::ResultData having all global static data members. More...
 
class  ResultDataTypes
 This base class contains all local types of used in the sf::ResultData class.
Multiple inheritance makes these types local for other classes as well.
Making code more readable and also prevents name space problems.
More...
 
class  RsaInterface
 Base class for the repetitive signal acquisition interface. More...
 
class  RsaServer
 RSA implementation of a information server. More...
 
struct  RsaTypes
 Type holding all types for the RsaInterface in a single namespaced structure. More...
 
class  scope_delete
 Deletes the pointer of type T allocated by 'new' when this instance goes out of scope. More...
 
class  scope_free
 Frees the pointer of type T allocated by 'malloc' when this instance goes out of scope. More...
 
class  ScriptAppModule
 
class  ScriptEditor
 
class  ScriptEngine
 Simple script engine able. More...
 
class  ScriptEntry
 Script entry for the list contained by the manager. More...
 
class  ScriptGlobalEntry
 Pure virtual class to register script accessible entries through the use of sf::ScriptGlobalObject class. More...
 
class  ScriptGlobalObject
 
class  ScriptGlobalStaticEntry
 sf::ScriptGlobalEntry derived class to link static functions or methods. More...
 
class  ScriptHighlighter
 Highlighter of a document class used by edit widgets. More...
 
class  ScriptInterpreter
 Script interpreter for running a loaded script. More...
 
class  ScriptListModel
 Provides a model list for instructions and variables of a script. More...
 
class  ScriptManager
 Manages scripts for the application. More...
 
class  ScriptManagerListModel
 List model for manipulating the passed script manager. More...
 
class  ScriptManagerPropertyPage
 
class  ScriptObject
 Info structure for objects used in scripts. More...
 
class  SegmentFaultHandler
 Class which intercepts SIGSEGV signals caused in a callback lambda function and recovers from it. Useful in unit testing where a SIGSEGV is expected to happen. More...
 
class  SelectImplementationDialog
 
class  Semaphore
 Semaphore class built around posix sem_xxx functionality. More...
 
class  ServerConnection
 Class handling the connection exchanging data using a QIODevice. More...
 
class  ServerConnector
 
class  ServiceAppModule
 
class  ServicePropertyPage
 
class  SimplePalette
 
class  SocketClient
 
class  SocketServer
 
class  StaticSustain
 
class  StorageInterface
 Base class for the interface. More...
 
class  StorageServer
 Storage server. More...
 
class  StringsObject
 
class  SustainBase
 
class  Sync
 Sync provides a system-independent interface to build classes that act like monitors, i.e., classes in which only one member can execute on a particular instance at any one time. Sync uses Mutex, so it is portable to all platforms that Mutex has been ported to. More...
 
class  TAEnvelope
 class TAEnvelope More...
 
class  TAPointer
 Pointer to an array of type T. Provides an array subscript operator and uses array delete[]. More...
 
class  TBitSet
 Template for creating large memory inexpensive bitmasks or bit sets. More...
 
class  TClassRegistration
 Template class used to register derived classes from a (virtual) interface class. More...
 
class  TClosure
 Encapsulates the std::function() template. More...
 
class  TDeque
 Counted deque having additional methods and operators for ease of usage. More...
 
class  TDynamicArray
 A dynamic buffer as typed array. More...
 
class  TDynamicBuffer
 Template for creating a dynamic buffer using an allocator. More...
 
class  TEnvelope
 Envelope-letter type of smart pointers. More...
 
class  TextEditor
 
class  TextEditorAppModule
 
class  TFifoClass
 Fifo template for classes and structure pointers. More...
 
class  Thread
 Thread wrapper class to be used for attachment to an existing thread or a new to be created thread. More...
 
class  ThreadClosure
 Class which combines a thread class and closure template. More...
 
class  ThreadMain
 Wrapper class for the main thread. More...
 
class  ThreadRelay
 Provides a way to stop executing a thread until the main thread enables the thread again. More...
 
struct  TimeSpec
 Class wrapper for timespec structure to modify. More...
 
class  TIterator
 Counted vector having function names compatible with Borland C++ templates. More...
 
class  TListener
 Template class used to bind listeners to a handler_type instance. More...
 
class  TMatrix2D
 Generic 2 x 2 matrix. More...
 
class  TMatrix44
 
class  TPointer
 Pointer to a single object. Provides member access operator -> More...
 
class  TPointerBase
 A pair of smart pointer template classes. Provides basic conversion operator to T*, as well as dereference (*), and 0-checking (!). These classes assume that they alone are responsible for deleting the object or array unless Relinquish() is called. More...
 
class  TRect2D
 C++ Wrapper around the Rect2D structure. More...
 
class  TResultDataHandler
 
class  TScriptGlobalEntry
 Template for creating a script global entry linking a dynamic created method. More...
 
struct  TSet
 Template class for managing bit maks preferably when bits are defined as enumerate values. More...
 
class  TStaticSync
 TStaticSync provides a system-independent interface to build sets of classes that act somewhat like monitors, i.e., classes in which only one member function can execute at any one time regardless of which instance it is being called on. TStaticSync uses Mutex, so it is portable to all platforms that Mutex has been ported to. More...
 
class  TStrings
 Counted vector of strings. More...
 
class  TSustain
 Template to make the sustain system call a class method regularly. More...
 
class  TVariableHandler
 Template for linking pointers of member function to Variable instances. More...
 
class  TVector
 Counted vector having additional methods and operators for ease of usage. More...
 
class  TVector2D
 2-dimensional vector for math operations. More...
 
class  TVector3
 
class  UnitConversionAppModule
 
struct  UnitConversionEvent
 Structure passed to handle unit conversions. More...
 
class  UnitConversionPropertyPage
 
class  UnitConversionServer
 Implementation of a unit conversion server using an ini-file. More...
 
class  UnitConversionServerEx
 Extended UnitConversionServer with master and slaved variables. More...
 
class  UnitConverter
 unit conversion class to easy the pain of conversions in dialogs. More...
 
class  Value
 Value container class able to performing arithmetic functions. More...
 
class  Variable
 Class for creating and referencing global or local created parameters or settings called variables. This class allows linking of member functions of other classes to handle events generated. See the Example on how to use this class and the 'TVariableHandler' template class. More...
 
class  VariableBar
 Widget for showing sf::Variable value types integer and floating point having a minimum and maximum value. More...
 
class  VariableBarPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
class  VariableCheckBox
 Widget for editing sf::Variable value types integer, floating point and single line string. More...
 
class  VariableCheckBoxPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
class  VariableCollector
 
class  VariableComboBox
 Widget for editing sf::Variable value types integer, floating point and single line string. More...
 
class  VariableComboBoxPlugin
 Interface class to create a sf::VariableComboBox custom widget. More...
 
class  VariableEdit
 Widget for editing sf::Variable value types integer, floating point and single line string. More...
 
class  VariableEditPlugin
 Interface class to create a sf::VariableEdit custom widget. More...
 
struct  VariableHandler
 Base class used for giving a Variable instance access to a member functions of a derived class. This class is not used directly and is used a base class for the TVariableHandler<T> template class. More...
 
class  VariableIdList
 
class  VariableIdPropertyPage
 
struct  VariableReference
 
class  VariableScriptObject
 Script object for exporting GII parameters to a script object. More...
 
class  VariableStatic
 Base class of the sf::Variable having all global static data members. More...
 
class  VariableTypes
 This base class contains all local types of used in the Variable class. More...
 
class  VariableWidgetBase
 Base class for sf::Variable based widgets. More...
 
class  WidgetPropertyPage
 
class  WinTimer
 

Typedefs

typedef TClosure< bool, UnitConversionEvent & > UnitConversionServerClosure
 Type of the server callback function.
 
typedef TVector2D< double > Vector2D
 
typedef TMatrix2D< double > Matrix2D
 
typedef TClosure< std::string, const std::string & > ConfigLocationClosure
 Type of the callback function.
 
typedef TDynamicBuffer< AllocatorDynamicBuffer
 Actual specialized dynamic buffer type using the default allocator.
 
typedef TStrings< std::string, std::string::value_type > strings
 Vector of std::strings with additional functionality.
 
typedef TStrings< std::wstring, std::wstring::value_type > wstrings
 Vector of std::wstrings with additional functionality.
 
typedef struct stat stat_t
 
typedef struct passwd passwd_type
 
typedef struct group group_type
 
typedef QList< QRgb > ColorTable
 
typedef TClosure< qreal, qreal > ColorShiftCurve
 

Enumerations

enum  EDebugOutputType : int {
  dotThrow = 1U << 0U , dotMessageBox = 1U << 1U , dotStdLog = 1U << 2U , dotStdOut = 1U << 3U ,
  dotStdErr = 1U << 4U , dotDebugString = 1U << 5U , dotDebugBreak = 1U << 6U , dotDefault = 1U << 7U
}
 

Functions

bool TARGET_IMPORT SaveVariableValues (IniProfile &profile)
 Saves variable settings to the passed profile instance.
 
bool TARGET_IMPORT LoadVariableValues (IniProfile &profile)
 
TARGET_IMPORT std::ostream & operator<< (std::ostream &os, const ResultData &)
 Stream operator for the setup std::string.
 
TARGET_IMPORT std::istream & operator>> (std::istream &is, ResultData &)
 Stream operator for setting up this instance with a setup std::string.
 
TARGET_IMPORT void setUnitConversionHandler (const UnitConversionServerClosure &closure={})
 Sets the callback function for a security server.
 
TARGET_IMPORT bool getUnitConversion (const std::string &option, const std::string &from_unit, int from_precision, double &multiplier, double &offset, std::string &to_unit, int &to_precision)
 Returns true if a conversion could be made.
Calculation to convert are:
From -> To calculation:
new_value = (value * multiplier) + offset;
To -> From calculation:
new_value = (value - offset) / multiplier;

 
TARGET_IMPORT std::ostream & operator<< (std::ostream &os, const Variable &v)
 
TARGET_IMPORT std::istream & operator>> (std::istream &is, Variable &v)
 Stream operator for the setup std::string.
 
TARGET_IMPORT std::ostream & operator<< (std::ostream &os, const Variable::State::Vector &v)
 Stream operator for setting up this instance with a setup std::string.
 
template<class T , class T2 >
const Quaterion< T, T2 > operator+ (const Quaterion< T, T2 > &lhs, const Quaterion< T, T2 > &rhs)
 
template<class T , class T2 >
const Quaterion< T, T2 > operator- (const Quaterion< T, T2 > &lhs, const Quaterion< T, T2 > &rhs)
 
template<class T , class T2 >
const Quaterion< T, T2 > operator* (const Quaterion< T, T2 > &lhs, const Quaterion< T, T2 > &rhs)
 
template<class T , class T2 >
const Quaterion< T, T2 > operator/ (const Quaterion< T, T2 > &lhs, const Quaterion< T, T2 > &rhs)
 
template<class T , class T2 >
const Quaterion< T, T2 > operator^ (const Quaterion< T, T2 > &lhs, const Quaterion< T, T2 > &rhs)
 
template<class T , class T2 >
Quaterion< T, T2 > operator* (T c, const Quaterion< T, T2 > &q)
 
template<class T , class T2 >
Quaterion< T, T2 > Square (const Quaterion< T, T2 > &q)
 
template<class T , class T2 >
Quaterion< T, T2 > Exp (const Quaterion< T, T2 > &q1)
 
template<class T , class T2 >
Quaterion< T, T2 > Log (const Quaterion< T, T2 > &q1)
 
template<class T , class T2 >
Quaterion< T, T2 > Interpolate (const Quaterion< T, T2 > &p, const Quaterion< T, T2 > &q, double t)
 
std::istream & operator>> (std::istream &is, TRect2D &r)
 
std::ostream & operator<< (std::ostream &os, const TRect2D &r)
 
template<typename T >
const TMatrix2D< T > operator* (const TMatrix2D< T > &lhs, const TMatrix2D< T > &rhs)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const TMatrix2D< T > &m)
 
template<typename T >
std::istream & operator>> (std::istream &is, TMatrix2D< T > &m) noexcept(false)
 
template<typename T >
TVector2D< T > operator* (T c, TVector2D< T > const &v)
 
template<typename T >
TVector2D< T > operator* (TVector2D< T > const &v, T c)
 
template<typename T >
std::istream & operator>> (std::istream &is, TVector2D< T > &v) noexcept(false)
 Operator for reading a vector from a stream.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const TVector2D< T > &v)
 Operator for writing a vector to a stream.
 
template<class T , class T2 >
std::ostream & operator<< (std::ostream &os, const TVector3< T, T2 > &v)
 
template<class T , class T2 >
TVector3< T, T2 > operator* (T c, TVector3< T, T2 > const &v)
 
template<class T , class T2 >
TVector3< T, T2 > operator* (TVector3< T, T2 > const &v, T c)
 
void setConfigLocationHandler (const ConfigLocationClosure &handler={})
 Sets the callback function for the getConfigLocation() function.
 
std::string getConfigLocation (const std::string &option={}, bool separator=false)
 Gets the configuration location/directory of the application.
 
std::ostream & operator<< (std::ostream &os, const IniProfile &profile)
 
bool operator== (const Md5Hash::hash_type &h1, const Md5Hash::hash_type &h2)
 Compare operator for storing an MD5 hash.
 
bool operator== (const Md5Hash &h1, const Md5Hash &h2)
 Compare operator for storing an MD5 hash.
 
std::ostream & operator<< (std::ostream &os, const Md5Hash &hash)
 Stream operator for showing hexadecimal hash value.
 
std::istream & operator>> (std::istream &is, Md5Hash &h)
 Read hash from input stream.
 
_MISC_FUNC std::ostream & operator<< (std::ostream &os, const Range &r)
 Output stream operator for a range.
 
_MISC_FUNC std::istream & operator>> (std::istream &is, Range &r)
 Input stream operator for a range.
 
_MISC_FUNC std::ostream & operator<< (std::ostream &os, const Range::Vector &rl)
 Output stream operator for a range vector.
 
_MISC_FUNC std::istream & operator>> (std::istream &is, Range::Vector &rl)
 Input stream operator for a range vector.
 
Value calculator (const std::string &script, const Value &def)
 Calculator function that converts a formula of the passed string to a #sf::Value.
 
Value::flt_type calculator (const std::string &script, Value::flt_type def)
 Calculator function that converts a formula of the passed string to a floating point value.
 
Value::flt_type calculator (const std::string &script, Value::flt_type def, Value::flt_type x, Value::flt_type y=0.0, Value::flt_type z=0.0)
 Same as calculator() only the passed variable 'x', 'y', 'z' are available as a constant in the script.
 
bool setSustainTimer (int msec)
 This function will enable a timer that call all Sustain functions in the DefaultVector member of the 'TSustain' template class.
 
int getSustainTimer ()
 Gets the current sustain timer interval in milli-seconds.
 
std::string getLibraryName ()
 function to get the library filename this function is called from.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, TDeque< T > const &v)
 Output stream operator.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, TVector< T > const &v)
 Output stream operator.
 
std::ostream & operator<< (std::ostream &os, const TimeSpec &ts)
 Operator for streaming a TTimeSpec class.
 
Value operator* (const Value &v1, const Value &v2)
 
Value operator/ (const Value &v1, const Value &v2)
 
Value operator% (const Value &v1, const Value &v2)
 
Value operator+ (const Value &v1, const Value &v2)
 
Value operator- (const Value &v1, const Value &v2)
 
std::ostream & operator<< (std::ostream &os, const Value &v)
 
std::istream & operator>> (std::istream &is, Value &v)
 
void UserOutputDebugString (unsigned int type, const char *str) noexcept
 Allows the passed string to be presented in various ways.
 
void SetDefaultDebugOutput (unsigned int type)
 Set and get function for the type of output when DO_DEFAULT is passed.
 
unsigned int GetDefaultDebugOutput ()
 Returns the combination of EDebugOutputType which is the default output.
 
void printBacktrace ()
 Prints the backtrace to std::cerr.
 
bool isDebug ()
 Gets the debug status.
 
bool isDebuggerActive ()
 Gets the debugger active status.
 
void debugBreak ()
 Causes a break when debugging.
 
std::string Demangle (const char *name)
 Demangles the passed rtti mangled type name.
 
template<typename T >
std::string rtti_name (const T &)
 Gets the demangled type name of the passed type T.
 
std::string getLine (std::istream &is)
 Return a line from the input stream.
 
bool fileExists (const char *path)
 
bool fileExists (const std::string &path)
 
std::string fileBaseName (const std::string &path)
 
std::string fileDirName (const std::string &path)
 
bool fileUnlink (const std::string &path)
 
bool fileRename (const std::string &old_path, const std::string &new_path)
 
bool fileFind (sf::strings &files, const std::string &wildcard)
 Finds the files using the passed wildcard.
 
std::string::value_type getDirectorySeparator ()
 Returns OS dependent directory separation character.
 
std::string getWorkingDirectory ()
 Returns the working directory.
 
std::string getExecutableFilepath ()
 Returns the executable filepath.
 
std::string getExecutableDirectory ()
 Returns the executable directory.
 
std::string getExecutableName ()
 Returns the executable name.
 
template<typename T >
round (T value, T rnd)
 Rounds the passed value to a multiple of the rnd value.
 
template<class T , class S >
calculateOffset (T value, T min, T max, S len, bool clip)
 Calculates the offset for a given range and set point.
 
template<class T >
clip (const T v, const T a, const T b)
 Return clipped value of v between a and b where a < b.
 
template<typename T >
random (T start, T stop)
 Generates random numbers within a specified integer range.
 
template<typename T >
modulo (T k, T n)
 Modulo function.
 
template<typename T >
toAbs (T v)
 
template<typename T >
ipow (T base, int exponent)
 Fast integer power-of function.
 
int precision (double value)
 Returns the precision of the passed floating point value. This is the amount of characters after the point without the trailing zeros. When the value is 12300.00 the value returned is 3. When the value is 0.0123 the value returned is also 3.
 
int digits (double value)
 Returns the amount of digits which are significant for the value. When the value is 12300.00 the value returned is -2. When the value is 0.0123 the value returned is 4.
 
int magnitude (double value)
 Returns the order of magnitude of the passed value. Examples: magnitude(0.001234) => -2 magnitude(0.123400) => 0 magnitude(12340.00) => 6.
 
int requiredDigits (double roundVal, double minVal, double maxVal)
 Gets the amount of required digits needed when drawing a scale.
 
template<class T >
void delete_null (T &p)
 Deletes object and clears pointer.
 
template<class T >
void delete_anull (T &p)
 Template function deleting an array previous allocated by 'new[]' when the pointer is non-null and also nulls the passed pointer.
 
template<class T >
void free_null (T &p)
 Template function freeing a pointer previous allocated by 'malloc' when the pointer is non-null and also nulls the passed pointer.
 
template<class T >
void swap_it (T &t1, T &t2)
 Swaps the passed two arguments of any type.
 
template<typename T >
T & null_ref ()
 
template<typename T >
bool not_ref_null (T &r)
 
std::string demangle (const char *name)
 Returns the unmangled function name returned by type ID.
 
char hexCharValue (char ch)
 Returns numeric the value of the passed hexadecimal character.
 
size_t stringHex (const char *hexstr, void *buffer, size_t sz)
 Converts a hexadecimal string to a block of data.
 
std::string hexString (const void *buffer, size_t sz)
 Converts a block of data to a hexadecimal string.
 
std::string bitToString (unsigned long wrd, size_t count)
 Converts a integer value to bit string '0' and '1' characters where the first character is the first bit.
 
std::string escape (const std::string &str, char delimiter='\0')
 Escapes all control and non ascii characters.
 
std::string unescape (const std::string &str)
 Unescapes the passed string escaped by the escape() function.
 
std::string filter (std::string str, const std::string &filter)
 Filters all characters from the passed string and returns the resulting string.
 
std::string toLower (std::string s)
 Converts the passed string into a lower case one and returns it.
 
std::string toUpper (std::string s)
 Converts the passed string into a upper case one and returns it.
 
std::string trim (std::string s, const std::string &t=" ")
 Trims a passed string at both sides and returns it.
 
std::string trimLeft (std::string s, const std::string &t=" ")
 Trims a passed string left and returns it.
 
std::string trimRight (std::string s, const std::string &t=" ")
 Trims a passed string right and returns it.
 
int wildcmp (const char *wild, const char *str, bool case_s)
 Matches a string against a wildcard string such as "*.*" or "bl?h.*" etc.
 
int wildcmp (const std::string &wild, const std::string &str, bool case_s)
 Matches a string against a wildcard string such as "*.*" or "bl?h.*" etc.
 
std::string error_string (int error_num)
 Thread safe version strerror_r() or strerror_s() when cross compiling for Windows.
 
std::string stringf (const char *fmt,...)
 Creates a formatted string and returns it in a string class instance.
 
template<typename... Args>
std::string string_format (const std::string &format, Args &&... args)
 Better implementation of 'stringf' ?
 
std::string gcvtString (double value, int digits=0)
 The gcvt() function converts number to a minimal length. It produces 'digits' significant digits in either printf(3) F format or E (scientific) format. Always returns a decimal point without setting the global locale.
 
std::string qgcvtString (long double value, int digits=0)
 The qgcvt() function converts number to a minimal length. (Not supported in Windows.) It produces 'digits' significant digits in either printf(3) F format or E (scientific) format. Always returns a decimal point without setting the global locale.
 
template<typename T >
char * itoa (T value, char *buffer, int base)
 Converts an integer type value to a buffer.
 
template<typename T >
std::string itostr (T value, int base=10)
 
template<typename T >
stod (const char *ptr, char **end_ptr=nullptr)
 A locale independent version of std::strtod() function which uses locale "C".
 
template<typename T , typename S = std::string>
toNumber (const S &s, size_t *idx=nullptr)
 Converts a std::string to a T value and whe not possible it returns the passed default.
 
template<typename T , typename S = std::string>
toNumberDefault (const S &s, T def)
 Converts a std::string to a T value and when not possible it returns the passed default.
 
template<typename T >
std::string toString (T value)
 The function converts number to a minimal length. It produces 'digits' significant digits in either printf(3) F format or E (scientific) format. Always returns a decimal point without setting the global locale.
 
std::string numberString (double value, int digits, bool sign_on=true)
 String formats a floating point or integer value using scientific notation. where the exponent is always a multiple of 3.
 
size_t strncspn (const char *s, size_t n, const char *reject)
 The strncspn() function calculates the length of the initial segment of 's' which consists entirely of characters not in reject up to a maximum 'n'. When no reject chars were found n is returned.
 
size_t strnspn (const char *s, size_t n, const char *accept)
 The strncspn() function calculates the length of the initial segment of 's' which consists entirely of characters in accept up to a maximum 'n'.
 
const char * strnstr (const char *s, const char *find, size_t n)
 Find the first occurrence of find in s, where the search is limited to the first slen characters of s.
 
std::istream & read_to_delimiter (std::istream &is, std::string &s, char delimiter)
 Read a stream until a given delimiter.
 
size_t getThreadCount ()
 Returns the thread count from the current process.
 
timespec getTimeRunning ()
 Gets the time this application is running.
 
int timespecCompare (const timespec &ts1, const timespec &ts2)
 Compares the 2 ::timespec times.
 
timespec getTime (bool realTime=false)
 Gets the timespec as function return value as clock_gettime() for the current time.
 
bool kb_hit ()
 
pid_t gettid () noexcept
 
bool getFiles (strings &files, std::string directory, std::string wildcard)
 
bool file_write (const char *path, const void *buf, size_t sz, bool append=false)
 
bool file_write (const std::string &path, const void *buf, size_t sz, bool append=false)
 
bool file_write (const std::string &path, const std::string &s, bool append=false)
 
std::filesystem::path file_fd_path (int fd)
 
bool file_stat (const std::string &path, stat_t &_stat)
 
std::string time_format (const struct tm *timeinfo, const char *format=nullptr)
 
std::string time_format (time_t time=-1, const char *format=nullptr, bool gmtime=false)
 
time_t time_str2time (const std::string &str, const char *format=nullptr, bool gmtime=false)
 
time_t time_mktime (struct tm *tm, bool gmtime=false)
 
bool file_mkdir (const char *path, __mode_t mode=0755)
 
bool file_mkdir (const std::string &path, __mode_t mode=0755)
 
bool proc_getpwnam (std::string name, passwd_t &pwd)
 
bool proc_getpwuid (uid_t uid, passwd_t &pwd)
 
void proc_setuid (uid_t uid)
 
void proc_seteuid (uid_t uid)
 
bool proc_getgrnam (const std::string &name, group_t &grp)
 
bool proc_getgrgid (gid_t gid, group_t &grp)
 
void proc_setgid (gid_t gid)
 
void proc_setegid (gid_t gid)
 
void proc_setfsuid (uid_t uid)
 
void proc_setfsgid (gid_t gid)
 
int siginterrupt (int sig, int flag)
 Replacement for deprecated 'siginterrupt' function. Returns EINVAL when the sig argument is not a valid signal number otherwise zero.
 
QSettings * setGlobalSettings (QSettings *settings)
 Sets global settings class for settings.
 
QSettings * getGlobalSettings ()
 Gets global settings class for settings.
 
QWidget * setGlobalParent (QWidget *parent)
 Sets global parent widget class for dialogs.
 
QWidget * getGlobalParent ()
 Gets global parent widget class for settings.
 
QUiLoader * setGlobalUiLoader (QUiLoader *uiLoader)
 Sets global UI loader class.
 
QUiLoader * getGlobalUiLoader ()
 Gets global UI loader instance.
 
void setPluginDir (QString pluginDir)
 Sets the global plugin directory used i.e. by sf::FormBuilderLoad() and sf::FormBuilderSave().
 
QString getPluginDir ()
 Gets the global plugin directory.
 
QWidget * FormBuilderLoad (QIODevice *io, QWidget *parent)
 Loads the form from the passed UI file.
 
void FormBuilderSave (QIODevice *io, QWidget *widget)
 Saves the widget to the passed file.
 
QRect moveRectWithinRect (const QRect &outer, const QRect &inner)
 
QMetaObject::Connection connectByName (const QWidget *widget, const QString &sender_name, const char *signal_name, const QObject *receiver, const char *method_name, Qt::ConnectionType ct=Qt::AutoConnection)
 Connects signals by name of sender and name of signal.
 
QStringList getObjectNamePath (const QObject *object)
 Gets all the parent names from the object's parent in a string list.
 
QLayout * getWidgetLayout (QWidget *widget)
 Gets the layout containing the passed widget.
 
int indexFromComboBox (QComboBox *comboBox, const QVariant &value, int default_index=-1)
 Gets the index from the passed data value of the passed combo box widget.
 
QPair< int, QFormLayout::ItemRole > getLayoutPosition (QFormLayout *layout, QObject *target)
 Gets the position (row, role) from the passed target object in te form-layout.
 
int getLayoutIndex (QBoxLayout *layout, QObject *target)
 Gets the index from the passed target object in te box-layout.
 
void resizeColumnsToContents (QTreeView *treeView)
 Resizes all columns to content of a tree view except the last column.
 
void dumpObjectProperties (QObject *obj)
 Dumps the object properties in qDebug().
 
template<typename T >
T * getSourceModel (const QAbstractItemModel *am)
 Gets the model type pointer from the passed abstract model pointer.
 
QModelIndex getSourceModelIndex (const QModelIndex &index)
 Gets the source index in case a proxy model has been used.
 
void expandTreeView (QTreeView *tv, bool expand=true, const QModelIndex &index={})
 Expands or collapses a tree view's items.
 
bool isGuiApplication ()
 Checks if the running QCoreApplication is a GUI application.
 
bool isRunningWine ()
 Determines if the application is running using Wine.
 
DWORD getMainThreadId ()
 Gets the main thread id.
 
TARGET_IMPORT void shiftHsv (const QColor &colorBegin, const QColor &colorEnd, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 
TARGET_IMPORT void shiftHsl (const QColor &colorBegin, const QColor &colorEnd, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 
TARGET_IMPORT void shiftSaturation (const QColor &color, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 
TARGET_IMPORT void shiftRgb (const QColor &colorBegin, const QColor &colorEnd, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 

Variables

const char * IniContent
 
constexpr double DEGTORAD {0.01745329251994329547}
 Conversion ratio from degrees to radials.
 
const double RADTODEG {57.29577951308232286465}
 Conversion ratio from radials to degrees.
 
bool RangeCompareExact
 

Typedef Documentation

◆ ColorShiftCurve

typedef TClosure<qreal, qreal> sf::ColorShiftCurve

◆ ColorTable

typedef QList<QRgb> sf::ColorTable

◆ ConfigLocationClosure

typedef TClosure<std::string, const std::string&> sf::ConfigLocationClosure

Type of the callback function.

◆ DynamicBuffer

Actual specialized dynamic buffer type using the default allocator.

◆ group_type

typedef struct group sf::group_type

Intermediate type to be able to create group_t struct/class.

◆ Matrix2D

typedef TMatrix2D<double> sf::Matrix2D

◆ passwd_type

typedef struct passwd sf::passwd_type

Intermediate type to be able to create passwd_t struct/class.

◆ stat_t

typedef struct stat sf::stat_t

Easier typename.

◆ strings

typedef TStrings<std::string, std::string::value_type> sf::strings

Vector of std::strings with additional functionality.

◆ UnitConversionServerClosure

Type of the server callback function.

Returns
True on successful conversion.

◆ Vector2D

typedef TVector2D<double> sf::Vector2D

◆ wstrings

typedef TStrings<std::wstring, std::wstring::value_type> sf::wstrings

Vector of std::wstrings with additional functionality.

Enumeration Type Documentation

◆ EDebugOutputType

Debug output type flags which can be combined to create a set of flags.

Enumerator
dotThrow 

Throw an exception.

dotMessageBox 

Notify through a message box.

dotStdLog 

Notify through the std::clog output stream.

dotStdOut 

Notify through the std::cout output stream.

dotStdErr 

Notify through the std::cerr output stream.

dotDebugString 

Notify through function OutputDebugString.

dotDebugBreak 

Call debug break function.

dotDefault 

Use default set notify output type.

Function Documentation

◆ bitToString()

std::string sf::bitToString ( unsigned long  wrd,
size_t  count 
)

Converts a integer value to bit string '0' and '1' characters where the first character is the first bit.

◆ calculateOffset()

template<class T , class S >
S sf::calculateOffset ( value,
min,
max,
len,
bool  clip 
)
inline

Calculates the offset for a given range and set point.

◆ calculator() [1/3]

Value sf::calculator ( const std::string &  script,
const Value def 
)

Calculator function that converts a formula of the passed string to a #sf::Value.

Parameters
scriptScript text to calculate.
defDefault value.
Returns
Result or default value depending on success or not.

◆ calculator() [2/3]

Value::flt_type sf::calculator ( const std::string &  script,
Value::flt_type  def 
)

Calculator function that converts a formula of the passed string to a floating point value.

Parameters
scriptScript text to calculate.
defDefault value.
Returns
Result or default value depending on success or not.

◆ calculator() [3/3]

Value::flt_type sf::calculator ( const std::string &  script,
Value::flt_type  def,
Value::flt_type  x,
Value::flt_type  y = 0.0,
Value::flt_type  z = 0.0 
)

Same as calculator() only the passed variable 'x', 'y', 'z' are available as a constant in the script.

Todo:
This function should be replaced by passing a vector of pairs instead.
Parameters
scriptScript text to calculate.
defDefault value.
xconstant value.
yconstant value.
zconstant value.
Returns
Result or default value depending on success or not.

◆ clip()

template<class T >
T sf::clip ( const T  v,
const T  a,
const T  b 
)

Return clipped value of v between a and b where a < b.

◆ connectByName()

QMetaObject::Connection sf::connectByName ( const QWidget *  widget,
const QString &  sender_name,
const char *  signal_name,
const QObject *  receiver,
const char *  method_name,
Qt::ConnectionType  ct = Qt::AutoConnection 
)

Connects signals by name of sender and name of signal.

Parameters
widgetWidget having the child with the passed sender_name
sender_nameName of sender widget.
signal_nameName of signal.
receiverReceiver object
method_nameName of receiver method.
ctConnection Type.
Returns
Connection object.

◆ debugBreak()

void sf::debugBreak ( )

Causes a break when debugging.

◆ delete_anull()

template<class T >
void sf::delete_anull ( T &  p)
inline

Template function deleting an array previous allocated by 'new[]' when the pointer is non-null and also nulls the passed pointer.

◆ delete_null()

template<class T >
void sf::delete_null ( T &  p)
inline

Deletes object and clears pointer.

Defines and templates for deleting allocated memory and testing for zero and clearing the pointer at the same time.

◆ Demangle()

std::string sf::Demangle ( const char *  name)

Demangles the passed rtti mangled type name.

Parameters
nameMangled name
Returns
Demangled name.

◆ demangle()

std::string sf::demangle ( const char *  name)

Returns the unmangled function name returned by type ID.

Examples
/mnt/server/userdata/source/c++src/qt-concepts/src/com/misc/gen/Exception.h.

◆ digits()

int sf::digits ( double  value)

Returns the amount of digits which are significant for the value. When the value is 12300.00 the value returned is -2. When the value is 0.0123 the value returned is 4.

Parameters
valueDouble value.
Returns
Amount of significant digits for the passed number.

◆ dumpObjectProperties()

void sf::dumpObjectProperties ( QObject *  obj)

Dumps the object properties in qDebug().

◆ error_string()

std::string sf::error_string ( int  error_num)

Thread safe version strerror_r() or strerror_s() when cross compiling for Windows.

◆ escape()

std::string sf::escape ( const std::string &  str,
char  delimiter = '\0' 
)

Escapes all control and non ascii characters.

See also
unescape()
Parameters
strString to be escaped.
delimiterCharacter delimiting the escaped string.
Returns
Escaped string

◆ Exp()

template<class T , class T2 >
Quaterion< T, T2 > sf::Exp ( const Quaterion< T, T2 > &  q1)

◆ expandTreeView()

void sf::expandTreeView ( QTreeView *  tv,
bool  expand = true,
const QModelIndex &  index = {} 
)

Expands or collapses a tree view's items.

Parameters
tvTreeView
expandTrue to expand false to collapse.
indexOptional child index. Defaults to the root item.

◆ file_fd_path()

std::filesystem::path sf::file_fd_path ( int  fd)

Returns the filepath of the passed file descriptor.

Parameters
fdOpen file descriptor.
Returns
path

◆ file_mkdir() [1/2]

bool sf::file_mkdir ( const char *  path,
__mode_t  mode = 0755 
)

Makes all directories recursively in the path.

◆ file_mkdir() [2/2]

bool sf::file_mkdir ( const std::string &  path,
__mode_t  mode = 0755 
)
inline

◆ file_stat()

bool sf::file_stat ( const std::string &  path,
stat_t _stat 
)

Same as stat() but using an std::string.

◆ file_write() [1/3]

bool sf::file_write ( const char *  path,
const void *  buf,
size_t  sz,
bool  append = false 
)

Writes a buffer to a file.

◆ file_write() [2/3]

bool sf::file_write ( const std::string &  path,
const std::string &  s,
bool  append = false 
)
inline

◆ file_write() [3/3]

bool sf::file_write ( const std::string &  path,
const void *  buf,
size_t  sz,
bool  append = false 
)
inline

◆ fileBaseName()

std::string sf::fileBaseName ( const std::string &  path)

Same as basename() but using a std::string.

◆ fileDirName()

std::string sf::fileDirName ( const std::string &  path)

Same as dirname() but using a std::string.

◆ fileExists() [1/2]

bool sf::fileExists ( const char *  path)

Checks if the passed path exist (by doing a access() using F_OK).

◆ fileExists() [2/2]

bool sf::fileExists ( const std::string &  path)
inline

◆ fileFind()

bool sf::fileFind ( sf::strings files,
const std::string &  wildcard 
)

Finds the files using the passed wildcard.

◆ fileRename()

bool sf::fileRename ( const std::string &  old_path,
const std::string &  new_path 
)

Same as rename() but using a std::string.

◆ fileUnlink()

bool sf::fileUnlink ( const std::string &  path)

Same as unlink() but using a std::string.

◆ filter()

std::string sf::filter ( std::string  str,
const std::string &  filter 
)

Filters all characters from the passed string and returns the resulting string.

◆ FormBuilderLoad()

QWidget * sf::FormBuilderLoad ( QIODevice *  io,
QWidget *  parent 
)

Loads the form from the passed UI file.

This function prevents mandatory linking of the Qt::Designer library.

◆ FormBuilderSave()

void sf::FormBuilderSave ( QIODevice *  io,
QWidget *  widget 
)

Saves the widget to the passed file.

This function prevents mandatory linking of the Qt::Designer library.

◆ free_null()

template<class T >
void sf::free_null ( T &  p)
inline

Template function freeing a pointer previous allocated by 'malloc' when the pointer is non-null and also nulls the passed pointer.

◆ gcvtString()

std::string sf::gcvtString ( double  value,
int  digits = 0 
)

The gcvt() function converts number to a minimal length. It produces 'digits' significant digits in either printf(3) F format or E (scientific) format. Always returns a decimal point without setting the global locale.

◆ getConfigLocation()

std::string sf::getConfigLocation ( const std::string &  option = {},
bool  separator = false 
)

Gets the configuration location/directory of the application.

When no handler is installed the working directory is returned.

Parameters
optionOptional option to pass to manipulate the result.
separatorTerminates the string with a directory separator.
Returns
Directory

◆ GetDefaultDebugOutput()

unsigned int sf::GetDefaultDebugOutput ( )

Returns the combination of EDebugOutputType which is the default output.

◆ getDirectorySeparator()

std::string::value_type sf::getDirectorySeparator ( )

Returns OS dependent directory separation character.

◆ getExecutableDirectory()

std::string sf::getExecutableDirectory ( )

Returns the executable directory.

◆ getExecutableFilepath()

std::string sf::getExecutableFilepath ( )

Returns the executable filepath.

◆ getExecutableName()

std::string sf::getExecutableName ( )

Returns the executable name.

◆ getFiles()

bool sf::getFiles ( strings files,
std::string  directory,
std::string  wildcard 
)

Returns all the files from the passed directory using a wildcard.

◆ getGlobalParent()

QWidget * sf::getGlobalParent ( )

Gets global parent widget class for settings.

Returns
Current global instance when set otherwise nullptr is returned.

◆ getGlobalSettings()

QSettings * sf::getGlobalSettings ( )

Gets global settings class for settings.

Returns
Current global instance when set otherwise nullptr is returned.

◆ getGlobalUiLoader()

QUiLoader * sf::getGlobalUiLoader ( )

Gets global UI loader instance.

Returns
Current global instance when set otherwise nullptr is returned.

◆ getLayoutIndex()

int sf::getLayoutIndex ( QBoxLayout *  layout,
QObject *  target 
)

Gets the index from the passed target object in te box-layout.

Parameters
layoutBox-layout.
targetQLayout(Item or QWidget type of object.
Returns
Index position.

◆ getLayoutPosition()

QPair< int, QFormLayout::ItemRole > sf::getLayoutPosition ( QFormLayout *  layout,
QObject *  target 
)

Gets the position (row, role) from the passed target object in te form-layout.

Parameters
layoutForm layout.
targetQLayout or QWidget type of object.
Returns
Pair of values (row, role),. On failure row = -1.

◆ getLibraryName()

std::string sf::getLibraryName ( )
inline

function to get the library filename this function is called from.

◆ getLine()

std::string sf::getLine ( std::istream &  is)

Return a line from the input stream.

◆ getMainThreadId()

DWORD sf::getMainThreadId ( )

Gets the main thread id.

◆ getObjectNamePath()

QStringList sf::getObjectNamePath ( const QObject *  object)

Gets all the parent names from the object's parent in a string list.

Parameters
objectTop object.
Returns
List of object names.

◆ getPluginDir()

QString sf::getPluginDir ( )

Gets the global plugin directory.

◆ getSourceModel()

template<typename T >
T * sf::getSourceModel ( const QAbstractItemModel *  am)

Gets the model type pointer from the passed abstract model pointer.

Template Parameters
TModel type derived from QAbstractItemModel
Parameters
amPointer to model.
Returns
Non-null when found.

◆ getSourceModelIndex()

QModelIndex sf::getSourceModelIndex ( const QModelIndex &  index)

Gets the source index in case a proxy model has been used.

◆ getSustainTimer()

int sf::getSustainTimer ( )

Gets the current sustain timer interval in milli-seconds.

Returns
Interval in milliseconds.

◆ getThreadCount()

size_t sf::getThreadCount ( )

Returns the thread count from the current process.

◆ gettid()

pid_t sf::gettid ( )
noexcept

Add missing gettid() system call.

◆ getTime()

timespec sf::getTime ( bool  realTime = false)

Gets the timespec as function return value as clock_gettime() for the current time.

Parameters
realTimeWhen true the real time is returned. When false the time is used for timers and un effected by system time changes.

◆ getTimeRunning()

timespec sf::getTimeRunning ( )

Gets the time this application is running.

Is used in combination with getTime(false) to get the time since the start of the application.

◆ getUnitConversion()

TARGET_IMPORT bool sf::getUnitConversion ( const std::string &  option,
const std::string &  from_unit,
int  from_precision,
double &  multiplier,
double &  offset,
std::string &  to_unit,
int &  to_precision 
)

Returns true if a conversion could be made.
Calculation to convert are:
From -> To calculation:
new_value = (value * multiplier) + offset;
To -> From calculation:
new_value = (value - offset) / multiplier;

Parameters
optionSpecial conversion option code.
from_unitcurrent unit string.
from_precisionDecimals of current unit. (can be negative)
multiplierMultiplication factor.
offsetOffset value.
to_unitNew unit string.
to_precisionNew precision after conversion.
Returns
True on success.

◆ getWidgetLayout()

QLayout * sf::getWidgetLayout ( QWidget *  widget)

Gets the layout containing the passed widget.

Parameters
widget.
Returns
On not found nullptr.

◆ getWorkingDirectory()

std::string sf::getWorkingDirectory ( )

Returns the working directory.

◆ hexCharValue()

char sf::hexCharValue ( char  ch)

Returns numeric the value of the passed hexadecimal character.

◆ hexString()

std::string sf::hexString ( const void *  buffer,
size_t  sz 
)

Converts a block of data to a hexadecimal string.

◆ indexFromComboBox()

int sf::indexFromComboBox ( QComboBox *  comboBox,
const QVariant &  value,
int  default_index = -1 
)

Gets the index from the passed data value of the passed combo box widget.

Parameters
comboBoxCombo box to query on for the given value..
valueValue to look the index up from.
default_indexDEfault index when the value was not found.
Returns
The found index or default given one.

◆ Interpolate()

template<class T , class T2 >
Quaterion< T, T2 > sf::Interpolate ( const Quaterion< T, T2 > &  p,
const Quaterion< T, T2 > &  q,
double  t 
)

◆ ipow()

template<typename T >
T sf::ipow ( base,
int  exponent 
)

Fast integer power-of function.

Template Parameters
TInteger type.
Parameters
base
exponent
Returns

◆ isDebug()

bool sf::isDebug ( )

Gets the debug status.

Returns
True if debugging is passed at the command line.

◆ isDebuggerActive()

bool sf::isDebuggerActive ( )

Gets the debugger active status.

Returns
True if a debugger is attached at startup.

◆ isGuiApplication()

bool sf::isGuiApplication ( )

Checks if the running QCoreApplication is a GUI application.

Returns
True when a GUI application.

◆ isRunningWine()

bool sf::isRunningWine ( )

Determines if the application is running using Wine.

◆ itoa()

template<typename T >
char * sf::itoa ( value,
char *  buffer,
int  base 
)

Converts an integer type value to a buffer.

The itoa function converts value to a null-terminated buffer and stores the result in buffer. With itoa, value is an integer. Note: The space allocated for buffer must be large enough to hold the returned buffer, including the terminating null character (\0). itoa can return up to (sizeof(T) * CHAR_BIT + 1) bytes.

◆ itostr()

template<typename T >
std::string sf::itostr ( value,
int  base = 10 
)

◆ kb_hit()

bool sf::kb_hit ( )

Checks if a keyboard key pas pressed.

◆ LoadVariableValues()

bool TARGET_IMPORT sf::LoadVariableValues ( IniProfile profile)

Loads variable settings from the passed profile instance.

Which variable values are loaded is determined by its flags.

◆ Log()

template<class T , class T2 >
Quaterion< T, T2 > sf::Log ( const Quaterion< T, T2 > &  q1)

◆ magnitude()

int sf::magnitude ( double  value)

Returns the order of magnitude of the passed value. Examples: magnitude(0.001234) => -2 magnitude(0.123400) => 0 magnitude(12340.00) => 6.

◆ modulo()

template<typename T >
T sf::modulo ( k,
n 
)

Modulo function.

Template Parameters
TArithmetic scalar type of the template.
Parameters
kIs the dividend.
nIs the divisor.
Returns
Remainder

◆ moveRectWithinRect()

QRect sf::moveRectWithinRect ( const QRect &  outer,
const QRect &  inner 
)

◆ not_ref_null()

template<typename T >
bool sf::not_ref_null ( T &  r)

◆ null_ref()

template<typename T >
T & sf::null_ref ( )

Creates typed reference to a null pointer.

Template Parameters
T
Returns

◆ numberString()

std::string sf::numberString ( double  value,
int  digits,
bool  sign_on = true 
)

String formats a floating point or integer value using scientific notation. where the exponent is always a multiple of 3.

Parameters
valueValue to be converted to a string.
digitsResolution in significant digits to represent the value.
sign_onWhen true the '+' sign is added.
Returns
String

◆ operator%()

Value sf::operator% ( const Value v1,
const Value v2 
)
inline

◆ operator*() [1/8]

template<class T , class T2 >
const Quaterion< T, T2 > sf::operator* ( const Quaterion< T, T2 > &  lhs,
const Quaterion< T, T2 > &  rhs 
)

◆ operator*() [2/8]

template<typename T >
const TMatrix2D< T > sf::operator* ( const TMatrix2D< T > &  lhs,
const TMatrix2D< T > &  rhs 
)
inline

◆ operator*() [3/8]

Value sf::operator* ( const Value v1,
const Value v2 
)
inline

◆ operator*() [4/8]

template<class T , class T2 >
Quaterion< T, T2 > sf::operator* ( c,
const Quaterion< T, T2 > &  q 
)

◆ operator*() [5/8]

template<typename T >
TVector2D< T > sf::operator* ( c,
TVector2D< T > const &  v 
)

◆ operator*() [6/8]

template<class T , class T2 >
TVector3< T, T2 > sf::operator* ( c,
TVector3< T, T2 > const &  v 
)

◆ operator*() [7/8]

template<typename T >
TVector2D< T > sf::operator* ( TVector2D< T > const &  v,
c 
)

◆ operator*() [8/8]

template<class T , class T2 >
TVector3< T, T2 > sf::operator* ( TVector3< T, T2 > const &  v,
c 
)

◆ operator+() [1/2]

template<class T , class T2 >
const Quaterion< T, T2 > sf::operator+ ( const Quaterion< T, T2 > &  lhs,
const Quaterion< T, T2 > &  rhs 
)

◆ operator+() [2/2]

Value sf::operator+ ( const Value v1,
const Value v2 
)
inline

◆ operator-() [1/2]

template<class T , class T2 >
const Quaterion< T, T2 > sf::operator- ( const Quaterion< T, T2 > &  lhs,
const Quaterion< T, T2 > &  rhs 
)

◆ operator-() [2/2]

Value sf::operator- ( const Value v1,
const Value v2 
)
inline

◆ operator/() [1/2]

template<class T , class T2 >
const Quaterion< T, T2 > sf::operator/ ( const Quaterion< T, T2 > &  lhs,
const Quaterion< T, T2 > &  rhs 
)

◆ operator/() [2/2]

Value sf::operator/ ( const Value v1,
const Value v2 
)
inline

◆ operator<<() [1/15]

std::ostream & sf::operator<< ( std::ostream &  os,
const IniProfile profile 
)
inline

◆ operator<<() [2/15]

std::ostream & sf::operator<< ( std::ostream &  os,
const Md5Hash hash 
)
inline

Stream operator for showing hexadecimal hash value.

◆ operator<<() [3/15]

_MISC_FUNC std::ostream & sf::operator<< ( std::ostream &  os,
const Range r 
)

Output stream operator for a range.

◆ operator<<() [4/15]

_MISC_FUNC std::ostream & sf::operator<< ( std::ostream &  os,
const Range::Vector rl 
)

Output stream operator for a range vector.

◆ operator<<() [5/15]

TARGET_IMPORT std::ostream & sf::operator<< ( std::ostream &  os,
const ResultData  
)

Stream operator for the setup std::string.

◆ operator<<() [6/15]

std::ostream & sf::operator<< ( std::ostream &  os,
const TimeSpec ts 
)
inline

Operator for streaming a TTimeSpec class.

◆ operator<<() [7/15]

template<typename T >
std::ostream & sf::operator<< ( std::ostream &  os,
const TMatrix2D< T > &  m 
)
inline

◆ operator<<() [8/15]

std::ostream & sf::operator<< ( std::ostream &  os,
const TRect2D r 
)

◆ operator<<() [9/15]

template<typename T >
std::ostream & sf::operator<< ( std::ostream &  os,
const TVector2D< T > &  v 
)

Operator for writing a vector to a stream.

◆ operator<<() [10/15]

template<class T , class T2 >
std::ostream & sf::operator<< ( std::ostream &  os,
const TVector3< T, T2 > &  v 
)

◆ operator<<() [11/15]

std::ostream & sf::operator<< ( std::ostream &  os,
const Value v 
)

stl output stream operator.

◆ operator<<() [12/15]

TARGET_IMPORT std::ostream & sf::operator<< ( std::ostream &  os,
const Variable v 
)

Class std::ostream operator

◆ operator<<() [13/15]

TARGET_IMPORT std::ostream & sf::operator<< ( std::ostream &  os,
const Variable::State::Vector &  v 
)

Stream operator for setting up this instance with a setup std::string.

◆ operator<<() [14/15]

template<typename T >
std::ostream & sf::operator<< ( std::ostream &  os,
TDeque< T > const &  v 
)

Output stream operator.

Template Parameters
TType of the vector.
Parameters
osOutput stream
vValue of the entry.
Returns
Stream

◆ operator<<() [15/15]

template<typename T >
std::ostream & sf::operator<< ( std::ostream &  os,
TVector< T > const &  v 
)

Output stream operator.

Template Parameters
TType of the vector.
Parameters
osOutput stream
vValue of the entry.
Returns
Stream

◆ operator==() [1/2]

bool sf::operator== ( const Md5Hash h1,
const Md5Hash h2 
)
inline

Compare operator for storing an MD5 hash.

◆ operator==() [2/2]

bool sf::operator== ( const Md5Hash::hash_type h1,
const Md5Hash::hash_type h2 
)

Compare operator for storing an MD5 hash.

◆ operator>>() [1/9]

std::istream & sf::operator>> ( std::istream &  is,
Md5Hash h 
)

Read hash from input stream.

◆ operator>>() [2/9]

_MISC_FUNC std::istream & sf::operator>> ( std::istream &  is,
Range r 
)

Input stream operator for a range.

◆ operator>>() [3/9]

_MISC_FUNC std::istream & sf::operator>> ( std::istream &  is,
Range::Vector rl 
)

Input stream operator for a range vector.

◆ operator>>() [4/9]

TARGET_IMPORT std::istream & sf::operator>> ( std::istream &  is,
ResultData  
)

Stream operator for setting up this instance with a setup std::string.

◆ operator>>() [5/9]

template<typename T >
std::istream & sf::operator>> ( std::istream &  is,
TMatrix2D< T > &  m 
)
inline

◆ operator>>() [6/9]

std::istream & sf::operator>> ( std::istream &  is,
TRect2D r 
)

◆ operator>>() [7/9]

template<typename T >
std::istream & sf::operator>> ( std::istream &  is,
TVector2D< T > &  v 
)

Operator for reading a vector from a stream.

◆ operator>>() [8/9]

std::istream & sf::operator>> ( std::istream &  is,
Value v 
)

stl input stream operator.

◆ operator>>() [9/9]

TARGET_IMPORT std::istream & sf::operator>> ( std::istream &  is,
Variable v 
)

Stream operator for the setup std::string.

◆ operator^()

template<class T , class T2 >
const Quaterion< T, T2 > sf::operator^ ( const Quaterion< T, T2 > &  lhs,
const Quaterion< T, T2 > &  rhs 
)

◆ precision()

int sf::precision ( double  value)

Returns the precision of the passed floating point value. This is the amount of characters after the point without the trailing zeros. When the value is 12300.00 the value returned is 3. When the value is 0.0123 the value returned is also 3.

Parameters
valueFloating point value
Returns
Amount of characters after the point without the trailing zeros.

◆ printBacktrace()

void sf::printBacktrace ( )

Prints the backtrace to std::cerr.

◆ proc_getgrgid()

bool sf::proc_getgrgid ( gid_t  gid,
group_t grp 
)

Wrapper for getpwuid_r() but simplified using group_t. Returns true when an entry was found. In case of an error it throws en exception.

◆ proc_getgrnam()

bool sf::proc_getgrnam ( const std::string &  name,
group_t grp 
)

Wrapper for getgrnam_r() but simplified using group_t. Returns true when an entry was found. In case of an error it throws en exception.

◆ proc_getpwnam()

bool sf::proc_getpwnam ( std::string  name,
passwd_t pwd 
)

Wrapper for getpwnam_r() but simplified using passwd_t. Returns true when an entry was found. In case of an error it throws en exception.

◆ proc_getpwuid()

bool sf::proc_getpwuid ( uid_t  uid,
passwd_t pwd 
)

Wrapper for getpwuid_r() but simplified using passwd_t. Returns true when an entry was found. Incase of an error it throws en exception.

◆ proc_setegid()

void sf::proc_setegid ( gid_t  gid)

Wrapper for setegid(). In case of an error it throws en exception.

◆ proc_seteuid()

void sf::proc_seteuid ( uid_t  uid)

Wrapper for seteuid(). In case of an error it throws en exception.

◆ proc_setfsgid()

void sf::proc_setfsgid ( gid_t  gid)

Wrapper for setfsgid(). In case of an error it throws en exception.

◆ proc_setfsuid()

void sf::proc_setfsuid ( uid_t  uid)

Wrapper for setfsuid(). In case of an error it throws en exception.

◆ proc_setgid()

void sf::proc_setgid ( gid_t  gid)

Wrapper for setgid(). In case of an error it throws en exception.

◆ proc_setuid()

void sf::proc_setuid ( uid_t  uid)

Wrapper for setuid(). In case of an error it throws en exception.

◆ qgcvtString()

std::string sf::qgcvtString ( long double  value,
int  digits = 0 
)

The qgcvt() function converts number to a minimal length. (Not supported in Windows.) It produces 'digits' significant digits in either printf(3) F format or E (scientific) format. Always returns a decimal point without setting the global locale.

◆ random()

template<typename T >
T sf::random ( start,
stop 
)

Generates random numbers within a specified integer range.

◆ read_to_delimiter()

std::istream & sf::read_to_delimiter ( std::istream &  is,
std::string &  s,
char  delimiter 
)

Read a stream until a given delimiter.

Parameters
isInput stream.
sString being filled.
delimiterDelimiting character.
Returns
Passed input stream.

◆ requiredDigits()

int sf::requiredDigits ( double  roundVal,
double  minVal,
double  maxVal 
)

Gets the amount of required digits needed when drawing a scale.

This function is used in combination with numberString() to provide the 'digits' argument.

Parameters
roundValValue used for rounding or stepping.
minValMinimum value on the scale.
maxValMaximum value on the scale.
Returns
Amount of digits required.

◆ resizeColumnsToContents()

void sf::resizeColumnsToContents ( QTreeView *  treeView)
inline

Resizes all columns to content of a tree view except the last column.

Parameters
treeView

◆ round()

template<typename T >
T sf::round ( value,
rnd 
)

Rounds the passed value to a multiple of the rnd value.

◆ rtti_name()

template<typename T >
std::string sf::rtti_name ( const T &  )

Gets the demangled type name of the passed type T.

Template Parameters
TType to get the type string from.
Returns
Demangled type string.

◆ SaveVariableValues()

bool TARGET_IMPORT sf::SaveVariableValues ( IniProfile profile)

Saves variable settings to the passed profile instance.

Which variable values are saved is determined by its flags.

◆ setConfigLocationHandler()

void sf::setConfigLocationHandler ( const ConfigLocationClosure handler = {})

Sets the callback function for the getConfigLocation() function.

Parameters
handlerCallback closure.

◆ SetDefaultDebugOutput()

void sf::SetDefaultDebugOutput ( unsigned int  type)

Set and get function for the type of output when DO_DEFAULT is passed.

Parameters
typeSingle or combined (or '|') value of EDebugOutputType enumerate.

◆ setGlobalParent()

QWidget * sf::setGlobalParent ( QWidget *  parent)

Sets global parent widget class for dialogs.

Parameters
parentNew instance.
Returns
Previous instance.

◆ setGlobalSettings()

QSettings * sf::setGlobalSettings ( QSettings *  settings)

Sets global settings class for settings.

Parameters
settingsNew instance.
Returns
Previous instance.

◆ setGlobalUiLoader()

QUiLoader * sf::setGlobalUiLoader ( QUiLoader *  uiLoader)

Sets global UI loader class.

Parameters
uiLoaderNew instance.
Returns
Previous instance.

◆ setPluginDir()

void sf::setPluginDir ( QString  pluginDir)

Sets the global plugin directory used i.e. by sf::FormBuilderLoad() and sf::FormBuilderSave().

◆ setSustainTimer()

bool sf::setSustainTimer ( int  msec)

This function will enable a timer that call all Sustain functions in the DefaultVector member of the 'TSustain' template class.

Passing the repetition rate in milliseconds. if the passed time is zero the timer stops. Returns true if it was successful.

Parameters
msecTime in milliseconds.

◆ setUnitConversionHandler()

TARGET_IMPORT void sf::setUnitConversionHandler ( const UnitConversionServerClosure closure = {})

Sets the callback function for a security server.

Parameters
closureCallback closure.

◆ shiftHsl()

TARGET_IMPORT void sf::shiftHsl ( const QColor &  colorBegin,
const QColor &  colorEnd,
ColorTable::iterator  fromEntry,
ColorTable::iterator  toEntry,
const ColorShiftCurve curve = {} 
)

◆ shiftHsv()

TARGET_IMPORT void sf::shiftHsv ( const QColor &  colorBegin,
const QColor &  colorEnd,
ColorTable::iterator  fromEntry,
ColorTable::iterator  toEntry,
const ColorShiftCurve curve = {} 
)

◆ shiftRgb()

TARGET_IMPORT void sf::shiftRgb ( const QColor &  colorBegin,
const QColor &  colorEnd,
ColorTable::iterator  fromEntry,
ColorTable::iterator  toEntry,
const ColorShiftCurve curve = {} 
)

◆ shiftSaturation()

TARGET_IMPORT void sf::shiftSaturation ( const QColor &  color,
ColorTable::iterator  fromEntry,
ColorTable::iterator  toEntry,
const ColorShiftCurve curve = {} 
)

◆ siginterrupt()

int sf::siginterrupt ( int  sig,
int  flag 
)

Replacement for deprecated 'siginterrupt' function. Returns EINVAL when the sig argument is not a valid signal number otherwise zero.

Parameters
sigA signal like defined in the SA_????? defines.
flagBoolean value for installing and uninstalling the signal.

◆ Square()

template<class T , class T2 >
Quaterion< T, T2 > sf::Square ( const Quaterion< T, T2 > &  q)

◆ stod()

template<typename T >
T sf::stod ( const char *  ptr,
char **  end_ptr = nullptr 
)

A locale independent version of std::strtod() function which uses locale "C".

◆ string_format()

template<typename... Args>
std::string sf::string_format ( const std::string &  format,
Args &&...  args 
)

Better implementation of 'stringf' ?

◆ stringf()

std::string sf::stringf ( const char *  fmt,
  ... 
)

Creates a formatted string and returns it in a string class instance.

◆ stringHex()

size_t sf::stringHex ( const char *  hexstr,
void *  buffer,
size_t  sz 
)

Converts a hexadecimal string to a block of data.

◆ strncspn()

size_t sf::strncspn ( const char *  s,
size_t  n,
const char *  reject 
)

The strncspn() function calculates the length of the initial segment of 's' which consists entirely of characters not in reject up to a maximum 'n'. When no reject chars were found n is returned.

◆ strnspn()

size_t sf::strnspn ( const char *  s,
size_t  n,
const char *  accept 
)

The strncspn() function calculates the length of the initial segment of 's' which consists entirely of characters in accept up to a maximum 'n'.

◆ strnstr()

const char * sf::strnstr ( const char *  s,
const char *  find,
size_t  n 
)

Find the first occurrence of find in s, where the search is limited to the first slen characters of s.

◆ swap_it()

template<class T >
void sf::swap_it ( T &  t1,
T &  t2 
)
inline

Swaps the passed two arguments of any type.

Deprecated:
Use std::swap()
Template Parameters
TType that is swapped
Parameters
t1Parameter 1 of type
t2Parameter 2 of type

◆ time_format() [1/2]

std::string sf::time_format ( const struct tm *  timeinfo,
const char *  format = nullptr 
)

Formats the time to the given format. When the format is NULL the XML format is used. When the timeinfo is NULL the current local time is used.

◆ time_format() [2/2]

std::string sf::time_format ( time_t  time = -1,
const char *  format = nullptr,
bool  gmtime = false 
)

When time -1 the current time is used.

◆ time_mktime()

time_t sf::time_mktime ( struct tm *  tm,
bool  gmtime = false 
)

Same as mktime() only GMT is the result value not the localtime when gmtime is true.

◆ time_str2time()

time_t sf::time_str2time ( const std::string &  str,
const char *  format = nullptr,
bool  gmtime = false 
)

Returns the unix time from the passed string in the format that was passed. When the format is NULL the XML format is used. When gmtime is true GMT is used otherwise the local time.

◆ timespecCompare()

int sf::timespecCompare ( const timespec &  ts1,
const timespec &  ts2 
)

Compares the 2 ::timespec times.

Helper function.

Returns
-1, 0, 1 respectively for smaller, equal en larger.

◆ toAbs()

template<typename T >
T sf::toAbs ( v)

Gets the absolute value of a passed scalar value.

Template Parameters
TScalar type only.
Parameters
vScalar value.
Returns
Absolute value.

◆ toLower()

std::string sf::toLower ( std::string  s)

Converts the passed string into a lower case one and returns it.

◆ toNumber()

template<typename T , typename S = std::string>
T sf::toNumber ( const S &  s,
size_t *  idx = nullptr 
)

Converts a std::string to a T value and whe not possible it returns the passed default.

Template Parameters
TAny floating point or integer value.
Parameters
sString representation of the value.
idxPosition where the conversion stopped in string 's'.
Returns
Converted value.

◆ toNumberDefault()

template<typename T , typename S = std::string>
T sf::toNumberDefault ( const S &  s,
def 
)

Converts a std::string to a T value and when not possible it returns the passed default.

Template Parameters
TAny floating point or integer value.
Parameters
sString representation of the value.
defDefault value when conversion is not possible.
Returns
Converted or default value.

◆ toString()

template<typename T >
std::string sf::toString ( value)

The function converts number to a minimal length. It produces 'digits' significant digits in either printf(3) F format or E (scientific) format. Always returns a decimal point without setting the global locale.

◆ toUpper()

std::string sf::toUpper ( std::string  s)

Converts the passed string into a upper case one and returns it.

◆ trim()

std::string sf::trim ( std::string  s,
const std::string &  t = " " 
)

Trims a passed string at both sides and returns it.

◆ trimLeft()

std::string sf::trimLeft ( std::string  s,
const std::string &  t = " " 
)

Trims a passed string left and returns it.

◆ trimRight()

std::string sf::trimRight ( std::string  s,
const std::string &  t = " " 
)

Trims a passed string right and returns it.

◆ unescape()

std::string sf::unescape ( const std::string &  str)

Unescapes the passed string escaped by the escape() function.

See also
escape()
Parameters
strInput string
Returns
Unescaped string

◆ UserOutputDebugString()

void sf::UserOutputDebugString ( unsigned int  type,
const char *  str 
)
noexcept

Allows the passed string to be presented in various ways.

Parameters
typeSingle or combined (or '|') value of EDebugOutputType enumerate.
strNotification string.

◆ wildcmp() [1/2]

int sf::wildcmp ( const char *  wild,
const char *  str,
bool  case_s 
)

Matches a string against a wildcard string such as "*.*" or "bl?h.*" etc.

◆ wildcmp() [2/2]

int sf::wildcmp ( const std::string &  wild,
const std::string &  str,
bool  case_s 
)
inline

Matches a string against a wildcard string such as "*.*" or "bl?h.*" etc.

Variable Documentation

◆ DEGTORAD

constexpr double sf::DEGTORAD {0.01745329251994329547}
constexpr

Conversion ratio from degrees to radials.

◆ IniContent

const char* sf::IniContent
extern

◆ RADTODEG

const double sf::RADTODEG {57.29577951308232286465}

Conversion ratio from radials to degrees.

◆ RangeCompareExact

bool sf::RangeCompareExact
extern

Set the equal and unequal operators to include the id's. Used in unit tests.