gdsio.h Source File

Main Page Class Hierarchy Compound List File List Compound Members

# gdsio.h

    00001 /*
    00002 Program GDSIO.H
    00003 Purpose Used by GDS driver for conversions and read en write
    00004                 GDSII elements (header)
    00005 Programmers     R. Spekreijse & N. Noorlander
    00006 Last Update     19-09-1995
    00007 */
    00008
    00009 #ifndef GDSIO_H
    00010 #define GDSIO_H
    00011 #ifdef __GNUG__
    00012 #pragma interface
    00013 #endif
    00014
    00015 #include <fstream.h>
    00016
    00017 #include "gdsii.h"
    00018 #include "gdserr.h"
    00019 #define MAX_G_BYTES             8               // maximum bytes a value can use
    00020
    00021 // when creating an 16 or 32 bits application, the size of the values must be
    00022 // the same size
    00023
    00024 typedef unsigned char                                   G_BYTE;         // 8 bits       -127    128
    00025
    00026 // 32 bits application definition
    00027 typedef unsigned short int      TWO_G_BYTE_UNSIGNED_INTEGER;
    00028 typedef unsigned int            FOUR_G_BYTE_UNSIGNED_INTEGER;
    00029 typedef short int               TWO_G_BYTE_SIGNED_INTEGER;
    00030 typedef int                             FOUR_G_BYTE_SIGNED_INTEGER;
    00031 typedef float                   FOUR_G_BYTE_REAL;
    00032 typedef double                  EIGHT_G_BYTE_REAL;
    00033
    00034 typedef struct _ARRAY    { unsigned char array[MAX_G_BYTES]; } _ARRAY;
    00035 typedef union a_union_value {
    00036                                                                 TWO_G_BYTE_SIGNED_INTEGER       two_byte_signed_integer;
    00037                                                                 FOUR_G_BYTE_SIGNED_INTEGER      four_byte_signed_integer;
    00038                                                                 FOUR_G_BYTE_REAL                                four_byte_real;
    00039                                                                 EIGHT_G_BYTE_REAL                               eight_byte_real;
    00040
    00041                                                                 _ARRAY                                          array;
    00042
    00043                                                         } a_union_value;
    00044
    00045
    00046
    00047
    00051 class Gdsio : public fstream
    00052 {
    00053         public:
    00055                 void gds2double(unsigned char *);
    00057                 void double2gds(unsigned char *);
    00058
    00060                 Gdsio& operator>>(G_BYTE *);
    00062                 Gdsio& operator>>(TWO_G_BYTE_UNSIGNED_INTEGER *my_integer);
    00064                 Gdsio& operator>>(TWO_G_BYTE_SIGNED_INTEGER *);
    00066                 Gdsio& operator>>(FOUR_G_BYTE_SIGNED_INTEGER *);
    00068                 Gdsio& operator>>(FOUR_G_BYTE_REAL *);
    00070                 Gdsio& operator>>(EIGHT_G_BYTE_REAL *);
    00071
    00073                 Gdsio& operator<<(G_BYTE );
    00075                 Gdsio& operator<<(TWO_G_BYTE_UNSIGNED_INTEGER my_integer);
    00077                 Gdsio& operator<<(TWO_G_BYTE_SIGNED_INTEGER );
    00079                 Gdsio& operator<<(FOUR_G_BYTE_SIGNED_INTEGER );
    00081                 Gdsio& operator<<(FOUR_G_BYTE_REAL );
    00083                 Gdsio& operator<<(EIGHT_G_BYTE_REAL );
    00084 };
    00085 #endif
    00086

gdsio.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page