GTXclient C++ API GTXserver-16.0.2

- Main Page
- Related Pages
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends | List of all members
GTXClient Class Reference

Class handling connection and communication with GTXserver. More...

`#include <GTXClient.hpp>`

## Public Member Functions
| GTXClient ()
| Default constructor, initializes the client library.
void | SetDebugMode (bool debug)
| Set the Debug Mode (off by default) More...
unsigned short | GetDefaultPort (void)
| Get the default port for GTXserver. More...
const char * | LocateGTXserver ()
void | SetGTXserverPath (const char *path)
| Set the GTXserver path to be used by GTXClient::RunGTXserver() More...
unsigned short | RunGTXserver (unsigned short port)
| Locate GTXserver executable and run it. More...
void | Connect (const char *host, unsigned short port, const char *path)
| Open a session with a running GTXserver to read isatis file system. More...
bool | IsConnected ()
| Check is client is connected with the server. More...
void | Disconnect ()
| Close the current session with the GTXserver. More...
int | GetServerVersion ()
| Retrieves Server Protocol Version. More...
GTXStringArray | GetStudyList ()
| Get study list in the Isatis file system. More...
void | SetStudy (const char *study)
| Set the name of the current study. More...
void | NewStudy (const char *study, const char *path)
| Create a new study in the Isatis file system. More...
void | DeleteStudy ()
| Delete the current study. More...
GTXStringArray | GetDirectoryList ()
| Get the list of directories in the current study. More...
bool | DirectoryExists (const char *directory)
| Check if a given directory exists. More...
void | SetDirectory (const char *directory)
| Set the current directory. More...
void | NewDirectory (const char *directory)
| Create a new directory in the current study. More...
void | DeleteDirectory ()
| Delete the current directory. More...
GTXStringArray | GetFileList ()
| Get the list of files in the current directory. More...
GTXStringArray | GetFileList (GTXFileInfo::FileType file_type, int file_dim)
| Get the list of files in the current directory given a type and dimension. More...
bool | FileExists (const char *file)
| Check if a given file exists. More...
void | SetFile (const char *file)
| Set the current file in the current directory. More...
void | DeleteFile ()
| Delete the current file. More...
GTXFileInfo | GetFileInfo ()
| Get information about current file. More...
const char * | GetFileComment ()
| Get the comment of the current file. More...
void | SetFileComment (bool append, const char *comment)
| Set a comment for the current file. More...
void | NewPointsFile2D (const char *name, gtx_long nsample, const double x[], const double y[])
| Create a new 2D points file in the current directory. More...
void | NewPointsFile3D (const char *name, gtx_long nsample, const double x[], const double y[], const double z[])
| Create a new 3D points file in the current directory. More...
void | NewGridFile2D (const char *name, double X0, double Y0, double DX, double DY, int NX, int NY)
| Create a new 2D grid file in the current directory. More...
void | NewGridFile3D (const char *name, double X0, double Y0, double Z0, double DX, double DY, double DZ, int NX, int NY, int NZ)
| Create a new 3D grid file in the current directory. More...
void | NewLinesFile (const char *name, int dimension)
| Create a new lines file in the current directory. More...
void | PointsFileAppend2D (gtx_long nsample, const double x[], const double y[])
| Append samples to the current Points 2D File. More...
void | PointsFileAppend3D (gtx_long nsample, const double x[], const double y[], const double z[])
| Append samples to the current 3D Points File. More...
void | LinesFileAddLineCores2DOld (int nsample, double xbegin, double ybegin, const double xend[], const double yend[])
| Add a new line in the current 2D lines file with core definition. More...
void | LinesFileAddLineCores3DOld (int nsample, double xbegin, double ybegin, double zbegin, const double xend[], const double yend[], const double zend[])
| Add a new line in the current 3D lines file with core definition. More...
void | LinesFileAddCoreLine2D (int nsample, double xbegin, double ybegin, const double xend[], const double yend[])
| Add a new line in the current 2D lines file with core definition. More...
void | LinesFileAddCoreLine3D (int nsample, double xbegin, double ybegin, double zbegin, const double xend[], const double yend[], const double zend[])
| Add a new line in the current 3D lines file with core definition. More...
void | LinesFileAddGravityLine2D (int nsample, const double xg[], const double yg[])
| Add a new line in the current 2D lines file with gravity centers definition. More...
void | LinesFileAddGravityLine3D (int nsample, const double xg[], const double yg[], const double zg[])
| Add a new line in the current 3D lines file with gravity centers definition. More...
void | LinesFileCreateLink (const char *points_file)
| Create a Link between current Lines file and its header Points file. More...
void | GridModifyOrigin (double x0, double y0, double z0)
| Modify the origin of the current file (must be a grid) More...
void | GridModifyMesh (double dx, double dy, double dz)
| Modify the mesh of the current file (must be a grid) More...
void | GridModifyRotation (double az, double ay, double ax)
| Modify the rotation of the current file (must be a grid) More...
GTXStringArray | GetVariableList ()
| Get the list of variables in the current file. More...
GTXStringArray | GetVariableList (GTXVariableInfo::VariableType var_type)
| Get the list of variables in the current file. More...
bool | VariableExists (const char *variable)
| Check if a given variable exists. More...
void | SetVariable (const char *variable)
| Set the current variable in the current file. More...
void | DeleteVariable ()
| Delete the current variable. More...
void | SetIndice (const int indice)
| Set the current indice for the current macro variable. More...
void | SetAlphaIndice (const char *alphaindice)
| Set the current alpha indice for the current macro variable. More...
GTXVariableInfo | GetVariableInfo ()
| Get the current variable information. More...
GTXIntArray | GetMacroIndices ()
| Get the list of available indices for the current macro variable. More...
GTXStringArray | GetMacroAlphaIndices ()
| Get the list of available macro alpha indices for the current macro variable. More...
void | AddMacroIndicesWithAlpha (const GTXIntArray indices, const GTXStringArray alpha_indices)
| Add a list of indices for the current macro variable. More...
void | AddMacroIndices (const GTXIntArray indices)
| Add a list of indices for the current macro variable. More...
GTXCharData | ReadCharVariable (bool compress)
| Read samples from the current variable. More...
GTXCharData | ReadCharVariableSub (gtx_long first, gtx_long last, bool compress)
| Read continuous samples from the current variable. More...
GTXCharData | ReadLineCharVariable (int line_index)
| Read samples of a line from the current alphanumerical variable. More...
GTXDoubleData | ReadLineDoubleVariable (int line_index)
| Read samples of a line from the current variable. More...
GTXDoubleData | ReadDoubleVariable (bool compress)
| Read samples from the current variable. More...
GTXDoubleData | ReadDoubleVariableSub (gtx_long first, gtx_long last, bool compress)
| Read a subpart of the samples from the current variable. More...
GTXByteArray | ReadSelectionVariable ()
| Read selection from the current variable. More...
GTXByteArray | ReadSelectionVariableSub (gtx_long first, gtx_long last)
| Read a subpart of the selection from the current variable. More...
void | NewDoubleVariable (const char *name, int bit_length, const GTXVariableFormat &format)
| Create a new double variable in the current file. More...
void | NewCharVariable (const char *name, int max_length)
| Create a new character variable in the current file. More...
void | SetVariableAsLineName (void)
| Set the current variable as the Line Name variable. More...
void | WriteDoubleVariable (bool compress, const GTXDoubleData &ddata)
| Write data to the current numerical variable. More...
void | WriteDoubleVariableSub (gtx_long first, gtx_long last, bool compress, const GTXDoubleData &ddata)
| Write continuous subpart of data to the current numerical variable. More...
void | WriteLineDoubleVariable (int line_index, const GTXDoubleData &ddata)
| Write line data to the current numerical variable. More...
void | WriteCharVariable (bool compress, const GTXCharData &cdata)
| Write data to the current alphanumerical variable. More...
void | WriteCharVariableSub (gtx_long first, gtx_long last, bool compress, const GTXCharData &cdata)
| Write continuous subpart of data to the current alphanumerical variable. More...
void | WriteLineCharVariable (int line_index, const GTXCharData &cdata)
| Write line data to the current alphanumerical variable. More...
void | WriteSelectionVariableSub (const gtx_long first, const gtx_long last, const GTXByteArray data)
| Write continuous subpart of selection data (0,1) to the current variable (must be a selection) More...
void | WriteSelectionVariable (const GTXByteArray data)
| Write selection data (0,1) to the current variable (must be a selection) More...
const char * | GetVariableComment ()
| Get the comment of the current variable. More...
void | SetVariableComment (bool append, const char *comment)
| Set a comment for the current variable. More...
void | SetSelection (const char *sel)
| Set the current selection. More...
void | SetVariableUnit (const char *factor, const char *symbol)
| Change the unit factor and symbol of a variable. More...
void | SetUnit (const char *unit)
| Set the current distance unit. More...
double | UnitFactorFromSymbol (const char *symbol)
| Get the unit factor corresponding to a given unit symbol. More...
const char * | UnitSymbolFromFactor (double factor)
| Get the unit factor corresponding to a given unit symbol. More...
void | SetUnitMode (int mode)
| Change the way length units are used. More...
void | SetCreationUnits (const char *x_unit, const char *y_unit, const char *z_unit)
| Change the default units for length variables creation. More...
void | VendorDataWrite (int level, const GTXVendorData &vdata)
| Write a vendor data. More...
GTXVendorData | VendorDataRead (const char *identifier, int level)
| Read a Vendor Data from Isatis file system. More...
bool | VendorDataExists (const char *identifier, int level)
| Checks if a Vendor Data exists. More...
int | VendorDataGetVersion (const char *identifier, int level)
| Get version string from a Vendor Data. More...
GTXFaultSystem | ReadFaults (int priority)
| Get fault system associated to the current file. More...
void | WriteFaults (GTXFaultSystem fs)
| Write fault system to the current file. More...
void | NewPolygonsFile (const char *name, const GTXPolygonSystem *psystem)
| Create a new polygon file in the current directory. More...
GTXPolygonSystem | ReadPolygons ()
| Get current file as polygon system (if possible) More...
void | NewWireframesFile (const char *name, const GTXWireframeSystem &wsys)
| Create a new Wireframes file in the current directory. More...
GTXWireframeSystem | ReadWireframes ()
| Get current file as wireframe system (if possible) More...

## Friends
class | GTXVendorData

## Detailed Description

Class handling connection and communication with GTXserver.

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

## Member Function Documentation

void GTXClient::AddMacroIndices | ( | const GTXIntArray | indices | ) |

Add a list of indices for the current macro variable.

This function add, from the GTXserver, the list of available indices for the current macro variable.

Exceptions

  GTXError |

Parameters

  indices | Array of numerical indices

Examples:
  write_files.cpp.

References GTXIntArray::GetCount(), and GTXIntArray::GetValues().

void GTXClient::AddMacroIndicesWithAlpha | ( | const GTXIntArray | indices,
|  | const GTXStringArray | alpha_indices
| ) |  |

Add a list of indices for the current macro variable.

This function add, from the GTXserver, the list of available indices for the current macro variable.

Exceptions

  GTXError |

Parameters

  indices | Array of numerical indices
  alpha_indices | Array of alpha indices

Examples:
  write_files.cpp.

References GTXIntArray::GetCount(), GTXIntArray::GetValues(), and GTXStringArray::GetValues().

void GTXClient::Connect | ( | const char * | host,
|  | unsigned short | port,
|  | const char * | path
| ) |  |

Open a session with a running GTXserver to read isatis file system.

This function opens a session with a GTXserver running on the host host that listens to the port port and starts to read the Isatis file system located at path. If the server is a mono session one, the server will remain attached to this client until disconnect then it will quit. If the server is a multi session one, the server will still be available for other clients.

