/home/kkrizka/Projects/libmidi/src/types.cpp File Reference
#include "types.h"
#include <math.h>
#include <iostream>
#include <iomanip>
Go to the source code of this file.
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.
|
byte * | dword2byte (dword var) |
| Concatonates 1 variable into 4 byte-long variables.
|
word | byte2word (byte array[]) |
| Concatonates (bitwise) 2 byte-long variables into 1 variable.
|
byte * | word2byte (word var) |
| Concatonates 1 variable into 2 byte-long variables.
|
Function Documentation
Concatonates (bitwise) 4 byte-long variables into 1 variable.
- Parameters:
-
- Returns:
- Concatonated array
Definition at line 46 of file types.cpp.
Concatonates (bitwise) 2 byte-long variables into 1 variable.
- Parameters:
-
- Returns:
- Concatonated array
Definition at line 69 of file types.cpp.
unsigned int char2num |
( |
char |
c |
) |
|
Converts a char into an unsigned integer.
- Parameters:
-
- Returns:
- c as an unsigned number. Range is 0 to 255
Definition at line 31 of file types.cpp.
Concatonates 1 variable into 4 byte-long variables.
- Parameters:
-
- 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.
Concatonates 1 variable into 2 byte-long variables.
- Parameters:
-
- Returns:
- Array of bytes that var was split into
Definition at line 81 of file types.cpp.