メインページ   クラス階層   構成   ファイル一覧   構成メンバ   ファイルメンバ  

mach-info.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 1996, 1997 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 2, or (at your option) any
00010 later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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 oct_mach_info
00030 {
00031 protected:
00032 
00033   oct_mach_info (void);
00034 
00035 public:
00036 
00037   enum float_format
00038     {
00039       flt_fmt_unknown,
00040       flt_fmt_ieee_little_endian,
00041       flt_fmt_ieee_big_endian,
00042       flt_fmt_vax_d,
00043       flt_fmt_vax_g,
00044       flt_fmt_cray
00045     };
00046 
00047   static bool instance_ok (void);
00048 
00049   static float_format native_float_format (void);
00050 
00051   static bool words_big_endian (void);
00052 
00053   static bool words_little_endian (void);
00054 
00055   static float_format string_to_float_format (const std::string&);
00056 
00057   static std::string float_format_as_string (float_format);
00058 
00059 private:
00060 
00061   static oct_mach_info *instance;
00062 
00063   void init_float_format (void) const;
00064 
00065   void ten_little_endians (void) const;
00066 
00067   // The floating point format for the current machine.
00068   mutable float_format native_float_fmt;
00069 
00070   // TRUE if the byte order on this system is big endian.
00071   mutable bool big_chief;
00072 
00073   // No copying!
00074 
00075   oct_mach_info (const oct_mach_info&);
00076 
00077   oct_mach_info& operator = (const oct_mach_info&);
00078 };
00079 
00080 #endif
00081 
00082 /*
00083 ;;; Local Variables: ***
00084 ;;; mode: C++ ***
00085 ;;; End: ***
00086 */

Wed Dec 29 11:51:44 2004に生成されました。 doxygen1.2.18
SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送