Parameters

  host | hostname or IP address "aaa.bbb.ccc.ddd" of the machine where the GTXserver is running on
  port | port number where the GTXserver is listening to. If 0, a call to /ref GTXClient::GetDefaultPort is made to determine the port where GTXserver may be running.
  path | pathname of the Isatis file system to be accessed (should be a path entered by the user (GTX_DATA or GTX_INIT (see below))

Remarks:
  A session must be closed using GTXClientDisconnect to free memory allocations. When accessing Isatis < 4.1 data, the user must specify where its database is stored. This place is known as GTX_DATA environment variable. You can get it in Isatis from the Help->About menu. Starting with Isatis 4.1, this variable is not useful anymore. Instead, an hidden file is created to keep a list of studies which can be put anywhere on disk. If accessing data linked to an Isatis >= 4.1, this variable should be left empty (not NULL). However it is possible to override the default study list that would then be taken by specifying the place where the study list lies in. This directory is referred to as GTX_INIT in the Isatis Help -> About Menu.

See Also
  GTXClient::Disconnect, GTXClient::GetDefaultPort

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::DeleteDirectory | ( |  | ) |

Delete the current directory.

This function will delete the current directory. If successfull, the is no current directory set.

Exceptions

  GTXError |

void GTXClient::DeleteFile | ( |  | ) |

Delete the current file.

This function will delete the current file. If successfull, the is no current file set.

Exceptions

  GTXError |

Examples:
  polygon.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::DeleteStudy | ( |  | ) |

Delete the current study.

This function will delete the current study. If successfull, the is no current study set.

Exceptions

  GTXError |

void GTXClient::DeleteVariable | ( |  | ) |

Delete the current variable.

This function will delete the current variable. If successfull, the is no current variable directory.

Exceptions

  GTXError |

bool GTXClient::DirectoryExists | ( | const char * | directory | ) |

Check if a given directory exists.

This function asks the server if a given directory exists (or for old servers, it retrieves the list of directories and check it by itself).

Exceptions

  GTXError |

Parameters

  directory | directory name to check

Returns
  false if it does not exists, true if it exists

Examples:
  fault.cpp, polygon.cpp, vendor.cpp, and wireframes.cpp.

void GTXClient::Disconnect | ( |  | ) |

Close the current session with the GTXserver.

This function closes the current session with the GTXserver. The server will exit if in mono session mode, if in multi-session mode, it will only close the current connection.

Exceptions

  GTXError |

Remarks:
  If there is no opened session the function will return 0.

See Also
  GTXClient::Connect

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

bool GTXClient::FileExists | ( | const char * | file | ) |

Check if a given file exists.

This function asks the server if a given file exists (or for old servers, it retrieves the list of files and check it by itself).

Exceptions

  GTXError |

Parameters

  file | file name to check

Returns
  false if it does not exists, true if it exists

Examples:
  fault.cpp, polygon.cpp, vendor.cpp, and wireframes.cpp.

unsigned short GTXClient::GetDefaultPort | ( | void |  | ) |

Get the default port for GTXserver.

When the GTXserver is ran without argument, it runs on a default port. This default port is taken from the local /etc/services file using getservbyname with the service name equal to "GTXserver". If not found in the services file, it defaults to a hard-coded value.

Returns
  port default GTXserver port

Remarks: The returned value may be used as an initial value for the port
  in the user interface asking parameters for connection on an already running server.

GTXStringArray GTXClient::GetDirectoryList | ( |  | ) |

Get the list of directories in the current study.

This function retrieve, from the GTXserver, the list of available directories in the current study.

Exceptions

  GTXError |

Returns
  Array of directory names

Examples:
  dump.cpp, and write_files.cpp.

const char * GTXClient::GetFileComment | ( |  | ) |

Get the comment of the current file.

Get the comment/description to the current file

Exceptions

  GTXError |

Return values

  comment | returned comment

Remarks:
  Warning: errors concerning a non compatible server are silently ignored.

C++ only: comment must be freed using

comment = GTXClientFreePointer(comment)

GTXFileInfo GTXClient::GetFileInfo | ( |  | ) |

Get information about current file.

This function retrieve, from the GTXserver, the information about the current file.

Exceptions

  GTXError |

Return values

  file_info | The information about current file

Remarks:
  All coordinates are returned in the current unit (GTXClient::SetUnit) or using the corresponding coordinate variable unit if unit_mode is true (GTXClient::SetUnitMode).

Examples:
  fault.cpp, and write_files.cpp.

GTXStringArray GTXClient::GetFileList | ( |  | ) |

Get the list of files in the current directory.

This function retrieve, from the GTXserver, the list of available files in the current directory.

Exceptions

  GTXError |

Returns
  Array of file names

Examples:
  dump.cpp, and write_files.cpp.

GTXStringArray GTXClient::GetFileList | ( | GTXFileInfo::FileType | file_type,
|  | int | file_dim
| ) |  |

Get the list of files in the current directory given a type and dimension.

This function retrieve, from the GTXserver, the list of available files in the current directory searching for a given type and dimension.

Exceptions

  GTXError |

Parameters

  file_type | File type (

See Also
  GTXFileInfo::FileType)

Parameters

  file_dim | File dimension (2,3 or -1 if it does not matter)

Returns
  Array of file names

GTXStringArray GTXClient::GetMacroAlphaIndices | ( |  | ) |

Get the list of available macro alpha indices for the current macro variable.

This function retrieve, from the GTXserver, the list of available alphanumerical indices for the current macro variable

Exceptions

  GTXError |

Returns
  Array of available macro indices for the current macro variable (may be empty if not a macro or if macro without alpha indices)

See Also
  GTXClient::GetMacroIndices to get the list of numerical indices

GTXIntArray GTXClient::GetMacroIndices | ( |  | ) |

Get the list of available indices for the current macro variable.

This function retrieve, from the GTXserver, the list of available indices for the current macro variable.

Exceptions

  GTXError |

Returns
  Array of available indices for the current macro variable

See Also
  GTXClient::GetMacroAlphaIndices to get the list of alphanumerical indices

int GTXClient::GetServerVersion | ( |  | ) |

Retrieves Server Protocol Version.

When the client is connected to the server, allows to know the server protocol version. The version is encoded as followed: Major * 1000000 + Minor * 1000 + Patch * 10 + Sub-Version It may now correspond to the Isatis version but to the major latest change in the protocol.

Returns
  connected:
  - server version

See Also
  GTXClient::Connect

GTXStringArray GTXClient::GetStudyList | ( |  | ) |

Get study list in the Isatis file system.

This function retrieve, from the GTXserver, the list of available studies in the Isatis file system selected by the GTXClient::Connect call

Exceptions

  GTXError |

Returns
  Array of study names

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

const char * GTXClient::GetVariableComment | ( |  | ) |

Get the comment of the current variable.

Get the comment/description to the current variable

Exceptions

  GTXError |

Return values

  comment | returned comment

Remarks:
  Warning: errors concerning a non compatible server are silently ignored.

C++ only: comment must be freed using

comment = GTXClientFreePointer(comment)

GTXVariableInfo GTXClient::GetVariableInfo | ( |  | ) |

Get the current variable information.

This function retrieve, from the GTXserver, the information about the current variable. If used on a length variable, information will be returned using the current default unit (GTXClient::SetUnit) or in the variable unit if current unit mode is true (GTXClient::SetUnitMode).

Exceptions

  GTXError |

Return values

  var_info | The current variable information

Remarks:
  On a length variable, by default, the returned unit is the current unit (GTXClient::SetUnit). If you want to get its real unit, you must set unit_mode to true before (GTXClient::SetUnitMode).

GTXStringArray GTXClient::GetVariableList | ( |  | ) |

Get the list of variables in the current file.

This function retrieve, from the GTXserver, the list of available variables in the current file.

Exceptions

  GTXError |

Returns
  Array of variable names

Examples:
  dump.cpp.

GTXStringArray GTXClient::GetVariableList | ( | GTXVariableInfo::VariableType | var_type | ) |

Get the list of variables in the current file.

This function retrieve, from the GTXserver, the list of available variables in the current file.

Exceptions

  GTXError |

Returns
  Array of variable names

void GTXClient::GridModifyMesh | ( | double | dx,
|  | double | dy,
|  | double | dz
| ) |  |

Modify the mesh of the current file (must be a grid)

This function modify the mesh of the current file (must be a grid)

Exceptions

  GTXError |

Parameters

  dx | X size of one cell of the grid
  dy | Y size of one cell of the grid
  dz | Z size of one cell of the grid (unused if 2D)

Remarks:
  The new mesh must be given in the current unit (GTXClient::SetUnit) if unit_mode = false (GTXClient::SetUnitMode). Elsewhere, you must enter the new mesh according to each coordinate variable unit.

Examples:
  write_files.cpp.

void GTXClient::GridModifyOrigin | ( | double | x0,
|  | double | y0,
|  | double | z0
| ) |  |

Modify the origin of the current file (must be a grid)

This function modify the origin of the current file (must be a grid)

Exceptions

  GTXError |

Parameters

  x0 | X origin of the grid
  y0 | Y origin of the grid
  z0 | Z origin of the grid (unused if 2D)

Remarks:
  The new origin must be given in the current unit (GTXClient::SetUnit) if unit_mode = false (GTXClient::SetUnitMode). Elsewhere, you must enter the new origin according to each coordinate variable unit.

Examples:
  write_files.cpp.

void GTXClient::GridModifyRotation | ( | double | az,
|  | double | ay,
|  | double | ax
| ) |  |

Modify the rotation of the current file (must be a grid)

This function modify the rotation of the current file (must be a grid)

Exceptions

  GTXError |

Parameters

  az | rotation around Z axis
  ay | rotation around the Y'-axis (new Y axis in the system after the first rotation) (unused in 2D)
  ax | rotation around the X"-axis (new X axis in the systemd after the two first rotations) (unused in 2D)

Examples:
  write_files.cpp.

bool GTXClient::IsConnected | ( |  | ) |

Check is client is connected with the server.

Check the status of the connection with the GTXserver

Returns
  connected
  - false if not connected
  - true if connected

See Also
  GTXClient::Connect, GTXClient::Disconnect

void GTXClient::LinesFileAddCoreLine2D | ( | int | nsample,
|  | double | xbegin,
|  | double | ybegin,
|  | const double | xend[],
|  | const double | yend[]
| ) |  |

Add a new line in the current 2D lines file with core definition.

This function add a new line in the current 2D lines file. Coordinates are given with beginning and end of cores.

Exceptions

  GTXError |

Parameters

  nsample | Number of sample to be added to the new line
  xbegin | X coordinate of the beginning of the first core
  ybegin | Y coordinate of the beginning of the first core
  xend | Array of X coordinate of the end of cores
  yend | Array of Y coordinate of the end of cores

Remarks:
  Lines file must have been set before appending a line. Samples will be converted to gravity centers. One sample will be added at the beginning of the line to enable a full reconstruction of the line.

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X and Y values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

Examples:
  write_files.cpp.

void GTXClient::LinesFileAddCoreLine3D | ( | int | nsample,
|  | double | xbegin,
|  | double | ybegin,
|  | double | zbegin,
|  | const double | xend[],
|  | const double | yend[],
|  | const double | zend[]
| ) |  |

Add a new line in the current 3D lines file with core definition.

This function add a new line in the current 3D lines file. Coordinates are given with beginning and end of cores.

Exceptions

  GTXError |

Parameters

  nsample | Number of sample to be added to the new line
  xbegin | X coordinate of the beginning of the first core
  ybegin | Y coordinate of the beginning of the first core
  zbegin | Z coordinate of the beginning of the first core
  xend | Array of X coordinate of the end of cores
  yend | Array of Y coordinate of the end of cores
  zend | Array of Z coordinate of the end of cores

Remarks:
  Lines file must have been set before appending a line. Samples will be converted to gravity centers. One sample will be added at the beginning of the line to enable a full reconstruction of the line.

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X,Y and Z values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

Examples:
  write_files.cpp.

void GTXClient::LinesFileAddGravityLine2D | ( | int | nsample,
|  | const double | xg[],
|  | const double | yg[]
| ) |  |

Add a new line in the current 2D lines file with gravity centers definition.

This function add a new line in the current 2D lines file. Coordinates are given with gravity centers.

Exceptions

  GTXError |

Parameters

  nsample | Number of sample to be added to the new line
  xg | Array of X coordinate of the centers of gravity
  yg | Array of Y coordinate of the centers of gravity

Remarks:
  Lines file must have been set before appending a line. Samples will be converted to gravity centers. If you want to use this line as cores in Isatis, you must add a sample at the beginning of the line.

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X and Y values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

void GTXClient::LinesFileAddGravityLine3D | ( | int | nsample,
|  | const double | xg[],
|  | const double | yg[],
|  | const double | zg[]
| ) |  |

Add a new line in the current 3D lines file with gravity centers definition.

This function add a new line in the current 3D lines file. Coordinates are given with gravity centers.

Exceptions

  GTXError |

Parameters

  nsample | Number of sample to be added to the new line
  xg | Array of X coordinate of the centers of gravity
  yg | Array of Y coordinate of the centers of gravity
  zg | Array of Z coordinate of the centers of gravity

Remarks:
  Lines file must have been set before appending a line. Samples will be converted to gravity centers. If you want to use this line as cores in Isatis, you must add a sample at the beginning of the line.

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X,Y and Z values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

void GTXClient::LinesFileAddLineCores2DOld | ( | int | nsample,
|  | double | xbegin,
|  | double | ybegin,
|  | const double | xend[],
|  | const double | yend[]
| ) |  |

Add a new line in the current 2D lines file with core definition.

This function add a new line in the current 2D lines file. Coordinates are given with beginning and end of cores.

Exceptions

  GTXError |

Parameters

  nsample | Number of sample to be added to the new line
  xbegin | X coordinate of the beginning of the first core
  ybegin | Y coordinate of the beginning of the first core
  xend | Array of X coordinate of the end of cores
  yend | Array of Y coordinate of the end of cores

Remarks:
  Lines file must have been set before appending a line. Samples will be converted to gravity centers. One sample will be added at the beginning of the line to enable a full reconstruction of the line.

You should consider using GTXClient::LinesFileAddCoreLine2D to create real cores in Isatis instead of converting to gravity centers like this function does. Warning: if you use the new function, you must also remove the storage of an additional undefined value at the beginning of each line (see client/CPP/write_files.cpp for an example).

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClient::PointsFileAppend() and link the lines file to the points file using GTXClient::LinesFileCreateLink().

The X and Y values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

void GTXClient::LinesFileAddLineCores3DOld | ( | int | nsample,
|  | double | xbegin,
|  | double | ybegin,
|  | double | zbegin,
|  | const double | xend[],
|  | const double | yend[],
|  | const double | zend[]
| ) |  |

Add a new line in the current 3D lines file with core definition.

This function add a new line in the current 3D lines file. Coordinates are given with beginning and end of cores.

Exceptions

  GTXError |

Parameters

  nsample | Number of sample to be added to the new line
  xbegin | X coordinate of the beginning of the first core
  ybegin | Y coordinate of the beginning of the first core
  zbegin | Z coordinate of the beginning of the first core
  xend | Array of X coordinate of the end of cores
  yend | Array of Y coordinate of the end of cores
  zend | Array of Z coordinate of the end of cores

Remarks:
  Lines file must have been set before appending a line. Samples will be converted to gravity centers. One sample will be added at the beginning of the line to enable a full reconstruction of the line.

You should consider using GTXClient::LinesFileAddCoreLine3D to create real cores in Isatis instead of converting to gravity centers like this function does. Warning: if you use the new function, you must also remove the storage of an additional undefined value at the beginning of each line (see client/CPP/write_files.cpp for an example).

When appending samples to a lines file linked to a points file, the link is deleted. If you want to restore it, you must append one sample per added line to the points file using GTXClientPointsFileAppend() and link the lines file to the points file using GTXClientLinesFileCreateLink().

The X,Y and Z values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

void GTXClient::LinesFileCreateLink | ( | const char * | points_file | ) |

Create a Link between current Lines file and its header Points file.

This function creates a link between the current Lines file and its associated Points File. Lines file must have been set before and the Points file must have as many samples as the Lines file has separate lines.

Exceptions

  GTXError |

Parameters

  points_file | points file to link to

Examples:
  write_files.cpp.

const char * GTXClient::LocateGTXserver | ( |  | ) |

This function tries to determine the location of GTXserver executable using:

- the value that has been set by GTXClient::SetGTXserverPath()
- the value of the GTX_SERVER environment variable
- the executable located in Isatis installation (which is determined by the value of GTX_HOME environment variable under UNIX and Windows or a registry key under Windows),
- a GTXserver executable in one component of the PATH environment variable. If all of those tests are unsuccessfull, this function will return 1.

Returns
  GTXserver executable path or empty string

Remarks:
  This function can be use to initialize an interface with the path of the currently used GTXserver or for debugging purposes. You can also force this function to find a given executable by using GTXClient::SetGTXserverPath() The returned string is a static string so it does have to be freed.

void GTXClient::NewCharVariable | ( | const char * | name,
|  | int | max_length
| ) |  |

Create a new character variable in the current file.

This function create a new character variable in the current file.

Exceptions

  GTXError |

Parameters

  name | Name of the variable to be created
  max_length | Maximum length of string per sample (without \0)

Examples:
  write_files.cpp.

void GTXClient::NewDirectory | ( | const char * | directory | ) |

Create a new directory in the current study.

This function creates a new directory in the current study.

Exceptions

  GTXError |

Parameters

  directory | Directory name to be created

Examples:
  fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::NewDoubleVariable | ( | const char * | name,
|  | int | bit_length,
|  | const GTXVariableFormat & | format
| ) |  |

Create a new double variable in the current file.

This function creates a new double variable (also known as numerical variable) in the current file

Exceptions

  GTXError |

Parameters

  name | Name of the variable to be created
  bit_length | Number of bits per sample, authorized values are 1, 2, 4, 8, 16, 32 and 64
  format | variable format

Remarks:
  If you use NULL as the unit string, the variable will be a length variable with the current default unit symbol and factor (GTXClient::SetUnit). If the format_unit is part of the known length units list, the variable will be a length one with the specified unit and corresponding factor, elsewhere a float variable will be created. If you need to have a length variable with different unit symbol and factor, use GTXClient::SetVariableUnit

Examples:
  write_files.cpp.

void GTXClient::NewGridFile2D | ( | const char * | name,
|  | double | X0,
|  | double | Y0,
|  | double | DX,
|  | double | DY,
|  | int | NX,
|  | int | NY
| ) |  |

Create a new 2D grid file in the current directory.

This function create a new 2D grid file in the current directory.

Exceptions

  GTXError |

Parameters

  name | Name of the grid file to be created
  X0 | X origin of the grid
  Y0 | Y origin of the grid
  DX | X size of one cell of the grid
  DY | Y size of one cell of the grid
  NX | X nodes number
  NY | Y nodes number

Remarks:
  The file will be created using the current unit (GTXClient::SetUnit) or the creation units (GTXClient::SetCreationUnits) if unit_mode is true (GTXClient::SetUnitMode). The grid origin and mesh must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

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

void GTXClient::NewGridFile3D | ( | const char * | name,
|  | double | X0,
|  | double | Y0,
|  | double | Z0,
|  | double | DX,
|  | double | DY,
|  | double | DZ,
|  | int | NX,
|  | int | NY,
|  | int | NZ
| ) |  |

Create a new 3D grid file in the current directory.

This function create a new 3D grid file in the current directory.

Exceptions

  GTXError |

Parameters

  name | Name of the grid file to be created
  X0 | X origin of the grid
  Y0 | Y origin of the grid
  Z0 | Z origin of the grid
  DX | X size of one cell of the grid
  DY | Y size of one cell of the grid
  DZ | Z size of one cell of the grid
  NX | X nodes number
  NY | Y nodes number
  NZ | Z nodes number

Remarks:
  The file will be created using the current unit (GTXClient::SetUnit) or the creation units (GTXClient::SetCreationUnits) if unit_mode is true (GTXClient::SetUnitMode). The grid origin and mesh must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

Examples:
  write_files.cpp.

void GTXClient::NewLinesFile | ( | const char * | name,
|  | int | dimension
| ) |  |

Create a new lines file in the current directory.

This function create a new lines file in the current directory.

Exceptions

  GTXError |

Parameters

  name | Name of the new lines file
  dimension | File dimension 2 for 2D, 3 for 3D

Examples:
  write_files.cpp.

void GTXClient::NewPointsFile2D | ( | const char * | name,
|  | gtx_long | nsample,
|  | const double | x[],
|  | const double | y[]
| ) |  |

Create a new 2D points file in the current directory.

This function create a new 2D points file in the current directory.

Exceptions

  GTXError |

Parameters

  name | Name of the file to be created
  nsample | Number of samples to be created in this file
  x | Array of X coordinate of each sample
  y | Array of Y coordinate of each sample

Remarks:
  The file will be created using the current unit (GTXClient::SetUnit) or the creation units (GTXClient::SetCreationUnits) if unit_mode is true (GTXClient::SetUnitMode).

The X and Y values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

Examples:
  write_files.cpp.

void GTXClient::NewPointsFile3D | ( | const char * | name,
|  | gtx_long | nsample,
|  | const double | x[],
|  | const double | y[],
|  | const double | z[]
| ) |  |

Create a new 3D points file in the current directory.

This function create a new 3D points file in the current directory.

Exceptions

  GTXError |

Parameters

  name | Name of the file to be created
  nsample | Number of samples to be created in this file
  x | Array of X coordinate of each sample
  y | Array of Y coordinate of each sample
  z | Array of Z coordinate of each sample

Remarks:
  The file will be created using the current unit (GTXClient::SetUnit) or the creation units (GTXClient::SetCreationUnits) if unit_mode is true (GTXClient::SetUnitMode).

The X,Y and Z values must be given in the current unit if unit_mode = false or according to the corresponding creation unit if unit_mode = true.

Examples:
  write_files.cpp.

void GTXClient::NewPolygonsFile | ( | const char * | name,
|  | const GTXPolygonSystem * | psystem
| ) |  |

Create a new polygon file in the current directory.

This function creates a new polygons file in the current directory.

Exceptions

  GTXError |

Parameters

  name | File name of the polygons file
  psystem | Polygon system to be created

Remarks:
  The file will be created using the current unit (GTXClient::SetUnit) or the creation units (GTXClient::SetCreationUnits) if unit_mode is 1 (GTXClient::SetUnitMode).

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

Examples:
  polygon.cpp.

void GTXClient::NewStudy | ( | const char * | study,
|  | const char * | path
| ) |  |

Create a new study in the Isatis file system.

This function create a new study in the Isatis file system.

Exceptions

  GTXError |

Parameters

  study | Name of the study to be created
  path | Physical file PATH (only works with Isatis >= 4.1)

Examples:
  fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::NewWireframesFile | ( | const char * | name,
|  | const GTXWireframeSystem & | wsys
| ) |  |

Create a new Wireframes file in the current directory.

This function creates a new wireframes file in the current directory.

Exceptions

  GTXError |

Parameters

  name | File name of the wireframes file to be created
  wsys | Wireframe system to be created

Remarks:
  The file will be created using the current unit (GTXClient::SetUnit) or the creation units (GTXClient::SetCreationUnits) if unit_mode is 1 (GTXClient::SetUnitMode).

The X,Y and Z values must be given in the current unit if unit_mode = 0 or according to the corresponding creation unit if unit_mode = 1.

Examples:
  wireframes.cpp.

void GTXClient::PointsFileAppend2D | ( | gtx_long | nsample,
|  | const double | x[],
|  | const double | y[]
| ) |  |

Append samples to the current Points 2D File.

This function appends samples to the current 2D Points File

Exceptions

  GTXError |

Parameters

  nsample | Number of samples to be appended in this file
  x | Array of X coordinate of each sample
  y | Array of Y coordinate of each sample

Remarks:
  The X and Y values must be given in the current unit if unit_mode = false or according to the corresponding units if unit_mode = true.

Creating a Points File by appending samples 1 by 1 is not optimum at all. If you know the number of samples from the beginning, you should directly create the file with the right number of points.

Examples:
  write_files.cpp.

void GTXClient::PointsFileAppend3D | ( | gtx_long | nsample,
|  | const double | x[],
|  | const double | y[],
|  | const double | z[]
| ) |  |

Append samples to the current 3D Points File.

This function appends samples to the current 3D Points File

Exceptions

  GTXError |

Parameters

  nsample | Number of samples to be appended in this file
  x | Array of X coordinate of each sample
  y | Array of Y coordinate of each sample
  z | Array of Z coordinate of each sample

Remarks:
  The X,Y and Z values must be given in the current unit if unit_mode = false or according to the corresponding units if unit_mode = true.

Creating a Points File by appending samples 1 by 1 is not optimum at all. If you know the number of samples from the beginning, you should directly create the file with the right number of points.

Examples:
  write_files.cpp.

GTXCharData GTXClient::ReadCharVariable | ( | bool | compress | ) |

Read samples from the current variable.

This function read all samples from the current variable. The variable must be an alphanumerical variable.

Exceptions

  GTXError |

Parameters

  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Returns
  Array of character variable samples

References GTXCharData::SetUndefinedValue().

GTXCharData GTXClient::ReadCharVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | bool | compress
| ) |  |

