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

data-conv.cc の解説

#include <cctype>
#include <iostream>
#include "byte-swap.h"
#include "data-conv.h"
#include "lo-error.h"

data-conv.ccのインクルード依存関係図

Include dependency graph

ソースコードを見る。

マクロ定義

#define FIND_SIZED_INT_TYPE(VAL, BITS, TQ, Q)
#define FIND_SIZED_FLOAT_TYPE(VAL, BITS)
#define GET_SIZED_INT_TYPE(T, U)
#define LS_DO_READ(TYPE, swap, data, size, len, stream)
#define LS_DO_WRITE(TYPE, data, size, len, stream)

関数

void do_double_format_conversion (void *data, int len, oct_mach_info::float_format from_fmt, oct_mach_info::float_format to_fmt)
void do_float_format_conversion (void *data, int len, oct_mach_info::float_format from_fmt, oct_mach_info::float_format to_fmt)
void do_float_format_conversion (void *data, size_t sz, int len, oct_mach_info::float_format from_fmt, oct_mach_info::float_format to_fmt)
void read_doubles (std::istream &is, double *data, save_type type, int len, bool swap, oct_mach_info::float_format fmt)
void write_doubles (std::ostream &os, const double *data, save_type type, int len)


マクロ定義の解説

#define FIND_SIZED_FLOAT_TYPE VAL,
BITS   
 

値:

do \
    { \
      int sz = BITS / CHAR_BIT; \
      if (sizeof (float) == sz) \
        VAL = oct_data_conv::dt_float; \
      else if (sizeof (double) == sz) \
        VAL = oct_data_conv::dt_double; \
      else \
        VAL = oct_data_conv::dt_unknown; \
    } \
  while (0)

data-conv.cc73 行で定義されています。

#define FIND_SIZED_INT_TYPE VAL,
BITS,
TQ,
 
 

値:

do \
    { \
      int sz = BITS / CHAR_BIT; \
      if (sizeof (TQ char) == sz) \
        VAL = oct_data_conv::dt_ ## Q ## char; \
      else if (sizeof (TQ short) == sz) \
        VAL = oct_data_conv::dt_ ## Q ## short; \
      else if (sizeof (TQ int) == sz) \
        VAL = oct_data_conv::dt_ ## Q ## int; \
      else if (sizeof (TQ long) == sz) \
        VAL = oct_data_conv::dt_ ## Q ## long; \
      else \
        VAL = oct_data_conv::dt_unknown; \
    } \
  while (0)

data-conv.cc55 行で定義されています。

#define GET_SIZED_INT_TYPE T,
 
 

値:

do \
    { \
      switch (sizeof (T)) \
        { \
        case 1: \
          retval = dt_ ## U ## int8; \
          break; \
 \
        case 2: \
          retval = dt_ ## U ## int16; \
          break; \
 \
        case 4: \
          retval = dt_ ## U ## int32; \
          break; \
 \
        case 8: \
          retval = dt_ ## U ## int64; \
          break; \
 \
        default: \
          retval = dt_unknown; \
          break; \
        } \
    } \
  while (0)

data-conv.cc143 行で定義されています。

呼出 oct_data_conv::string_to_data_type().

#define LS_DO_READ TYPE,
swap,
data,
size,
len,
stream   
 

値:

do \
    { \
      if (len > 0) \
        { \
          volatile TYPE *ptr = X_CAST (volatile TYPE *, data); \
          stream.read (X_CAST (char *, ptr), size * len); \
          if (swap) \
            swap_bytes< size > (ptr, len); \
          TYPE tmp = ptr[0]; \
          for (int i = len - 1; i > 0; i--) \
            data[i] = ptr[i]; \
          data[0] = tmp; \
        } \
    } \
  while (0)

data-conv.cc466 行で定義されています。

呼出 read_doubles().

#define LS_DO_WRITE TYPE,
data,
size,
len,
stream   
 

値:

do \
    { \
      if (len > 0) \
        { \
          char tmp_type = static_cast<char> (type); \
          stream.write (&tmp_type, 1); \
          TYPE *ptr = new TYPE [len]; \
          for (int i = 0; i < len; i++) \
            ptr[i] = X_CAST (TYPE, data[i]); \
          stream.write (X_CAST (char *, ptr), size * len); \
          delete [] ptr ; \
        } \
    } \
  while (0)

data-conv.cc486 行で定義されています。

呼出 write_doubles().


関数の解説

void do_double_format_conversion void *    data,
int    len,
oct_mach_info::float_format    from_fmt,
oct_mach_info::float_format    to_fmt
 

data-conv.cc720 行で定義されています。

参照 oct_mach_info::float_format, oct_mach_info::flt_fmt_cray, oct_mach_info::flt_fmt_ieee_big_endian, oct_mach_info::flt_fmt_ieee_little_endian, oct_mach_info::flt_fmt_vax_d, と oct_mach_info::flt_fmt_vax_g.

呼出 do_float_format_conversion(), と read_doubles().

void do_float_format_conversion void *    data,
size_t    sz,
int    len,
oct_mach_info::float_format    from_fmt,
oct_mach_info::float_format    to_fmt
 

data-conv.cc974 行で定義されています。

参照 do_double_format_conversion(), と oct_mach_info::float_format.

呼出 read_doubles().

void do_float_format_conversion void *    data,
int    len,
oct_mach_info::float_format    from_fmt,
oct_mach_info::float_format    to_fmt
 

data-conv.cc847 行で定義されています。

void read_doubles std::istream &    is,
double *    data,
save_type    type,
int    len,
bool    swap,
oct_mach_info::float_format    fmt
 

data-conv.cc998 行で定義されています。

参照 do_double_format_conversion(), do_float_format_conversion(), oct_mach_info::float_format, LS_CHAR, LS_DO_READ, LS_DOUBLE, LS_FLOAT, LS_INT, LS_SHORT, LS_U_CHAR, LS_U_INT, LS_U_SHORT, と save_type.

void write_doubles std::ostream &    os,
const double *    data,
save_type    type,
int    len
 

data-conv.cc1051 行で定義されています。

参照 LS_CHAR, LS_DO_WRITE, LS_DOUBLE, LS_FLOAT, LS_INT, LS_SHORT, LS_U_CHAR, LS_U_INT, LS_U_SHORT, と save_type.


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