ERUCES::TEAgentMatrix
#include <teagent.h>
The TEAgentMatrix class represents a 2-D data matrix.
The TEAgentMatrix class has indices of the matrix starting at 1. Data contained in the matrix can be encrypted, decrypted or hashed.
Inheritance
- Inherits ERUCES::TEAgent
Private Attrib
| Type | Name | Description |
|---|---|---|
| void * | m_pmapHashColumn | |
| void * | m_pHashMatrix |
Public Member Functions
| Member | Description |
|---|---|
TEAgentMatrix() | The TEAgentMatrix constructor is the default class constructor. |
~TEAgentMatrix() | The TEAgentMatrix destructor is the class destructor. |
void setElement(uint32_t row, uint32_t col, const _TESTD string &data) | The setElement method sets data to a specific row and column in a matrix. |
void getElement(uint32_t row, uint32_t col, _TESTD string &data) const | The getElement method retrieves data from a specific row and column in a matrix. |
void setHiddenLink(uint32_t row, const _TESTD string &data) | The setHiddenLink method sets the TTag for a specific row in a matrix. |
void getHiddenLink(uint32_t row, _TESTD string &data) const | The getHiddenLink method retrieves a TTag from a specific row in a matrix. |
void setHashColumns(const TEObjectContainer &container) | The setHashColumns method sets columns to be hashed and sets the salt needed to do so. |
uint32_t getHashColumns(TEObjectContainer &container) const | The getHashColumns method retrieves columns to be hashed and sets the salt needed to do so. |
void getHashElement(uint32_t row, uint32_t col, _TESTD string &data, const _TESTD string &salt=_TESTD string("")) const | The getHashElement method retrieves a hashed value from a specific element in a matrix. |
uint32_t getRowCount() const | The getRowCount method retrieves the highest row number in a matrix. |
uint32_t getColumnCount() const | The getColumnCount method retrieves the highest column number in a matrix. |
void clear() | The clear method clears all internal status data. |
_TESTD auto_ptr< TEAgent > clone() const | The clone method clones a TEAgentMatrix object. |
Private Func
| Member | Description |
|---|---|
void copyColumn(uint32_t col) | The copyColumn copies a specified column (for internal use only). |
Member Function Documentation
TEAgentMatrix()
The TEAgentMatrix constructor is the default class constructor.
~TEAgentMatrix()
The TEAgentMatrix destructor is the class destructor.
void setElement(uint32_t row, uint32_t col, const _TESTD string &data)
The setElement method sets data to a specific row and column in a matrix.
Parameters
| Parameter | Description |
|---|---|
row | A 32-bit unsigned integer representing a row number; row numbers start at 1. |
col | A 32-bit unsigned integer representing a row number; row numbers start at 1. |
data | A string variable representing the data to be set; if the TEAgent setDecodeStatus has been set to True, the data will be Base64-decoded before being set to this variable. |
void getElement(uint32_t row, uint32_t col, _TESTD string &data) const
The getElement method retrieves data from a specific row and column in a matrix.
Parameters
| Parameter | Description |
|---|---|
row | A 32-bit unsigned integer representing a row number; row numbers start at 1. |
col | A 32-bit unsigned integer representing a column number; column numbers start at 1. |
data | A string variable that will hold the data; if the TEAgent setEncodeStatus has been set to True, the data will be Base64-encoded before being set to this variable. |
void setHiddenLink(uint32_t row, const _TESTD string &data)
The setHiddenLink method sets the TTag for a specific row in a matrix.
Parameters
| Parameter | Description |
|---|---|
row | A 32-bit unsigned integer representing a row number; row numbers start at 1. |
data | A string variable representing a TTag; if the TEAgent setDecodeStatus has been set to True, the Hidden Link will be Base64-decoded before being set to this variable. |
void getHiddenLink(uint32_t row, _TESTD string &data) const
The getHiddenLink method retrieves a TTag from a specific row in a matrix.
Parameters
| Parameter | Description |
|---|---|
row | A 32-bit unsigned integer representing a row number; row numbers start at 1. |
data | A string variable that will hold the Hidden Link; if the TEAgent setEncodeStatus has been set to True, the Hidden Link will be Base64-encoded before being set to this variable. |
void setHashColumns(const TEObjectContainer &container)
The setHashColumns method sets columns to be hashed and sets the salt needed to do so.
The hash method is SHA -
Parameters
| Parameter | Description |
|---|---|
container | An object container holding pairs of integers and strings; each integer represents the column number of a column to be hashed, and each string represents a salt for hashing. |
uint32_t getHashColumns(TEObjectContainer &container) const
The getHashColumns method retrieves columns to be hashed and sets the salt needed to do so.
The hash method is SHA -
Parameters
| Parameter | Description |
|---|---|
container | An object container holding pairs of integers and strings; each integer represents the column number of a column to be hashed, and each string represents a salt for hashing. |
void getHashElement(uint32_t row, uint32_t col, _TESTD string &data, const _TESTD string &salt=_TESTD string("")) const
The getHashElement method retrieves a hashed value from a specific element in a matrix.
The hash method is SHA -
Parameters
| Parameter | Description |
|---|---|
row | A 32-bit unsigned integer representing a row number; row numbers start at 1. |
col | A 32-bit unsigned integer representing a column number; column numbers start at 1. |
data | A string variable that will hold the hashed value; if the TEAgent setEncodeStatus has been set to True, the hashed value will be Base64-encoded before being set to this variable. |
salt | A string representing an additional salt; if provided, the salt will be added to the salt set by the setHashColumns method. The default value is "". |
uint32_t getRowCount() const
The getRowCount method retrieves the highest row number in a matrix.
Returns: Returns a 32-bit unsigned integer representing the highest row number in a matrix.
uint32_t getColumnCount() const
The getColumnCount method retrieves the highest column number in a matrix.
Returns: Returns a 32-bit unsigned integer representing the highest column number in a matrix.
void clear()
The clear method clears all internal status data.
_TESTD auto_ptr< TEAgent > clone() const
The clone method clones a TEAgentMatrix object.
Returns: Returns a smart pointer to a new TEAgent object. The pointer can be cast as a smart pointer to a TEAgentMatrix object.
void copyColumn(uint32_t col)
The copyColumn copies a specified column (for internal use only).
Parameters
| Parameter | Description |
|---|---|
col | Column number |