Read continuous samples from the current variable.

This function read contiguous samples from the current variable. The variable must be an alphanumerical variable.

Exceptions

  GTXError |

Parameters

  first | Sample Number of the first item to read (from 1 to nsample)
  last | Sample Number of the last item to read (from 1 to nsample)
  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Return values

  data | Array of character variable samples

References GTXCharData::SetUndefinedValue().

GTXDoubleData GTXClient::ReadDoubleVariable | ( | bool | compress | ) |

Read samples from the current variable.

This function read all samples from the current variable. The variable must be an numerical variable.

Exceptions

  GTXError |

Parameters

  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Returns
  data Array of variable samples

Remarks:
  If the variable is a length one, data is returned in the current unit (GTXClient::SetUnit) if unit_mode is false (GTXClient::SetUnitMode). If the variable is a length one and unit_mode is true, the variable unit is used instead.

References GTXDoubleData::SetUndefinedValue().

GTXDoubleData GTXClient::ReadDoubleVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | bool | compress
| ) |  |

Read a subpart of the samples from the current variable.

This function read a subpart of the samples from the current variable. The variable must be an numerical variable.

Exceptions

  GTXError |

Parameters

  first | Sample Number of the first item to read (from 1 to nsample)
  last | Sample Number of the last item to read (from 1 to nsample)
  compress | Samples masked by the current selection are transformed into test values if 0, or do not appear in the output array if this flag is set to 1

