Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

pack.H File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define UGA_PACK_DOUBLE(QUAN, BUF, COUNT)
#define UGA_PACK_NDOUBLE(QUAN, BUF, NUM, COUNT)
#define UGA_PACK_WORD(QUAN, BUF, COUNT)
#define UGA_PACK_NWORD(QUAN, BUF, NUM, COUNT)
#define UGA_PACK_BYTES(PTR, BUF, SIZE, COUNT)
#define UGA_UNPACK_DOUBLE(QUAN, BUF, COUNT)
#define UGA_UNPACK_NDOUBLE(QUAN, BUF, NUM, COUNT)
#define UGA_UNPACK_WORD(QUAN, BUF, COUNT, TYPE)
#define UGA_UNPACK_NWORD(QUAN, BUF, NUM, COUNT, TYPE)
#define UGA_UNPACK_BYTES(PTR, BUF, SIZE, COUNT)
#define UGA_PACK_LONG(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NLONG(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_PACK_INTEGER(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NINTEGER(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_PACK_ENUM(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NENUM(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_PACK_POINTER(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NPOINTER(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_UNPACK_LONG(Q, B, C)   UGA_UNPACK_WORD(Q,B,C,long)
#define UGA_UNPACK_NLONG(Q, B, N, C)   UGA_UNPACK_NWORD(Q,B,N,C,long)
#define UGA_UNPACK_INTEGER(Q, B, C)   UGA_UNPACK_WORD(Q,B,C,int)
#define UGA_UNPACK_NINTEGER(Q, B, N, C)   UGA_UNPACK_NWORD(Q,B,N,C,int)
#define UGA_UNPACK_ENUM(Q, B, C, T)   UGA_UNPACK_WORD(Q,B,C,T)
#define UGA_UNPACK_NENUM(Q, B, N, C, T)   UGA_UNPACK_NWORD(Q,B,N,C,T)
#define UGA_UNPACK_POINTER(Q, B, C, T)   UGA_UNPACK_WORD(Q,B,C,T)
#define UGA_UNPACK_NPOINTER(Q, B, N, C, T)   UGA_UNPACK_NWORD(Q,B,N,C,T)
#define OPSYS_ALIGN_CHAR   sizeof(char)
#define OPSYS_ALIGN_INT   sizeof(int)
#define OPSYS_ALIGN_SHORT   sizeof(short)
#define OPSYS_ALIGN_LONG   sizeof(long)
#define OPSYS_ALIGN_FLOAT   sizeof(float)
#define OPSYS_ALIGN_DOUBLE   sizeof(double)
#define OPSYS_ALIGN_GENERIC   (sizeof(double)>sizeof(long)?sizeof(double):sizeof(long))


Define Documentation

#define OPSYS_ALIGN_CHAR   sizeof(char)
 

Definition at line 157 of file pack.H.

#define OPSYS_ALIGN_DOUBLE   sizeof(double)
 

Definition at line 162 of file pack.H.

#define OPSYS_ALIGN_FLOAT   sizeof(float)
 

Definition at line 161 of file pack.H.

#define OPSYS_ALIGN_GENERIC   (sizeof(double)>sizeof(long)?sizeof(double):sizeof(long))
 

Definition at line 163 of file pack.H.

#define OPSYS_ALIGN_INT   sizeof(int)
 

Definition at line 158 of file pack.H.

#define OPSYS_ALIGN_LONG   sizeof(long)
 

Definition at line 160 of file pack.H.

#define OPSYS_ALIGN_SHORT   sizeof(short)
 

Definition at line 159 of file pack.H.

#define UGA_PACK_BYTES PTR,
BUF,
SIZE,
COUNT   ) 
 

Value:

((void)bcopy((char *)(PTR),(char *)(BUF),(int)(SIZE)),  \
         BUF += (SIZE),(COUNT) += (SIZE))

Definition at line 72 of file pack.H.

#define UGA_PACK_DOUBLE QUAN,
BUF,
COUNT   ) 
 

Value:

do { char *_buf_ = BUF, *_ptr_ = (char *)&(QUAN);       \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        (BUF) = _buf_;                 \
        (COUNT) += 8; } while (0)

Definition at line 24 of file pack.H.

Referenced by operator<<().

#define UGA_PACK_ENUM Q,
B,
 )     UGA_PACK_WORD(Q,B,C)
 

Definition at line 143 of file pack.H.

#define UGA_PACK_INTEGER Q,
B,
 )     UGA_PACK_WORD(Q,B,C)
 

Definition at line 141 of file pack.H.

#define UGA_PACK_LONG Q,
B,
 )     UGA_PACK_WORD(Q,B,C)
 

Definition at line 139 of file pack.H.

#define UGA_PACK_NDOUBLE QUAN,
BUF,
NUM,
COUNT   ) 
 

Value:

do { int _i;                  \
          for (_i=0; _i<(int)NUM; _i++)            \
               UGA_PACK_DOUBLE(QUAN[_i], BUF, COUNT); } while (0)

Definition at line 51 of file pack.H.

#define UGA_PACK_NENUM Q,
B,
N,
 )     UGA_PACK_NWORD(Q,B,N,C)
 

