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
01915 class SoPreferences {
01916 public:
01917
01918
01946 SoNONUNICODE static const char* getValue (const char* name);
01947
01973 static const SbString* getStringValue( const SbString& name );
01974
01992 SoNONUNICODE static SbBool getBool( const char* name, SbBool defaultValue );
01993
02002 static SbBool getBool( const SbString& name, SbBool defaultValue );
02003
02015 SoNONUNICODE static int getInt( const char* name, int defaultValue );
02016
02026 static int getInt( const SbString& name, int defaultValue);
02027
02039 SoNONUNICODE static long getLong( const char* name, long defaultValue );
02040
02050 static long getLong( const SbString& name, long defaultValue );
02051
02063 SoNONUNICODE static float getFloat( const char* name, float defaultValue );
02064
02074 static float getFloat( const SbString& name, float defaultValue );
02075
02087 SoNONUNICODE static double getDouble( const char* name, double defaultValue );
02088
02098 static double getDouble( const SbString& name, double defaultValue );
02099
02112 SoNONUNICODE static const SbString& getString (const char* name, const SbString& defaultValue);
02113
02124 static const SbString& getString( const SbString& name, const SbString& defaultValue );
02125
02140 SoNONUNICODE static const SbVec3f& getVec3f( const char* name, const SbVec3f& defaultValue );
02141
02154 static const SbVec3f& getVec3f( const SbString& name, const SbVec3f& defaultValue );
02155
02170 SoNONUNICODE static const SbVec2s& getVec2s( const char* name, const SbVec2s& defaultValue );
02171
02184 static const SbVec2s& getVec2s( const SbString& name, const SbVec2s& defaultValue );
02185
02200 SoNONUNICODE static const SbColor& getColor( const char* name, const SbColor& defaultValue );
02201
02214 static const SbColor& getColor( const SbString& name, const SbColor& defaultValue );
02215
02216
02217
02218
02232 SoNONUNICODE static void setValue( const char* name, const char* value = NULL );
02233
02245 static void setValue( const SbString& name, const SbString* value = NULL );
02246
02253 SoNONUNICODE static void setBool( const char* name, SbBool value );
02254
02259 static void setBool( const SbString& name, SbBool value );
02260
02267 SoNONUNICODE static void setInt( const char* name, int value );
02268
02273 static void setInt( const SbString& name, int value );
02274
02281 SoNONUNICODE static void setLong( const char* name, long value );
02282
02287 static void setLong( const SbString& name, long value );
02288
02295 SoNONUNICODE static void setFloat( const char* name, float value );
02296
02301 static void setFloat( const SbString& name, float value );
02302
02309 SoNONUNICODE static void setDouble( const char* name, double value );
02310
02315 static void setDouble( const SbString& name, double value );
02316
02329 SoNONUNICODE static void setString (const char* name, const SbString& value);
02330
02340 static void setString( const SbString& name, const SbString& value );
02341
02348 SoNONUNICODE static void setVec3f( const char* name, const SbVec3f& value );
02349
02354 static void setVec3f( const SbString& name, const SbVec3f& value );
02355
02362 SoNONUNICODE static void setVec2s( const char* name, const SbVec2s& value );
02363
02368 static void setVec2s( const SbString& name, const SbVec2s& value );
02369
02376 SoNONUNICODE static void setColor( const char* name, const SbColor& value );
02377
02378
02383 static void setColor( const SbString& name, const SbColor& value );
02384
02392 SoNONUNICODE static void readFile (const char* filename);
02393
02399 static void readFile (const SbString& filename);
02400
02401 private:
02402 static SbDict* s_dictionary;
02403 static SbThreadMutex s_mutex;
02404 static void initialize ();
02405 static SbString s_unspecifiedValue;
02406 static bool s_verbose_env;
02407
02408 private:
02409 static void clean();
02410
02411 class SoPreferencesImpl;
02412 friend class SoPreferencesImpl;
02413
02414 };
02415 #endif // _SB_ENVIRONMENT_VARS_H
02416
02417