Open CASCADE Technology  7.2.0
Public Types | Static Public Member Functions

BVH::Array< T, N > Struct Template Reference

Tool class providing typical operations on the array. It allows for interoperability between STD vector and NCollection vector. More...

#include <BVH_Types.hxx>

Public Types

typedef BVH::ArrayType< T, N >::Type BVH_ArrayNt
 

Static Public Member Functions

static const BVH::VectorType< T, N >::Type & Value (const BVH_ArrayNt &theArray, const Standard_Integer theIndex)
 Returns a const reference to the element with the given index. More...
 
static BVH::VectorType< T, N >::Type & ChangeValue (BVH_ArrayNt &theArray, const Standard_Integer theIndex)
 Returns a reference to the element with the given index. More...
 
static void Append (BVH_ArrayNt &theArray, const typename BVH::VectorType< T, N >::Type &theElement)
 Adds the new element at the end of the array. More...
 
static Standard_Integer Size (const BVH_ArrayNt &theArray)
 Returns the number of elements in the given array. More...
 
static void Clear (BVH_ArrayNt &theArray)
 Removes all elements from the given array. More...
 
static void Reserve (BVH_ArrayNt &theArray, const Standard_Integer theCount)
 Requests that the array capacity be at least enough to contain given number of elements. This function has no effect in case of NCollection based array. More...
 

Detailed Description

template<class T, int N = 1>
struct BVH::Array< T, N >

Tool class providing typical operations on the array. It allows for interoperability between STD vector and NCollection vector.

Template Parameters
TNumeric data type
NComponent number

Member Typedef Documentation

◆ BVH_ArrayNt

template<class T , int N = 1>
typedef BVH::ArrayType<T, N>::Type BVH::Array< T, N >::BVH_ArrayNt

Member Function Documentation

◆ Append()

template<class T , int N = 1>
static void BVH::Array< T, N >::Append ( BVH_ArrayNt theArray,
const typename BVH::VectorType< T, N >::Type &  theElement 
)
inlinestatic

Adds the new element at the end of the array.

◆ ChangeValue()

template<class T , int N = 1>
static BVH::VectorType<T, N>::Type& BVH::Array< T, N >::ChangeValue ( BVH_ArrayNt theArray,
const Standard_Integer  theIndex 
)
inlinestatic

Returns a reference to the element with the given index.

◆ Clear()

template<class T , int N = 1>
static void BVH::Array< T, N >::Clear ( BVH_ArrayNt theArray)
inlinestatic

Removes all elements from the given array.

◆ Reserve()

template<class T , int N = 1>
static void BVH::Array< T, N >::Reserve ( BVH_ArrayNt theArray,
const Standard_Integer  theCount 
)
inlinestatic

Requests that the array capacity be at least enough to contain given number of elements. This function has no effect in case of NCollection based array.

◆ Size()

template<class T , int N = 1>
static Standard_Integer BVH::Array< T, N >::Size ( const BVH_ArrayNt theArray)
inlinestatic

Returns the number of elements in the given array.

◆ Value()

template<class T , int N = 1>
static const BVH::VectorType<T, N>::Type& BVH::Array< T, N >::Value ( const BVH_ArrayNt theArray,
const Standard_Integer  theIndex 
)
inlinestatic

Returns a const reference to the element with the given index.


The documentation for this struct was generated from the following file: