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

Namespaces

namespace  backtrace
 
namespace  gii
 
namespace  gmi
 
namespace  lnx
 
namespace  numbers
 
namespace  qt
 
namespace  Ui
 
namespace  xgl
 

Classes

class  AcquisitionControl
 
class  AcquisitionControlPlugin
 Interface class to create the custom widget. More...
 
class  AcquisitionControlPropertyPage
 
class  AcquisitionEmulator
 Implements a repetitive signal acquisition emulator. More...
 
class  ActionButton
 A QPushButton which is associated with an action. More...
 
class  ActionButtonPlugin
 Interface class to create the custom widget. More...
 
class  AddItemDialog
 
struct  Allocator
 Memory allocator class. More...
 
class  AmplitudePalette
 
class  Application
 
class  ApplicationPropertyPage
 
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 the custom widget. More...
 
class  AscanPropertyPage
 
class  AxesCoordDialog
 
class  AxesCoordEdit
 Widget for editing sf::Variable value types integer, floating point and single line string. More...
 
class  AxesCoordEditPlugin
 Interface class to create the custom widget. More...
 
class  BscanGraph
 
class  BscanGraphPlugin
 Interface class to create the 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
 Simple widget which redirects the painting event to a Qt signal method. More...
 
class  DrawWidgetPlugin
 Interface class to create the 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 the 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
 Creates a dialog from ui-type file. More...
 
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  GmiCustomWidgets
 Implementation of interface class for the creation of GII custom widgets. More...
 
class  GmiEmulator
 
class  Graph
 Class for drawing a graph having optional rulers and grid. This class uses sf::Draw class for drawing a graph rulers and grid. Use this class as a private class for a custom widget which produces a graph. 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 the 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 the custom widget. More...
 
class  LayoutCustomWidgets
 Implementation of interface class for the creation of GII custom widgets. 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 the 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  MainWindow
 
class  MainWindowPropertyPage
 
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. Since the class sf::MultiDocInterface cannot inheriting QObject because of Qt not allowing multiple inheritance of a QObject derived class. So this class is an intermediate. 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  OpenGLCustomWidgets
 Implementation of interface class for the creation of GII custom widgets. More...
 
class  OpenGLRenderer
 Pure virtual class to implement rendering separated from the widget and makes the sf::OpenGLWidget the placeholder. More...
 
class  OpenGLWidget
 
class  OpenGLWidgetPlugin
 Interface class to create the custom widget. 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
 Extends struct passwd and auto allocates needed memory. Used as a result type with auto memory cleanup . More...
 
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 the 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...
 
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...
 
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
 Base class for a script to implementing. More...
 
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
 Implements a class to hook a static function to the global main thread sustain call. More...
 
class  StorageInterface
 Base class for the interface. More...
 
class  StorageServer
 Storage server. More...
 
class  SustainBase
 Base class for template TSustain which enables repetitive calls from the main thread with a set frequency. More...
 
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. Registering name and description.
Example More...
 
class  TClosure
 Encapsulates the std::function() template. More...
 
class  TContour
 
struct  TContourInfo
 
struct  TContourItem
 Container for a single data segment. More...
 
class  TDeque
 Counted deque having additional methods and operators for ease of usage. More...
 
class  TDynamicArray
 A dynamic buffer as typed array. Has range check on any index. More...
 
class  TDynamicBuffer
 Template for creating a dynamic buffer using an allocator. More...
 
struct  TElementInfoData
 
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. This class can only be used to derive from since the constructor Thread::Thread() is protected by design. at least the run() function must be overridden. 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  TMatrix22
 Generic 2 x 2 matrix template. More...
 
class  TMatrix44
 Generic 4 x 4 matrix template. More...
 
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  TQuaternion
 Generic type Quaternion. More...
 
class  TRectangle2D
 Class to store and manipulate a rectangle based on floating point values. More...
 
class  TResultDataHandler
 
class  TScriptGlobalEntry
 Template for creating a script global entry linking a dynamic created method. 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  TToolInfoData
 
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  TVector3D
 3-dimensional vector for math operations. More...
 
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. This conversion class installs a handler using setUnitConversionHandler() using a UnitConversionServerClosure type of function. 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 the 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 the 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 the 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 the custom widget. More...
 
class  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
 
class  VariableListModel
 List model for a sf::Variable list. More...
 
class  VariableListView
 Implements a tree view (table) for a variable list. More...
 
class  VariableListViewPlugin
 Interface class to create the custom widget. More...
 
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. Multiple inheritance makes these types local for other classes as well. Making code more readable and also prevents name space problems. More...
 
class  VariableWidgetBase
 Base class for sf::Variable based widgets. More...
 
class  WidgetPropertyPage
 

Typedefs

typedef TClosure< bool, UnitConversionEvent & > UnitConversionServerClosure
 Type of the server callback function.
 
typedef TSet< ETranslateOptionTTranslateOptions
 
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
 Easier typename for 'struct stat'.
 
typedef struct passwd passwd_type
 
typedef struct group group_type
 
typedef QList< QRgb > ColorTable
 
typedef TClosure< qreal, qreal > ColorShiftCurve
 

Enumerations

enum  EContourItemType { citNONE , citARC , citPOINT }
 
enum  EContourItemPoint {
  cipNONE = -1 , cipCENTER , cipSTART , cipSTOP ,
  cipMID , cipLAST_ENTRY
}
 
enum  ETranslateOption : int { toSECSOLUTION , toTOGGLESECSOL , toNOSURFACECALC }
 
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 _GII_FUNC saveVariableValues (IniProfile &profile)
 Saves variable settings to the passed profile instance.
 
bool _GII_FUNC loadVariableValues (IniProfile &profile)
 
_GII_FUNC std::ostream & operator<< (std::ostream &os, const ResultData &)
 Stream operator for the setup std::string.
 
_GII_FUNC std::istream & operator>> (std::istream &is, ResultData &)
 Stream operator for setting up this instance with a setup std::string.
 
_GII_FUNC void setUnitConversionHandler (const UnitConversionServerClosure &closure={})
 Sets the callback function for a security server.
 
_GII_FUNC 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;

 
_GII_FUNC std::ostream & operator<< (std::ostream &os, const Variable &v)
 
_GII_FUNC std::istream & operator>> (std::istream &is, Variable &v)
 Stream operator for the setup std::string.
 
_GII_FUNC std::ostream & operator<< (std::ostream &os, const Variable::State::Vector &v)
 Stream operator for setting up this instance with a setup std::string.
 
_GMI_FUNC std::ostream & operator<< (std::ostream &os, const gmi::AxesCoord &ac)
 Operator for writing the sf::gmi::AxesCoord to an output-stream.
 
_GMI_FUNC std::istream & operator>> (std::istream &is, gmi::AxesCoord &ac)
 Operator for reading the sf::gmi::AxesCoord from an input stream.
 
bool _KTM_FUNC GetSurfaceMatrix (const Vector2D &surf_point, double surf_angle, double rotangle, Matrix44 &surface)
 
bool _KTM_FUNC GetSurfaceMatrix (const Vector2D &surf_point, double surf_angle, double rotangle, double anglexz, double angleyz, double anglexy, Matrix44 &surface)
 
bool _KTM_FUNC TranslateToNipscanCoords (const Matrix44 &surface, const TToolInfoData &tool, double beamlen, double &x, double &y, double &z, double &a, double &b, TTranslateOptions options={})
 
