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
02532 class SoPreferences {
02533 public:
02534
02535
02563 SoNONUNICODE static const char* getValue (const char* name);
02564
02590 static const SbString* getStringValue( const SbString& name );
02591
02609 SoNONUNICODE static SbBool getBool( const char* name, SbBool defaultValue );
02610
02619 static SbBool getBool( const SbString& name, SbBool defaultValue );
02620
02632 SoNONUNICODE static int getInt( const char* name, int defaultValue );
02633
02643 static int getInt( const SbString& name, int defaultValue);
02644
02656 SoNONUNICODE static long getLong( const char* name, long defaultValue );
02657
02667 static long getLong( const SbString& name, long defaultValue );
02668
02680 SoNONUNICODE static float getFloat( const char* name, float defaultValue );
02681
02691 static float getFloat( const SbString& name, float defaultValue );
02692
02704 SoNONUNICODE static double getDouble( const char* name, double defaultValue );
02705
02715 static double getDouble( const SbString& name, double defaultValue );
02716
02729 SoNONUNICODE static const SbString& getString (const char* name, const SbString& defaultValue);
02730
02741 static const SbString& getString( const SbString& name, const SbString& defaultValue );
02742
02757 SoNONUNICODE static const SbVec3f& getVec3f( const char* name, const SbVec3f& defaultValue );
02758
02771 static const SbVec3f& getVec3f( const SbString& name, const SbVec3f& defaultValue );
02772
02787 SoNONUNICODE static const SbVec2s& getVec2s( const char* name, const SbVec2s& defaultValue );
02788
02801 static const SbVec2s& getVec2s( const SbString& name, const SbVec2s& defaultValue );
02802
02817 SoNONUNICODE static const SbColor& getColor( const char* name, const SbColor& defaultValue );
02818
02831 static const SbColor& getColor( const SbString& name, const SbColor& defaultValue );
02832
02833
02834
02835
02849 SoNONUNICODE static void setValue( const char* name, const char* value = NULL );
02850
02862 static void setValue( const SbString& name, const SbString* value = NULL );
02863
02870 SoNONUNICODE static void setBool( const char* name, SbBool value );
02871
02876 static void setBool( const SbString& name, SbBool value );
02877
02884 SoNONUNICODE static void setInt( const char* name, int value );
02885
02890 static void setInt( const SbString& name, int value );
02891
02898 SoNONUNICODE static void setLong( const char* name, long value );
02899
02904 static void setLong( const SbString& name, long value );
02905
02912 SoNONUNICODE static void setFloat( const char* name, float value );
02913
02918 static void setFloat( const SbString& name, float value );
02919
02926 SoNONUNICODE static void setDouble( const char* name, double value );
02927
02932 static void setDouble( const SbString& name, double value );
02933
02946 SoNONUNICODE static void setString (const char* name, const SbString& value);
02947
02957 static void setString( const SbString& name, const SbString& value );
02958
02965 SoNONUNICODE static void setVec3f( const char* name, const SbVec3f& value );
02966
02971 static void setVec3f( const SbString& name, const SbVec3f& value );
02972
02979 SoNONUNICODE static void setVec2s( const char* name, const SbVec2s& value );
02980
02985 static void setVec2s( const SbString& name, const SbVec2s& value );
02986
02993 SoNONUNICODE static void setColor( const char* name, const SbColor& value );
02994
02995
03000 static void setColor( const SbString& name, const SbColor& value );
03001
03009 SoNONUNICODE static void readFile (const char* filename);
03010
03016 static void readFile (const SbString& filename);
03017
03018 private:
03019 static SbDict* s_dictionary;
03020 static SbThreadMutex s_mutex;
03021 static void initialize ();
03022 static SbString s_unspecifiedValue;
03023 static bool s_verbose_env;
03024
03025 private:
03026 static void clean();
03027
03028 class SoPreferencesImpl;
03029 friend class SoPreferencesImpl;
03030
03031 };
03032 #endif // _SB_ENVIRONMENT_VARS_H
03033
03034