cee::imp::cae::DataSourceCae

class DataSourceCae : public DataSourceInterface

The data source interface for commercial CAE file formats.

The DataSourceCae is a subclass of DataSource. See DataSource on general functionality such as how to get states and metadata directory.

Public Types

enum PollChangeResult

Poll change results description.

Values:

enumerator NONE

None.

enumerator RESULT_MODIFIED

Result has been modified.

enumerator GEOMETRY_MODIFIED

Geometry has been modified.

enumerator META_DATA_CHANGED

Metadata has been modified.

enumerator TRANSFORMATIONS_MODIFIED

Transformations has been modified.

typedef int PollChangeResults

Poll change results.

Public Functions

DataSourceCae(int dataSourceId)

Creates a data source with specified unique id.

virtual bool open(const Str &fileName, cee::ug::Error *error = NULL)

Opens the data source from the specified file name.

Note regarding Abaqus ODB files

The Abaqus ODB reader can only read the latest version of Abaqus. If an old file is opened the following will happen.

  1. The file will be converted. The new filename will be: {old_file_name_base}_upg.odb.

  2. The converted file will be opened.

  3. A warning about this conversion will be added to the Logger.

  4. Open will return true if opening the converted file is successful, but error will be set to cee::ug::Error::ERR_FILE_INVALID_FORMAT. This can be trapped by the app and used to inform the user. See the DemoApp example for an example on how to do this.

virtual bool open(const std::vector<Str> &fileNameArr, cee::ug::Error *error = NULL)

Opens the data source from the specified array of file names.

This is useful for e.g. Fluent which has to open .cas for mesh and .dat for results.

Note regarding Abaqus ODB files

The Abaqus ODB reader can only read the latest version of Abaqus. If an old file is opened the following will happen.

  1. The file will be converted. The new filename will be: {old_file_name_base}_upg.odb.

  2. The converted file will be opened.

  3. A warning about this conversion will be added to the Logger.

  4. Open will return true if opening the converted file is successful, but error will be set to cee::ug::Error::ERR_FILE_INVALID_FORMAT. This can be trapped by the app and used to inform the user. See the DemoApp example for an example on how to do this.

virtual bool openSecondary(const Str &fileName, cee::ug::Error *error = NULL)

Opens the a secondary file and append to this data source.

virtual void close()

Closes the data source.

bool isSupported(const Str &fileName) const

Returns true if the specified file is of a supported interface format.

PollChangeResults pollForChanges()

Polls the reader for changes.

If you are using a data provider, this will end up calling pollForChanges() on the data provider and preform any updates flaged by the data provider.

bool executeRequest(const Str &message, const Str &data, Str *response, PollChangeResults *changeResults)

Send a request to the reader.

If using a data provider, this will call the handleClientRequest() method in the data provider and return the response.

If any changes to the data have been done the changes will be communicated in the changeResults variable in the similar fasion as with pollForChanges().

void enableResultCaching(bool enable)

Enables caching of results: when on, read results will be kept in memory for future use.

void clearCachedResults()

Releases memory used by result caching.

Str vdmVersion() const

Returns the version of VdmTools used for file interfaces towards CAE models.

Public Static Functions

static ReaderSettings &readerSettings()

Gets the reader settings to customize reader behavior.

static std::vector<ReaderInfo> supportedFormats()

Returns a list of supported file interface formats.

static bool supportsDataProviderPlugins()

Gets if data provider plugins are supported or not.

static bool loadDataProviderPlugin(const Str &baseFileName)

Loads data provider plugin.

static std::vector<cee::Str> loadDataProviderPluginsFromWildcard(const Str &wildcardString)

Loads all data provider plugins matching the wildcard.

The wildcard string must include extension to look for, e.g.: /Users/nn/DP/cdp_*.so

Returns a list of full filename for all providers loaded