PVData C++ 8.0.7
Loading...
Searching...
No Matches
epics::pvData::ScalarTypeFunc Namespace Reference

Convenience functions for ScalarType. More...

Functions

bool isInteger (ScalarType scalarType)
 
bool isUInteger (ScalarType scalarType)
 
bool isNumeric (ScalarType scalarType)
 
bool isPrimitive (ScalarType scalarType)
 
ScalarType getScalarType (std::string const &value)
 
const char * name (ScalarType scalarType)
 
size_t elementSize (ScalarType id)
 gives sizeof(T) where T depends on the scalar type id.
 
shared_vector< void > allocArray (ScalarType id, size_t len)
 Allocate an untyped array based on ScalarType.
 
template<ScalarType ID>
shared_vector< typename ScalarTypeTraits< ID >::type > allocArray (size_t len)
 Allocate an untyped array based on ScalarType.
 

Detailed Description

Convenience functions for ScalarType.

Function Documentation

◆ allocArray()

template<ScalarType ID>
shared_vector< typename ScalarTypeTraits< ID >::type > epics::pvData::ScalarTypeFunc::allocArray ( size_t len)
inline

Allocate an untyped array based on ScalarType.

Definition at line 959 of file sharedVector.h.

◆ getScalarType()

ScalarType epics::pvData::ScalarTypeFunc::getScalarType ( std::string const & value)
extern

Get the scalarType for value.

Parameters
valueThe name of the scalar type.
Returns
The scalarType. An exception is thrown if the name is not the name of a scalar type.

◆ isInteger()

bool epics::pvData::ScalarTypeFunc::isInteger ( ScalarType scalarType)
extern

Is the type an integer, i.e. is it one of byte,...ulong

Parameters
scalarTypeThe type.
Returns
(false,true) if the scalarType is an integer.

◆ isNumeric()

bool epics::pvData::ScalarTypeFunc::isNumeric ( ScalarType scalarType)
extern

Is the type numeric, i.e. is it one of byte,...,double

Parameters
scalarTypeThe type.
Returns
(false,true) if the scalarType is a numeric

◆ isPrimitive()

bool epics::pvData::ScalarTypeFunc::isPrimitive ( ScalarType scalarType)
extern

Is the type primitive, i.e. not string

Parameters
scalarTypeThe type.
Returns
(false,true) if the scalarType is primitive.

◆ isUInteger()

bool epics::pvData::ScalarTypeFunc::isUInteger ( ScalarType scalarType)
extern

Is the type an unsigned integer, i.e. is it one of ubyte,...ulong

Parameters
scalarTypeThe type.
Returns
(false,true) if the scalarType is an integer.

◆ name()

const char * epics::pvData::ScalarTypeFunc::name ( ScalarType scalarType)
extern

Get a name for the scalarType.

Parameters
scalarTypeThe type.
Returns
The name for the scalarType.