Belle II Software development
NSMVHandler Class Reference
Inheritance diagram for NSMVHandler:
NSMVHandlerFloat NSMVHandlerFloatArray NSMVHandlerInt NSMVHandlerIntArray NSMVHandlerRef NSMVHandlerText RCConfigHandler

Public Member Functions

 NSMVHandler (const std::string &node, const std::string &name, bool useget, bool useset)
 
virtual bool handleGet (NSMVar &var)
 
virtual bool handleSet (const NSMVar &var)
 
const std::string & getNode () const
 
const std::string & getName () const
 
bool useGet () const
 
bool useSet () const
 
void setUseGet (bool use)
 
void setUseSet (bool use)
 
int getTimeStamp () const
 
int getId () const
 
void setNode (const std::string &node)
 
void setId (int id)
 
void set (const NSMVar &var)
 
void set (int val)
 
void set (float val)
 
void set (const std::string &val)
 
void set (const std::vector< int > &val)
 
void set (const std::vector< float > &val)
 
const NSMVarget () const
 
NSMVarget ()
 
NSMVar::Type getType () const
 
const char * getTypeLabel () const
 
bool isDumped () const
 
void setDumped (bool isdump)
 

Static Public Member Functions

static NSMVHandlercreate (const NSMVar &var)
 

Protected Attributes

int m_id
 
int m_timestamp
 
std::string m_node
 
std::string m_name
 
bool m_useget
 
bool m_useset
 
NSMVar m_var
 
bool m_isdump
 

Friends

class Callback
 
class AbstractNSMCallback
 
class NSMCallback
 

Detailed Description

Definition at line 22 of file NSMVHandler.h.

Constructor & Destructor Documentation

◆ NSMVHandler()

NSMVHandler ( const std::string &  node,
const std::string &  name,
bool  useget,
bool  useset 
)
inline

Definition at line 32 of file NSMVHandler.h.

34 : m_id(0), m_timestamp(0), m_node(node), m_name(name),
35 m_useget(useget), m_useset(useset), m_var(name) {}

◆ ~NSMVHandler()

virtual ~NSMVHandler ( )
inlinevirtual

Definition at line 36 of file NSMVHandler.h.

36{}

Member Function Documentation

◆ create()

NSMVHandler * create ( const NSMVar var)
static

Definition at line 14 of file NSMVHandler.cc.

15{
16 const std::string node = var.getNode();
17 const std::string name = var.getName();
18 if (var.getType() == NSMVar::INT) {
19 if (var.getLength() == 0) {
20 return new NSMVHandlerInt(node, name, false, true);
21 }
22 return new NSMVHandlerIntArray(node, name, false, true);
23 } else if (var.getType() == NSMVar::FLOAT) {
24 if (var.getLength() == 0) {
25 return new NSMVHandlerFloat(node, name, false, true);
26 }
27 return new NSMVHandlerFloatArray(node, name, false, true);
28 } else if (var.getType() == NSMVar::TEXT) {
29 return new NSMVHandlerText(node, name, false, true);
30 }
31 return NULL;
32}

◆ get() [1/2]

NSMVar & get ( )
inline

Definition at line 68 of file NSMVHandler.h.

68{ return m_var; }

◆ get() [2/2]

const NSMVar & get ( ) const
inline

Definition at line 67 of file NSMVHandler.h.

67{ return m_var; }

◆ getId()

int getId ( ) const
inline

Definition at line 58 of file NSMVHandler.h.

58{ return m_id; }

◆ getName()

const std::string & getName ( ) const
inline

Definition at line 52 of file NSMVHandler.h.

52{ return m_name; }

◆ getNode()

const std::string & getNode ( ) const
inline

Definition at line 51 of file NSMVHandler.h.

51{ return m_node; }

◆ getTimeStamp()

int getTimeStamp ( ) const
inline

Definition at line 57 of file NSMVHandler.h.

57{ return m_timestamp; }

◆ getType()

