Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends
OODebug::MessagePart Class Reference

The base class for the Command and Reply class, it defines the stream reading and writing operators. More...

Inheritance diagram for OODebug::MessagePart:
OODebug::BreakpointEvent OODebug::ClassBySignature OODebug::ClassPrepare OODebug::CodeIndexLine OODebug::Command OODebug::Event OODebug::Frame OODebug::JVMMethod OODebug::Location OODebug::Modifier OODebug::Reply OODebug::SingleStepEvent OODebug::StackVariable OODebug::StepData OODebug::TaggedObjectId OODebug::VMStart OODebug::Value OODebug::VariableDetails

Public Types

using ReadOperator = std::function< void(MessagePart *, QDataStream &)>
 
using WriteOperator = std::function< void(const MessagePart *, QDataStream &)>
 

Public Member Functions

virtual ~MessagePart ()
 
void addMessageField (ReadOperator reader, WriteOperator writer=nullptr)
 
virtual int kind () const
 

Static Public Member Functions

template<typename Enum >
static constexpr std::enable_if< std::is_enum< Enum >::value, typename std::underlying_type< Enum >::type >::type cast (Enum enumValue)
 Casts an enum value to its underlying type. More...
 

Static Public Attributes

static const int noKind {}
 

Private Attributes

QList< ReadOperatorreaders_
 
QList< WriteOperatorwriters_
 

Friends

QDataStream & operator<< (QDataStream &stream, const MessagePart &message)
 
QDataStream & operator>> (QDataStream &stream, MessagePart &message)
 

Detailed Description

The base class for the Command and Reply class, it defines the stream reading and writing operators.

This class should only be used by the Command and Reply class, i.e. clients should implement those classes.

Member Typedef Documentation

◆ ReadOperator

using OODebug::MessagePart::ReadOperator = std::function<void (MessagePart*, QDataStream&)>

◆ WriteOperator

using OODebug::MessagePart::WriteOperator = std::function<void (const MessagePart*, QDataStream&)>

Constructor & Destructor Documentation

◆ ~MessagePart()

OODebug::MessagePart::~MessagePart ( )
virtual

Member Function Documentation

◆ addMessageField()

void OODebug::MessagePart::addMessageField ( ReadOperator  reader,
WriteOperator  writer = nullptr 
)

◆ cast()

template<typename Enum >
constexpr std::enable_if< std::is_enum< Enum >::value, typename std::underlying_type< Enum >::type >::type OODebug::MessagePart::cast ( Enum  enumValue)
staticconstexpr

Casts an enum value to its underlying type.

◆ kind()

int OODebug::MessagePart::kind ( ) const
virtual

Friends And Related Function Documentation

◆ operator<<

QDataStream& operator<< ( QDataStream &  stream,
const MessagePart message 
)
friend

◆ operator>>

QDataStream& operator>> ( QDataStream &  stream,
MessagePart message 
)
friend

Member Data Documentation

◆ noKind

const int OODebug::MessagePart::noKind {}
static

◆ readers_

QList<ReadOperator> OODebug::MessagePart::readers_
private

◆ writers_

QList<WriteOperator> OODebug::MessagePart::writers_
private