00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef _SB_ENVIRONMENT_VARS_H
00036 #define _SB_ENVIRONMENT_VARS_H
00037
00038 #include <Inventor/SbBase.h>
00039 #include <Inventor/SbDict.h>
00040 #include <Inventor/SbColor.h>
00041 #include <Inventor/SbVec.h>
00042
00043 #include <Inventor/threads/SbThreadMutex.h>
00044
01983 class SoPreferences {
01984 public:
01985
01986
02014 SoNONUNICODE static const char* getValue (const char* name);
02015
02041 static const SbString* getStringValue( const SbString& name );
02042
02060 SoNONUNICODE static SbBool getBool( const char* name, SbBool defaultValue );
02061
02070 static SbBool getBool( const SbString& name, SbBool defaultValue );
02071
02083 SoNONUNICODE static int getInt( const char* name, int defaultValue );
02084
02094 static int getInt( const SbString& name, int defaultValue);
02095
02107 SoNONUNICODE static long getLong( const char* name, long defaultValue );
02108
02118 static long getLong( const SbString& name, long defaultValue );
02119
02131 SoNONUNICODE static float getFloat( const char* name, float defaultValue );
02132
02142 static float getFloat( const SbString& name, float defaultValue );
02143
02155 SoNONUNICODE static double getDouble( const char* name, double defaultValue );
02156
02166 static double getDouble( const SbString& name, double defaultValue );
02167
02180 SoNONUNICODE static const SbString& getString (const char* name, const SbString& defaultValue);
02181
02192 static const SbString& getString( const SbString& name, const SbString& defaultValue );
02193
02208 SoNONUNICODE static const SbVec3f& getVec3f( const char* name, const SbVec3f& defaultValue );
02209
02222 static const SbVec3f& getVec3f( const SbString& name, const SbVec3f& defaultValue );
02223
02238 SoNONUNICODE static const SbVec2s& getVec2s( const char* name, const SbVec2s& defaultValue );
02239
02252 static const SbVec2s& getVec2s( const SbString& name, const SbVec2s& defaultValue );
02253
02268 SoNONUNICODE static const SbColor& getColor( const char* name, const SbColor& defaultValue );
02269
02282 static const SbColor& getColor( const SbString& name, const SbColor& defaultValue );
02283
02284
02285
02286
02300 SoNONUNICODE static void setValue( const char* name, const char* value = NULL );
02301
02313 static void setValue( const SbString& name, const SbString* value = NULL );
02314
02321 SoNONUNICODE static void setBool( const char* name, SbBool value );
02322
02327 static void setBool( const SbString& name, SbBool value );
02328
02335 SoNONUNICODE static void setInt( const char* name, int value );
02336
02341 static void setInt( const SbString& name, int value );
02342
02349 SoNONUNICODE static void setLong( const char* name, long value );
02350
02355 static void setLong( const SbString& name, long value );
02356
02363 SoNONUNICODE static void setFloat( const char* name, float value );
02364
02369 static void setFloat( const SbString& name, float value );
02370
02377 SoNONUNICODE static void setDouble( const char* name, double value );
02378
02383 static void setDouble( const SbString& name, double value );
02384
02397 SoNONUNICODE static void setString (const char* name, const SbString& value);
02398
02408 static void setString( const SbString& name, const SbString& value );
02409
02416 SoNONUNICODE static void setVec3f( const char* name, const SbVec3f& value );
02417
02422 static void setVec3f( const SbString& name, const SbVec3f& value );
02423
02430 SoNONUNICODE static void setVec2s( const char* name, const SbVec2s& value );
02431
02436 static void setVec2s( const SbString& name, const SbVec2s& value );
02437
02444 SoNONUNICODE static void setColor( const char* name, const SbColor& value );
02445
02446
02451 static void setColor( const SbString& name, const SbColor& value );
02452
02460 SoNONUNICODE static void readFile (const char* filename);
02461
02467 static void readFile (const SbString& filename);
02468
02469 private:
02470 static SbDict* s_dictionary;
02471 static SbThreadMutex s_mutex;
02472 static void initialize ();
02473 static SbString s_unspecifiedValue;
02474 static bool s_verbose_env;
02475
02476 private:
02477 static void clean();
02478
02479 class SoPreferencesImpl;
02480 friend class SoPreferencesImpl;
02481
02482 };
02483 #endif // _SB_ENVIRONMENT_VARS_H
02484
02485