Returns
  data Array of variable samples

Remarks:
  Warning: This functions needs a server version >= 4.0.7 for 4.0.x series or >= 4.1.1 for 4.1.x series.

References GTXDoubleData::SetUndefinedValue().

GTXFaultSystem GTXClient::ReadFaults | ( | int | priority | ) |

Get fault system associated to the current file.

This function retrieve, from the GTXserver, the fault system associated to the current file. Faults in the fault system can be masked with the given priority.

Exceptions

  GTXError |

Returns
  Fault system associated to the current file

Parameters

  priority | Authorized priority

Remarks:
  Only segments which have a priority greater or equal to priority are returned. Faults which have no such segments are removed.

You may use a 0 priority to get all the faults with all their segments. Use the value from GTXClientGetFileInfo to get the faults as they were saved in Isatis Fault Manager.

All coordinates are returned in the current unit (\ref GTXClient::SetUnit) or using the corresponding coordinate variable unit if unit_mode is set to 1 (\ref GTXClient::SetUnitMode).

Some memory is allocated inside passed fault_system. Memory must be freed using GTXClientFreeFaults.

Examples:
  fault.cpp.

GTXCharData GTXClient::ReadLineCharVariable | ( | int | line_index | ) |

Read samples of a line from the current alphanumerical variable.

