Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Convert Namespace Reference

Functions to convert one type to another. More...

Classes

class  Type
 Template class for converting a type. More...
class  ScalarType
class  Type< Int64 >
 Specialization for scalar types. More...
class  Type< Int32 >
class  Type< Real >

Functions

String toHexaString (ByteConstArrayView input)
 Converts a byte array to its hexadecimal representation.
String toHexaString (Span< const std::byte > input)
 Converts a byte array to its hexadecimal representation.
String toHexaString (Real input)
 Converts a real number to its hexadecimal representation.
void toHexaString (Int64 input, Span< Byte > output)
 Converts a 64-bit integer to its hexadecimal representation.
double toDouble (Real r)
 Converts a Real to double.
Integer toInteger (Real r)
 Converts a Real to Integer.
Int64 toInt64 (Real r)
 Converts a Real to Int64.
Int32 toInt32 (Real r)
 Converts a Real to Int32.
bool toBool (Real r)
 Converts a Real to Integer.
Real toReal (Real r)
 Converts r to a Real.
Real toReal (int r)
 Converts r to a Real.
Real toReal (unsigned int r)
 Converts r to a Real.
Real toReal (long r)
 Converts r to a Real.
Real toReal (unsigned long r)
 Converts r to a Real.
Real toReal (long long r)
 Converts r to a Real.
Real toReal (unsigned long long r)
 Converts r to a Real.

Detailed Description

Functions to convert one type to another.

Function Documentation

◆ toBool()

bool Arcane::Convert::toBool ( Real r)
inline

Converts a Real to Integer.

Definition at line 115 of file arccore/src/base/arccore/base/Convert.h.

References toDouble().

Here is the call graph for this function:

◆ toDouble()

double Arcane::Convert::toDouble ( Real r)
inline

◆ toHexaString() [1/4]

String Arcane::Convert::toHexaString ( ByteConstArrayView input)
extern

Converts a byte array to its hexadecimal representation.

Each byte of input is converted into two hexadecimal characters, belonging to [0-9a-f].

Definition at line 71 of file arcane/src/arcane/utils/Convert.cc.

References Arcane::asBytes().

Referenced by Arcane::VariableIOReaderMng::_checkHashFunction(), Arcane::MetisGraphDigest::_digestString(), Arcane::MeshUtils::checkUniqueIdsHashCollective(), Arcane::VariablePrivate::computeComparisonHashCollective(), and toHexaString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toHexaString() [2/4]

void Arcane::Convert::toHexaString ( Int64 input,
Span< Byte > output )
extern

Converts a 64-bit integer to its hexadecimal representation.

Each byte of input is converted into two hexadecimal characters, belonging to [0-9a-f]. The output array must have at least 16 elements.

Definition at line 80 of file arcane/src/arcane/utils/Convert.cc.

◆ toHexaString() [3/4]

String Arcane::Convert::toHexaString ( Real input)
extern

Converts a real number to its hexadecimal representation.

Each byte of input is converted into two hexadecimal characters, belonging to [0-9a-f].

Definition at line 94 of file arcane/src/arcane/utils/Convert.cc.

References toHexaString().

Here is the call graph for this function:

◆ toHexaString() [4/4]

String Arcane::Convert::toHexaString ( Span< const std::byte > input)
extern

Converts a byte array to its hexadecimal representation.

Each byte of input is converted into two hexadecimal characters, belonging to [0-9a-f].

Definition at line 62 of file arcane/src/arcane/utils/Convert.cc.

◆ toInt32()

Int32 Arcane::Convert::toInt32 ( Real r)
inline

Converts a Real to Int32.

Definition at line 105 of file arccore/src/base/arccore/base/Convert.h.

References toDouble().

Referenced by Arcane::CartesianMeshImpl::reduceNbGhostLayers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toInt64()

Int64 Arcane::Convert::toInt64 ( Real r)
inline

Converts a Real to Int64.

Definition at line 95 of file arccore/src/base/arccore/base/Convert.h.

References toDouble().

Referenced by Arcane::Parallel::Stat::print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toInteger()

Integer Arcane::Convert::toInteger ( Real r)
inline

Converts a Real to Integer.

Definition at line 85 of file arccore/src/base/arccore/base/Convert.h.

References toDouble().

Referenced by Arcane::MetisMeshPartitioner::_partitionMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toReal() [1/7]

Real Arcane::Convert::toReal ( int r)
inline

Converts r to a Real.

Definition at line 129 of file arccore/src/base/arccore/base/Convert.h.

◆ toReal() [2/7]

Real Arcane::Convert::toReal ( long long r)
inline

Converts r to a Real.

Definition at line 157 of file arccore/src/base/arccore/base/Convert.h.

◆ toReal() [3/7]

Real Arcane::Convert::toReal ( long r)
inline

Converts r to a Real.

Definition at line 143 of file arccore/src/base/arccore/base/Convert.h.

◆ toReal() [4/7]

Real Arcane::Convert::toReal ( Real r)
inline

Converts r to a Real.

Definition at line 122 of file arccore/src/base/arccore/base/Convert.h.

Referenced by Arcane::TimeHistoryValueT< DataType >::arrayToWrite().

Here is the caller graph for this function:

◆ toReal() [5/7]

Real Arcane::Convert::toReal ( unsigned int r)
inline

Converts r to a Real.

Definition at line 136 of file arccore/src/base/arccore/base/Convert.h.

◆ toReal() [6/7]

Real Arcane::Convert::toReal ( unsigned long long r)
inline

Converts r to a Real.

Definition at line 168 of file arccore/src/base/arccore/base/Convert.h.

◆ toReal() [7/7]

Real Arcane::Convert::toReal ( unsigned long r)
inline

Converts r to a Real.

Definition at line 150 of file arccore/src/base/arccore/base/Convert.h.