Definition at line 144 of file pack.H.

#define UGA_PACK_NINTEGER Q,
B,
N,
 )     UGA_PACK_NWORD(Q,B,N,C)
 

Definition at line 142 of file pack.H.

#define UGA_PACK_NLONG Q,
B,
N,
 )     UGA_PACK_NWORD(Q,B,N,C)
 

Definition at line 140 of file pack.H.

#define UGA_PACK_NPOINTER Q,
B,
N,
 )     UGA_PACK_NWORD(Q,B,N,C)
 

Definition at line 146 of file pack.H.

#define UGA_PACK_NWORD QUAN,
BUF,
NUM,
COUNT   ) 
 

Value:

do { int _i;                  \
          for (_i=0; _i<(int)NUM; _i++)            \
                UGA_PACK_WORD(QUAN[_i], BUF, COUNT); } while (0)

Definition at line 67 of file pack.H.

#define UGA_PACK_POINTER Q,
B,
 )     UGA_PACK_WORD(Q,B,C)
 

Definition at line 145 of file pack.H.

#define UGA_PACK_WORD QUAN,
BUF,
COUNT   ) 
 

Value:

do { u_long _long_ = htonl((u_long)QUAN);    \
        char *_buf_ = BUF, *_ptr_;           \
        _ptr_ = (char *)&_long_;          \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        *((_buf_)++) = *((_ptr_)++);            \
        (BUF) = _buf_;                 \
        (COUNT) += 4; } while (0)

Definition at line 56 of file pack.H.

Referenced by NetStream::flush_data(), and operator<<().

#define UGA_UNPACK_BYTES PTR,
BUF,
SIZE,
COUNT   ) 
 

Value:

((void)bcopy((char *)(BUF), (char *)(PTR), (int)(SIZE)),\
         BUF += (SIZE),(COUNT) += (SIZE))

Definition at line 126 of file pack.H.

#define UGA_UNPACK_DOUBLE QUAN,
BUF,
COUNT   ) 
 

Value:

do { char *_buf_ = BUF, *_ptr_ = (char *)&(QUAN);  \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        (BUF) = _buf_;                 \
        (COUNT) += 8; } while (0)

Definition at line 79 of file pack.H.

Referenced by operator>>().

#define UGA_UNPACK_ENUM Q,
B,
C,
 )     UGA_UNPACK_WORD(Q,B,C,T)
 

Definition at line 152 of file pack.H.

#define UGA_UNPACK_INTEGER Q,
B,
 )     UGA_UNPACK_WORD(Q,B,C,int)
 

Definition at line 150 of file pack.H.

Referenced by NetStream::read_stuff().

#define UGA_UNPACK_LONG Q,
B,
 )     UGA_UNPACK_WORD(Q,B,C,long)
 

Definition at line 148 of file pack.H.

#define UGA_UNPACK_NDOUBLE QUAN,
BUF,
NUM,
COUNT   ) 
 

Value:

do { int _i;                  \
          for (_i=0; _i<(int)NUM; _i++)            \
               UGA_UNPACK_DOUBLE(QUAN[_i], BUF, COUNT); } while (0)

Definition at line 106 of file pack.H.

#define UGA_UNPACK_NENUM Q,
B,
N,
C,
 )     UGA_UNPACK_NWORD(Q,B,N,C,T)
 

Definition at line 153 of file pack.H.

#define UGA_UNPACK_NINTEGER Q,
B,
N,
 )     UGA_UNPACK_NWORD(Q,B,N,C,int)
 

Definition at line 151 of file pack.H.

#define UGA_UNPACK_NLONG Q,
B,
N,
 )     UGA_UNPACK_NWORD(Q,B,N,C,long)
 

Definition at line 149 of file pack.H.

#define UGA_UNPACK_NPOINTER Q,
B,
N,
C,
 )     UGA_UNPACK_NWORD(Q,B,N,C,T)
 

Definition at line 155 of file pack.H.

#define UGA_UNPACK_NWORD QUAN,
BUF,
NUM,
COUNT,
TYPE   ) 
 

Value:

do { int _i;                  \
          for (_i=0; _i<(int)NUM; _i++)            \
                UGA_UNPACK_WORD(QUAN, BUF, COUNT, TYPE); } while (0)

Definition at line 121 of file pack.H.

#define UGA_UNPACK_POINTER Q,
B,
C,
 )     UGA_UNPACK_WORD(Q,B,C,T)
 

Definition at line 154 of file pack.H.

#define UGA_UNPACK_WORD QUAN,
BUF,
COUNT,
TYPE   ) 
 

Value:

do { char *_buf_ = BUF, *_ptr_ = (char *)&(QUAN);  \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        *((_ptr_)++) = *((_buf_)++);            \
        (BUF) = _buf_;                 \
        (QUAN) = (TYPE)ntohl((u_long)QUAN);        \
        (COUNT) += 4; } while (0)

Definition at line 111 of file pack.H.

Referenced by operator>>().


Generated on Mon Sep 18 11:42:22 2006 for jot by  doxygen 1.4.4