Analysis Plugins > Reference > Types > TextTable

TextTable

Contains text values for stress report Detail reporting. Note that text is not stored directly in the Detail data structure to prevent excessive memory usage. See the sample code for a detailed example.

Field Type Description
Count int Number of values in the table.
Values TextValue[20] Array of text values.

 

Method Parameters Return Type Description
Add char* text int Stores text to table. Returns the index corresponding to the TextValue array. This index should be stored in the Value field of the Detail data structure.
AddBoolean bool int Converts the boolean value to "True" or "False" text. Next the text is added to the table using the above Add() method. Use this method to output boolean details to the stress report.

Referenced by: Detail, Hs_UDef

C++ Example

... do some calculations ...

 

// Create a new result.

auto result = AnalysisResult();

result.MS = 1.23;

 

// This is the text we wish to stored in the stress report.

char* objectName = object->Name; // "Skin", "Web", etc.

 

// Add the text to the text table. The index corresponding to the textTable->Values array is returned.

// textTable_ is a local reference to the text table passed in from HyperSizer.

int textIndex = textTable_->Add(objectName);

 

// Add the text index as the value of the detail.

// Note that the units are set to Units_Text.

result.Details[0] = Detail("Object", textIndex, Units_Text);