This function read all samples of a line from the current alphanumerical variable.

Exceptions

  GTXError |

Parameters

  line_index | The line index [1..nline]

Returns
  data Array of variable samples

Examples:
  write_files.cpp.

GTXDoubleData GTXClient::ReadLineDoubleVariable | ( | int | line_index | ) |

Read samples of a line from the current variable.

This function read all samples of a line from the current variable. The variable must be an numerical variable.

Exceptions

  GTXError |

Parameters

  line_index | The line index [1..nline]

Returns
  data Array of variable samples

Remarks:
  If the variable is a length one, data is returned in the current unit (GTXClient::SetUnit) if unit_mode is false (GTXClient::SetUnitMode). If the variable is a length one and unit_mode is true, the variable unit is used instead.

Examples:
  write_files.cpp.

GTXPolygonSystem GTXClient::ReadPolygons | ( |  | ) |

Get current file as polygon system (if possible)

This function retrieve, from the GTXserver, the polygon system associated to the current file.

Returns
  Polygon system associated to the current file

Exceptions

  GTXError |

Remarks:
  All coordinates are returned in the current unit (GTXClient::SetUnit) or using the corresponding coordinate variable unit if unit_mode is set to 1 (GTXClient::SetUnitMode).

Examples:
  polygon.cpp.

GTXByteArray GTXClient::ReadSelectionVariable | ( |  | ) |

Read selection from the current variable.

This function read all selection from the current variable. The variable must be an numerical variable.

Exceptions

  GTXError |

Returns
  data Array of variable selection

Examples:
  write_files.cpp.

GTXByteArray GTXClient::ReadSelectionVariableSub | ( | gtx_long | first,
|  | gtx_long | last
| ) |  |

Read a subpart of the selection from the current variable.

This function read a subpart of the selection from the current variable. The variable must be an numerical variable.

Exceptions

  GTXError |

Parameters

  first | Selection Number of the first item to read (from 1 to nselection)
  last | Selection Number of the last item to read (from 1 to nselection)

Returns
  Array of variable selection

Warning: This functions needs a server version >= 4.0.7 for 4.0.x series or >= 4.1.1 for 4.1.x series.

GTXWireframeSystem GTXClient::ReadWireframes | ( |  | ) |

Get current file as wireframe system (if possible)

This function retrieve, from the GTXserver, the wireframe system associated to the current file.

Returns
  Wireframe system associated to the current file

Exceptions

  GTXError |

Remarks:
  All coordinates are returned in the current unit (GTXClient::SetUnit) or using the corresponding coordinate variable unit if unit_mode is set to 1 (GTXClient::SetUnitMode).

