# cee::ug::Situation

class `Situation` : public RefCountedObject

  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.

  Public Functions

  `Situation`()

    Creates an empty situation item.

  const PropertySetCollection *`propertyCollection`() const

    Returns the collection of properties for this situation.

  void `setPropertyCollection`(PropertySetCollection *collection)

    Sets the property collection.

  void `setName`(const Str &name)

    Sets the name of this situation.

  Str `name`() const

    Returns the situation name.

  void `setDescription`(const Str &description)

    Sets the situation description.

  Str `description`() const

    Returns the description.

  void `setSourceModelFile`(const Str &modelfile)

    Sets the source model file path.

  Str `sourceModelFile`() const

    Returns the source model file path.

  void `setSnapshot`(Image *image)

    Sets a snapshot image for this situation.

  const Image *`snapshot`() const

    Returns the snapshot image.

  Str `date`() const

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

  size_t `elementSetCount`() const

    Returns the number of element sets.

  const DataElementSet *`elementSet`(size_t setIndex) const

    Returns the element set at the given index.

  SetInfo `elementSetInfo`(size_t setIndex) const

    Returns element set info at the specified index.

  void `addElementSet`(const DataElementSet *elementSet, SetInfo setInfo)

    Adds an element set to a situation.

  size_t `userDataCount`() const

    Returns the number of user-defined data items.

  Str `userData`(const Str &key) const

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

  void `setUserData`(const Str &key, const Str &value)

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

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

  std::vector<Str> `allUserDataKeys`() const

    Returns all the user data keys.

  void `capture`(const UnstructGridModel &model, const vis::View &view)

    Captures the situation content from the given model and view.

  void `updateModel`(UnstructGridModel *model) const

    Updates the given model with this situation.

  void `updateView`(vis::View *view) const

    Updates the given view with this situation.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...