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

This class implements introspection object for a structureArray. More...

#include "pvIntrospect.h"

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

Public Types

typedef StructureArrayreference
 
typedef const StructureArrayconst_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 (StructureArray)
 
const StructureConstPtrgetStructure () const
 
virtual ArraySizeType getArraySizeType () const OVERRIDE FINAL
 
virtual std::size_t getMaximumCapacity () const OVERRIDE FINAL
 
virtual std::string getID () const OVERRIDE FINAL
 
virtual std::ostream & dump (std::ostream &o) const OVERRIDE FINAL
 
virtual void serialize (ByteBuffer *buffer, SerializableControl *control) const OVERRIDE FINAL
 
virtual void deserialize (ByteBuffer *buffer, DeserializableControl *control) OVERRIDE FINAL
 
std::tr1::shared_ptr< PVValueArray< std::tr1::shared_ptr< PVStructure > > > build () const
 
virtual ~StructureArray ()
 
- 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 ()
 

Protected Member Functions

 StructureArray (StructureConstPtr const &structure)
 
- Protected Member Functions inherited from epics::pvData::Array
 Array (Type type)
 
- Protected Member Functions inherited from epics::pvData::Field
 Field (Type type)
 
void cacheCleanup ()
 

Friends

class FieldCreate
 

Additional Inherited Members

- Static Public Attributes inherited from epics::pvData::Field
static size_t num_instances
 

Detailed Description

This class implements introspection object for a structureArray.

Definition at line 607 of file pvIntrospect.h.

Member Typedef Documentation

Constructor & Destructor Documentation

epics::pvData::StructureArray::StructureArray ( StructureConstPtr const &  structure)
protected

Constructor.

Parameters
structureThe introspection interface for the elements.

Definition at line 418 of file FieldCreateFactory.cpp.

epics::pvData::StructureArray::~StructureArray ( )
virtual

Definition at line 423 of file FieldCreateFactory.cpp.

424 {
425  cacheCleanup();
426 }

Member Function Documentation

std::tr1::shared_ptr< PVValueArray< std::tr1::shared_ptr< PVStructure > > > epics::pvData::StructureArray::build ( ) const

Allocate a new instance

Version
Added after 7.0.0

Definition at line 453 of file FieldCreateFactory.cpp.

454 {
455  return getPVDataCreate()->createPVStructureArray(std::tr1::static_pointer_cast<const StructureArray>(shared_from_this()));
456 }
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()
Definition: pvData.h:1648
void epics::pvData::StructureArray::deserialize ( ByteBuffer buffer,
DeserializableControl flusher 
)
virtual

Deserialize buffer.

Parameters
bufferserialization buffer.
flusherdeserialization control.

Implements epics::pvData::Serializable.

Definition at line 449 of file FieldCreateFactory.cpp.

449  {
450  throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead");
451 }
std::ostream & epics::pvData::StructureArray::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 433 of file FieldCreateFactory.cpp.

434 {
435  o << format::indent() << getID() << std::endl;
436  {
437  format::indent_scope s(o);
438  o << *pstructure;
439  }
440  return o;
441 }
virtual std::string getID() const OVERRIDE FINAL
virtual ArraySizeType epics::pvData::StructureArray::getArraySizeType ( ) const
inlinevirtual

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

Returns
array size type enum.

Implements epics::pvData::Array.

Definition at line 619 of file pvIntrospect.h.

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

Get the identification string.

Returns
The identification string, can be empty.

Implements epics::pvData::Field.

Definition at line 428 of file FieldCreateFactory.cpp.

429 {
430  return pstructure->getID() + "[]";
431 }
virtual std::size_t epics::pvData::StructureArray::getMaximumCapacity ( ) const
inlinevirtual

Get maximum capacity of the array.

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

Implements epics::pvData::Array.

Definition at line 621 of file pvIntrospect.h.

621 {return 0;}
const StructureConstPtr& epics::pvData::StructureArray::getStructure ( ) const
inline

Get the introspection interface for the array elements.

Returns
The introspection interface.

Definition at line 617 of file pvIntrospect.h.

617 {return pstructure;}
epics::pvData::StructureArray::POINTER_DEFINITIONS ( StructureArray  )
void epics::pvData::StructureArray::serialize ( ByteBuffer buffer,
SerializableControl flusher 
) const
virtual

Serialize field into given buffer.

Parameters
bufferserialization buffer.
flusherflush interface.

Implements epics::pvData::Serializable.

Definition at line 443 of file FieldCreateFactory.cpp.

443  {
444  control->ensureBuffer(1);
445  buffer->putByte((int8)0x88);
446  control->cachedSerialize(pstructure, buffer);
447 }
int8_t int8
Definition: pvType.h:75

Friends And Related Function Documentation

friend class FieldCreate
friend

Definition at line 644 of file pvIntrospect.h.


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