Go to the documentation of this file.
52 #ifndef __PCL_Settings_h
53 #define __PCL_Settings_h
58 #include <pcl/Diagnostics.h>
63 #ifndef __PCL_NO_FLAGS_SETTINGS_IO
219 static bool Read(
const IsoString& key,
bool& b );
237 static bool ReadGlobal(
const IsoString& key,
bool& b );
254 static bool Read(
const IsoString& key,
int& i );
272 static bool ReadGlobal(
const IsoString& key,
int& i );
289 static bool Read(
const IsoString& key,
unsigned& u );
308 static bool ReadGlobal(
const IsoString& key,
unsigned& u );
325 static bool Read(
const IsoString& key,
double& f );
343 static bool ReadGlobal(
const IsoString& key,
double& f );
360 double d; Read( key, d );
361 if ( LastReadOK() ) { f = float( d );
return true; }
380 double d; ReadGlobal( key, d );
381 if ( LastReadOK() ) { f = float( d );
return true; }
385 #ifndef __PCL_NO_SETTINGS_TEMPLATES
399 template <
typename T>
402 int i; Read( key, i );
403 if ( LastReadOK() ) { t = T( i );
return true; }
420 template <
typename T>
423 unsigned u; Read( key, u );
424 if ( LastReadOK() ) { t = T( u );
return true; }
430 #ifndef __PCL_NO_FLAGS_SETTINGS_IO
448 template <
typename E>
451 return Read( key, f.m_flags );
470 template <
typename E>
473 return ReadGlobal( key, f.m_flags );
482 static bool LastReadOK();
576 static void Write(
const IsoString& key,
bool b );
597 static void WriteGlobal(
const IsoString& key,
bool b );
614 static void Write(
const IsoString& key,
int i );
635 static void WriteGlobal(
const IsoString& key,
int i );
652 static void Write(
const IsoString& key,
unsigned u );
674 static void WriteGlobal(
const IsoString& key,
unsigned u );
691 static void Write(
const IsoString& key,
double f );
712 static void WriteGlobal(
const IsoString& key,
double f );
729 Write( key,
double( f ) );
747 WriteGlobal( key,
double( f ) );
750 #ifndef __PCL_NO_SETTINGS_TEMPLATES
759 template <
typename T>
762 Write( key,
int( t ) );
772 template <
typename T>
775 Write( key,
unsigned( t ) );
780 #ifndef __PCL_NO_FLAGS_SETTINGS_IO
797 template <
typename E>
800 Write( key, f.m_flags );
822 template <
typename E>
825 WriteGlobal( key, f.m_flags );
836 static void Remove(
const IsoString& key );
850 static void RemoveGlobal(
const IsoString& key );
860 static bool CanReadGlobal(
const IsoString& key );
870 static bool CanWriteGlobal(
const IsoString& key );
886 static void SetGlobalKeyAccess(
const IsoString& key,
bool allowRead,
bool allowWrite );
893 #endif // __PCL_Settings_h
static void WriteGlobal(const IsoString &key, Flags< E > f)
static bool ReadGlobal(const IsoString &key, float &f)
static void WriteU(const IsoString &key, T t)
Persistent module settings.
static bool ReadI(const IsoString &key, T &t)
static bool ReadU(const IsoString &key, T &t)
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
A type-safe collection of enumerated flags.
static bool Read(const IsoString &key, float &f)
static void WriteI(const IsoString &key, T t)
static void WriteGlobal(const IsoString &key, float f)
static bool ReadGlobal(const IsoString &key, Flags< E > &f)
static bool Read(const IsoString &key, Flags< E > &f)
static void Write(const IsoString &key, float f)
static void Write(const IsoString &key, Flags< E > f)