This is Unofficial EPICS BASE Doxygen Site
epics::pvData::ScalarArray Class Reference

This class implements introspection object for scalar array. More...

#include "pvIntrospect.h"

+ Inheritance diagram for epics::pvData::ScalarArray:
+ Collaboration diagram for epics::pvData::ScalarArray:

Public Types

typedef ScalarArrayreference
 
typedef const ScalarArrayconst_reference
 
- Public Types inherited from epics::pvData::Array
enum  ArraySizeType { variable, fixed, bounded }
 
typedef Arrayreference
 
typedef const Arrayconst_reference
 
- Public Types inherited from epics::pvData::Field
enum  { isField =1 }
 

Public Member Functions

 POINTER_DEFINITIONS (ScalarArray)
 
 ScalarArray (ScalarType scalarType)
 
ScalarType getElementType () const
 
virtual ArraySizeType getArraySizeType () const OVERRIDE
 
virtual std::size_t getMaximumCapacity () const OVERRIDE
 
virtual std::string getID () const OVERRIDE
 
virtual std::ostream & dump (std::ostream &o) const OVERRIDE FINAL
 
virtual void serialize (ByteBuffer *buffer, SerializableControl *control) const OVERRIDE
 
virtual void deserialize (ByteBuffer *buffer, DeserializableControl *control) OVERRIDE FINAL
 
std::tr1::shared_ptr< PVScalarArraybuild () const
 
virtual ~ScalarArray ()
 
- Public Member Functions inherited from epics::pvData::Array
 POINTER_DEFINITIONS (Array)
 
virtual ~Array ()
 
- Public Member Functions inherited from epics::pvData::Field
 POINTER_DEFINITIONS (Field)
 
virtual ~Field ()
 
Type getType () const
 
std::tr1::shared_ptr< PVFieldbuild () const
 
- Public Member Functions inherited from epics::pvData::Serializable
virtual ~Serializable ()
 

Friends

class FieldCreate
 

Additional Inherited Members

- Static Public Attributes inherited from epics::pvData::Field
static size_t num_instances
 
- Protected Member Functions inherited from epics::pvData::Array
 Array (Type type)
 
- Protected Member Functions inherited from epics::pvData::Field
 Field (Type type)
 
void cacheCleanup ()
 

Detailed Description

This class implements introspection object for scalar array.

Definition at line 497 of file pvIntrospect.h.

Member Typedef Documentation

Definition at line 501 of file pvIntrospect.h.

Constructor & Destructor Documentation

epics::pvData::ScalarArray::ScalarArray ( ScalarType  scalarType)

Constructor

Parameters
scalarTypeThe scalarType for the field.

Definition at line 310 of file FieldCreateFactory.cpp.

311  : Array(scalarArray),
312  elementType(elementType)
313 {
314  if(elementType<0 || elementType>MAX_SCALAR_TYPE)
315  throw std::invalid_argument("Can't construct ScalarArray from invalid ScalarType");
316 }
#define MAX_SCALAR_TYPE
Definition: pvIntrospect.h:280
epics::pvData::ScalarArray::~ScalarArray ( )
virtual

Definition at line 318 of file FieldCreateFactory.cpp.

319 {
320  cacheCleanup();
321 }

Member Function Documentation

std::tr1::shared_ptr< PVScalarArray > epics::pvData::ScalarArray::build ( ) const

Allocate a new instance

Version
Added after 7.0.0

Definition at line 361 of file FieldCreateFactory.cpp.

362 {
363  return getPVDataCreate()->createPVScalarArray(std::tr1::static_pointer_cast<const ScalarArray>(shared_from_this()));
364 }
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()
Definition: pvData.h:1648
void epics::pvData::ScalarArray::deserialize ( ByteBuffer buffer,
DeserializableControl flusher 
)
virtual

Deserialize buffer.

Parameters
bufferserialization buffer.
flusherdeserialization control.

Implements epics::pvData::Serializable.

Definition at line 357 of file FieldCreateFactory.cpp.

357  {
358  throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead");
359 }
std::ostream & epics::pvData::ScalarArray::dump ( std::ostream &  o) const
virtual

Puts the string representation to the stream.

Parameters
ooutput stream.
Returns
The output stream.

Implements epics::pvData::Field.

Definition at line 347 of file FieldCreateFactory.cpp.

348 {
349  return o << format::indent() << getID();
350 }
virtual std::string getID() const OVERRIDE
virtual ArraySizeType epics::pvData::ScalarArray::getArraySizeType ( ) const
inlinevirtual

Get array size type (i.e. variable/fixed/bounded size array).

Returns
array size type enum.

Implements epics::pvData::Array.

Reimplemented in epics::pvData::FixedScalarArray, and epics::pvData::BoundedScalarArray.

Definition at line 514 of file pvIntrospect.h.

ScalarType epics::pvData::ScalarArray::getElementType ( ) const
inline

Get the scalarType for the elements.

Returns
the scalarType

Definition at line 512 of file pvIntrospect.h.

512 {return elementType;}
string epics::pvData::ScalarArray::getID ( ) const
virtual

Get the identification string.

Returns
The identification string, can be empty.

Implements epics::pvData::Field.

Reimplemented in epics::pvData::FixedScalarArray, and epics::pvData::BoundedScalarArray.

Definition at line 342 of file FieldCreateFactory.cpp.

343 {
344  return getIDScalarArrayLUT();
345 }
virtual std::size_t epics::pvData::ScalarArray::getMaximumCapacity ( ) const
inlinevirtual

Get maximum capacity of the array.

Returns
maximum capacity of the array, 0 indicates variable size array.

Implements epics::pvData::Array.

Reimplemented in epics::pvData::FixedScalarArray, and epics::pvData::BoundedScalarArray.

Definition at line 516 of file pvIntrospect.h.

516 {return 0;}
epics::pvData::ScalarArray::POINTER_DEFINITIONS ( ScalarArray  )
void epics::pvData::ScalarArray::serialize ( ByteBuffer buffer,
SerializableControl flusher 
) const
virtual

Serialize field into given buffer.

Parameters
bufferserialization buffer.
flusherflush interface.

Implements epics::pvData::Serializable.

Reimplemented in epics::pvData::FixedScalarArray, and epics::pvData::BoundedScalarArray.

Definition at line 352 of file FieldCreateFactory.cpp.

352  {
353  control->ensureBuffer(1);
354  buffer->putByte((int8)0x08 | Scalar::getTypeCodeLUT(elementType));
355 }
int8_t int8
Definition: pvType.h:75

Friends And Related Function Documentation

friend class FieldCreate
friend

Definition at line 533 of file pvIntrospect.h.


The documentation for this class was generated from the following files: