GTXclient C++ API GTXserver-16.0.2

- Main Page
- Related Pages
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
GTXByteArray Class Reference

Class for handling an array of bytes. More...

`#include <GTXByteArray.hpp>`

## Public Member Functions
| GTXByteArray ()
| empty constructor
| GTXByteArray (gtx_long count, unsigned char values[])
| constructor from a count of items and a C byte array More...
| ~GTXByteArray ()
| destructor
| GTXByteArray (const GTXByteArray &in_bytearray)
| copy contructor More...
GTXByteArray & | operator= (const GTXByteArray &in_bytearray)
| operator = More...
gtx_long | GetCount (void) const
| Get the number of byte in the list. More...
void | Resize (gtx_long count)
unsigned char | GetValue (gtx_long rank) const
| Get the rank'th unsigned char (0 <= rank < count) More...
void | SetValue (gtx_long rank, unsigned char value)
| Set the rank'th unsigned char (0 <= rank < count) More...
const unsigned char * | GetValues () const
| Get the complete values array. More...

## Detailed Description

Class for handling an array of bytes.

Examples:
  write_files.cpp.

## Constructor & Destructor Documentation

GTXByteArray::GTXByteArray | ( | gtx_long | count,
|  | unsigned char | values[]
| ) |  |

constructor from a count of items and a C byte array

Parameters

  count | number of values
  values | array of values to be copied

GTXByteArray::GTXByteArray | ( | const GTXByteArray & | in_bytearray | ) |

copy contructor

Parameters

  in_bytearray | source byte array

## Member Function Documentation

gtx_long GTXByteArray::GetCount | ( | void |  | ) | const

Get the number of byte in the list.

Returns
  number of values in the array

Referenced by GTXClient::WriteSelectionVariable(), and GTXClient::WriteSelectionVariableSub().

unsigned char GTXByteArray::GetValue | ( | gtx_long | rank | ) | const

Get the rank'th unsigned char (0 <= rank < count)

Parameters

  rank | (0 <= rank < count) of the value to retrieve

Returns
  rank'th int value

const unsigned char * GTXByteArray::GetValues | ( |  | ) | const

Get the complete values array.

Returns
  the pointer on the array used in the internal structure

Remarks
  in C# and Java, this is changed to a copy as a native byte array

Referenced by GTXClient::WriteSelectionVariable(), and GTXClient::WriteSelectionVariableSub().

GTXByteArray & GTXByteArray::operator= | ( | const GTXByteArray & | in_bytearray | ) |

operator =

Parameters

  in_bytearray | source byte array

void GTXByteArray::Resize | ( | gtx_long | count | ) |

Parameters

  count | number of values

void GTXByteArray::SetValue | ( | gtx_long | rank,
|  | unsigned char | value
| ) |  |

Set the rank'th unsigned char (0 <= rank < count)

Parameters

  rank | (0 <= rank < count) of the value to change
  value | new rank'th int value

The documentation for this class was generated from the following files:

- include/GTXByteArray.hpp
- src/gtxclient/GTXByteArray.cpp