Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ISimpleTableInternalMng.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/* ISimpleTableInternalMng.h (C) 2000-2025 */
9/* */
10/* Interface representing a manager for SimpleTableInternal. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ISIMPLETABLEINTERNALMNG_H
13#define ARCANE_CORE_ISIMPLETABLEINTERNALMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Array.h"
18#include "arcane/utils/Array2.h"
19
20#include "arcane/core/SimpleTableInternal.h"
21#include "arcane/core/ISubDomain.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
61class ARCANE_CORE_EXPORT ISimpleTableInternalMng
62{
63 public:
64
65 virtual ~ISimpleTableInternalMng() = default;
66
67 public:
68
69 /*---------------------------------------------------------------------------*/
70 /*---------------------------------------------------------------------------*/
71
76 virtual void clearInternal() = 0;
77
78 /*---------------------------------------------------------------------------*/
79 /*---------------------------------------------------------------------------*/
80
88 virtual Integer addRow(const String& row_name) = 0;
89
102 virtual Integer addRow(const String& row_name, ConstArrayView<Real> elements) = 0;
103
111 virtual bool addRows(StringConstArrayView rows_names) = 0;
112
113 /*---------------------------------------------------------------------------*/
114 /*---------------------------------------------------------------------------*/
115
123 virtual Integer addColumn(const String& column_name) = 0;
124
137 virtual Integer addColumn(const String& column_name, ConstArrayView<Real> elements) = 0;
138
146 virtual bool addColumns(StringConstArrayView columns_names) = 0;
147
148 /*---------------------------------------------------------------------------*/
149 /*---------------------------------------------------------------------------*/
150
159 virtual bool addElementInRow(Integer position, Real element) = 0;
160
171 virtual bool addElementInRow(const String& row_name, Real element, bool create_if_not_exist = true) = 0;
172
186
187 /*---------------------------------------------------------------------------*/
188 /*---------------------------------------------------------------------------*/
189
202 virtual bool addElementsInRow(Integer position, ConstArrayView<Real> elements) = 0;
203
218 virtual bool addElementsInRow(const String& row_name, ConstArrayView<Real> elements, bool create_if_not_exist = true) = 0;
219
236 virtual bool addElementsInSameRow(ConstArrayView<Real> elements) = 0;
237
238 /*---------------------------------------------------------------------------*/
239 /*---------------------------------------------------------------------------*/
240
249 virtual bool addElementInColumn(Integer position, Real element) = 0;
250
261 virtual bool addElementInColumn(const String& column_name, Real element, bool create_if_not_exist = true) = 0;
262
275
276 /*---------------------------------------------------------------------------*/
277 /*---------------------------------------------------------------------------*/
278
291 virtual bool addElementsInColumn(Integer position, ConstArrayView<Real> elements) = 0;
292
307 virtual bool addElementsInColumn(const String& column_name, ConstArrayView<Real> elements, bool create_if_not_exist = true) = 0;
308
326
327 /*---------------------------------------------------------------------------*/
328 /*---------------------------------------------------------------------------*/
329
342 virtual bool editElementUp(Real element, bool update_last_position = true) = 0;
343
360 virtual bool editElementDown(Real element, bool update_last_position = true) = 0;
361
374 virtual bool editElementLeft(Real element, bool update_last_position = true) = 0;
375
392 virtual bool editElementRight(Real element, bool update_last_position = true) = 0;
393
394 /*---------------------------------------------------------------------------*/
395 /*---------------------------------------------------------------------------*/
396
407 virtual Real elementUp(bool update_last_position = false) = 0;
408
419 virtual Real elementDown(bool update_last_position = false) = 0;
420
431 virtual Real elementLeft(bool update_last_position = false) = 0;
432
443 virtual Real elementRight(bool update_last_position = false) = 0;
444
445 /*---------------------------------------------------------------------------*/
446 /*---------------------------------------------------------------------------*/
447
461 virtual bool editElement(Real element) = 0;
462
472 virtual bool editElement(Integer position_x, Integer position_y, Real element) = 0;
473
483 virtual bool editElement(const String& column_name, const String& row_name, Real element) = 0;
484
485 /*---------------------------------------------------------------------------*/
486 /*---------------------------------------------------------------------------*/
487
495 virtual Real element() = 0;
496
505 virtual Real element(Integer position_x, Integer position_y, bool update_last_position = false) = 0;
506
515 virtual Real element(const String& column_name, const String& row_name, bool update_last_position = false) = 0;
516
517 /*---------------------------------------------------------------------------*/
518 /*---------------------------------------------------------------------------*/
519
526 virtual RealUniqueArray row(Integer position) = 0;
527
534 virtual RealUniqueArray row(const String& row_name) = 0;
535
542 virtual RealUniqueArray column(Integer position) = 0;
543
550 virtual RealUniqueArray column(const String& column_name) = 0;
551
552 /*---------------------------------------------------------------------------*/
553 /*---------------------------------------------------------------------------*/
554
562 virtual Integer rowSize(Integer position) = 0;
563
571 virtual Integer rowSize(const String& row_name) = 0;
572
580 virtual Integer columnSize(Integer position) = 0;
581
589 virtual Integer columnSize(const String& column_name) = 0;
590
591 /*---------------------------------------------------------------------------*/
592 /*---------------------------------------------------------------------------*/
593
600 virtual Integer rowPosition(const String& row_name) = 0;
601
608 virtual Integer columnPosition(const String& column_name) = 0;
609
610 /*---------------------------------------------------------------------------*/
611 /*---------------------------------------------------------------------------*/
612
619 virtual Integer numberOfRows() = 0;
620
628
629 /*---------------------------------------------------------------------------*/
630 /*---------------------------------------------------------------------------*/
631
640 virtual String rowName(Integer position) = 0;
641
650 virtual String columnName(Integer position) = 0;
651
652 /*---------------------------------------------------------------------------*/
653 /*---------------------------------------------------------------------------*/
654
663 virtual bool editRowName(Integer position, const String& new_name) = 0;
664
673 virtual bool editRowName(const String& row_name, const String& new_name) = 0;
674
683 virtual bool editColumnName(Integer position, const String& new_name) = 0;
684
693 virtual bool editColumnName(const String& column_name, const String& new_name) = 0;
694
695 /*---------------------------------------------------------------------------*/
696 /*---------------------------------------------------------------------------*/
697
705 virtual Integer addAverageColumn(const String& column_name) = 0;
706
714
721 virtual void setInternal(const Ref<SimpleTableInternal>& simple_table_internal) = 0;
722};
723
724/*---------------------------------------------------------------------------*/
725/*---------------------------------------------------------------------------*/
726
727} // End namespace Arcane
728
729/*---------------------------------------------------------------------------*/
730/*---------------------------------------------------------------------------*/
731
732#endif
Declarations of types on entities.
Constant view of an array of type T.
Class interface representing a manager for SimpleTableInternal (aka STI).
virtual bool editElementRight(Real element, bool update_last_position=true)=0
Method allowing editing an element to the right of the last element recently manipulated (same row/co...
virtual Integer rowSize(const String &row_name)=0
Method allowing retrieval of the size of a row. Including hypothetical 'gaps' in the row.
virtual bool addElementsInRow(Integer position, ConstArrayView< Real > elements)=0
Method to add multiple elements to a row.
virtual Integer columnSize(Integer position)=0
Method allowing retrieval of the size of a column. Including hypothetical 'gaps' in the column.
virtual bool editElement(Real element)=0
Method allowing modification of an element in the table.
virtual RealUniqueArray column(Integer position)=0
Method allowing retrieval of a copy of a column.
virtual bool addColumns(StringConstArrayView columns_names)=0
Method to add multiple columns.
virtual bool addElementInColumn(const String &column_name, Real element, bool create_if_not_exist=true)=0
Method to add an element to a column.
virtual Integer addAverageColumn(const String &column_name)=0
Method allowing creation of a column containing the average of elements of each row.
virtual Integer numberOfRows()=0
Method allowing retrieval of the number of rows in the table. This is, in a sense,...
virtual bool editElement(Integer position_x, Integer position_y, Real element)=0
Method allowing modification of an element in the table.
virtual bool editElementUp(Real element, bool update_last_position=true)=0
Method to edit an element above the last element most recently manipulated (row above/same column).
virtual bool editElementLeft(Real element, bool update_last_position=true)=0
Method to edit an element to the left of the last element most recently manipulated (same row/column ...
virtual Integer addColumn(const String &column_name)=0
Method to add a column.
virtual bool editColumnName(Integer position, const String &new_name)=0
Method allowing changing the name of a column.
virtual RealUniqueArray row(const String &row_name)=0
Method allowing retrieval of a copy of a row.
virtual bool addElementInRow(Integer position, Real element)=0
Method to add an element to a row.
virtual Integer rowPosition(const String &row_name)=0
Method allowing retrieval of the position of a row.
virtual Real element()=0
Method allowing retrieval of a copy of an element.
virtual Real elementRight(bool update_last_position=false)=0
Method allowing retrieval of an element to the right of the last element recently manipulated (same r...
virtual String columnName(Integer position)=0
Method allowing retrieval of the name of a column from its position.
virtual Real elementUp(bool update_last_position=false)=0
Method allowing retrieval of an element above the last element recently manipulated (row above/same c...
virtual bool addElementsInRow(const String &row_name, ConstArrayView< Real > elements, bool create_if_not_exist=true)=0
Method to add multiple elements to a row.
virtual bool addElementsInSameRow(ConstArrayView< Real > elements)=0
Method to add multiple elements to the row most recently manipulated.
virtual bool editRowName(const String &row_name, const String &new_name)=0
Method allowing changing the name of a row.
virtual Integer rowSize(Integer position)=0
Method allowing retrieval of the size of a row. Including hypothetical 'gaps' in the row.
virtual Integer addRow(const String &row_name)=0
Method to add a row.
virtual RealUniqueArray row(Integer position)=0
Method allowing retrieval of a copy of a row.
virtual Real elementLeft(bool update_last_position=false)=0
Method allowing retrieval of an element to the left of the last element recently manipulated (same ro...
virtual String rowName(Integer position)=0
Method allowing retrieval of the name of a row from its position.
virtual bool addRows(StringConstArrayView rows_names)=0
Method to add multiple rows.
virtual Integer addRow(const String &row_name, ConstArrayView< Real > elements)=0
Method to add a row.
virtual Real elementDown(bool update_last_position=false)=0
Method allowing retrieval of an element below the last element recently manipulated (row below/same c...
virtual RealUniqueArray column(const String &column_name)=0
Method allowing retrieval of a copy of a column.
virtual bool addElementInSameColumn(Real element)=0
Method to add an element to the column most recently manipulated.
virtual bool editColumnName(const String &column_name, const String &new_name)=0
Method allowing changing the name of a column.
virtual void setInternal(const Ref< SimpleTableInternal > &simple_table_internal)=0
Method allowing setting a reference to a SimpleTableInternal.
virtual bool addElementInSameRow(Real element)=0
Method to add an element to the row most recently manipulated.
virtual Real element(Integer position_x, Integer position_y, bool update_last_position=false)=0
Method allowing retrieval of a copy of an element.
virtual Integer numberOfColumns()=0
Method allowing retrieval of the number of columns in the table. This is, in a sense,...
virtual bool addElementsInSameColumn(ConstArrayView< Real > elements)=0
Method to add multiple elements to the column most recently manipulated.
virtual bool editRowName(Integer position, const String &new_name)=0
Method allowing changing the name of a row.
virtual Ref< SimpleTableInternal > internal()=0
Method allowing retrieval of a reference to the object SimpleTableInternal used.
virtual bool editElement(const String &column_name, const String &row_name, Real element)=0
Method allowing modification of an element in the table.
virtual bool addElementsInColumn(Integer position, ConstArrayView< Real > elements)=0
Method to add multiple elements to a column.
virtual Real element(const String &column_name, const String &row_name, bool update_last_position=false)=0
Method allowing retrieval of a copy of an element.
virtual bool editElementDown(Real element, bool update_last_position=true)=0
Method to edit an element below the last element most recently manipulated (row below/same column).
virtual Integer columnPosition(const String &column_name)=0
Method allowing retrieval of the position of a column.
virtual bool addElementInRow(const String &row_name, Real element, bool create_if_not_exist=true)=0
Method to add an element to a row.
virtual Integer addColumn(const String &column_name, ConstArrayView< Real > elements)=0
Method to add a column.
virtual bool addElementsInColumn(const String &column_name, ConstArrayView< Real > elements, bool create_if_not_exist=true)=0
Method to add multiple elements to a column.
virtual bool addElementInColumn(Integer position, Real element)=0
Method to add an element to a column.
virtual Integer columnSize(const String &column_name)=0
Method allowing retrieval of the size of a column. Including hypothetical 'gaps' in the column.
virtual void clearInternal()=0
Method to clear the content of the SimpleTableInternal.
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< String > StringConstArrayView
C equivalent of a 1D array of strings.
Definition UtilsTypes.h:492
Int32 Integer
Type representing an integer.
UniqueArray< Real > RealUniqueArray
Dynamic 1D array of reals.
Definition UtilsTypes.h:349
double Real
Type representing a real number.