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

多个Element的集合,一般非纯并行、也非纯串行(Gluster)时使用 More...

#include <GRegion.h>

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

Public Member Functions

GRegionsetGEngineType (GEngineType type)
 
CSize trim ()
 
- 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 ~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 Member Functions

 GRegion ()
 
 ~GRegion () override
 
CStatus init () final
 
CStatus run () final
 
CStatus destroy () final
 
- 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

CStatus addElement (GElementPtr element) final
 
CVoid dump (std::ostream &oss) final
 
CBool isSerializable () const final
 
CStatus addManagers (GParamManagerPtr paramManager, GEventManagerPtr eventManager, GStageManagerPtr stageManager) final
 
CBool isSeparate (GElementCPtr a, GElementCPtr b) const final
 

Private Attributes

GElementManagerPtr manager_ = nullptr
 

Friends

class GPipeline
 
class CAllocator
 
class GTrimOptimizer
 

Additional Inherited Members

- Protected Attributes inherited from CDescInfo
std::string name_
 
std::string session_
 
std::string description_
 

Detailed Description

多个Element的集合,一般非纯并行、也非纯串行(Gluster)时使用

Constructor & Destructor Documentation

◆ GRegion()

CGRAPH_NAMESPACE_BEGIN GRegion::GRegion ( )
explicitprotected
Here is the call graph for this function:

◆ ~GRegion()

GRegion::~GRegion ( )
overrideprotected

Member Function Documentation

◆ addElement()

CStatus GRegion::addElement ( GElementPtr  element)
finalprivatevirtual

向group中,添加element信息

Parameters
element
Returns

Reimplemented from GGroup.

Here is the call graph for this function:

◆ addManagers()

CStatus GRegion::addManagers ( GParamManagerPtr  paramManager,
GEventManagerPtr  eventManager,
GStageManagerPtr  stageManager 
)
finalprivatevirtual

设置manager信息

Parameters
paramManager
eventManager
stageManager
Returns

Reimplemented from GGroup.

◆ destroy()

CStatus GRegion::destroy ( )
finalprotectedvirtual

释放函数

Reimplemented from GGroup.

Here is the call graph for this function:

◆ dump()

CVoid GRegion::dump ( std::ostream &  oss)
finalprivatevirtual

graphviz dump 逻辑

Parameters
oss
Returns

Reimplemented from GElement.

Here is the call graph for this function:

◆ init()

CStatus GRegion::init ( )
finalprotectedvirtual

初始化函数

Reimplemented from GGroup.

Here is the call graph for this function:

◆ isSeparate()

CBool GRegion::isSeparate ( GElementCPtr  a,
GElementCPtr  b 
) const
finalprivatevirtual

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

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

Reimplemented from GGroup.

Here is the call graph for this function:

◆ isSerializable()

CBool GRegion::isSerializable ( ) const
finalprivatevirtual

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

Returns

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

Reimplemented from GGroup.

Here is the call graph for this function:

◆ run()

CStatus GRegion::run ( )
finalprotectedvirtual

流程处理函数

Implements CObject.

Here is the call graph for this function:

◆ setGEngineType()

GRegionPtr GRegion::setGEngineType ( GEngineType  type)

设置EngineType信息

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

◆ trim()

CSize GRegion::trim ( )

修剪冗余的连边信息

Returns
Here is the call graph for this function:

Friends And Related Function Documentation

◆ CAllocator

friend class CAllocator
friend

◆ GPipeline

friend class GPipeline
friend

◆ GTrimOptimizer

friend class GTrimOptimizer
friend

Member Data Documentation

◆ manager_

GElementManagerPtr GRegion::manager_ = nullptr
private

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