_KTM_FUNC std::istream & operator>> (std::istream &is, TToolInfoData &)
 
_KTM_FUNC std::ostream & operator<< (std::ostream &os, const TToolInfoData &)
 
Vector3D _KTM_FUNC ToolBeamVector (const TToolInfoData &tool, double beamlen, double a, double b)
 
bool _KTM_FUNC CalcTangent (int select, const Vector2D &c1, double radius1, Vector2D &tg1, const Vector2D &c2, double radius2, Vector2D &tg2)
 
bool _KTM_FUNC GetLineValues (const Vector2D &p, double angle, double &slope, double &yofs)
 
bool _KTM_FUNC GetLineValues (const Vector2D &p1, const Vector2D &p2, double &slope, double &yofs)
 
bool _KTM_FUNC GetIntersection (const Vector2D &p11, const Vector2D &p12, const Vector2D &p2, double angle2, Vector2D &ip)
 
bool _KTM_FUNC GetIntersection (const Vector2D &center, double radius, const Vector2D &p, double angle, Vector2D &ip1, Vector2D &ip2)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const TMatrix22< T > &mtx)
 Operator for writing the sf::TMatrix22 to an output-stream.
 
template<typename T >
std::istream & operator>> (std::istream &is, TMatrix22< T > &mtx) noexcept(false)
 Operator for reading the sf::TMatrix22 from an input stream.
 
template<typename T >
TMatrix44< T > operator* (const TMatrix44< T > &lm, const TMatrix44< T > &rm)
 Multiplies to matrices into a single one.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const TMatrix44< T > &mtx)
 Operator for writing the matrix to an output-stream.
 
template<typename T >
std::istream & operator>> (std::istream &is, TMatrix44< T > &mtx) noexcept(false)
 Operator for reading the matrix from an input stream.
 
template<typename T >
TQuaternion< T > operator+ (const TQuaternion< T > &lhs, const TQuaternion< T > &rhs)
 Adds two quaternions.
 
template<typename T >
TQuaternion< T > operator- (const TQuaternion< T > &lhs, const TQuaternion< T > &rhs)
 Subtracts two quaternions.
 
template<typename T >
TQuaternion< T > operator* (const TQuaternion< T > &lhs, const TQuaternion< T > &rhs)
 Multiplies two quaternions.
 
template<typename T >
TQuaternion< T > operator/ (const TQuaternion< T > &lhs, const TQuaternion< T > &rhs)
 Divides two quaternions.
 
template<typename T >
TQuaternion< T > operator* (T c, const TQuaternion< T > &quat)
 Multiplies a scalar value with a quaternion.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const TQuaternion< T > &quat)
 Operator for writing the sf::TQuaternion to an output-stream. Calls TQuaternion::toString() for the operator.
 
template<typename T >
std::istream & operator>> (std::istream &is, TQuaternion< T > &quat) noexcept(false)
 Operator for reading the sf::TQuaternion from an input stream. Calls TQuaternion<T>::fromString() to perform this operator.
 
template<typename T >
std::istream & operator>> (std::istream &is, TRectangle2D< T > &)
 Extracts the rectangle from an input stream.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const TRectangle2D< T > &)
 Writes the rectangle into an output stream.
 
template<typename T >
TVector2D< T > operator* (T c, const TVector2D< T > &v)
 
template<typename T >
TVector2D< T > operator* (const TVector2D< T > &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<typename T >
TVector3D< T > operator* (T c, const TVector3D< T > &v)
 
template<typename T >
TVector3D< T > operator* (const TVector3D< T > &v, T c)
 
template<typename T >
std::istream & operator>> (std::istream &is, TVector3D< T > &v) noexcept(false)
 Operator for reading a vector from a stream.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const TVector3D< T > &v)
 Operator for writing a vector to a stream.
 
_MISC_FUNC void setConfigLocationHandler (const ConfigLocationClosure &handler={})
 Sets the callback function for the getConfigLocation() function.
 
_MISC_FUNC 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)
 
_MISC_FUNC 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.
 
_MISC_FUNC 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.
 
_MISC_FUNC Value calculator (const std::string &script, const Value &def)
 Calculator function that converts a formula of the passed string to a #sf::Value.
 
_MISC_FUNC 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.
 
_MISC_FUNC 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.
 
_MISC_FUNC bool 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.
 
_MISC_FUNC int getSustainTimer ()
 Gets the current sustain timer interval in milliseconds.
 
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.
 
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)
 
_MISC_FUNC std::ostream & operator<< (std::ostream &os, const Value &v)
 Value class output stream operator.
 
_MISC_FUNC std::istream & operator>> (std::istream &is, Value &v)
 Value class input stream operator.
 
_MISC_FUNC void UserOutputDebugString (unsigned int type, const char *str) noexcept
 Allows the passed string to be presented in various ways.
 
_MISC_FUNC void SetDefaultDebugOutput (unsigned int type)
 Set and get function for the type of output when DO_DEFAULT is passed.
 
_MISC_FUNC unsigned int GetDefaultDebugOutput ()
 Returns the combination of EDebugOutputType which is the default output.
 
_MISC_FUNC void printBacktrace ()
 Prints the backtrace to std::cerr.
 
_MISC_FUNC bool isDebug ()
 Gets the debug status.
 
_MISC_FUNC bool isDebuggerActive ()
 Gets the debugger active status.
 
_MISC_FUNC void debugBreak ()
 Causes a break when debugging.
 
_MISC_FUNC void freeConsole (bool always=false)
 Closes the console window.
 
_MISC_FUNC 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.
 
_MISC_FUNC std::string getLine (std::istream &is)
 Return a line from the input stream.
 
_MISC_FUNC bool fileExists (const char *path)
 Checks if the passed path exist (by doing an access() using F_OK).
 
bool fileExists (const std::string &path)
 Checks if the passed path exist (by doing an access() using F_OK).
 
_MISC_FUNC std::string fileBaseName (const std::string &path)
 Same as basename() but using a std::string.
 
_MISC_FUNC std::string fileDirName (const std::string &path)
 Same as dirname() but using a std::string.
 
_MISC_FUNC bool fileUnlink (const std::string &path)
 Same as unlink() but using a std::string.
 
_MISC_FUNC bool fileRename (const std::string &old_path, const std::string &new_path)
 Same as rename() but using a std::string.
 
_MISC_FUNC bool findFiles (sf::strings &files, const std::string &wildcard)
 Finds the files using the passed wildcard.
 
_MISC_FUNC std::string::value_type getDirectorySeparator ()
 Returns OS dependent directory separation character.
 
_MISC_FUNC std::string getDynamicLibraryExtension ()
 Returns OS dependent dynamic library extension.
 
_MISC_FUNC std::string getTemporaryDirectory ()
 Returns the temporary directory.
 
_MISC_FUNC std::string getWorkingDirectory ()
 Returns the working directory.
 
_MISC_FUNC std::string getExecutableFilepath ()
 Returns the executable filepath.
 
_MISC_FUNC std::string getExecutableDirectory ()
 Returns the executable directory.
 
_MISC_FUNC 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<typename T , typename S >
calculateOffset (T value, T min, T max, S len, bool clip)
 Calculates the offset for a given range and set point.
 
