libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::ExodusII_IO_Helper::NamesData Class Reference

This class is useful for managing anything that requires a char ** input/output in ExodusII file. More...

#include <exodusII_io_helper.h>

Public Member Functions

 NamesData (size_t n_strings, size_t string_length)
 Constructor. More...
 
void push_back_entry (const std::string &name)
 Adds another name to the current data table. More...
 
char ** get_char_star_star ()
 Provide access to the underlying C data table. More...
 
char * get_char_star (int i)
 Provide access to the i'th underlying char *. More...
 

Private Attributes

std::vector< std::vector< char > > data_table
 
std::vector< char * > data_table_pointers
 
size_t counter
 
size_t table_size
 

Detailed Description

This class is useful for managing anything that requires a char ** input/output in ExodusII file.

You must know the number of strings and the length of each one at the time you create it.

Definition at line 1245 of file exodusII_io_helper.h.

Constructor & Destructor Documentation

◆ NamesData()

libMesh::ExodusII_IO_Helper::NamesData::NamesData ( size_t  n_strings,
size_t  string_length 
)
explicit

Constructor.

Allocates enough storage to hold n_strings of length string_length. (Actually allocates string_length+1 characters per string to account for the trailing '\0' character.)

Member Function Documentation

◆ get_char_star()

char* libMesh::ExodusII_IO_Helper::NamesData::get_char_star ( int  i)

Provide access to the i'th underlying char *.

◆ get_char_star_star()

char** libMesh::ExodusII_IO_Helper::NamesData::get_char_star_star ( )

Provide access to the underlying C data table.

◆ push_back_entry()

void libMesh::ExodusII_IO_Helper::NamesData::push_back_entry ( const std::string &  name)

Adds another name to the current data table.

Member Data Documentation

◆ counter

size_t libMesh::ExodusII_IO_Helper::NamesData::counter
private

Definition at line 1276 of file exodusII_io_helper.h.

◆ data_table

std::vector<std::vector<char> > libMesh::ExodusII_IO_Helper::NamesData::data_table
private

Definition at line 1273 of file exodusII_io_helper.h.

◆ data_table_pointers

std::vector<char *> libMesh::ExodusII_IO_Helper::NamesData::data_table_pointers
private

Definition at line 1274 of file exodusII_io_helper.h.

◆ table_size

size_t libMesh::ExodusII_IO_Helper::NamesData::table_size
private

Definition at line 1277 of file exodusII_io_helper.h.


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