Main Page · Modules · All Classes · Class Hierarchy
Public Member Functions | Protected Attributes | List of all members
MSData Struct Reference

Base class for the data exchange of the elements. More...

#include <MSData.hpp>

Inheritance diagram for MSData:
MPCursorPosition MPLogEntryMap MPMissingPackets MPRecordsContainer MPRecoveredPackets MPStreamMarkers MPTimestampList

Public Member Functions

 MSData (const QString &type_name)
 Class constructor. More...
 
 MSData (const MSData &other)
 Copy constructor. More...
 
virtual ~MSData ()
 Class destructor.
 
QString GetTypeName () const
 Get the type name. More...
 
void * operator[] (const QString &variable) const
 operator[] to resolve variable pointers More...
 
const QMap< QString, void * > & GetVariableMap () const
 Get the variable map. More...
 
virtual MSDataoperator= (MSData &data)
 Copy assignment operator. More...
 
virtual MSDataoperator= (const MSData &data)
 Copy assignment operator. More...
 

Protected Attributes

QMap< QString, void * > VariableMap
 Variable map.
 
QString TypeName
 Type name.
 

Detailed Description

Base class for the data exchange of the elements.

Definition at line 54 of file MSData.hpp.

Constructor & Destructor Documentation

MSData::MSData ( const QString &  type_name)
explicit

Class constructor.

Parameters
type_nameType name

Definition at line 26 of file MSData.cpp.

MSData::MSData ( const MSData other)

Copy constructor.

Parameters
otherOther instance

Definition at line 35 of file MSData.cpp.

Member Function Documentation

QString MSData::GetTypeName ( ) const

Get the type name.

Returns
The type name

Get the type name.

Definition at line 42 of file MSData.cpp.

const QMap< QString, void * > & MSData::GetVariableMap ( ) const

Get the variable map.

Returns
Variable map

Get the variable map.

Definition at line 54 of file MSData.cpp.

MSData & MSData::operator= ( MSData data)
virtual

Copy assignment operator.

Parameters
dataOther instance of the class
Returns
Reference to the current instance

Virtual copy assignment operator. It is very important to use the MSDATA_FUNCTIONS macro in the derived classes because it is the base of the data exchange between the elements. It uses a small trick to cast the parameter to a pointer of the derived class and use the appropriate copy assignment operator.

Definition at line 60 of file MSData.cpp.

MSData & MSData::operator= ( const MSData data)
virtual

Copy assignment operator.

Parameters
dataOther instance of the class
Returns
Reference to the current instance

Virtual copy assignment operator. It is very important to use the MSDATA_FUNCTIONS macro in the derived classes because it is the basis of the data exchange between the elements. It uses a small trick to cast the parameter to a pointer of the derived class and use the appropriate copy assignment operator.

Definition at line 67 of file MSData.cpp.

void * MSData::operator[] ( const QString &  variable) const

operator[] to resolve variable pointers

Parameters
variableName of the variable
Returns
Pointer to the desired variable otherwise null-pointer

This operator[] provides a convenient and easy way to get variable pointers.

Definition at line 48 of file MSData.cpp.


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