template<typename T >
clip (const T value, const T lower_lim, const T upper_lim)
 Template function clipping the given value between an upper and lower limit.
 
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 template function.
 
template<typename T >
toAbs (T v)
 Gets the absolute value of a passed scalar value.
 
template<typename T >
ipow (T base, int exponent)
 Fast integer power-of function.
 
template<typename T >
constexpr T toRadians (T degrees)
 Converts degrees to radians.
 
template<typename T >
constexpr T toDegrees (T radians)
 Converts radians to degrees.
 
template<typename T >
bool isEqual (T a, T b, T epsilon=std::numeric_limits< T >::epsilon())
 Compares 2 floating point values of the same type with a given epsilon.
 
template<typename T >
bool isZero (T value, T epsilon=std::numeric_limits< T >::epsilon())
 Check if the passed value is zero or near zero according the given epsilon.
 
template<typename T >
bool isValidValue (T value)
 Check if the passed value is not NaN or infinity.
 
template<typename T , typename... Args>
size_t maxArgumentIndex (T first, Args... args)
 Finds the index of the largest element passed as an argument.
 
template<typename T , typename... Args>
size_t minArgumentIndex (T first, Args... args)
 Finds the index of the smallest element passed as an argument.
 
template<typename T , size_t N>
size_t maxArrayIndex (const std::array< T, N > &arr)
 Finds the largest element index of the passed array.
 
template<typename T , size_t N>
size_t minArrayIndex (const std::array< T, N > &arr)
 Finds the largest element index of the passed array.
 
_MISC_FUNC 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.
 
_MISC_FUNC 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.
 
template<typename T >
std::pair< T, int > getMantissaExponent (T value)
 Gets the mantissa and exponent part of a floating point value.
 
template<typename T >
int magnitude (T value)
 Gets the order of magnitude of the passed floating point value. Examples: magnitude(0.001234) => -2 magnitude(0.123400) => 0 magnitude(12340.00) => 5.
 
_MISC_FUNC int magnitudeObsolete (double value)
 Gets the order of magnitude of the passed double value. Examples: magnitude(0.001234) => -2 magnitude(0.123400) => 0 magnitude(12340.00) => 5.
 
_MISC_FUNC int requiredDigits (double round_val, double min_val, double max_val)
 Gets the amount of required digits needed when drawing a scale.
 
template<typename T >
void delete_null (T &p)
 Deletes object and clears pointer.
 
template<typename T >
void delete_anull (T &p)
 Deletes an array previous allocated by 'new[]' when the pointer is non-null and also nulls the passed pointer.
 
template<typename 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<typename 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)
 
_MISC_FUNC char * decimal_separator_fix (char *buffer, size_t len)
 Replaces a decimal comma for a point. This instead of changing the global locale. Used by template functions.
 
_MISC_FUNC 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.
 
_MISC_FUNC 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'.
 
_MISC_FUNC 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.
 
_MISC_FUNC std::string demangle (const char *name)
 Returns the unmangled function name returned by type ID.
 
_MISC_FUNC char hexCharValue (char ch)
 Returns numeric the value of the passed hexadecimal character.
 
_MISC_FUNC size_t stringHex (const char *hexstr, void *buffer, size_t sz)
 Converts a hexadecimal string to a block of data.
 
_MISC_FUNC std::string hexString (const void *buffer, size_t sz)
 Converts a block of data to a hexadecimal string.
 
_MISC_FUNC std::string bitToString (unsigned long wrd, size_t count)
 Converts an integer value to bit string '0' and '1' characters where the first character is the first bit.
 
_MISC_FUNC std::string escape (const std::string &str, char delimiter='\0')
 Escapes all control and non ascii characters.
 
_MISC_FUNC std::string unescape (const std::string &str)
 Unescapes the passed string escaped by the escape() function.
 
_MISC_FUNC std::string filter (std::string str, const std::string &filter)
 Filters all characters from the passed string and returns the resulting string.
 
_MISC_FUNC std::string toLower (std::string s)
 Converts the passed string into a lower case one and returns it.
 
_MISC_FUNC std::string toUpper (std::string s)
 Converts the passed string into an upper case one and returns it.
 
_MISC_FUNC std::string trim (std::string s, const std::string &t=" ")
 Trims a passed string at both sides and returns it.
 
_MISC_FUNC std::string trimLeft (std::string s, const std::string &t=" ")
 Trims a passed string left and returns it.
 
_MISC_FUNC std::string trimRight (std::string s, const std::string &t=" ")
 Trims a passed string right and returns it.
 
_MISC_FUNC 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.
 
_MISC_FUNC std::string error_string (int error_num)
 Thread safe version strerror_r() or strerror_s() when cross compiling for Windows.
 
_MISC_FUNC std::string stringf (const char *fmt,...)
 Creates a formatted string and returns it in a string class instance.
 
_MISC_FUNC std::string replaceAll (const std::string &s, const std::string &from, const std::string &to)
 Replaces all occurrences of 'from' substring and replaces them with 'to' string.
 
template<typename... Args>
std::string string_format (const std::string &format, Args &&... args)
 Better implementation of 'stringf' ?
 
template<typename T >
char * gcvt (T value, int ndigits, char *buf, size_t len)
 Converts a floating-point number to a string always using a decimal point. 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 >
std::string gcvtString (T value, int ndigits=0)
 Converts a floating-point number to a string always using a decimal point.
 
template<typename T >
char * itoa (T value, char *buffer, int base=10)
 Converts an integer type value to a buffer.
 
template<typename T >
std::string itostr (T value, int base=10)
 Converts an integer type value to a std::string.
 
template<typename T >
toFloat (const char *ptr, char **end_ptr=nullptr)
 A locale independent template version for std::strtof(), std::strtod() and std::strtold() functions 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, int digits=0)
 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. In case of more than 3 trailing zeros with large numbers a scientific notation is formed instead.
 
template<typename T >
std::string toStringPrecision (T value, int prec=std::numeric_limits< int >::max())
 Coverts any floating point value in to a string with a given precision. The default precision shows a .
 
_MISC_FUNC 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.
 
_MISC_FUNC std::istream & read_to_delimiter (std::istream &is, std::string &s, char delimiter)
 Read a stream until a given delimiter.
 
template<typename T >
int fcvt_r (T value, int ndigit, int *decpt, int *sign, char *buf, size_t len)
 Function identical to ecvt(), except that 'ndigits' specifies the number of digits after the decimal point.
 
template<typename T >
int ecvt_r (T value, int ndigit, int *decpt, int *sign, char *buf, size_t len)
 Converts number to a null-terminated string of 'ndigits' digits. where 'ndigits' is reduced to a system-specific limit determined by the precision of a double. The high-order digit is nonzero, unless number is zero. The low order digit is rounded. The string itself does not contain a decimal point; however, the position of the decimal point relative to the start of the string is stored in *decpt. A negative value for *decpt means that the decimal point is to the left of the start of the string. If the sign of number is negative, *sign is set to a nonzero value, otherwise it is set to 0. If number is zero, it is unspecified whether *decpt is 0 or 1.
 
_MISC_FUNC int getThreadCount ()
 Gets the thread count from the current process.
 
_MISC_FUNC timespec getTimeRunning ()
 Gets the time this application is running.
 
_MISC_FUNC bool loadDynamicLibrary (const std::string &path)
 Loads a dynamic library from the given path.
 
