Functions
vtkGenericIOUtilities Namespace Reference

Functions

std::stringtrim (std::string &s)
 Trims leading & trailing whitespace from a string. More...
 
MPI_Comm GetMPICommunicator (vtkMultiProcessController *mpc)
 Returns the corresponding MPI communicator for the multi-process controller used by this instance. More...
 
vtkDataArrayGetVtkDataArray (std::string name, int type, void *rawBuffer, int N)
 This method parses the data in the rawbuffer and reads it into a vtkDataArray that can be attached as vtkPointData to a vtkDataSet, in this case, a vtkUnstructuredGrid that consists of the particles. More...
 
vtkIdType GetIdFromRawBuffer (const int type, void *buffer, vtkIdType buffer_idx)
 This method accesses the user-supplied buffer at the given index and returns the data as a vtkIdType. More...
 
double GetDoubleFromRawBuffer (const int type, void *buffer, vtkIdType buffer_idx)
 This method accesses the user-supplied buffer at the given index and returns the data as a double. More...
 
gio::GenericIOReader * GetReader (MPI_Comm comm, bool posix, int distribution, const std::string &fileName)
 This method constructs and returns the underlying GenericIO reader. More...
 
gio::GenericIOWriter * GetWriter (MPI_Comm comm, const std::string &fileName)
 This method constructs and returns the underlying GenericIO writer. More...
 
std::stringltrim (std::string &s)
 Trims leading whitespace from a string. More...
 
std::stringrtrim (std::string &s)
 Trims trailing whitespace from a string. More...
 
void SafeDeleteString (char *&str)
 If the pointer given is non-nullptr this function deletes the string and set the pointer to nullptr. More...
 

Function Documentation

◆ ltrim()

std::string& vtkGenericIOUtilities::ltrim ( std::string s)
inline

Trims leading whitespace from a string.

Definition at line 40 of file vtkGenericIOUtilities.h.

◆ rtrim()

std::string& vtkGenericIOUtilities::rtrim ( std::string s)
inline

Trims trailing whitespace from a string.

Definition at line 53 of file vtkGenericIOUtilities.h.

◆ trim()

std::string& vtkGenericIOUtilities::trim ( std::string s)
inline

Trims leading & trailing whitespace from a string.

Definition at line 66 of file vtkGenericIOUtilities.h.

◆ GetMPICommunicator()

MPI_Comm vtkGenericIOUtilities::GetMPICommunicator ( vtkMultiProcessController mpc)

Returns the corresponding MPI communicator for the multi-process controller used by this instance.

◆ GetVtkDataArray()

vtkDataArray* vtkGenericIOUtilities::GetVtkDataArray ( std::string  name,
int  type,
void *  rawBuffer,
int  N 
)

This method parses the data in the rawbuffer and reads it into a vtkDataArray that can be attached as vtkPointData to a vtkDataSet, in this case, a vtkUnstructuredGrid that consists of the particles.

◆ GetIdFromRawBuffer()

vtkIdType vtkGenericIOUtilities::GetIdFromRawBuffer ( const int  type,
void *  buffer,
vtkIdType  buffer_idx 
)

This method accesses the user-supplied buffer at the given index and returns the data as a vtkIdType.

It is intended as a convenience method to allow the user to access the data in an agnostic-type fashion.

◆ GetDoubleFromRawBuffer()

double vtkGenericIOUtilities::GetDoubleFromRawBuffer ( const int  type,
void *  buffer,
vtkIdType  buffer_idx 
)

This method accesses the user-supplied buffer at the given index and returns the data as a double.

It is intended as a convenience method to allow the user to access the data in an agnostic-type fashion.

◆ GetReader()

gio::GenericIOReader* vtkGenericIOUtilities::GetReader ( MPI_Comm  comm,
bool  posix,
int  distribution,
const std::string fileName 
)

This method constructs and returns the underlying GenericIO reader.

◆ GetWriter()

gio::GenericIOWriter* vtkGenericIOUtilities::GetWriter ( MPI_Comm  comm,
const std::string fileName 
)

This method constructs and returns the underlying GenericIO writer.

The returned writer will have its filename set already

◆ SafeDeleteString()

void vtkGenericIOUtilities::SafeDeleteString ( char *&  str)
inline

If the pointer given is non-nullptr this function deletes the string and set the pointer to nullptr.

This sets the pointer variable in the calling function since the pointer is passed by reference.

Definition at line 123 of file vtkGenericIOUtilities.h.