Examples:
  wireframes.cpp.

unsigned short GTXClient::RunGTXserver | ( | unsigned short | port | ) |

Locate GTXserver executable and run it.

This function tries to locate the GTXserver executable using GTXClient::LocateGTXserver() and run it. If it is not found or if in cannot run, this function will throw an exception.

Exceptions

  GTXError |

Returns
  port on which the server is now running

Parameters

  port | if you have a preferred port to RUN GTXserver on. If 0 a free port is taken and its value is returned.

Remarks:
  GTXserver is ran in the background listening on the given port. If the port is 0, GTXserver is ran on the first free port of the machine. This is the preferred way to run GTXserver as it avoids trying to run a server on an already used port. The new returned port should be used to connect to the server.

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::SetAlphaIndice | ( | const char * | alphaindice | ) |

Set the current alpha indice for the current macro variable.

Set the current alpha indice for the current macro variable.

Exceptions

  GTXError |

Parameters

  alphaindice | Macro alpha indice to set

Remarks:
  Current variable should have been set before.

Examples:
  write_files.cpp.

void GTXClient::SetCreationUnits | ( | const char * | x_unit,
|  | const char * | y_unit,
|  | const char * | z_unit
| ) |  |

Change the default units for length variables creation.

This functions allows to change the default units used for coordinate variables creation when unit_mode (GTXClient::SetUnitMode) is set to true. After that, all coordinate variables creation take those units into account. This has no effect when unit_mode is false.

Exceptions

  GTXError |

Parameters

  x_unit | new X coordinate unit
  y_unit | new Y coordinate unit
  z_unit | new Z coordinate unit

Remarks
  Warning: setting mode to 1 and back to 0 resets creation units.

void GTXClient::SetDebugMode | ( | bool | debug | ) |

Set the Debug Mode (off by default)

Parameters

  debug | new debug mode, false by default. When true, debug messages are sent to the terminal.

void GTXClient::SetDirectory | ( | const char * | directory | ) |

Set the current directory.

Set the current directory to name.

Exceptions

  GTXError |

Parameters

  directory | Name of the directory to be set as current

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::SetFile | ( | const char * | file | ) |

Set the current file in the current directory.

Set the current file in the current directory.

Exceptions

  GTXError |

Parameters

  file | Name of the file to be set as current

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::SetFileComment | ( | bool | append,
|  | const char * | comment
| ) |  |

Set a comment for the current file.

Set or append a comment/description to the current file

Exceptions

  GTXError |

Parameters

  append | 0 to set a comment 1 to append to an existing one
  comment | Comment to be set or append to the existing one

Remarks:
  Warning: errors concerning a non compatible server are silently ignored.

void GTXClient::SetGTXserverPath | ( | const char * | path | ) |

Set the GTXserver path to be used by GTXClient::RunGTXserver()

Parameters

  path,: | full path of the GTXserver executable, should be less than 1024 characters or empty string to remove any previous specification of it.

void GTXClient::SetIndice | ( | const int | indice | ) |

Set the current indice for the current macro variable.

Set the current indice for the current macro variable.

Exceptions

  GTXError |

Parameters

  indice | Macro indice to set

Remarks:
  Current variable should have been set before.

Examples:
  write_files.cpp.

void GTXClient::SetSelection | ( | const char * | sel | ) |

Set the current selection.

Set the current selection for further reading in the current file.

Exceptions

  GTXError |

Parameters

  sel | Name of the selection to be set as curent, use NULL or empty to unset a selection

void GTXClient::SetStudy | ( | const char * | study | ) |

Set the name of the current study.

This function will set the name of the current study, all following calls will be made using this study.

Exceptions

  GTXError |

Parameters

  study | Name of the study to be set

Examples:
  dump.cpp, fault.cpp, polygon.cpp, vendor.cpp, wireframes.cpp, and write_files.cpp.

void GTXClient::SetUnit | ( | const char * | unit | ) |

Set the current distance unit.

Set the current distance unit.

Exceptions

  GTXError |

Parameters

  unit | Distance unit to set

Remarks:
  This default Unit will be used when creating new variables. It will also be used to scale length variables in this unit when reading and from this unit when writing. Authorized units are:
  - micr for Micron
  - mm for Millimeter
  - cm for Centimeter
  - dm for Decimeter
  - m for Meter
  - dam for Decameter
  - hm for Hectometer
  - km for Kilometer
  - in for Inch
  - ft for Foot
  - yd for Yard
  - mile for Mile
  - nmil for Nautical Mile
  - dakm for 10 Kilometers
  - hkm for 100 Kilometers
  - kkm for 1000 Kilometers

Examples:
  write_files.cpp.

void GTXClient::SetUnitMode | ( | int | mode | ) |

Change the way length units are used.

This functions allows to change the way units are used at the creation of new length variables and reading of existing ones. When mode is 0, all length variables are read/written using the current unit (\ref GTXClient::SetUnit). When mode is 1, each length variable is read/written using its own unit. This also affect File Information and File Creation that are also based on coordinates variables which are the main length variables.

Exceptions

  GTXError |

Parameters

  mode | new unit mode

Remarks
  Default mode if 0 which means that you read/write all information in the current unit set with \ref GTXClient::SetUnit.

Warning: setting mode to 1 and back to 0 resets creation units (set with GTXClient::SetCreationUnits) to the current unit.

void GTXClient::SetVariable | ( | const char * | variable | ) |

Set the current variable in the current file.

Set the current variable in the current file

Exceptions

  GTXError |

Parameters

  variable | Name of the variable to be set as curent

Examples:
  dump.cpp, and write_files.cpp.

void GTXClient::SetVariableAsLineName | ( | void |  | ) |

Set the current variable as the Line Name variable.

This function sets the current variable as the line name of the file in which it appears. The file must be a Points file linked to Lines file and the variable must be alphanumerical.

Exceptions

  GTXError |

Examples:
  write_files.cpp.

void GTXClient::SetVariableComment | ( | bool | append,
|  | const char * | comment
| ) |  |

Set a comment for the current variable.

Set or append a comment/description to the current variable

Exceptions

  GTXError |

Parameters

  append | 0 to set a comment 1 to append to an existing one
  comment | Comment to be set or append to the existing one

Remarks:
  Warning: errors concerning a non compatible server are silently ignored.

void GTXClient::SetVariableUnit | ( | const char * | factor,
|  | const char * | symbol
| ) |  |

Change the unit factor and symbol of a variable.

This functions allows to change the unit attached to a variable. If the factor unit is part of the known units list, it changes the variable to a length one. Then we can specify a different symbol to display. If the factor, is not known as a length one, the variable will be float (e.g, not length) and the symbol will not be used.

Exceptions

  GTXError |

Parameters

  factor | new unit factor
  symbol | new unit symbol (used for length or NULL)

See Also
  GTXClient::SetUnit for the list of know units.

double GTXClient::UnitFactorFromSymbol | ( | const char * | symbol | ) |

Get the unit factor corresponding to a given unit symbol.

This function returns the unit factor corresponding to a given unit symbol or 0. if not a known length symbol.

Parameters

  symbol | unit symbol to be searched for

Returns
  unit factor

