/home/kkrizka/Projects/libmidi/src/types.h File Reference

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

Go to the source code of this file.

Typedefs

typedef unsigned long dword
 Will hold at least 32 bits on all platforms.
typedef unsigned int word
 Will hold at least 16 bits on all platforms.
typedef unsigned char byte
 Will hold at least 8 bits on all platforms.

Functions

unsigned int char2num (char c)
 Converts a char into an unsigned integer.
char num2char (unsigned int i)
 Converts a an unsigned number into a character.
dword byte2dword (byte array[])
 Concatonates (bitwise) 4 byte-long variables into 1 variable.
bytedword2byte (dword var)
 Concatonates 1 variable into 4 byte-long variables.
word byte2word (byte array[])
 Concatonates (bitwise) 2 byte-long variables into 1 variable.
byteword2byte (word var)
 Concatonates 1 variable into 2 byte-long variables.

Typedef Documentation

typedef unsigned char byte

Will hold at least 8 bits on all platforms.

Definition at line 31 of file types.h.

typedef unsigned long dword

Will hold at least 32 bits on all platforms.

Definition at line 27 of file types.h.

typedef unsigned int word

Will hold at least 16 bits on all platforms.

Definition at line 29 of file types.h.


Function Documentation

dword byte2dword ( byte  array[]  ) 

Concatonates (bitwise) 4 byte-long variables into 1 variable.

Parameters:
array Array of length 4
Returns:
Concatonated array

Definition at line 46 of file types.cpp.

word byte2word ( byte  array[]  ) 

Concatonates (bitwise) 2 byte-long variables into 1 variable.

Parameters:
array Array of length 2
Returns:
Concatonated array

Definition at line 69 of file types.cpp.

unsigned int char2num ( char  c  ) 

Converts a char into an unsigned integer.

Parameters:
c Input character
Returns:
c as an unsigned number. Range is 0 to 255

Definition at line 31 of file types.cpp.

byte* dword2byte ( dword  var  ) 

Concatonates 1 variable into 4 byte-long variables.

Parameters:
var Some variable
Returns:
Array of bytes that var was split into

Definition at line 58 of file types.cpp.

char num2char ( unsigned int  i  ) 

Converts a an unsigned number into a character.

Parameters:
i Input number, must be in range 0 to 255
Returns:
Character c represented by code c

Definition at line 38 of file types.cpp.

byte* word2byte ( word  var  ) 

Concatonates 1 variable into 2 byte-long variables.

Parameters:
var Some variable
Returns:
Array of bytes that var was split into

Definition at line 81 of file types.cpp.

 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Defines

Generated on Tue Jan 5 16:09:42 2010 for libmidi by  doxygen 1.6.1