_MISC_FUNC int timespecCompare (const timespec &ts1, const timespec &ts2)
 Compares the 2 'timespec' time structures. Helper function.
 
_MISC_FUNC timespec getTime (bool real_time=false)
 Gets the timespec as function return value as clock_gettime() for the current time.
 
template<typename T >
void copy_data (T &dest, const T &src) noexcept(true)
 Does a binary copy from source to destination data.
 
std::string getGCCVersion ()
 Gets the GNU compiler version.
 
std::string_view getCppStandard ()
 Gets the C++ standard used.
 
_MISC_FUNC std::string getOSVersion ()
 Gets the OS and version used.
 
_MISC_FUNC std::string_view getCpuArchitecture ()
 Gets the CPU architecture returned from 'uname -m' command.
 
_MISC_FUNC bool kb_hit ()
 
_MISC_FUNC pid_t gettid () noexcept
 
_MISC_FUNC bool getFiles (strings &files, std::string directory, std::string wildcard)
 
_MISC_FUNC bool file_write (const char *path, const void *buf, size_t sz, bool append=false)
 Writes a buffer to a filepath.
 
bool file_write (const std::string &path, const void *buf, size_t sz, bool append=false)
 Writes a character buffer to file.
 
bool file_write (const std::string &path, const std::string &s, bool append=false)
 Writes a std::string to file.
 
_MISC_FUNC std::filesystem::path file_fd_path (int fd)
 
_MISC_FUNC bool file_stat (const std::string &path, stat_t &_stat)
 Same as stat() but using a std::string.
 
_MISC_FUNC std::string time_format (const struct tm *time_info, const char *format=nullptr)
 Formats the time to the given format.
 
_MISC_FUNC std::string time_format (time_t time=-1, const char *format=nullptr, bool gm_time=false)
 Formats the time to the given format.
 
_MISC_FUNC time_t time_str2time (const std::string &str, const char *format=nullptr, bool gm_time=false)
 Gets the unix time from the passed string in the format that was passed.
 
_MISC_FUNC time_t time_mktime (struct tm *tm, bool gm_time=false)
 Same as mktime().
 
_MISC_FUNC bool file_mkdir (const char *path, __mode_t mode=0755)
 Makes all directories recursively in the path.
 
bool file_mkdir (const std::string &path, __mode_t mode=0755)
 Makes all directories recursively in the path.
 
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)
 
_MISC_FUNC bool proc_getgrnam (const std::string &name, group_t &grp)
 
_MISC_FUNC bool proc_getgrgid (gid_t gid, group_t &grp)
 
_MISC_FUNC void proc_setgid (gid_t gid)
 
_MISC_FUNC void proc_setegid (gid_t gid)
 
_MISC_FUNC void proc_setfsuid (uid_t uid)
 
_MISC_FUNC void proc_setfsgid (gid_t gid)
 
int _MISC_FUNC siginterrupt (int sig, int flag)
 Replacement for deprecated 'siginterrupt' function. Returns EINVAL when the sig argument is not a valid signal number otherwise zero.
 
_MISC_FUNC QSettings * setGlobalSettings (QSettings *settings)
 Sets global settings class for settings.
 
_MISC_FUNC QSettings * getGlobalSettings ()
 Gets global settings class for settings.
 
_MISC_FUNC QWidget * setGlobalParent (QWidget *parent)
 Sets global parent widget class for dialogs.
 
_MISC_FUNC QWidget * getGlobalParent ()
 Gets global parent widget class for settings.
 
_MISC_FUNC QUiLoader * setGlobalUiLoader (QUiLoader *uiLoader)
 Sets global UI loader class.
 
_MISC_FUNC QUiLoader * getGlobalUiLoader ()
 Gets global UI loader instance.
 
_MISC_FUNC void setPluginDir (QString pluginDir)
 Sets the global plugin directory used i.e. by sf::FormBuilderLoad() and sf::FormBuilderSave().
 
_MISC_FUNC QString getPluginDir ()
 Gets the global plugin directory.
 
_MISC_FUNC QWidget * FormBuilderLoad (QIODevice *io, QWidget *parent)
 Loads the form from the passed UI file. This function prevents mandatory linking of the Qt::Designer library.
 
_MISC_FUNC void FormBuilderSave (QIODevice *io, QWidget *widget)
 Saves the widget to the passed file. This function prevents mandatory linking of the Qt::Designer library.
 
_MISC_FUNC std::string toString (const QRect &rect)
 Converts the passed Qt rectangle into a std string.
 
_MISC_FUNC QRect moveRectWithinRect (const QRect &outer, const QRect &inner)
 Moves the inner in to the outer rectangle.
 
_MISC_FUNC 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.
 
_MISC_FUNC QStringList getObjectNamePath (const QObject *object)
 Gets all the parent names from the object's parent in a string list.
 
_MISC_FUNC QLayout * getWidgetLayout (const QWidget *widget)
 Gets the layout containing the passed widget.
 
_MISC_FUNC int indexFromComboBox (const QComboBox *comboBox, const QVariant &value, int default_index=-1)
 Gets the index from the passed data value of the passed combo box widget.
 
_MISC_FUNC QPair< int, QFormLayout::ItemRole > getLayoutPosition (const QFormLayout *layout, QObject *target)
 Gets the position (row, role) from the passed target object in te form-layout.
 
