FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
SMV_Numeric< NUMTYPE > Class Template Reference

Convenience template for creating shared memory variables of one of the supported numeric types. More...

#include <shared_variable.hpp>

+ Inheritance diagram for SMV_Numeric< NUMTYPE >:

Public Member Functions

 SMV_Numeric (const char *varName, SharedMemoryVariableManager *mgr=&DEFAULT_sharedMemoryVariableManager) NONNULL_CLASS_PARAMETERS(2)
 
 SMV_Numeric (const char *varName, SharedMemoryVariableNode *parentNode) NONNULL_CLASS_PARAMETERS(2)
 
 operator NUMTYPE () const OME_ALWAYS_INLINE
 Cast operator for a numeric shared memory variable. More...
 
NUMTYPE * getAddress () const OME_ALWAYS_INLINE
 Get address of shared memory variable. More...
 
 operator const NUMTYPE * () const OME_ALWAYS_INLINE
 Cast operator for a pointer to a numeric shared memory variable. More...
 
NUMTYPE & operator= (const NUMTYPE arg) OME_ALWAYS_INLINE
 Assignment operator for a numeric shared memory variable. More...
 
NUMTYPE & operator+= (const NUMTYPE arg) OME_ALWAYS_INLINE
 Addition operator for a numeric shared memory variable. More...
 
NUMTYPE & operator-= (const NUMTYPE arg) OME_ALWAYS_INLINE
 Subtraction operator for a numeric shared memory variable. More...
 
NUMTYPE & operator*= (const NUMTYPE arg) OME_ALWAYS_INLINE
 Multiplication operator for a numeric shared memory variable. More...
 
NUMTYPE & operator/= (const NUMTYPE arg) OME_ALWAYS_INLINE
 Division operator for a numeric shared memory variable. More...
 
NUMTYPE & operator++ () OME_ALWAYS_INLINE
 Prefix increment operator for a numeric shared memory variable. More...
 
NUMTYPE & operator-- () OME_ALWAYS_INLINE
 Prefix decrement operator for a numeric shared memory variable. More...
 
NUMTYPE operator++ (int) OME_ALWAYS_INLINE
 Postfix increment operator for a numeric shared memory variable. More...
 
NUMTYPE operator-- (int) OME_ALWAYS_INLINE
 Postfix decrement operator for a numeric shared memory variable. More...
 
- Public Member Functions inherited from SharedMemoryVariable
SharedMemoryVariableNodegetParentNode () const
 
SharedMemoryVariableManagergetVariableManager () const
 
unsigned int getType () const OME_ALWAYS_INLINE
 Return type of variable, see SharedMemoryVariableType. More...
 
unsigned int getMinLength () const OME_ALWAYS_INLINE
 Return minimum number of bytes required for variable record. More...
 
const char * getName (uint_fast32_t *retNameLen=nullptr) const OME_ALWAYS_INLINE
 Get variable name. More...
 
int setName (const char *newName)
 Set new variable name. More...
 
uint_fast32_t getFullName (char *bfr, uint_fast32_t bfrLen) const
 Get full path name of variable. More...
 
 SharedMemoryVariable (class SharedMemoryVariableManager *mgr, const char *varName, int varType, size_t length)
 Construct an shared memory variable and attach to the indicated manager for the collection of variables. More...
 
 SharedMemoryVariable (class SharedMemoryVariableNode *parentNode, const char *varName, int varType, size_t length)
 
virtual ~SharedMemoryVariable ()
 
virtual void noteNowRegistered (SharedMemoryVariable_Record *newArea)
 Extension mechanism to allow derived classes to be informed when they are about to be assigned storage; called at most once per lifetime of object. More...
 
void makeAliasFor (SharedMemoryVariable *v)
 

Additional Inherited Members

- Public Types inherited from SharedMemoryVariable
enum  SharedMemoryVariableType {
  SMV_TYPE_NONE =0, SMV_TYPE_UNSIGNED =1, SMV_TYPE_LARGE =2, SMV_TYPE_INT32 =4,
  SMV_TYPE_UINT32 =SMV_TYPE_INT32|SMV_TYPE_UNSIGNED, SMV_TYPE_INT64 =SMV_TYPE_INT32|SMV_TYPE_LARGE, SMV_TYPE_UINT64 =SMV_TYPE_INT64|SMV_TYPE_UNSIGNED, SMV_TYPE_FLOAT =8,
  SMV_TYPE_DOUBLE =SMV_TYPE_FLOAT|SMV_TYPE_LARGE, SMV_TYPE_FIXED =SMV_TYPE_FLOAT|SMV_TYPE_UNSIGNED, SMV_TYPE_TINY_STRING =16, SMV_TYPE_TINY_BINARY_STRING =SMV_TYPE_TINY_STRING|SMV_TYPE_UNSIGNED,
  SMV_TYPE_STRING =SMV_TYPE_TINY_STRING|SMV_TYPE_LARGE, SMV_TYPE_BINARY_STRING =SMV_TYPE_STRING|SMV_TYPE_UNSIGNED, SMV_TYPE_NAME_NODE =32
}
 
