Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::UserDataList Class Reference

Manages a list of user data. More...

#include <arcane/utils/UserDataList.h>

Classes

class  Impl

Public Member Functions

 ~UserDataList ()
 Frees resources.
virtual void setData (const String &name, IUserData *ud)
 Sets the user data associated with the name name.
virtual IUserDatadata (const String &name, bool allow_null=false) const
 Data associated with name.
virtual void removeData (const String &name, bool allow_null=false)
 Removes the data associated with the name name.
virtual void clear ()
 Removes all user data.
Public Member Functions inherited from Arcane::IUserDataList
virtual ~IUserDataList ()
 Frees resources.

Detailed Description

Manages a list of user data.

Definition at line 37 of file UserDataList.h.

Constructor & Destructor Documentation

◆ UserDataList()

Arcane::UserDataList::UserDataList ( )

Definition at line 44 of file UserDataList.cc.

◆ ~UserDataList()

Arcane::UserDataList::~UserDataList ( )

Frees resources.

Definition at line 53 of file UserDataList.cc.

References clear().

Member Function Documentation

◆ clear()

void Arcane::UserDataList::clear ( )
virtual

Removes all user data.

This is equivalent to calling removeData() for all user data.

Implements Arcane::IUserDataList.

Definition at line 63 of file UserDataList.cc.

Referenced by ~UserDataList().

◆ data()

IUserData * Arcane::UserDataList::data ( const String & name,
bool allow_null = false ) const
virtual

Data associated with name.

An exception is thrown if allow_null is false and no data is associated with name. If allow_null is true and no data is associated, a null pointer is returned.

Implements Arcane::IUserDataList.

Definition at line 89 of file UserDataList.cc.

◆ removeData()

void Arcane::UserDataList::removeData ( const String & name,
bool allow_null = false )
virtual

Removes the data associated with the name name.

An exception is thrown if allow_null is false and no data is associated with name.

Implements Arcane::IUserDataList.

Definition at line 104 of file UserDataList.cc.

References Arcane::IUserData::notifyDetach().

◆ setData()

void Arcane::UserDataList::setData ( const String & name,
IUserData * ud )
virtual

Sets the user data associated with the name name.

No data should already be associated with name, otherwise an exception is thrown.

Implements Arcane::IUserDataList.

Definition at line 76 of file UserDataList.cc.

References Arcane::IUserData::notifyAttach().


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