Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Transition to version 2.0

When transitioning to version 2.0, it is planned to permanently remove certain classes that have been obsolete for several years and to slightly modify the behavior of other classes.

The following table lists the classes that will be removed and how to replace them.

ConstCStringTo be replaced by the String class
CStringTo be replaced by the String class
CStringAllocTo be replaced by the String class
CStringBufTTo be replaced by the String class
OCStringStreamTo be replaced by the OStringStream class
CArrayTTo be replaced by the UniqueArray class
BufferTTo be replaced by the UniqueArray class
CArrayBaseTTo be replaced by the ArrayView class
ConstCArrayTTo be replaced by the ConstArrayView class
CArray2TTo be replaced by the UniqueArray2 or UniqueMultiArray2 class
CArray2BaseTTo be replaced by the Array2View or MultiArray2View class
CArrayBuilderTTo be replaced by SharedArray
MutableArrayTo be replaced by SharedArray
ConstArrayTo be replaced by SharedArray

Version 2.0 also includes the following changes:

  • The String class becomes immutable. Operators allowing modification of the instance, such as String::operator+=(), are removed.
  • The Array and Array2 classes have been modified to prohibit copies. Indeed, the default behavior, which had a reference semantics, was not explicit and could mislead people accustomed to standard STL classes such as std::vector. Therefore, you must now use SharedArray or UniqueArray instead of Array if you wish to be able to copy the array. The SharedArray class uses reference semantics and the UniqueArray class uses value semantics. Both these classes derive from Array and can therefore be used when you need to pass a mutable array. For more information, the page Arrays describes the use of array-managing classes in Arcane.
  • Following the prohibition of copies for Array and Array2, methods that used an Array or Array2 as an argument now use an Array& or Array2&.