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

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

#include "pvIntrospect.h"

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

Public Types

typedef BoundedScalarArrayreference
 
typedef const BoundedScalarArrayconst_reference
 
- Public Types inherited from epics::pvData::ScalarArray
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 (BoundedScalarArray)
 
 BoundedScalarArray (ScalarType scalarType, std::size_t size)
 
virtual ArraySizeType getArraySizeType () const OVERRIDE FINAL
 
virtual std::size_t getMaximumCapacity () const OVERRIDE FINAL
 
virtual std::string getID () const OVERRIDE FINAL
 
virtual void serialize (ByteBuffer *buffer, SerializableControl *control) const OVERRIDE FINAL
 
virtual ~BoundedScalarArray ()
 
- Public Member Functions inherited from epics::pvData::ScalarArray
 POINTER_DEFINITIONS (ScalarArray)
 
 ScalarArray (ScalarType scalarType)
 
ScalarType getElementType () const
 
virtual std::ostream & dump (std::ostream &o) const OVERRIDE FINAL
 
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 bounded scalar array.

Definition at line 543 of file pvIntrospect.h.

Member Typedef Documentation

Constructor & Destructor Documentation

epics::pvData::BoundedScalarArray::BoundedScalarArray ( ScalarType  scalarType,
std::size_t  size 
)

Constructor

Parameters
scalarTypeThe scalarType for the field.
sizemaximum (bound) capacity.

Definition at line 372 of file FieldCreateFactory.cpp.

373  : ScalarArray(elementType),
374  size(size)
375 {
376 }
ScalarArray(ScalarType scalarType)
epics::pvData::BoundedScalarArray::~BoundedScalarArray ( )
virtual

Definition at line 367 of file FieldCreateFactory.cpp.

368 {
369  cacheCleanup();
370 }

Member Function Documentation

virtual ArraySizeType epics::pvData::BoundedScalarArray::getArraySizeType ( ) const
inlinevirtual

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

Returns
array size type enum.

Reimplemented from epics::pvData::ScalarArray.

Definition at line 556 of file pvIntrospect.h.

string epics::pvData::BoundedScalarArray::getID ( ) const
virtual

Get the identification string.

Returns
The identification string, can be empty.

Reimplemented from epics::pvData::ScalarArray.

Definition at line 378 of file FieldCreateFactory.cpp.

379 {
380  char buffer[32];
381  sprintf(buffer, "%s<%zu>", ScalarTypeFunc::name(getElementType()), size);
382  return string(buffer);
383 }
const char * name(ScalarType t)
Definition: TypeFunc.cpp:76
ScalarType getElementType() const
Definition: pvIntrospect.h:512
virtual std::size_t epics::pvData::BoundedScalarArray::getMaximumCapacity ( ) const
inlinevirtual

Get maximum capacity of the array.

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

Reimplemented from epics::pvData::ScalarArray.

Definition at line 558 of file pvIntrospect.h.

558 {return size;}
epics::pvData::BoundedScalarArray::POINTER_DEFINITIONS ( BoundedScalarArray  )
void epics::pvData::BoundedScalarArray::serialize ( ByteBuffer buffer,
SerializableControl flusher 
) const
virtual

Serialize field into given buffer.

Parameters
bufferserialization buffer.
flusherflush interface.

Reimplemented from epics::pvData::ScalarArray.

Definition at line 385 of file FieldCreateFactory.cpp.

385  {
386  control->ensureBuffer(1);
387  buffer->putByte((int8)0x10 | Scalar::getTypeCodeLUT(getElementType()));
388  SerializeHelper::writeSize(size, buffer, control);
389 }
int8_t int8
Definition: pvType.h:75
static void writeSize(std::size_t s, ByteBuffer *buffer, SerializableControl *flusher)
ScalarType getElementType() const
Definition: pvIntrospect.h:512

Friends And Related Function Documentation

friend class FieldCreate
friend

Definition at line 567 of file pvIntrospect.h.


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