Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IPropertyMng.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/* IPropertyMng.h (C) 2000-2025 */
9/* */
10/* Interface of the property manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPROPERTYMNG_H
13#define ARCANE_CORE_IPROPERTYMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class Properties;
29class PropertiesImpl;
30class IObservable;
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35/*!
36 * \brief Interface of the property manager.
37 */
39{
40 public:
41
42 virtual ~IPropertyMng() {} //!< Frees the resources.
43
44 public:
45
46 virtual ITraceMng* traceMng() const = 0;
47
48 public:
49
50 /*!
51 * \internal
52 * \brief Retrieves the list of properties by full name \a full_name.
53 *
54 * This method must only be called by the Properties class.
55 * To retrieve an instance, the Properties constructor must be used.
56 */
57 virtual PropertiesImpl* getPropertiesImpl(const String& full_name) = 0;
58
59 /*!
60 * \internal
61 * \brief Registers the properties referenced by \a p.
62 */
63 virtual void registerProperties(const Properties& p) = 0;
64
65 //! Deletes the properties referenced by \a p
66 virtual void destroyProperties(const Properties& p) = 0;
67
68 //! Performs serialization
69 virtual void serialize(ISerializer* serializer) = 0;
70
71 //! Serializes property information into \a bytes.
72 virtual void writeTo(ByteArray& bytes) = 0;
73
74 /*!
75 * \brief Reads the serialized information contained in \a bytes.
76 *
77 * The \a bytes array must have been created by a call to writeTo().
78 */
79 virtual void readFrom(Span<const Byte> bytes) = 0;
80
81 //! Prints the properties and their values to the stream \a o
82 virtual void print(std::ostream& o) const = 0;
83
84 /*!
85 * \brief Observable for writing.
86 *
87 * The observers registered in this observable are called
88 * at the beginning of writeTo().
89 */
91
92 /*!
93 * \brief Observable for reading.
94 *
95 * The observers registered in this observable are called
96 * at the end of readFrom().
97 */
99};
100
101/*---------------------------------------------------------------------------*/
102/*---------------------------------------------------------------------------*/
103
104} // End namespace Arcane
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109#endif
Declarations of Arcane's general types.
Interface of the property manager.
virtual ~IPropertyMng()
Frees the resources.
virtual void serialize(ISerializer *serializer)=0
Performs serialization.
virtual void print(std::ostream &o) const =0
Prints the properties and their values to the stream o.
virtual IObservable * writeObservable()=0
Observable for writing.
virtual void readFrom(Span< const Byte > bytes)=0
Reads the serialized information contained in bytes.
virtual IObservable * readObservable()=0
Observable for reading.
virtual void destroyProperties(const Properties &p)=0
Deletes the properties referenced by p.
virtual void writeTo(ByteArray &bytes)=0
Serializes property information into bytes.
List of properties.
Definition Properties.h:65
View of an array of elements of type T.
Definition Span.h:635
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
Definition UtilsTypes.h:121