fw4spl
fwTools Namespace Reference

The namespace fwTools contains several tools like UUID, factory, dispatche, stringizer, macros, helper. More...

Namespaces

 os
 Namespace fwTools::os contains tools methods which depend on os like get user application data directory.
 

Classes

struct  AppendValueFirst
 Helper for BinaryCartesianProduct two Set. More...
 
struct  BinaryCartesianProduct
 Compute Cartesian Product of two set (type list) to generate all possible combinaison. More...
 
struct  BinaryCartesianProductRecurser
 Helper which compute from a set and a multi set. More...
 
class  Bookmarks
 Allows to add a bookmark to an object, the bookmark name is unique (in time), an object can have several bookmarks. More...
 
struct  CartesianProduct
 compute the cartesian product of many set More...
 
class  ClassFactory
 
struct  CleanZombies
 
class  Dispatcher
 Create an automatic template instancier exple Dispatcher< TYPESEQUENCE , FUNCTOR>::invoke("int");. More...
 
class  DynamicType
 Class defining an elementary C++ type aka unsigned char, signed char, .... signed long, float, double. More...
 
struct  EmptyListMapping
 an helper to isMapping() using iterator More...
 
class  EndTypeListAction
 Limit cases for empty typelist. More...
 
class  Exception
 Implements fwTools exception class. More...
 
class  Failed
 Implements a failed exception class. More...
 
class  fwID
 Defines ID for fwTools::Object. It is used to associate ID with object. More...
 
struct  isMappingMultiMPLHelper
 an helper to isMapping() using iterator : this class is called when TSEQ is a sequence. it is recursivelly called with head element removed from TSEQ More...
 
struct  isMappingSingleMPLHelper
 an isMapping() helper : This function is called iff TSingle_or_TSEQ is not a sequence and isMapping<SingleType> is not specialized This class is intended to avoid developer to forgive the specialization of isMapping<TYPE> More...
 
class  isSignedFunctor
 
struct  make_vector
 MetaFunction which create an boost::boost::mpl::vector. More...
 
struct  makeSetOfSingletons
 MetaFunction ( used for pseudo Curryfication ) which transform a set where new elements are singleton of 1st set elements i.e { a , b , c } –> { {a}, {b}, {c} }. More...
 
class  MinMaxFunctor
 
class  Object
 Define Base class for FW4SPL objects and services. More...
 
class  ProgressAdviser
 Subclasses Inherited from ProgressAdviser can notify progression This class is used as base class to add the functionalities of progress notification. To notify a progress then simply call notifyProgress() method by given the progression [0, 1.0] and a message. The ProgressAdviser will automatically call handler (=Observer). Handlers can be added using addHandler(). the Handler of type ProgessHandler can be a function or functor or boost::signal with a signature ( float, std::string ) and returning nothing. More...
 
class  ProgressToLogger
 Class ProgressToLogger is an ProgressAdviser::ProgressHandler, it receive notification from its ProgressAdviser and send the progress to the logging system ( SpyLog ) More...
 
struct  RemoveTemporaryFolder
 
class  System
 Provide a system to get a Temporary folder which allow multi-user, multi-instance separation. More...
 
class  Type
 Class describing an elementary C++ type aka unsigned char, signed char, .... int, float, double. More...
 
class  TypeInfo
 Purpose: offer a first-class, comparable wrapper over std::type_info ( but copy construcible ) More...
 
struct  TypeSetter
 
class  UUID
 Management of UUID on objects. More...
 

Typedefs

typedef ::boost::mpl::vector< signed char, unsigned char, signed short, unsigned short, signed int, unsigned int,signed long, unsigned long >::type IntegerTypes
 
typedef ::boost::mpl::push_back< ::boost::mpl::push_back< IntegerTypes, float >::type, double >::type IntrinsicTypes
 
typedef boost::mpl::vector< signed char, unsigned char, signed short, unsigned short, signed int, unsigned int, float, double >::type SupportedTypes
 

Functions

template<class TYPE >
DynamicType makeDynamicType ()
 Helper to create object DynamicType from a given type TYPE in { (un)signed char, ... , double }.
 
