cee::ug::Situation Class Reference

A situation stores the setup of the unstructgrid model and view. More...

Public Member Functions

 Situation ()
 Creates an empty situation item. More...
 
const PropertySetCollectionpropertyCollection () const
 Returns the collection of properties for this situation. More...
 
void setPropertyCollection (PropertySetCollection *collection)
 Sets the property collection. More...
 
void setName (const Str &name)
 Sets the name of this situation. More...
 
Str name () const
 Returns the situation name. More...
 
void setDescription (const Str &description)
 Sets the situation description. More...
 
Str description () const
 Returns the description. More...
 
void setSourceModelFile (const Str &modelfile)
 Sets the source model file path. More...
 
Str sourceModelFile () const
 Returns the source model file path. More...
 
void setSnapshot (Image *image)
 Sets a snapshot image for this situation. More...
 
const Imagesnapshot () const
 Returns the snapshot image. More...
 
Str date () const
 Returns the date for when this situation item was created. Format: yy:mm:dd:hh:mm. More...
 
std::vector< const DataElementSet * > elementSets () const
 Returns an array of element sets. More...
 
std::vector< SetInfoelementSetInfos () const
 Returns an array of element set info. More...
 
void addElementSetInfo (SetInfo setInfo)
 Adds an element set info to a situation. More...
 
void addElementSet (const DataElementSet *set)
 Adds an element set to a situation. More...
 
size_t userDataCount () const
 Returns the number of user-defined data items. More...
 
Str userData (const Str &name) const
 Returns the value of the given user-defined data key. More...
 
void setUserData (const Str &name, const Str &value)
 Sets the value of a given user-defined data key. More...
 
void setAllUserData (std::map< Str, Str > ud)
 Sets all user data. More...
 
const std::map< Str, Str > * allUserData () const
 Returns all user data. More...
 
void capture (const UnstructGridModel &model, const vis::View &view)
 Captures the situation content from the given model and view. More...
 
void updateModel (UnstructGridModel *model) const
 Updates the given model with this situation. More...
 
void updateView (vis::View *view) const
 Updates the given view with this situation. 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...
 
Inheritance diagram for cee::ug::Situation:
cee::RefCountedObject

Detailed Description

A situation stores the setup of the unstructgrid model and view.

This enables the user to reapply/recreate a specific situation. This can for instance be fringes, vector results, current step, draw style, cutting plane configuration and so on. This enables the user to quickly change between a number of desired setups without having to manually apply all the changed settings.

The situation item is model independent and can be applied to any fitting model.

Situations can be saved/loaded from file using the SituationIo class.

Constructor & Destructor Documentation

cee::ug::Situation::Situation ( )

Creates an empty situation item.

Member Function Documentation

void cee::ug::Situation::addElementSet ( const DataElementSet set)

Adds an element set to a situation.

Number of element sets and element sets info must always be the same!

void cee::ug::Situation::addElementSetInfo ( ug::SetInfo  setInfo)

Adds an element set info to a situation.

Number of element sets and element sets info must always be the same!

const std::map< Str, Str > * cee::ug::Situation::allUserData ( ) const

Returns all user data.

void cee::ug::Situation::capture ( const UnstructGridModel model,
const vis::View view 
)

Captures the situation content from the given model and view.

Str cee::ug::Situation::date ( ) const

Returns the date for when this situation item was created. Format: yy:mm:dd:hh:mm.

Str cee::ug::Situation::description ( ) const

Returns the description.

std::vector< ug::SetInfo > cee::ug::Situation::elementSetInfos ( ) const

Returns an array of element set info.

std::vector< const ug::DataElementSet * > cee::ug::Situation::elementSets ( ) const

Returns an array of element sets.

Str cee::ug::Situation::name ( ) const

Returns the situation name.

const PropertySetCollection * cee::ug::Situation::propertyCollection ( ) const

Returns the collection of properties for this situation.

void cee::ug::Situation::setAllUserData ( std::map< Str, Str ud)

Sets all user data.

void cee::ug::Situation::setDescription ( const Str description)

Sets the situation description.

void cee::ug::Situation::setName ( const Str name)

Sets the name of this situation.

void cee::ug::Situation::setPropertyCollection ( PropertySetCollection collection)

Sets the property collection.

void cee::ug::Situation::setSnapshot ( Image image)

Sets a snapshot image for this situation.

void cee::ug::Situation::setSourceModelFile ( const Str modelfile)

Sets the source model file path.

void cee::ug::Situation::setUserData ( const Str key,
const Str value 
)

Sets the value of a given user-defined data key.

User data consists of an map of key-value pair. Key names must be unique.

const Image * cee::ug::Situation::snapshot ( ) const

Returns the snapshot image.

Str cee::ug::Situation::sourceModelFile ( ) const

Returns the source model file path.

void cee::ug::Situation::updateModel ( UnstructGridModel model) const

Updates the given model with this situation.

void cee::ug::Situation::updateView ( vis::View view) const

Updates the given view with this situation.

Str cee::ug::Situation::userData ( const Str name) const

Returns the value of the given user-defined data key.

size_t cee::ug::Situation::userDataCount ( ) const

Returns the number of user-defined data items.