Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_mach_info_h)
00024 #define octave_mach_info_h 1
00025
00026 #include <string>
00027
00028 class
00029 OCTAVE_API
00030 oct_mach_info
00031 {
00032 protected:
00033
00034 oct_mach_info (void);
00035
00036 public:
00037
00038 enum float_format
00039 {
00040 flt_fmt_unknown,
00041 flt_fmt_ieee_little_endian,
00042 flt_fmt_ieee_big_endian,
00043 flt_fmt_vax_d,
00044 flt_fmt_vax_g,
00045 flt_fmt_cray
00046 };
00047
00048 static bool instance_ok (void);
00049
00050 static float_format native_float_format (void);
00051
00052 static bool words_big_endian (void);
00053
00054 static bool words_little_endian (void);
00055
00056 static float_format string_to_float_format (const std::string&);
00057
00058 static std::string float_format_as_string (float_format);
00059
00060 private:
00061
00062 static oct_mach_info *instance;
00063
00064 static void cleanup_instance (void) { delete instance; instance = 0; }
00065
00066
00067 mutable float_format native_float_fmt;
00068
00069
00070 mutable bool big_chief;
00071
00072
00073
00074 oct_mach_info (const oct_mach_info&);
00075
00076 oct_mach_info& operator = (const oct_mach_info&);
00077 };
00078
00079 #endif