CGraph
Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GGroup Class Reference

所有节点组合的基类,所有节点组合功能,均继承自此类 More...

#include <GGroup.h>

Inheritance diagram for GGroup:
Inheritance graph
[legend]
Collaboration diagram for GGroup:
Collaboration graph
[legend]

Protected Member Functions

virtual CStatus addElement (GElementPtr element)
 
CBool isSerializable () const override
 
- Protected Member Functions inherited from GElement
 GElement ()=default
 
 ~GElement () override
 
virtual CStatus prepareRun ()
 
virtual CStatus checkRunResult ()
 
virtual CBool isHold ()
 
virtual CBool isMatch ()
 
CStatus crashed (const CException &ex)
 
template<typename T , c_enable_if_t< std::is_base_of< GElementParam, T >::value, int > = 0>
T * getEParam (const std::string &key)
 
CIndex getThreadIndex ()
 
CBool isTimeout () const
 
CIndex getBindingIndex () const
 
GElementRelation getRelation () const
 
 CGRAPH_NO_ALLOWED_COPY (GElement)
 

Private Member Functions

 GGroup ()
 
CStatus addManagers (GParamManagerPtr paramManager, GEventManagerPtr eventManager, GStageManagerPtr stageManager) override
 
CStatus init () override
 
CStatus destroy () override
 
CVoid dumpGroupLabelBegin (std::ostream &oss)
 
CVoid dumpGroupLabelEnd (std::ostream &oss)
 
virtual CBool isSeparate (GElementCPtr a, GElementCPtr b) const
 

Private Attributes

GElementPtrArr group_elements_arr_
 

Friends

class GPipeline
 
class GCluster
 
class GRegion
 
class GCondition
 
class GMutable
 
template<GMultiConditionType >
class GMultiCondition
 
template<CInt >
class GSome
 

Additional Inherited Members

- Public Member Functions inherited from GElement
template<typename TAspect , typename TParam = GAspectDefaultParam, c_enable_if_t< std::is_base_of< GAspect, TAspect >::value, int > = 0, c_enable_if_t< std::is_base_of< GAspectParam, TParam >::value, int > = 0>
GElementaddGAspect (TParam *param=nullptr)
 
template<typename TAspect , typename ... Args, c_enable_if_t< std::is_base_of< GTemplateAspect< Args... >, TAspect >::value, int > = 0>
GElementaddGAspect (Args... args)
 
template<typename T , c_enable_if_t< std::is_base_of< GElementParam, T >::value, int > = 0>
GElementaddEParam (const std::string &key, T *param)
 
CStatus addDependGElements (const std::set< GElement * > &elements)
 
GElementsetName (const std::string &name) override
 
GElementsetLoop (CSize loop)
 
GElementsetLevel (CLevel level)
 
GElementsetVisible (CBool visible)
 
GElementsetBindingIndex (CIndex index)
 
GElementsetTimeout (CMSec timeout, GElementTimeoutStrategy strategy=GElementTimeoutStrategy::AS_ERROR)
 
GElementsetMacro (CBool macro)
 
CBool isGGroup () const
 
CBool isGAdaptor () const
 
CBool isGNode () const
 
GElementState getCurState () const
 
CStatus removeDepend (GElement *element)
 
GElementoperator-- (int) noexcept
 
GElementoperator> (GElement *element)
 
GElementoperator& (GElement *element)
 
GElementoperator* (CSize loop) noexcept
 
template<typename TAspect , typename TParam , c_enable_if_t< std::is_base_of< GAspect, TAspect >::value, int > , c_enable_if_t< std::is_base_of< GAspectParam, TParam >::value, int > >
CGRAPH_NAMESPACE_BEGIN GElementPtr addGAspect (TParam *param)
 
template<typename TAspect , typename ... Args, c_enable_if_t< std::is_base_of< GTemplateAspect< Args... >, TAspect >::value, int > >
GElementPtr addGAspect (Args... args)
 
template<typename T , c_enable_if_t< std::is_base_of< GElementParam, T >::value, int > >
GElementPtr addEParam (const std::string &key, T *param)
 
- Public Member Functions inherited from CObject
 CObject ()=default
 
virtual CStatus run ()=0
 
virtual ~CObject ()=default
 
- Public Member Functions inherited from CDescInfo
virtual const std::string & getName () const
 
const std::string & getSession () const
 
const std::string & getDescription () const
 
virtual auto setDescription (const std::string &description) -> decltype(this)
 
virtual ~CDescInfo ()=default
 
- Protected Attributes inherited from CDescInfo
std::string name_
 
std::string session_
 
std::string description_
 

Detailed Description

所有节点组合的基类,所有节点组合功能,均继承自此类

Constructor & Destructor Documentation

◆ GGroup()

CGRAPH_NAMESPACE_BEGIN GGroup::GGroup ( )
explicitprivate

Member Function Documentation

◆ addElement()

CStatus GGroup::addElement ( GElementPtr  element)
protectedvirtual

向group中,添加element信息

Parameters
element
Returns

Reimplemented in GSome< TriggerNum >, and GRegion.

Here is the call graph for this function:

◆ addManagers()

CStatus GGroup::addManagers ( GParamManagerPtr  paramManager,
GEventManagerPtr  eventManager,
GStageManagerPtr  stageManager 
)
overrideprivatevirtual

设置manager信息

Parameters
paramManager
eventManager
stageManager
Returns

Reimplemented from GElement.

Reimplemented in GRegion.

◆ destroy()

CStatus GGroup::destroy ( )
overrideprivatevirtual

释放函数

Reimplemented from CObject.

Reimplemented in GRegion, and GMutable.

◆ dumpGroupLabelBegin()

CVoid GGroup::dumpGroupLabelBegin ( std::ostream &  oss)
private

生成graphviz中 group对应的label 的开头信息

Parameters
oss
Returns
Here is the call graph for this function:

◆ dumpGroupLabelEnd()

CVoid GGroup::dumpGroupLabelEnd ( std::ostream &  oss)
private

生成graphviz中的 group对应的label 的结尾信息

Parameters
oss
Returns

◆ init()

CStatus GGroup::init ( )
overrideprivatevirtual

初始化函数

Reimplemented from CObject.

Reimplemented in GRegion, and GMutable.

◆ isSeparate()

CBool GGroup::isSeparate ( GElementCPtr  a,
GElementCPtr  b 
) const
privatevirtual

判断两个element,是否相互独立

Parameters
a
b
Returns
@notice 如果返回 true,则表示一定有前后依赖关系,不可能并发执行。否则表示不确定,原因是并发情况无法完全确定

Reimplemented in GCondition, GRegion, GMultiCondition< type >, and GCluster.

◆ isSerializable()

CBool GGroup::isSerializable ( ) const
overrideprotectedvirtual

判断当前元素,是否可以线性执行。默认返回true

Returns

针对group的情况,应该是所有在其中的element 都是可以串行的,才认定为可串行 但是在 region和 multiCondition中,有针对性的判断

Reimplemented from GElement.

Reimplemented in GMutable, GSome< TriggerNum >, and GRegion.

Friends And Related Function Documentation

◆ GCluster

friend class GCluster
friend

◆ GCondition

friend class GCondition
friend

◆ GMultiCondition

template<GMultiConditionType >
friend class GMultiCondition
friend

◆ GMutable

friend class GMutable
friend

◆ GPipeline

friend class GPipeline
friend

◆ GRegion

friend class GRegion
friend

◆ GSome

template<CInt >
friend class GSome
friend

Member Data Documentation

◆ group_elements_arr_

GElementPtrArr GGroup::group_elements_arr_
private

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