const char * GTXClient::UnitSymbolFromFactor | ( | double | factor | ) |

Get the unit factor corresponding to a given unit symbol.

This function returns the unit symbol corresponding to a given unit symbol or an empty string if not a known length factor.

Parameters

  factor | unit factor to be searched for

Returns
  unit symbol

Remarks: the returned string is a static string. It doesn't have to be
  fred.

bool GTXClient::VariableExists | ( | const char * | variable | ) |

Check if a given variable exists.

This function asks the server if a given variable exists (or for old servers, it retrieves the list of variables and check it by itself).

Exceptions

  GTXError |

Parameters

  variable | variable name to check

Returns
  false if it does not exists, true if it exists

bool GTXClient::VendorDataExists | ( | const char * | identifier,
|  | int | level
| ) |  |

Checks if a Vendor Data exists.

This function verifies the existence of a Vendor Data

Exceptions

  GTXError |

Returns
  exists false if it does not exists, true if it exists

Parameters

  identifier | Identifier of the Vendor Data
  level | Where to read the Vendor Data 0 for study 1 for directory 2 for file 3 for variable

int GTXClient::VendorDataGetVersion | ( | const char * | identifier,
|  | int | level
| ) |  |

Get version string from a Vendor Data.

This function reads the version string from a stored Vendor Data

Exceptions

  GTXError |

Returns
  Returned Vendor Data version

Parameters

  identifier | Identifier of the Vendor Data
  level | Where to read the Vendor Data 0 for study 1 for directory 2 for file 3 for variable

GTXVendorData GTXClient::VendorDataRead | ( | const char * | identifier,
|  | int | level
| ) |  |

Read a Vendor Data from Isatis file system.

This function reads a Vendor Data from the Isatis file system

Exceptions

  GTXError |

Returns
  Returned Vendor Data

Parameters

  identifier | Identifier of the Vendor Data
  level | Where to read the Vendor Data 0 for study 1 for directory 2 for file 3 for variable

Examples:
  vendor.cpp.

void GTXClient::VendorDataWrite | ( | int | level,
|  | const GTXVendorData & | vdata
| ) |  |

Write a vendor data.

This function writes a vendor data .

Exceptions

  GTXError |

Parameters

  level | Where to write the Vendor Data 0 for study 1 for directory 2 for file 3 for variable
  vdata | The Vendor Data to be written

Examples:
  vendor.cpp.

void GTXClient::WriteCharVariable | ( | bool | compress,
|  | const GTXCharData & | cdata
| ) |  |

Write data to the current alphanumerical variable.

This function writes data to the current alphanumerical variable

Exceptions

  GTXError |

Parameters

  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  cdata | Array of alphanumerical variable samples

Examples:
  write_files.cpp.

void GTXClient::WriteCharVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | bool | compress,
|  | const GTXCharData & | cdata
| ) |  |

Write continuous subpart of data to the current alphanumerical variable.

This function writes a subpart of data to the current alphanumerical variable

Exceptions

  GTXError |

Parameters

  first | Sample Number of the first item to write (from 1 to nsample)
  last | Sample Number of the last item to write (from 1 to nsample)
  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  cdata | Array of alphanumerical variable samples

Remarks:
  Warning: This functions needs a server version >= 6.0.8

void GTXClient::WriteDoubleVariable | ( | bool | compress,
|  | const GTXDoubleData & | ddata
| ) |  |

Write data to the current numerical variable.

This function writes data to the current numerical variable

Exceptions

  GTXError |

Parameters

  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  ddata | Array of numerical variable samples

Remarks:
  All the numerical variables are stored in double precision arrays

If the variable is a length one, data must be in the current unit (GTXClient::SetUnit) if unit_mode is false (GTXClient::SetUnitMode). If the variable is a length one and unit_mode is true, it must be expressed in the variable unit.

Examples:
  write_files.cpp.

void GTXClient::WriteDoubleVariableSub | ( | gtx_long | first,
|  | gtx_long | last,
|  | bool | compress,
|  | const GTXDoubleData & | ddata
| ) |  |

Write continuous subpart of data to the current numerical variable.

This function writes a subpart of data to the current numerical variable

Exceptions

  GTXError |

Parameters

  first | Sample Number of the first item to write (from 1 to nsample)
  last | Sample Number of the last item to write (from 1 to nsample)
  compress | Samples masked by the selection are in the array but ignored if 0, or do not appear in the array if this flag is set to 1
  ddata | Array of numerical variable samples

Remarks:
  All the numerical variables are stored in double precision arrays Warning: This functions needs a server version >= 4.0.7 for 4.0.x series or >= 4.1.1 for 4.1.x series.

Examples:
  write_files.cpp.

void GTXClient::WriteFaults | ( | GTXFaultSystem | fs | ) |

Write fault system to the current file.

Exceptions

  GTXError | This function store a fault system in the current file.

Parameters

  fs | Fault system to be stored in the current file

Examples:
  fault.cpp.

void GTXClient::WriteLineCharVariable | ( | int | line_index,
|  | const GTXCharData & | cdata
| ) |  |

Write line data to the current alphanumerical variable.

This function writes line data to the current alphanumerical variable

Exceptions

  GTXError |

Parameters

  line_index | The line index [1..nline]
  cdata | Array of alphanumerical variable samples

Remarks:
  All the numerical variables are stored in double precision arrays

Examples:
  write_files.cpp.

void GTXClient::WriteLineDoubleVariable | ( | int | line_index,
|  | const GTXDoubleData & | ddata
| ) |  |

Write line data to the current numerical variable.

This function writes line data to the current numerical variable

Exceptions

  GTXError |

Parameters

  line_index | The line index [1..nline]
  ddata | Array of numerical variable samples

Remarks:
  All the numerical variables are stored in double precision arrays

Examples:
  write_files.cpp.

void GTXClient::WriteSelectionVariable | ( | const GTXByteArray | data | ) |

Write selection data (0,1) to the current variable (must be a selection)

This function writes data to the current numerical/selection variable

Exceptions

  GTXError |

Parameters

  data | Array of variable samples (0,1)

Remarks:
  The current selection (which may have been set by GTXClientSetSelection) is ignored while writing the current variable's (which must also be a selection variable) contents. The variable must be have been chosen beforehand by using GTXClientSetVariable.

Examples:
  write_files.cpp.

References GTXByteArray::GetCount(), and GTXByteArray::GetValues().

void GTXClient::WriteSelectionVariableSub | ( | const gtx_long | first,
|  | const gtx_long | last,
|  | const GTXByteArray | data
| ) |  |

Write continuous subpart of selection data (0,1) to the current variable (must be a selection)

This function writes data to the current numerical/selection variable

Exceptions

  GTXError |

Parameters

  first | Sample Number of the first item to write (from 1 to nsample)
  last | Sample Number of the last item to write (from 1 to nsample)
  data | Array of variable samples (0,1)

Remarks:
  The current selection (which may have been set by GTXClientSetSelection) is ignored while writing the current variable's (which must also be a selection variable) contents. The variable must be have been chosen beforehand by using GTXClientSetVariable.

References GTXByteArray::GetCount(), and GTXByteArray::GetValues().

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

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