template<class KEYTYPE >
DynamicType makeDynamicType (const KEYTYPE &keyType)
 Helper to create object DynamicType from a given type from a KEYTYPE representing a type in { (un)signed char, ... , double }. More...
 
template<>
FWTOOLS_API std::string getString (const DynamicType &dt)
 
template<>
FWTOOLS_API std::string getString (const std::vector< DynamicType > &dtv)
 
template<typename TYPEOUT , typename TYPEIN >
TYPEOUT numericRoundCast (const TYPEIN &value)
 
FWTOOLS_API boost::filesystem::path getPathDifference (boost::filesystem::path path1, boost::filesystem::path path2)
 Return the relative difference within two paths. More...
 
template<class TSingle_or_TSEQ , class KeyType_or_KeyTypeContainer >
bool isMapping (const KeyType_or_KeyTypeContainer &key)
 Create a type (T) binding/mapping with a KeyType ( std::string, ipop::PixelType etc... More...
 
template<class TSEQ , class KeyTypeContainer >
bool isMappingMulti (const KeyTypeContainer &keys)
 Test whatever a typelist is mapping a container of KeyType. More...
 
template<>
std::string getString (const DynamicType &dt)
 
template<>
std::string getString (const std::vector< DynamicType > &dtv)
 
template<>
bool isMapping< unsigned char > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
bool isMapping< unsigned short > (const DynamicType &key)
 
template<>
bool isMapping< unsigned int > (const DynamicType &key)
 
template<>
bool isMapping< unsigned long > (const DynamicType &key)
 
template<>
bool isMapping< signed char > (const DynamicType &key)
 
template<>
bool isMapping< signed short > (const DynamicType &key)
 
template<>
bool isMapping< signed int > (const DynamicType &key)
 
template<>
bool isMapping< signed long > (const DynamicType &key)
 
template<>
bool isMapping< float > (const DynamicType &key)
 
template<>
bool isMapping< double > (const DynamicType &key)
 
template<>
bool isMapping< std::string > (const DynamicType &key)
 
template<>
std::string getString (const std::string &aString)
 explicit specialization of getString(const T &t)
 
template<>
std::string getString (const std::type_info &ti)
 
template<>
std::string getString (const TypeInfo &ti)
 
template<>
std::string getString (const signed char &c)
 
template<>
std::string getString (const char &c)
 
template<>
std::string getString (const unsigned char &c)
 
template<>
bool isMapping< unsigned char > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
bool isMapping< unsigned short > (const std::string &key)
 
template<>
bool isMapping< unsigned int > (const std::string &key)
 
template<>
bool isMapping< unsigned long > (const std::string &key)
 
template<>
bool isMapping< signed char > (const std::string &key)
 
template<>
bool isMapping< signed short > (const std::string &key)
 
template<>
bool isMapping< signed int > (const std::string &key)
 
template<>
bool isMapping< signed long > (const std::string &key)
 
template<>
bool isMapping< float > (const std::string &key)
 
template<>
bool isMapping< double > (const std::string &key)
 
template<>
bool isMapping< std::string > (const std::string &key)
 
const ::boost::filesystem::path createUniqueFolder (const ::boost::filesystem::path &folderUniquePath)
 
template<class T >
bool isMappingTypeInfoCommon (const std::type_info &key)
 template specialization for defining KeyType mapping ( here std::type_info) with their value
 
template<>
bool isMapping< unsigned char > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
bool isMapping< unsigned short > (const std::type_info &key)
 
template<>
bool isMapping< unsigned int > (const std::type_info &key)
 
template<>
bool isMapping< unsigned long > (const std::type_info &key)
 
template<>
bool isMapping< signed char > (const std::type_info &key)
 
template<>
bool isMapping< signed short > (const std::type_info &key)
 
template<>
bool isMapping< signed int > (const std::type_info &key)
 
template<>
bool isMapping< signed long > (const std::type_info &key)
 
template<>
bool isMapping< float > (const std::type_info &key)
 
template<>
bool isMapping< double > (const std::type_info &key)
 
template<>
bool isMapping< std::string > (const std::type_info &key)
 
Date and time
FWTOOLS_API::boost::gregorian::date strToBoostDate (const std::string &dateStr)
 Convert a string date to a boost date. More...
 
FWTOOLS_API::boost::posix_time::time_duration strToBoostTime (const std::string &timeStr)
 Convert a string time to a boost time. More...
 
FWTOOLS_API::boost::posix_time::ptime strToBoostDateAndTime (const std::string &dateStr, const std::string &timeStr="000000")
 Convert string data time to a boost time. More...
 
FWTOOLS_API std::string getDate (const ::boost::posix_time::ptime &dateAndTime)
 Convert a boost time to a string date. More...
 
FWTOOLS_API std::string getTime (const ::boost::posix_time::ptime &dateAndTime)
 Convert a boost time to a string time. More...
 
FWTOOLS_API std::string getCurrentTime ()
 Return the current clock. More...
 
Dynamic key type mapping
template<>
FWTOOLS_API bool isMapping< unsigned char > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned short > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned int > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned long > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed char > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed short > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed int > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed long > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< float > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< double > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< std::string > (const DynamicType &key)
 Template specialization for defining KeyType mapping ( here DynamicType) with their value. More...
 
Date and time in iso extended format
FWTOOLS_API boost::posix_time::ptime fromIsoExtendedString (const std::string &time_string)
 Construct a boost ptime from a string in iso extended format (YYYY-MM-DDTHH:MM:SS) More...
 
FWTOOLS_API::boost::posix_time::ptime fromDateInXsdFormat (const std::string &date_string)
 Construct a boost ptime from a string in xsd format (YYYY-MM-DD) More...
 
FWTOOLS_API std::string toIsoExtendedString (boost::posix_time::ptime ptime)
 Construct a string in iso extended format from a boost ptime. More...
 
FWTOOLS_API std::string getDateInXsdFormat (const boost::posix_time::ptime &dateAndTime)
 Construct a string in the format YYYY-MM-DD from a boost ptime. More...
 
Conversion value to string
template<class T >
std::string getString (const T &t)
 Convert the value to a string. More...
 
template<class T1 , class T2 >
std::string getString (const std::pair< T1, T2 > &t)
 Convert a pair of values to a string. More...
 
template<class ForwardIterator >
std::string getString (ForwardIterator begin, ForwardIterator end)
 Convert container values to a string. More...
 
template<>
FWTOOLS_API std::string getString (const std::string &aString)
 explicit specialization of getString(const T &t)
 
template<>
FWTOOLS_API std::string getString (const std::type_info &ti)
 Convert the value to a string. More...
 
template<>
FWTOOLS_API std::string getString (const TypeInfo &ti)
 Convert the value to a string. More...
 
template<>
FWTOOLS_API std::string getString (const signed char &c)
 Convert the value to a string. More...
 
template<>
FWTOOLS_API std::string getString (const char &c)
 Convert the value to a string. More...
 
template<>
FWTOOLS_API std::string getString (const unsigned char &c)
 Convert the value to a string. More...
 
String type mapping
template<>
FWTOOLS_API bool isMapping< unsigned char > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned short > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned int > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned long > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed char > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed short > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed int > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed long > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< float > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< double > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< std::string > (const std::string &key)
 Template specialization for defining KeyType mapping ( here std::string) with their value. More...
 
Comparison operators for TypeInfo
FWTOOLS_API bool operator== (const TypeInfo &lhs, const TypeInfo &rhs)
 
FWTOOLS_API bool operator< (const TypeInfo &lhs, const TypeInfo &rhs)
 
FWTOOLS_API bool operator!= (const TypeInfo &lhs, const TypeInfo &rhs)
 
FWTOOLS_API bool operator> (const TypeInfo &lhs, const TypeInfo &rhs)
 
FWTOOLS_API bool operator<= (const TypeInfo &lhs, const TypeInfo &rhs)
 
FWTOOLS_API bool operator>= (const TypeInfo &lhs, const TypeInfo &rhs)
 
TypeInfo mapping
template<>
FWTOOLS_API bool isMapping< unsigned char > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned short > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned int > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< unsigned long > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed char > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed short > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed int > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< signed long > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< float > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< double > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 
template<>
FWTOOLS_API bool isMapping< std::string > (const std::type_info &key)
 Template specialization for defining KeyType mapping ( here std::type_info) with their value. More...
 

Detailed Description

The namespace fwTools contains several tools like UUID, factory, dispatche, stringizer, macros, helper.

Date
2009-2010.

Function Documentation

boost::posix_time::ptime fwTools::fromDateInXsdFormat ( const std::string &  date_string)

Construct a boost ptime from a string in xsd format (YYYY-MM-DD)

Parameters
date_stringdate in the xsd format YYYY-MM-DD
Returns
Time in the boost format

Definition at line 38 of file fromIsoExtendedString.cpp.

boost::posix_time::ptime fwTools::fromIsoExtendedString ( const std::string &  time_string)

Construct a boost ptime from a string in iso extended format (YYYY-MM-DDTHH:MM:SS)

Parameters
[in]time_stringtime in the iso extended format YYYY-MM-DDTHH:MM:SS (example : 2007-02-25T00:00:00 )
Returns
Time in the boost format

Definition at line 24 of file fromIsoExtendedString.cpp.

std::string fwTools::getCurrentTime ( )

Return the current clock.

Returns
Time in the string format YYYY-mmm-DD HH:MM:SS

Definition at line 117 of file dateAndTime.cpp.

std::string fwTools::getDate ( const ::boost::posix_time::ptime &  dateAndTime)

Convert a boost time to a string date.

Parameters
[in]dateAndTimetime in the boost format
Returns
Date in the string format YYYYMMDD

Definition at line 101 of file dateAndTime.cpp.

Referenced by fwStructuralPatch::fwData::Patient::V1ToFwMedDataPatientV1::apply(), fwGui::view::IActivityView::createMainActivity(), activities::SActivitySequencer::updating(), and uiMedDataQt::editor::SActivityWizard::updating().

+ Here is the caller graph for this function:

std::string fwTools::getDateInXsdFormat ( const boost::posix_time::ptime &  dateAndTime)

Construct a string in the format YYYY-MM-DD from a boost ptime.

Parameters
[in]dateAndTimetime in the boost format
Returns
Time in the format YYYY-MM-DD (example : 2007-02-25 )

Definition at line 16 of file fromIsoExtendedString.cpp.

boost::filesystem::path fwTools::getPathDifference ( boost::filesystem::path  path1,
boost::filesystem::path  path2 
)

Return the relative difference within two paths.

Return The relative difference within two paths in such way :

  • cd path1;
  • cd getPathDifference(path1,path2)
  • assert( pwd = path2 )
Note
Here path are supposed to be attached in a same root

examples :

  • path1="a/b/c"
    path2="a/b/e/g"
    getPathDifference(path1,path2)
    return "../e/g"
  • path1="a/b/c"
    path2="e/f/g"
    getPathDifference(path1,path2)
    return "../../../e/f/g"
  • path1="a"
    path2="a"
    getPathDifference(path1,path2)
    return ""
  • path1="a"
    path2="a/e"
    getPathDifference(path1,path2)
    return "e"
  • etc..

Definition at line 14 of file pathDifference.cpp.

template<class T >
std::string fwTools::getString ( const T &  t)
inline

Convert the value to a string.

Parameters
[in]tvalue
Returns
Value converted in a string

Definition at line 66 of file Stringizer.hpp.

template<class T1 , class T2 >
std::string fwTools::getString ( const std::pair< T1, T2 > &  t)
inline

Convert a pair of values to a string.

partial specialization.

Parameters
[in]tpair of values in type T1 and T2
Returns
String in format [value 1, value 2]

Definition at line 85 of file Stringizer.hpp.

template<class ForwardIterator >
std::string fwTools::getString ( ForwardIterator  begin,
ForwardIterator  end 
)
inline

Convert container values to a string.

Specialization for all stl container vector,list,map

Parameters
[in]beginbegin of the container
[in]endend of the container
Returns
String in format [value1, value2,....]

Definition at line 102 of file Stringizer.hpp.

template<>
FWTOOLS_API std::string fwTools::getString ( const std::type_info &  ti)

Convert the value to a string.

Parameters
[in]tvalue
Returns
Value converted in a string

Definition at line 29 of file Stringizer.cpp.

template<>
FWTOOLS_API std::string fwTools::getString ( const TypeInfo ti)

Convert the value to a string.

Parameters
[in]tvalue
Returns
Value converted in a string

Definition at line 51 of file Stringizer.cpp.

References fwTools::TypeInfo::type_info().

+ Here is the call graph for this function:

template<>
FWTOOLS_API std::string fwTools::getString ( const signed char &  c)

Convert the value to a string.

Parameters
[in]tvalue
Returns
Value converted in a string

Definition at line 59 of file Stringizer.cpp.

template<>
FWTOOLS_API std::string fwTools::getString ( const char &  c)

Convert the value to a string.

Parameters
[in]tvalue
Returns
Value converted in a string

Definition at line 67 of file Stringizer.cpp.

template<>
FWTOOLS_API std::string fwTools::getString ( const unsigned char &  c)

Convert the value to a string.

Parameters
[in]tvalue
Returns
Value converted in a string

Definition at line 75 of file Stringizer.cpp.

std::string fwTools::getTime ( const ::boost::posix_time::ptime &  dateAndTime)

Convert a boost time to a string time.

Parameters
[in]dateAndTimetime in the boost format
Returns
Time in the string format HHMMSS

Definition at line 109 of file dateAndTime.cpp.

Referenced by fwGui::view::IActivityView::createMainActivity(), activities::SActivitySequencer::updating(), and uiMedDataQt::editor::SActivityWizard::updating().

+ Here is the caller graph for this function:

template<class TSingle_or_TSEQ , class KeyType_or_KeyTypeContainer >
bool fwTools::isMapping ( const KeyType_or_KeyTypeContainer &  key)

Create a type (T) binding/mapping with a KeyType ( std::string, ipop::PixelType etc...

Template Parameters
TSingle_or_TSEQa sequence or 1 element type to test
KeyType_or_KeyTypeContainerto keys (sequence or single one)
Returns
true iff the value of the KeyType can deal with the specified type T

This function should be specializated to create a Mapping with a KeyType value and a type. This function is used by Dispatcher<>::invoke(key) to know what instance to execute. If isMapping function is missing for a given type then a compilation error "invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>" is raised to inform developer.

Example : if keytype type is a std::string and we need to have a binding within unsigned char

template<>
bool isMapping<unsigned char>(const std::string &key)
{
return key=="unsigned char";
}

Definition at line 56 of file TypeMapping.hpp.

template<>
FWTOOLS_API bool fwTools::isMapping< double > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 71 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< double > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 71 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< double > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 79 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< float > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 66 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< float > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 66 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< float > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 74 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed char > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 42 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed char > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 42 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed char > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 50 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed int > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 52 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed int > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 52 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed int > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 60 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed long > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 58 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed long > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 58 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed long > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 66 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed short > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 47 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed short > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 47 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< signed short > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 55 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< std::string > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 78 of file DynamicTypeKeyTypeMapping.cpp.

Referenced by isMapping< std::string >().

+ Here is the caller graph for this function:

template<>
FWTOOLS_API bool fwTools::isMapping< std::string > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 78 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< std::string > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 86 of file TypeInfoKeyTypeMapping.cpp.

References isMapping< std::string >().

+ Here is the call graph for this function:

template<>
bool fwTools::isMapping< unsigned char > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 20 of file StringKeyTypeMapping.cpp.

template<>
bool fwTools::isMapping< unsigned char > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 20 of file DynamicTypeKeyTypeMapping.cpp.

template<>
bool fwTools::isMapping< unsigned char > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 28 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned char > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 20 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned char > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 20 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned char > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 28 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned int > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 30 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned int > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 30 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned int > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 38 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned long > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 35 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned long > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 35 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned long > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 43 of file TypeInfoKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned short > ( const DynamicType key)

Template specialization for defining KeyType mapping ( here DynamicType) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 25 of file DynamicTypeKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned short > ( const std::string &  key)

Template specialization for defining KeyType mapping ( here std::string) with their value.

Header declare function already specialized while src provide definition.

Warning
isMapping does not need to be exported since fwTools Library is builded as static.

Definition at line 25 of file StringKeyTypeMapping.cpp.

template<>
FWTOOLS_API bool fwTools::isMapping< unsigned short > ( const std::type_info &  key)

Template specialization for defining KeyType mapping ( here std::type_info) with their value.

Header declare function already specialized while src provide definition

Warning
isMapping does not need to be exported since fwTools Library is builded as static

Definition at line 33 of file TypeInfoKeyTypeMapping.cpp.

template<class TSEQ , class KeyTypeContainer >
bool fwTools::isMappingMulti ( const KeyTypeContainer &  keys)

Test whatever a typelist is mapping a container of KeyType.

Returns
true if same size & each element of type list mappes a single element of KeyType

Definition at line 98 of file TypeMapping.hpp.

template<class KEYTYPE >
DynamicType fwTools::makeDynamicType ( const KEYTYPE &  keyType)

Helper to create object DynamicType from a given type from a KEYTYPE representing a type in { (un)signed char, ... , double }.

Example makeDynamicType(type_id(int)) and makeDynamicType("signed int") should work

Definition at line 38 of file DynamicType.hxx.

References fwTools::Dispatcher< TSEQ, FUNCTOR >::invoke().

+ Here is the call graph for this function:

template<typename TYPEOUT , typename TYPEIN >
TYPEOUT fwTools::numericRoundCast ( const TYPEIN &  value)

This method converts an value of type TYPEIN to an value of type TYPEOUT. If TYPEIN is a floating point type and TYPEOUT is a integral type then it rounds float number to nearest integer (returns 3 for 3.1f, 5 for 4.5f).

Be careful: there is not range checking, overflow is not detected (silent overflow policy)

Parameters
valueto cast (and rounds if is a floating point type) in TYPEOUT
Returns
casted and rounded value.

Definition at line 26 of file NumericRoundCast.hxx.

boost::gregorian::date fwTools::strToBoostDate ( const std::string &  dateStr)

Convert a string date to a boost date.

Parameters
[in]dateStrdate in the string format YYYYMMDD (ie : 20090722)
Returns
Date in the boost format

Definition at line 19 of file dateAndTime.cpp.

References OSLM_WARN.

Referenced by strToBoostDateAndTime().

+ Here is the caller graph for this function:

boost::posix_time::ptime fwTools::strToBoostDateAndTime ( const std::string &  dateStr,
const std::string &  timeStr = "000000" 
)

Convert string data time to a boost time.

Parameters
[in]dateStrdate in the string format YYYYMMDD (ie : 20090722)
[in]timeStrtime in the string format HHMMSS (by default : "000000")
Returns
Time in the boost format

Definition at line 94 of file dateAndTime.cpp.

References strToBoostDate(), and strToBoostTime().

+ Here is the call graph for this function:

boost::posix_time::time_duration fwTools::strToBoostTime ( const std::string &  timeStr)

Convert a string time to a boost time.

Parameters
[in]timeStrtime in the string format HHMMSS
Returns
Time in the boost format

Definition at line 53 of file dateAndTime.cpp.

References OSLM_WARN.

Referenced by strToBoostDateAndTime().

+ Here is the caller graph for this function:

std::string fwTools::toIsoExtendedString ( boost::posix_time::ptime  ptime)

Construct a string in iso extended format from a boost ptime.

Parameters
[in]ptimetime in the boost format
Returns
Time in the iso extended format YYYY-MM-DDTHH:MM:SS (example : 2007-02-25T00:00:00 )

Definition at line 49 of file fromIsoExtendedString.cpp.