_MISC_FUNC int getLayoutIndex (const 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.
 
_MISC_FUNC void dumpObjectProperties (const QObject *obj)
 Dumps all the object properties in qDebug().
 
template<typename T >
T * getSourceModel (const QAbstractItemModel *am)
 Gets the model type pointer from the passed abstract model pointer.
 
_MISC_FUNC QModelIndex getSourceModelIndex (const QModelIndex &index)
 Gets the source index in case a proxy model has been used.
 
_MISC_FUNC void expandTreeView (QTreeView *tv, bool expand=true, const QModelIndex &index={})
 Expands or collapses a tree view's items.
 
_MISC_FUNC bool isGuiApplication ()
 Checks if the running QCoreApplication is a GUI application.
 
_PAL_FUNC void shiftHsv (const QColor &colorBegin, const QColor &colorEnd, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 
_PAL_FUNC void shiftHsl (const QColor &colorBegin, const QColor &colorEnd, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 
_PAL_FUNC void shiftSaturation (const QColor &color, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 
_PAL_FUNC void shiftRgb (const QColor &colorBegin, const QColor &colorEnd, ColorTable::iterator fromEntry, ColorTable::iterator toEntry, const ColorShiftCurve &curve={})
 

Variables

class _MISC_CLASS PropertySheetDialog
 
_MISC_DATA bool RangeCompareExact
 
constexpr const char * US_METHOD_PEAK = "Peak"
 Names used for method identification.
 
constexpr const char * US_METHOD_COPY = "Copy"
 Method for generating sample copy results in array's of Amplitude values.
 

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.

◆ 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 for 'struct stat'.

◆ strings

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

Vector of std::strings with additional functionality.

◆ TTranslateOptions

◆ UnitConversionServerClosure

Type of the server callback function.

Returns
True on successful conversion.

◆ wstrings

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

Vector of std::wstrings with additional functionality.

Enumeration Type Documentation

◆ EContourItemPoint

Enumerator
cipNONE 
cipCENTER 
cipSTART 
cipSTOP 
cipMID 
cipLAST_ENTRY 

◆ EContourItemType

Enumerator
citNONE 
citARC 
citPOINT 

◆ 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.

◆ ETranslateOption

Enumerator
toSECSOLUTION 
toTOGGLESECSOL 
toNOSURFACECALC 

Function Documentation

◆ bitToString()

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

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

◆ CalcTangent()

bool _KTM_FUNC sf::CalcTangent ( int  select,
const Vector2D &  c1,
double  radius1,
Vector2D &  tg1,
const Vector2D &  c2,
double  radius2,
Vector2D &  tg2 
)

◆ calculateOffset()

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

Calculates the offset for a given range and set point.

◆ calculator() [1/3]

_MISC_FUNC 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]

_MISC_FUNC 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]

_MISC_FUNC 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<typename T >
T sf::clip ( const T  value,
const T  lower_lim,
const T  upper_lim 
)

Template function clipping the given value between an upper and lower limit.

Template Parameters
TType of the value clipped.
Parameters
valueThe value for being clipped.
lower_limLower limit value.
upper_limUpper limit value.
Returns
The clipped value.

◆ connectByName()

_MISC_FUNC 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.

◆ copy_data()

template<typename T >
void sf::copy_data ( T &  dest,
const T &  src 
)
noexcept

Does a binary copy from source to destination data.

Template Parameters
TStructure or data type or array.
Parameters
destReference to the destination data.
srcReference to the source data.

◆ debugBreak()

_MISC_FUNC void sf::debugBreak ( )

Causes a break when debugging.

◆ decimal_separator_fix()

_MISC_FUNC char * sf::decimal_separator_fix ( char *  buffer,
size_t  len 
)

Replaces a decimal comma for a point. This instead of changing the global locale. Used by template functions.

Parameters
buffer
len
Returns
The passed buffer pointer.

◆ delete_anull()

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

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

◆ delete_null()

template<typename 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()

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

Demangles the passed rtti mangled type name.

Parameters
nameMangled name
Returns
Demangled name.

◆ demangle()

_MISC_FUNC 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()

_MISC_FUNC 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()

_MISC_FUNC void sf::dumpObjectProperties ( const QObject *  obj)

Dumps all the object properties in qDebug().

◆ ecvt_r()

template<typename T >
int sf::ecvt_r ( value,
int  ndigit,
int *  decpt,
int *  sign,
char *  buf,
size_t  len 
)

Converts number to a null-terminated string of 'ndigits' digits. where 'ndigits' is reduced to a system-specific limit determined by the precision of a double. The high-order digit is nonzero, unless number is zero. The low order digit is rounded. The string itself does not contain a decimal point; however, the position of the decimal point relative to the start of the string is stored in *decpt. A negative value for *decpt means that the decimal point is to the left of the start of the string. If the sign of number is negative, *sign is set to a nonzero value, otherwise it is set to 0. If number is zero, it is unspecified whether *decpt is 0 or 1.

Template Parameters
TFloating point type.
Parameters
valueFloating point value to convert.
ndigitAmount of digits.
decptDecimal point.
signNon-zero when the value is negative.
bufReceiving character buffer pointer.
lenReceiving buffer size.
Returns
0 on success, and -1 otherwise.
Note
Copied from glibc and modified for C++.

◆ error_string()

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

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

◆ escape()

_MISC_FUNC 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

◆ expandTreeView()

_MISC_FUNC 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.

◆ fcvt_r()

template<typename T >
int sf::fcvt_r ( value,
int  ndigit,
int *  decpt,
int *  sign,
char *  buf,
size_t  len 
)

Function identical to ecvt(), except that 'ndigits' specifies the number of digits after the decimal point.

Template Parameters
TFloating point type.
Parameters
valueFloating point value to convert.
ndigitAmount of digits.
decptDecimal point.
signNon-zero when the value is negative.
bufReceiving character buffer pointer.
lenReceiving buffer size.
Returns
0 on success, and -1 otherwise.
Note
Copied from glibc and modified for C++.

◆ file_fd_path()

_MISC_FUNC 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]

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

Makes all directories recursively in the path.

Parameters
pathDirectory path to make.
modeMode of each created directory.
Returns
True on success.

◆ file_mkdir() [2/2]

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

Makes all directories recursively in the path.

Parameters
pathDirectory path to make.
modeMode of each created directory.
Returns
True on success.

◆ file_stat()

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

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

◆ file_write() [1/3]

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

Writes a buffer to a filepath.

Parameters
pathFilepath.
bufPointer to the character buffer.
szSize of the buffer.
appendWhen true it appends the buffer to the file.
Returns

◆ file_write() [2/3]

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

Writes a std::string to file.

Parameters
pathFile path.
sString to be written to the file.
appendWhen true it appends the buffer to the file.
Returns
True on success.

◆ file_write() [3/3]

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

Writes a character buffer to file.

Parameters
pathFilepath.
bufPointer to the character buffer.
szSize of the buffer.
appendWhen true it appends the buffer to the file.
Returns
True on success.

◆ fileBaseName()

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

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

◆ fileDirName()

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

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

◆ fileExists() [1/2]

_MISC_FUNC bool sf::fileExists ( const char *  path)

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

◆ fileExists() [2/2]

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

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

◆ fileRename()

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

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

◆ fileUnlink()

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

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

◆ filter()

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

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

◆ findFiles()

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

Finds the files using the passed wildcard.

◆ FormBuilderLoad()

_MISC_FUNC 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()

_MISC_FUNC 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<typename 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.

◆ freeConsole()

_MISC_FUNC void sf::freeConsole ( bool  always = false)

Closes the console window.

Parameters
alwaysWhen true the console is closed even when debugging argument '–debug' on command line.

◆ gcvt()

template<typename T >
char * sf::gcvt ( value,
int  ndigits,
char *  buf,
size_t  len 
)

Converts a floating-point number to a string always using a decimal point. 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 Parameters
TFloating point type.
Parameters
valueFloating point value to convert.
ndigitsAmount of digits.
bufBuffer pointer.
lenLength of the buffer.
Returns
Pointer to passed buffer.

◆ gcvtString()

template<typename T >
std::string sf::gcvtString ( value,
int  ndigits = 0 
)

Converts a floating-point number to a string always using a decimal point.

See also
sf::gcvt()
Template Parameters
TFloating point type.
Parameters
valueFloating point value to convert.
ndigitsAmount of digits default to 0 which is means the minimum amount to represent the value.
Returns
String containing converted value.

◆ getConfigLocation()

_MISC_FUNC 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

◆ getCppStandard()

std::string_view sf::getCppStandard ( )
inline

Gets the C++ standard used.

◆ getCpuArchitecture()

_MISC_FUNC std::string_view sf::getCpuArchitecture ( )

Gets the CPU architecture returned from 'uname -m' command.

◆ GetDefaultDebugOutput()

_MISC_FUNC unsigned int sf::GetDefaultDebugOutput ( )

Returns the combination of EDebugOutputType which is the default output.

◆ getDirectorySeparator()

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

Returns OS dependent directory separation character.

◆ getDynamicLibraryExtension()

_MISC_FUNC std::string sf::getDynamicLibraryExtension ( )

Returns OS dependent dynamic library extension.

◆ getExecutableDirectory()

_MISC_FUNC std::string sf::getExecutableDirectory ( )

Returns the executable directory.

◆ getExecutableFilepath()

_MISC_FUNC std::string sf::getExecutableFilepath ( )

Returns the executable filepath.

◆ getExecutableName()

_MISC_FUNC std::string sf::getExecutableName ( )

Returns the executable name.

◆ getFiles()

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

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

◆ getGCCVersion()

std::string sf::getGCCVersion ( )
inline

Gets the GNU compiler version.

◆ getGlobalParent()

_MISC_FUNC QWidget * sf::getGlobalParent ( )

Gets global parent widget class for settings.

Returns
Current global instance when set otherwise nullptr is returned.

◆ getGlobalSettings()

_MISC_FUNC QSettings * sf::getGlobalSettings ( )

Gets global settings class for settings.

Returns
Current global instance when set otherwise nullptr is returned.

◆ getGlobalUiLoader()

_MISC_FUNC QUiLoader * sf::getGlobalUiLoader ( )

Gets global UI loader instance.

Returns
Current global instance when set otherwise nullptr is returned.

◆ GetIntersection() [1/2]

bool _KTM_FUNC sf::GetIntersection ( const Vector2D &  center,
double  radius,
const Vector2D &  p,
double  angle,
Vector2D &  ip1,
Vector2D &  ip2 
)

◆ GetIntersection() [2/2]

bool _KTM_FUNC sf::GetIntersection ( const Vector2D &  p11,
const Vector2D &  p12,
const Vector2D &  p2,
double  angle2,
Vector2D &  ip 
)

◆ getLayoutIndex()

_MISC_FUNC int sf::getLayoutIndex ( const 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()

_MISC_FUNC QPair< int, QFormLayout::ItemRole > sf::getLayoutPosition ( const 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()

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

Return a line from the input stream.

◆ GetLineValues() [1/2]

bool _KTM_FUNC sf::GetLineValues ( const Vector2D &  p,
double  angle,
double &  slope,
double &  yofs 
)

◆ GetLineValues() [2/2]

bool _KTM_FUNC sf::GetLineValues ( const Vector2D &  p1,
const Vector2D &  p2,
double &  slope,
double &  yofs 
)

◆ getMantissaExponent()

template<typename T >
std::pair< T, int > sf::getMantissaExponent ( value)

Gets the mantissa and exponent part of a floating point value.

Template Parameters
T
Parameters
value
Returns

◆ getObjectNamePath()

_MISC_FUNC 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.

◆ getOSVersion()

_MISC_FUNC std::string sf::getOSVersion ( )

Gets the OS and version used.

◆ getPluginDir()

_MISC_FUNC 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()

_MISC_FUNC QModelIndex sf::getSourceModelIndex ( const QModelIndex &  index)

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

◆ GetSurfaceMatrix() [1/2]

bool _KTM_FUNC sf::GetSurfaceMatrix ( const Vector2D &  surf_point,
double  surf_angle,
double  rotangle,
double  anglexz,
double  angleyz,
double  anglexy,
Matrix44 &  surface 
)

◆ GetSurfaceMatrix() [2/2]

bool _KTM_FUNC sf::GetSurfaceMatrix ( const Vector2D &  surf_point,
double  surf_angle,
double  rotangle,
Matrix44 &  surface 
)

◆ getSustainTimer()

_MISC_FUNC int sf::getSustainTimer ( )

Gets the current sustain timer interval in milliseconds.

Returns
Interval in milliseconds.

◆ getTemporaryDirectory()

_MISC_FUNC std::string sf::getTemporaryDirectory ( )

Returns the temporary directory.

◆ getThreadCount()

_MISC_FUNC int sf::getThreadCount ( )

Gets the thread count from the current process.

Returns
On failure -1 else the actual thread count.

◆ gettid()

_MISC_FUNC pid_t sf::gettid ( )
noexcept

Add missing gettid() system call.

◆ getTime()

_MISC_FUNC timespec sf::getTime ( bool  real_time = false)

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

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

◆ getTimeRunning()

_MISC_FUNC 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()

_GII_FUNC 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()

_MISC_FUNC QLayout * sf::getWidgetLayout ( const QWidget *  widget)

Gets the layout containing the passed widget.

Parameters
widget.
Returns
On not found nullptr.

◆ getWorkingDirectory()

_MISC_FUNC std::string sf::getWorkingDirectory ( )

Returns the working directory.

◆ hexCharValue()

_MISC_FUNC char sf::hexCharValue ( char  ch)

Returns numeric the value of the passed hexadecimal character.

◆ hexString()

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

Converts a block of data to a hexadecimal string.

◆ indexFromComboBox()

_MISC_FUNC int sf::indexFromComboBox ( const 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.

◆ ipow()

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

Fast integer power-of function.

Template Parameters
TInteger type.
Parameters
base
exponent
Returns

◆ isDebug()

_MISC_FUNC bool sf::isDebug ( )

Gets the debug status.

Returns
True if debugging is passed at the command line.

◆ isDebuggerActive()

_MISC_FUNC bool sf::isDebuggerActive ( )

Gets the debugger active status.

Returns
True if a debugger is attached at startup.

◆ isEqual()

template<typename T >
bool sf::isEqual ( a,
b,
epsilon = std::numeric_limits<T>::epsilon() 
)

Compares 2 floating point values of the same type with a given epsilon.

Template Parameters
TBase floating point type.
Parameters
aFloating point value 1.
bFloating point value 2.
epsilon
Returns
True when near equal.

◆ isGuiApplication()

_MISC_FUNC bool sf::isGuiApplication ( )

Checks if the running QCoreApplication is a GUI application.

Returns
True when a GUI application.

◆ isValidValue()

template<typename T >
bool sf::isValidValue ( value)

Check if the passed value is not NaN or infinity.

◆ isZero()

template<typename T >
bool sf::isZero ( value,
epsilon = std::numeric_limits<T>::epsilon() 
)

Check if the passed value is zero or near zero according the given epsilon.

◆ itoa()

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

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.

Template Parameters
TInteger type.
Parameters
valueInteger value.
bufferReceiving buffer pointer.
baseBase of number system or radix defaulting to 10.
Returns
Null terminated pointer buffer. (Not the same as the buffer pointer.)

◆ itostr()

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

Converts an integer type value to a std::string.

Template Parameters
TInteger type.
Parameters
valueInteger value.
baseBase of number system or radix defaulting to 10.
Returns
Null terminated pointer buffer. (Not the same as the buffer pointer.)

◆ kb_hit()

_MISC_FUNC bool sf::kb_hit ( )

Checks if a keyboard key pas pressed.

◆ loadDynamicLibrary()

_MISC_FUNC bool sf::loadDynamicLibrary ( const std::string &  path)

Loads a dynamic library from the given path.

Parameters
pathPath to the library.
Returns
True when library loading was successful.

◆ loadVariableValues()

bool _GII_FUNC sf::loadVariableValues ( IniProfile profile)

Loads variable settings from the passed profile instance.

Which variable values are loaded is determined by its flags.

◆ magnitude()

template<typename T >
int sf::magnitude ( value)

Gets the order of magnitude of the passed floating point value. Examples: magnitude(0.001234) => -2 magnitude(0.123400) => 0 magnitude(12340.00) => 5.

◆ magnitudeObsolete()

_MISC_FUNC int sf::magnitudeObsolete ( double  value)

Gets the order of magnitude of the passed double value. Examples: magnitude(0.001234) => -2 magnitude(0.123400) => 0 magnitude(12340.00) => 5.

◆ maxArgumentIndex()

template<typename T , typename... Args>
size_t sf::maxArgumentIndex ( first,
Args...  args 
)

Finds the index of the largest element passed as an argument.

◆ maxArrayIndex()

template<typename T , size_t N>
size_t sf::maxArrayIndex ( const std::array< T, N > &  arr)

Finds the largest element index of the passed array.

Template Parameters
TType of elements in the array.
NSize of the elements in the array.
Parameters
arrArray of type std::array<T, N>
Returns
Zero based index of largest array entry.

◆ minArgumentIndex()

template<typename T , typename... Args>
size_t sf::minArgumentIndex ( first,
Args...  args 
)

Finds the index of the smallest element passed as an argument.

◆ minArrayIndex()

template<typename T , size_t N>
size_t sf::minArrayIndex ( const std::array< T, N > &  arr)

Finds the largest element index of the passed array.

Template Parameters
TType of elements in the array.
NSize of the elements in the array.
Parameters
arrArray of type std::array<T, N>
Returns
Zero based index of largest array entry.

◆ modulo()

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

Modulo template function.

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

◆ moveRectWithinRect()

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

Moves the inner in to the outer rectangle.

Parameters
outerBounding rectangle.
innerRectangle to be moved.
Returns
Modified rectangle.

◆ not_ref_null()

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

◆ null_ref()

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

Creates typed reference to a null pointer.

Template Parameters
T
Returns

◆ numberString()

_MISC_FUNC 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<typename T >
TMatrix44< T > sf::operator* ( const TMatrix44< T > &  lm,
const TMatrix44< T > &  rm 
)

Multiplies to matrices into a single one.

Template Parameters
TBase floating point type.
Parameters
lmLeft matrix of multiplication.
rmRight matrix of multiplication.
Returns
New matrix.

◆ operator*() [2/8]

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

Multiplies two quaternions.

Template Parameters
TBase floating point type.
Parameters
lhsLeft value of the multiplication.
rhsRight value of the multiplication.
Returns
New quaternion instance.

◆ operator*() [3/8]

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

◆ operator*() [4/8]

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

◆ operator*() [5/8]

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

◆ operator*() [6/8]

template<typename T >
TQuaternion< T > sf::operator* ( c,
const TQuaternion< T > &  quat 
)

Multiplies a scalar value with a quaternion.

Template Parameters
TBase floating point type.
Parameters
cScalar left value of the multiplication.
quatQuaternion right value of the multiplication.
Returns
New quaternion instance.

◆ operator*() [7/8]

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

◆ operator*() [8/8]

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

◆ operator+() [1/2]

template<typename T >
TQuaternion< T > sf::operator+ ( const TQuaternion< T > &  lhs,
const TQuaternion< T > &  rhs 
)

Adds two quaternions.

Template Parameters
TBase floating point type.
Parameters
lhsLeft value of the addition.
rhsRight value of the addition.
Returns
New matrix.

◆ operator+() [2/2]

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

◆ operator-() [1/2]

template<typename T >
TQuaternion< T > sf::operator- ( const TQuaternion< T > &  lhs,
const TQuaternion< T > &  rhs 
)

Subtracts two quaternions.

Template Parameters
TBase floating point type.
Parameters
lhsLeft value of the subtraction.
rhsRight value of the subtraction.
Returns
New matrix.

◆ operator-() [2/2]

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

◆ operator/() [1/2]

template<typename T >
TQuaternion< T > sf::operator/ ( const TQuaternion< T > &  lhs,
const TQuaternion< T > &  rhs 
)

Divides two quaternions.

Template Parameters
TBase floating point type.
Parameters
lhsLeft value of the division.
rhsRight value of the division.
Returns
New quaternion instance.

◆ operator/() [2/2]

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

◆ operator<<() [1/18]

_GMI_FUNC std::ostream & sf::operator<< ( std::ostream &  os,
const gmi::AxesCoord ac 
)

Operator for writing the sf::gmi::AxesCoord to an output-stream.

Parameters
osOutput stream.
acAxes coordinate to stream.
Returns
The passed output stream.

◆ operator<<() [2/18]

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

◆ operator<<() [3/18]

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

Stream operator for showing hexadecimal hash value.

◆ operator<<() [4/18]

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

Output stream operator for a range.

◆ operator<<() [5/18]

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

Output stream operator for a range vector.

◆ operator<<() [6/18]

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

Stream operator for the setup std::string.

◆ operator<<() [7/18]

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

Operator for writing the sf::TMatrix22 to an output-stream.

Template Parameters
TBase floating point type.
Parameters
osOutput stream.
mtxMatrix to stream out.
Returns
The passed output stream.

◆ operator<<() [8/18]

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

Operator for writing the matrix to an output-stream.

Template Parameters
TBase floating point type.
Parameters
osOutput stream.
mtxMatrix to stream out.
Returns
The passed output stream.

◆ operator<<() [9/18]

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

Operator for writing the sf::TQuaternion to an output-stream. Calls TQuaternion::toString() for the operator.

Template Parameters
TBase floating point type.
Parameters
osOutput stream.
quatMatrix to stream out.
Returns
The passed output stream.

◆ operator<<() [10/18]

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

Writes the rectangle into an output stream.

◆ operator<<() [11/18]

_KTM_FUNC std::ostream & sf::operator<< ( std::ostream &  os,
const TToolInfoData  
)

◆ operator<<() [12/18]

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

Operator for writing a vector to a stream.

◆ operator<<() [13/18]

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

Operator for writing a vector to a stream.

◆ operator<<() [14/18]

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

Value class output stream operator.

◆ operator<<() [15/18]

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

Class std::ostream operator

◆ operator<<() [16/18]

_GII_FUNC 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<<() [17/18]

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<<() [18/18]

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]

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

Compare operator for storing an MD5 hash.

◆ operator>>() [1/14]

_GMI_FUNC std::istream & sf::operator>> ( std::istream &  is,
gmi::AxesCoord ac 
)

Operator for reading the sf::gmi::AxesCoord from an input stream.

Parameters
isInput stream.
acAxes coordinate to stream.
Returns
The passed input stream.

◆ operator>>() [2/14]

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

Read hash from input stream.

◆ operator>>() [3/14]

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

Input stream operator for a range.

◆ operator>>() [4/14]

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

Input stream operator for a range vector.

◆ operator>>() [5/14]

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

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

◆ operator>>() [6/14]

template<typename T >
std::istream & sf::operator>> ( std::istream &  is,
TMatrix22< T > &  mtx 
)

Operator for reading the sf::TMatrix22 from an input stream.

Template Parameters
TBase floating point type.
Parameters
isInput stream.
mtxMatrix to stream.
Returns
The passed input stream.

◆ operator>>() [7/14]

template<typename T >
std::istream & sf::operator>> ( std::istream &  is,
TMatrix44< T > &  mtx 
)

Operator for reading the matrix from an input stream.

Template Parameters
TBase floating point type.
Parameters
isInput stream.
mtxMatrix to stream.
Returns
The passed input stream.

◆ operator>>() [8/14]

template<typename T >
std::istream & sf::operator>> ( std::istream &  is,
TQuaternion< T > &  quat 
)

Operator for reading the sf::TQuaternion from an input stream. Calls TQuaternion<T>::fromString() to perform this operator.

Template Parameters
TBase floating point type.
Parameters
isInput stream.
quatMatrix to stream.
Returns
The passed input stream.

◆ operator>>() [9/14]

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

Extracts the rectangle from an input stream.

◆ operator>>() [10/14]

_KTM_FUNC std::istream & sf::operator>> ( std::istream &  is,
TToolInfoData  
)

◆ operator>>() [11/14]

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

Operator for reading a vector from a stream.

◆ operator>>() [12/14]

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

Operator for reading a vector from a stream.

◆ operator>>() [13/14]

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

Value class input stream operator.

◆ operator>>() [14/14]

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

Stream operator for the setup std::string.

◆ precision()

_MISC_FUNC 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()

_MISC_FUNC void sf::printBacktrace ( )

Prints the backtrace to std::cerr.

◆ proc_getgrgid()

_MISC_FUNC 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()

_MISC_FUNC 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. In case of an error it throws en exception.

◆ proc_setegid()

_MISC_FUNC 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()

_MISC_FUNC void sf::proc_setfsgid ( gid_t  gid)

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

◆ proc_setfsuid()

_MISC_FUNC void sf::proc_setfsuid ( uid_t  uid)

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

◆ proc_setgid()

_MISC_FUNC 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.

◆ random()

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

Generates random numbers within a specified integer range.

◆ read_to_delimiter()

_MISC_FUNC 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.

◆ replaceAll()

_MISC_FUNC std::string sf::replaceAll ( const std::string &  s,
const std::string &  from,
const std::string &  to 
)

Replaces all occurrences of 'from' substring and replaces them with 'to' string.

Parameters
sSource string.
fromString to be replaced.
toString to replace it with.
Returns
Resulting string.

◆ requiredDigits()

_MISC_FUNC int sf::requiredDigits ( double  round_val,
double  min_val,
double  max_val 
)

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
round_valValue used for rounding or stepping.
min_valMinimum value on the scale.
max_valMaximum 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 _GII_FUNC sf::saveVariableValues ( IniProfile profile)

Saves variable settings to the passed profile instance.

Which variable values are saved is determined by its flags.

◆ setConfigLocationHandler()

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

Sets the callback function for the getConfigLocation() function.

Parameters
handlerCallback closure.

◆ SetDefaultDebugOutput()

_MISC_FUNC 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()

_MISC_FUNC QWidget * sf::setGlobalParent ( QWidget *  parent)

Sets global parent widget class for dialogs.

Parameters
parentNew instance.
Returns
Previous instance.

◆ setGlobalSettings()

_MISC_FUNC QSettings * sf::setGlobalSettings ( QSettings *  settings)

Sets global settings class for settings.

Parameters
settingsNew instance.
Returns
Previous instance.

◆ setGlobalUiLoader()

_MISC_FUNC QUiLoader * sf::setGlobalUiLoader ( QUiLoader *  uiLoader)

Sets global UI loader class.

Parameters
uiLoaderNew instance.
Returns
Previous instance.

◆ setPluginDir()

_MISC_FUNC void sf::setPluginDir ( QString  pluginDir)

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

◆ setSustainTimer()

_MISC_FUNC 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()

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

Sets the callback function for a security server.

Parameters
closureCallback closure.

◆ shiftHsl()

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

◆ shiftHsv()

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

◆ shiftRgb()

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

◆ shiftSaturation()

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

◆ siginterrupt()

int _MISC_FUNC 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.

◆ string_format()

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

Better implementation of 'stringf' ?

◆ stringf()

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

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

◆ stringHex()

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

Converts a hexadecimal string to a block of data.

◆ strncspn()

_MISC_FUNC 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()

_MISC_FUNC 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()

_MISC_FUNC 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<typename 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]

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

Formats the time to the given format.

Parameters
time_infoWhen NULL the current local time is used.
formatWhen NULL the XML format is used.
Returns
Formatted time string.

◆ time_format() [2/2]

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

Formats the time to the given format.

Parameters
timeWhen -1 the current time is used.
formatWhen NULL the XML format is used.
gm_timeWhen true GMT is the result value not the localtime.
Returns
Formatted time string.

◆ time_mktime()

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

Same as mktime().

Parameters
tmTime
gm_timeWhen true GMT is the result value not the localtime.
Returns
Time as time_t.

◆ time_str2time()

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

Gets the unix time from the passed string in the format that was passed.

Parameters
str
formatWhen NULL the XML format is used.
gm_timeWhen is true GMT is used otherwise the local time.
Returns
Time structure.

◆ timespecCompare()

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

Compares the 2 'timespec' time structures. 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.

◆ toDegrees()

template<typename T >
constexpr T sf::toDegrees ( radians)
constexpr

Converts radians to degrees.

◆ toFloat()

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

A locale independent template version for std::strtof(), std::strtod() and std::strtold() functions which uses locale "C".

Template Parameters
TFloating point type.
Parameters
ptrString buffer pointer to start.
end_ptrOptional pointer to pointer where conversion stopped reading.
Returns
The floating point value.

◆ toLower()

_MISC_FUNC 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.

◆ ToolBeamVector()

Vector3D _KTM_FUNC sf::ToolBeamVector ( const TToolInfoData tool,
double  beamlen,
double  a,
double  b 
)

◆ toRadians()

template<typename T >
constexpr T sf::toRadians ( degrees)
constexpr

Converts degrees to radians.

◆ toString() [1/2]

_MISC_FUNC std::string sf::toString ( const QRect &  rect)

Converts the passed Qt rectangle into a std string.

Parameters
rectQt Rectangle.
Returns
String like '(left, bottom, right, top)'.

◆ toString() [2/2]

template<typename T >
std::string sf::toString ( value,
int  digits = 0 
)

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. In case of more than 3 trailing zeros with large numbers a scientific notation is formed instead.

Parameters
valueValue to be converted to a string.
digitsAmount of digits of resolution in case of a floating point.

◆ toStringPrecision()

template<typename T >
std::string sf::toStringPrecision ( value,
int  prec = std::numeric_limits<int>::max() 
)

Coverts any floating point value in to a string with a given precision. The default precision shows a .

Parameters
valueFloating point value.
precAmount of float decimals when not in scientific notation.
Returns
sprintf string formated.

◆ toUpper()

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

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

◆ TranslateToNipscanCoords()

bool _KTM_FUNC sf::TranslateToNipscanCoords ( const Matrix44 &  surface,
const TToolInfoData tool,
double  beamlen,
double &  x,
double &  y,
double &  z,
double &  a,
double &  b,
TTranslateOptions  options = {} 
)

◆ trim()

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

Trims a passed string at both sides and returns it.

◆ trimLeft()

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

Trims a passed string left and returns it.

◆ trimRight()

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

Trims a passed string right and returns it.

◆ unescape()

_MISC_FUNC 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()

_MISC_FUNC 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]

_MISC_FUNC 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

◆ PropertySheetDialog

◆ RangeCompareExact

_MISC_DATA bool sf::RangeCompareExact
extern

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

◆ US_METHOD_COPY

constexpr const char* sf::US_METHOD_COPY = "Copy"
constexpr

Method for generating sample copy results in array's of Amplitude values.

◆ US_METHOD_PEAK

constexpr const char* sf::US_METHOD_PEAK = "Peak"
constexpr

Names used for method identification.