NSMVar::Type getType ( ) const
inline

Definition at line 69 of file NSMVHandler.h.

69{ return m_var.getType(); }

◆ getTypeLabel()

const char * getTypeLabel ( ) const
inline

Definition at line 70 of file NSMVHandler.h.

70{ return m_var.getTypeLabel(); }

◆ handleGet()

virtual bool handleGet ( NSMVar var)
inlinevirtual

Definition at line 39 of file NSMVHandler.h.

40 {
41 var = m_var;
42 return true;
43 }

◆ handleSet()

virtual bool handleSet ( const NSMVar var)
inlinevirtual

Definition at line 44 of file NSMVHandler.h.

45 {
46 m_var = var;
47 return true;
48 }

◆ isDumped()

bool isDumped ( ) const
inline

Definition at line 71 of file NSMVHandler.h.

71{ return m_isdump; }

◆ set() [1/6]

void set ( const NSMVar var)
inline

Definition at line 61 of file NSMVHandler.h.

61{ m_var = var; }

◆ set() [2/6]

void set ( const std::string &  val)
inline

Definition at line 64 of file NSMVHandler.h.

64{ m_var = val; }

◆ set() [3/6]

void set ( const std::vector< float > &  val)
inline

Definition at line 66 of file NSMVHandler.h.

66{ m_var = val; }

◆ set() [4/6]

void set ( const std::vector< int > &  val)
inline

Definition at line 65 of file NSMVHandler.h.

65{ m_var = val; }

◆ set() [5/6]

void set ( float  val)
inline

Definition at line 63 of file NSMVHandler.h.

63{ m_var = val; }

◆ set() [6/6]

void set ( int  val)
inline

Definition at line 62 of file NSMVHandler.h.

62{ m_var = val; }

◆ setDumped()

void setDumped ( bool  isdump)
inline

Definition at line 72 of file NSMVHandler.h.

72{ m_isdump = isdump; }

◆ setId()

void setId ( int  id)
inline

Definition at line 60 of file NSMVHandler.h.

60{ m_id = id; }

◆ setNode()

void setNode ( const std::string &  node)
inline

Definition at line 59 of file NSMVHandler.h.

59{ m_node = node; }

◆ setUseGet()

void setUseGet ( bool  use)
inline

Definition at line 55 of file NSMVHandler.h.

55{ m_useget = use; }

◆ setUseSet()

void setUseSet ( bool  use)
inline

Definition at line 56 of file NSMVHandler.h.

56{ m_useset = use; }

◆ useGet()

bool useGet ( ) const
inline

Definition at line 53 of file NSMVHandler.h.

53{ return m_useget; }

◆ useSet()

bool useSet ( ) const
inline

Definition at line 54 of file NSMVHandler.h.

54{ return m_useset; }

Friends And Related Function Documentation

◆ AbstractNSMCallback

friend class AbstractNSMCallback
friend

Definition at line 25 of file NSMVHandler.h.

◆ Callback

friend class Callback
friend

Definition at line 24 of file NSMVHandler.h.

◆ NSMCallback

friend class NSMCallback
friend

Definition at line 26 of file NSMVHandler.h.

Member Data Documentation

◆ m_id

int m_id
protected

Definition at line 75 of file NSMVHandler.h.

◆ m_isdump

bool m_isdump
protected

Definition at line 82 of file NSMVHandler.h.

◆ m_name

std::string m_name
protected

Definition at line 78 of file NSMVHandler.h.

◆ m_node

std::string m_node
protected

Definition at line 77 of file NSMVHandler.h.

◆ m_timestamp

int m_timestamp
protected

Definition at line 76 of file NSMVHandler.h.

◆ m_useget

bool m_useget
protected

Definition at line 79 of file NSMVHandler.h.

◆ m_useset

bool m_useset
protected

Definition at line 80 of file NSMVHandler.h.

◆ m_var

NSMVar m_var
protected

Definition at line 81 of file NSMVHandler.h.


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