cee::app::Models Class Reference

Class to manage the list of UnstructGridModel instances in the application. More...

Public Member Functions

size_t count () const
 Returns the number of models. More...
 
cee::ug::UnstructGridModelcurrent () const
 Returns the current model. More...
 
cee::ug::SimulationInfo currentInfo () const
 Returns the current model info. More...
 
void setCurrent (cee::ug::UnstructGridModel *model)
 Sets the model as current. More...
 
size_t currentIndex () const
 Returns the index of the current model. More...
 
void setCurrentIndex (size_t index)
 Sets the current model index. More...
 
size_t indexOf (const cee::ug::UnstructGridModel *model) const
 Returns the index of the specified model. More...
 
cee::ug::UnstructGridModelget (size_t index) const
 Returns the model at given index. More...
 
cee::ug::SimulationInfo info (size_t index) const
 Returns the model info at the specified index. More...
 
cee::ug::SimulationInfo info (const cee::ug::UnstructGridModel *model) const
 Returns the model info for the specified model. More...
 
size_t add (cee::ug::UnstructGridModel *model)
 Adds the given model and returns its index. More...
 
cee::ug::UnstructGridModelopen (const cee::Str &filename, cee::ug::Error *error)
 Creates a model from the given file and adds it to the collection, returning the created model. More...
 
cee::ug::UnstructGridModelopen (const cee::Str &filename, const cee::Str &password, cee::ug::Error *error)
 Creates a model from the given file and adds it to the collection, returning the created model. More...
 
cee::ug::UnstructGridModelopen (const std::vector< cee::Str > &filenameArr, cee::ug::Error *error)
 Creates a model from the given set of files and adds it to the collection, returning the created model. More...
 
cee::ug::UnstructGridModelopen (const std::vector< cee::Str > &filenameArr, const cee::Str &password, cee::ug::Error *error)
 Creates a model from the given set of files and adds it to the collection, returning the created model. More...
 
bool reopen (cee::ug::UnstructGridModel *model, const cee::Str &filename, cee::ug::Error *error)
 Reopens specified model using the specified filename. More...
 
bool reopen (size_t index, const cee::Str &filename, cee::ug::Error *error)
 Reopens the model at the given index using the specified filename. More...
 
bool openSecondary (const cee::Str &filename, cee::ug::Error *error)
 Adds the given secondary file to the current model. More...
 
void close (size_t index)
 Closes the model at the specified index. More...
 
void close (cee::ug::UnstructGridModel *model)
 Closes the specified model. More...
 
bool closeCurrent ()
 Closes current model. More...
 
void closeAll ()
 Closes all model. More...
 
- Public Member Functions inherited from cee::RefCountedObject
void addRef () const
 Increments the reference count for this object. More...
 
void release () const
 Decrements the reference count for this object. More...
 
int refCount () const
 Returns the reference count for this object. More...
 
void setRefCountZero () const
 Sets the ref count to zero, but DOES NOT delete the object. More...
 

Static Public Member Functions

static Modelsinstance ()
 Models is a singleton. Always access Models using this instance() More...
 
Inheritance diagram for cee::app::Models:
cee::RefCountedObject

Detailed Description

Class to manage the list of UnstructGridModel instances in the application.

The interface provides methods adapted to a unique mode view for single-view applications

Member Function Documentation

size_t cee::app::Models::add ( cee::ug::UnstructGridModel model)

Adds the given model and returns its index.

void cee::app::Models::close ( size_t  index)

Closes the model at the specified index.

void cee::app::Models::close ( cee::ug::UnstructGridModel model)

Closes the specified model.

void cee::app::Models::closeAll ( )

Closes all model.

bool cee::app::Models::closeCurrent ( )

Closes current model.

size_t cee::app::Models::count ( ) const

Returns the number of models.

UnstructGridModel * cee::app::Models::current ( ) const

Returns the current model.

size_t cee::app::Models::currentIndex ( ) const

Returns the index of the current model.

cee::ug::SimulationInfo cee::app::Models::currentInfo ( ) const

Returns the current model info.

UnstructGridModel * cee::app::Models::get ( size_t  index) const

Returns the model at given index.

size_t cee::app::Models::indexOf ( const cee::ug::UnstructGridModel model) const

Returns the index of the specified model.

cee::ug::SimulationInfo cee::app::Models::info ( size_t  index) const

Returns the model info at the specified index.

cee::ug::SimulationInfo cee::app::Models::info ( const cee::ug::UnstructGridModel model) const

Returns the model info for the specified model.

Models * cee::app::Models::instance ( )
static

Models is a singleton. Always access Models using this instance()

cee::ug::UnstructGridModel * cee::app::Models::open ( const cee::Str filename,
cee::ug::Error error 
)

Creates a model from the given file and adds it to the collection, returning the created model.

cee::ug::UnstructGridModel * cee::app::Models::open ( const cee::Str filename,
const cee::Str password,
cee::ug::Error error 
)

Creates a model from the given file and adds it to the collection, returning the created model.

cee::ug::UnstructGridModel * cee::app::Models::open ( const std::vector< cee::Str > &  filenameArr,
cee::ug::Error error 
)

Creates a model from the given set of files and adds it to the collection, returning the created model.

cee::ug::UnstructGridModel * cee::app::Models::open ( const std::vector< cee::Str > &  filenameArr,
const cee::Str password,
cee::ug::Error error 
)

Creates a model from the given set of files and adds it to the collection, returning the created model.

bool cee::app::Models::openSecondary ( const cee::Str filename,
cee::ug::Error error 
)

Adds the given secondary file to the current model.

bool cee::app::Models::reopen ( cee::ug::UnstructGridModel model,
const cee::Str filename,
cee::ug::Error error 
)

Reopens specified model using the specified filename.

bool cee::app::Models::reopen ( size_t  index,
const cee::Str filename,
cee::ug::Error error 
)

Reopens the model at the given index using the specified filename.

void cee::app::Models::setCurrent ( cee::ug::UnstructGridModel model)

Sets the model as current.

void cee::app::Models::setCurrentIndex ( size_t  index)

Sets the current model index.