00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CONFIGFLAGS_H
00016 #define CONFIGFLAGS_H
00017
00018 #include "dtoolbase.h"
00019 #include "numeric_types.h"
00020 #include "atomicAdjust.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029 class EXPCL_DTOOLCONFIG ConfigFlags {
00030 PUBLISHED:
00031 enum ValueType {
00032 VT_undefined,
00033 VT_list,
00034 VT_string,
00035 VT_filename,
00036 VT_bool,
00037 VT_int,
00038 VT_double,
00039 VT_enum,
00040 VT_search_path,
00041 VT_int64,
00042 };
00043
00044 enum VariableFlags {
00045
00046
00047
00048 F_trust_level_mask = 0x00000fff,
00049 F_open = 0x00001000,
00050 F_closed = 0x00002000,
00051
00052
00053
00054
00055 F_dynamic = 0x00004000,
00056
00057
00058
00059
00060 F_dconfig = 0x00008000,
00061 };
00062
00063 protected:
00064 INLINE static bool is_cache_valid(AtomicAdjust::Integer local_modified);
00065 INLINE static void mark_cache_valid(AtomicAdjust::Integer &local_modified);
00066 INLINE static AtomicAdjust::Integer initial_invalid_cache();
00067 INLINE static void invalidate_cache();
00068
00069 private:
00070 static TVOLATILE AtomicAdjust::Integer _global_modified;
00071 };
00072
00073 ostream &operator << (ostream &out, ConfigFlags::ValueType type);
00074
00075 #include "configFlags.I"
00076
00077 #endif
00078