enum  { SMV_DISPLAY_NAME =1, SMV_DISPLAY_VALUE =2, SMV_DISPLAY_TYPE =4, SMV_DISPLAY_EQUALS =8 }
 
- Static Public Member Functions inherited from SharedMemoryVariable
static const char * typeName (unsigned int t) OME_CONST_FUNCTION
 Return type as text string. More...
 
- Protected Attributes inherited from SharedMemoryVariable
SharedMemoryVariable_RecorddataPointer
 
class SharedMemoryVariableNodeparentNodeRecord
 
class SharedMemoryVariableManagervariableManager
 
const char * variableName
 
uint32_t minLength
 
unsigned char dataType
 
unsigned char registered
 
unsigned char _pad1 [2]
 
- Static Protected Attributes inherited from SharedMemoryVariable
static SharedMemoryVariable_Record unallocated_data
 

Detailed Description

template<typename NUMTYPE>
class SMV_Numeric< NUMTYPE >

Convenience template for creating shared memory variables of one of the supported numeric types.

Constructor & Destructor Documentation

◆ SMV_Numeric() [1/2]

template<typename NUMTYPE >
SMV_Numeric< NUMTYPE >::SMV_Numeric ( const char *  varName,
SharedMemoryVariableManager mgr = &DEFAULT_sharedMemoryVariableManager 
)
inlineexplicit

◆ SMV_Numeric() [2/2]

template<typename NUMTYPE >
SMV_Numeric< NUMTYPE >::SMV_Numeric ( const char *  varName,
SharedMemoryVariableNode parentNode 
)
inline

Member Function Documentation

◆ getAddress()

template<typename NUMTYPE >
NUMTYPE* SMV_Numeric< NUMTYPE >::getAddress ( ) const
inline

Get address of shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator const NUMTYPE *()

template<typename NUMTYPE >
SMV_Numeric< NUMTYPE >::operator const NUMTYPE * ( ) const
inlineexplicit

Cast operator for a pointer to a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator NUMTYPE()

template<typename NUMTYPE >
SMV_Numeric< NUMTYPE >::operator NUMTYPE ( ) const
inline

Cast operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator*=()

template<typename NUMTYPE >
NUMTYPE& SMV_Numeric< NUMTYPE >::operator*= ( const NUMTYPE  arg)
inline

Multiplication operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator++() [1/2]

template<typename NUMTYPE >
NUMTYPE& SMV_Numeric< NUMTYPE >::operator++ ( )
inline

Prefix increment operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator++() [2/2]

template<typename NUMTYPE >
NUMTYPE SMV_Numeric< NUMTYPE >::operator++ ( int  )
inline

Postfix increment operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator+=()

template<typename NUMTYPE >
NUMTYPE& SMV_Numeric< NUMTYPE >::operator+= ( const NUMTYPE  arg)
inline

Addition operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator--() [1/2]

template<typename NUMTYPE >
NUMTYPE& SMV_Numeric< NUMTYPE >::operator-- ( )
inline

Prefix decrement operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator--() [2/2]

template<typename NUMTYPE >
NUMTYPE SMV_Numeric< NUMTYPE >::operator-- ( int  )
inline

Postfix decrement operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator-=()

template<typename NUMTYPE >
NUMTYPE& SMV_Numeric< NUMTYPE >::operator-= ( const NUMTYPE  arg)
inline

Subtraction operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator/=()

template<typename NUMTYPE >
NUMTYPE& SMV_Numeric< NUMTYPE >::operator/= ( const NUMTYPE  arg)
inline

Division operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.

◆ operator=()

template<typename NUMTYPE >
NUMTYPE& SMV_Numeric< NUMTYPE >::operator= ( const NUMTYPE  arg)
inline

Assignment operator for a numeric shared memory variable.

References SharedMemoryVariable::dataPointer.


The documentation for this class was generated from the following file:
Generated: Fri Jul 31 2020 18:19:16
Support Information