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
GTXIntArray Class Reference

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

`#include <GTXIntArray.hpp>`

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

## Detailed Description

Class for handling an array of integer.

Examples:
  browser.cpp, vendor.cpp, and write_files.cpp.

## Constructor & Destructor Documentation

GTXIntArray::GTXIntArray | ( | gtx_long | count,
|  | int | values[]
| ) |  |

constructor from a count of items and a C int array

Parameters

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

GTXIntArray::GTXIntArray | ( | const GTXIntArray & | in_intarray | ) |

copy contructor

Parameters

  in_intarray | source int array

## Member Function Documentation

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

Get the number of ints in the list.

Returns
  number of values in the array

Examples:
  browser.cpp, and vendor.cpp.

Referenced by GTXVendorData::AddAttributeIntArray(), GTXClient::AddMacroIndices(), and GTXClient::AddMacroIndicesWithAlpha().

int GTXIntArray::GetValue | ( | gtx_long | rank | ) | const

Get the rank'th int (0 <= rank < count)

Parameters

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

Returns
  rank'th int value

Examples:
  browser.cpp, and vendor.cpp.

const int * GTXIntArray::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 int array

Referenced by GTXVendorData::AddAttributeIntArray(), GTXClient::AddMacroIndices(), and GTXClient::AddMacroIndicesWithAlpha().

GTXIntArray & GTXIntArray::operator= | ( | const GTXIntArray & | in_intarray | ) |

operator =

Parameters

  in_intarray | source int array

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

Parameters

  count | number of values

Examples:
  vendor.cpp.

void GTXIntArray::SetValue | ( | gtx_long | rank,
|  | int | value
| ) |  |

Set the rank'th int (0 <= rank < count)

Parameters

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

Examples:
  vendor.cpp.

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

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