cc_tools_qt
Common Environment for Protocol Analysis.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Protected Member Functions | List of all members
cc_tools_qt::property::field::Bitfield Class Reference

#include "cc_tools_qt/property/field.h"

Detailed Description

Class to contain all the properties relevant to comms::field::Bitfield fields.

Inheritance diagram for cc_tools_qt::property::field::Bitfield:
cc_tools_qt::property::field::CommonBase< Bitfield > cc_tools_qt::property::field::Common

Public Types

using MembersList = QList< QVariantMap >
 Properties of contained fields.
 

Public Member Functions

 Bitfield ()
 Default constructor.
 
 Bitfield (Bitfield &&)
 Move constructor.
 
 Bitfield (const Bitfield &)
 Copy constructor.
 
 Bitfield (const QVariant &props)
 Construct from QVariant containing QVariantMap.
 
 Bitfield (const QVariantMap &props)
 Construct from QVariantMap.
 
 ~Bitfield () noexcept
 Desctructor.
 
Bitfieldadd (const QVariantMap &memberProps)
 Add properties of the next member.
 
Bitfieldadd (QVariantMap &&memberProps)
 Add properties of the next member.
 
QVariantMap asMap () const
 Retrieve all properties as map.
 
Bitfieldhidden (bool value=true)
 Set whether the field is hidden.
 
BitfieldhiddenWhenReadOnly (bool value=true)
 Set whether the field must be hidden when cannot be modified.
 
bool isHidden () const
 Check the field is hidden.
 
bool isHiddenWhenReadOnly () const
 Check the field is hidden when readOnly.
 
bool isReadOnly () const
 Check whether the field cannot be modified.
 
bool isSerialisedHidden () const
 Check the serialisation part is hidden.
 
const MembersListmembers () const
 Get access to the properties of contained members.
 
const QString & name () const
 Get name of the field.
 
Bitfieldname (const char *value)
 Set name value.
 
Bitfieldname (const QString &value)
 Set name value.
 
Bitfieldoperator= (Bitfield &&)
 Move assignment.
 
Bitfieldoperator= (const Bitfield &)
 Copy assignment.
 
BitfieldreadOnly (bool value=true)
 Set whether the field cannot be modified.
 
BitfieldserialisedHidden (bool value=true)
 Set whether the serialised part is hidden.
 
void setName (const char *value)
 Update the name value.
 
void setName (const QString &value)
 Update the name value.
 
void setTo (QVariantMap &props) const
 Copy all the properties value into provided properties map.
 

Static Protected Member Functions

template<typename TValueType >
static TValueType getElemFrom (const QVariantMap &props, const QString &name, const TValueType &defaultVal=TValueType())
 read element value from the map
 
template<typename U >
static void setElemTo (U &&val, const QString &name, QVariantMap &props)
 set element value to the map
 

Member Function Documentation

◆ getElemFrom()

template<typename TValueType >
static TValueType cc_tools_qt::property::field::Common::getElemFrom ( const QVariantMap &  props,
const QString &  name,
const TValueType &  defaultVal = TValueType() 
)
staticprotectedinherited

read element value from the map

Parameters
[in]propsProperties map
[in]nameProperty name
[in]defaultValValue to return if not found in map
Returns
Value of found property in the map

◆ hidden()

Bitfield & cc_tools_qt::property::field::CommonBase< Bitfield >::hidden ( bool  value = true)
inherited

Set whether the field is hidden.

Returns
reference to derived class

◆ hiddenWhenReadOnly()

Bitfield & cc_tools_qt::property::field::CommonBase< Bitfield >::hiddenWhenReadOnly ( bool  value = true)
inherited

Set whether the field must be hidden when cannot be modified.

Returns
reference to derived class

◆ name() [1/2]

Bitfield & cc_tools_qt::property::field::CommonBase< Bitfield >::name ( const char *  value)
inherited

Set name value.

Returns
reference to derived class

◆ name() [2/2]

Bitfield & cc_tools_qt::property::field::CommonBase< Bitfield >::name ( const QString &  value)
inherited

Set name value.

Returns
reference to derived class

◆ readOnly()

Bitfield & cc_tools_qt::property::field::CommonBase< Bitfield >::readOnly ( bool  value = true)
inherited

Set whether the field cannot be modified.

Returns
reference to derived class

◆ serialisedHidden()

Bitfield & cc_tools_qt::property::field::CommonBase< Bitfield >::serialisedHidden ( bool  value = true)
inherited

Set whether the serialised part is hidden.

Returns
reference to derived class

◆ setElemTo()

template<typename U >
static void cc_tools_qt::property::field::Common::setElemTo ( U &&  val,
const QString &  name,
QVariantMap &  props 
)
staticprotectedinherited

set element value to the map

Parameters
[in]valValue to set
[in]nameName of the property
[in,out]propsMap to update

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