Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
UserDataList.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* UserDataList.h (C) 2000-2018 */
9/* */
10/* Manages a list of user data. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_USERDATALIST_H
13#define ARCANE_UTILS_USERDATALIST_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/IUserDataList.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class IUserData;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33/*!
34 * \brief Manages a list of user data.
35 * \ingroup Core
36 */
37class ARCANE_UTILS_EXPORT UserDataList
38: public IUserDataList
39{
40 public:
41
42 class Impl;
43
44 public:
45
46 UserDataList();
47 //! Frees resources
48 ~UserDataList();
49
50 public:
51
52 virtual void setData(const String& name, IUserData* ud);
53 virtual IUserData* data(const String& name, bool allow_null = false) const;
54 virtual void removeData(const String& name, bool allow_null = false);
55 virtual void clear();
56
57 private:
58
59 Impl* m_p;
60};
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65} // namespace Arcane
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
69
70#endif
Interface of a list that manages user data.
Interface for user data attached to another object.
Definition IUserData.h:33
virtual void clear()
Removes all user data.
virtual void removeData(const String &name, bool allow_null=false)
Removes the data associated with the name name.
virtual IUserData * data(const String &name, bool allow_null=false) const
Data associated with name.
virtual void setData(const String &name, IUserData *ud)
Sets the user data associated with the name name.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --