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::Bundle Class Reference

#include "cc_tools_qt/property/field.h"

Detailed Description

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

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

Public Types

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

Public Member Functions

 Bundle ()
 Default constructor.
 
 Bundle (Bundle &&)
 Move constructor.
 
 Bundle (const Bundle &)
 Copy constructor.
 
 Bundle (const QVariant &props)
 Construct from QVariant containing QVariantMap.
 
 Bundle (const QVariantMap &props)
 Construct from QVariantMap.
 
 ~Bundle () noexcept
 Destructor.
 
Bundleadd (const QVariantMap &memberProps)
 Add properties of the next member.
 
Bundleadd (QVariantMap &&memberProps)
 Add properties of the next member.
 
QVariantMap asMap () const
 Retrieve all properties as map.
 
Bundlehidden (bool value=true)
 Set whether the field is hidden.
 
BundlehiddenWhenReadOnly (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.
 
Bundlename (const char *value)
 Set name value.
 
Bundlename (const QString &value)
 Set name value.
 
Bundleoperator= (Bundle &&)
 Move assignment.
 
Bundleoperator= (const Bundle &)
 Copy assignment.
 
BundlereadOnly (bool value=true)
 Set whether the field cannot be modified.
 
BundleserialisedHidden (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()

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

Set whether the field is hidden.

Returns
reference to derived class

◆ hiddenWhenReadOnly()

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

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

Returns
reference to derived class

◆ name() [1/2]

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

Set name value.

Returns
reference to derived class

◆ name() [2/2]

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

Set name value.

Returns
reference to derived class

◆ readOnly()

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

Set whether the field cannot be modified.

Returns
reference to derived class

◆ serialisedHidden()

Bundle & cc_tools_qt::property::field::CommonBase< Bundle >::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: