|
Covalent Bond
0.0.1-alpha
'covalent bond' is a data middle office. As a 2022-2023 Fall SWE final project.
|
#include <cbComputeGraph.hpp>

Public Member Functions | |
| cbComputeGraph (int32_t idx) | |
| ~cbComputeGraph () | |
| bool | isDAG () |
| To judge the Graph is DAG or not. More... | |
| bool | isSingleOutput () |
| To judge the graph has single output or not. More... | |
| cbMySQLCell * | createCell () |
| Create a Cell object. More... | |
| cbMySQLCell * | createCell (int value) |
| Create a Cell object. More... | |
| cbMySQLCell * | createCell (float value) |
| Create a Cell object. More... | |
| cbMySQLCell * | createCell (double value) |
| Create a Cell object. More... | |
| cbMySQLCell * | createCell (unsigned long long value) |
| Create a Cell object. More... | |
| cbMySQLCell * | createCell (const std::string &value) |
| Create a Cell object. More... | |
| cbMySQLCell * | createCell (const std::string &value, const cbMySQLType &t) |
| Create a Cell object. More... | |
| cbVirtualDeviceNode * | createVirtualDeviceNode (int32_t idx) |
| create nodes belongs to this graph. More... | |
| cbRedisCachingNode * | createRedisCachingNode (int32_t idx) |
| ! for sql only, now. More... | |
| cbOperatorNode * | createCombineNode (const std::vector< std::string > &keys, const std::string &name) |
| Create a Combine Node object. More... | |
| cbOperatorNode * | createFilterNode (const sol::function &boolF, const sol::function &exF) |
| Create a Filter Node object. More... | |
| void | setVirtualDeviceManager (trivial::cbVirtualDeviceManager *virtualDeviceM) |
| Set the Virtual Device Manager object. More... | |
| void | registerNode (cbNode *node) |
| register a node. Not used by lua binding. More... | |
| int32_t | getId () |
| Get the Id object. More... | |
| WFGraphTask * | generateGraphTask (const graph_callback &func=nullptr) |
| Create the graph task. More... | |
| void | execScriptFile (const std::string &filePath) |
| execute the script from file. More... | |
| void | execScript (const std::string &script) |
| execute the script More... | |
| void | addCacheServer (cbRedisCachingNode *v) |
| The cache server node. Lua binding in. More... | |
| cbOutputTableStruct * | getOutput () |
| Get the Output object. More... | |
| std::vector< cbNode * > | getNodes () |
| Get the Nodes object. More... | |
Static Public Member Functions | |
| static void | execMain (WFGraphTask *task, cbComputeGraph *graph) |
| Execute the graph task. More... | |
Public Attributes | |
| friend | cbVirtualDeviceNode |
| friend | cbRedisCachingNode |
| friend | cbOperatorNode |
Private Attributes | |
| int32_t | m_idx = 0 |
| cbOpIO | io |
| std::vector< cbNode * > | m_nodes |
| cbRedisCachingNode * | m_cacheNode = nullptr |
| cbGraphSharedMem * | m_sharedMem = nullptr |
| cbGraphSharedLuaStack * | m_sharedLuaStack = nullptr |
| trivial::cbVirtualDeviceManager * | m_virtualDevice = nullptr |
Definition at line 342 of file cbComputeGraph.hpp.
| cb::graph::cbComputeGraph::cbComputeGraph | ( | int32_t | idx | ) |
Definition at line 174 of file cbComputeGraph.cpp.
References __luaPackedCellAsVec(), __luaPackedStringAsVec(), addCacheServer(), cb::graph::cbVirtualDeviceNode::addQuery(), cbVirtualTable::atPtr(), cbVirtualTable::atPtrRef(), cbVirtualTable::colNameAt(), cbVirtualTable::colTypeAt(), createCell(), createCombineNode(), createFilterNode(), createRedisCachingNode(), createVirtualDeviceNode(), DataTime, Date, Double, fetchShapeIndex(), Float, cb::graph::cbGraphSharedLuaStack::get(), cbVirtualTable::getCol(), cbVirtualTable::getInfoAt(), cbVirtualTable::getRow(), cbVirtualTable::getShape(), cbOpIO::I, Int, baseOp::io, cb::graph::cbNode::io, isDAG(), isSingleOutput(), cbVirtualTable::keyBy(), m_sharedLuaStack, MAKE_SHARED, Null, cbOpIO::O, cb::graph::cbOperatorNode::Op, cbOpCombine::overload(), cb::graph::cbNode::PointTo(), cbVirtualTable::pushRow(), cbVirtualTable::resetShape(), cbVirtualTable::resetShapeH(), cbVirtualTable::setInfoAt(), cbVirtualTable::setPtrAt(), cbMySQLField::setTable(), storeShapeIndex(), cbVirtualTable::str(), String, Time, and ULL.

| cb::graph::cbComputeGraph::~cbComputeGraph | ( | ) |
Definition at line 375 of file cbComputeGraph.cpp.
References m_cacheNode, m_nodes, m_sharedLuaStack, and m_sharedMem.
| void cb::graph::cbComputeGraph::addCacheServer | ( | cbRedisCachingNode * | v | ) |
The cache server node. Lua binding in.
| v | the redis caching server node. |
Definition at line 580 of file cbComputeGraph.cpp.
References cb::graph::cbNode::graph, and m_cacheNode.
Referenced by cbComputeGraph().

| cbMySQLCell * cb::graph::cbComputeGraph::createCell | ( | ) |
Create a Cell object.
Definition at line 407 of file cbComputeGraph.cpp.
References m_sharedMem, and cb::graph::cbGraphSharedMem::push().
Referenced by cbComputeGraph().


| cbMySQLCell * cb::graph::cbComputeGraph::createCell | ( | const std::string & | value | ) |
Create a Cell object.
| value | string |
Definition at line 437 of file cbComputeGraph.cpp.
References m_sharedMem, and cb::graph::cbGraphSharedMem::push().

| cbMySQLCell * cb::graph::cbComputeGraph::createCell | ( | const std::string & | value, |
| const cbMySQLType & | t | ||
| ) |
Create a Cell object.
| value | string |
| t | the type. such as String, Date, DateTime. |
Definition at line 443 of file cbComputeGraph.cpp.
References m_sharedMem, and cb::graph::cbGraphSharedMem::push().

| cbMySQLCell * cb::graph::cbComputeGraph::createCell | ( | double | value | ) |
Create a Cell object.
| value | double |
Definition at line 425 of file cbComputeGraph.cpp.
References m_sharedMem, and cb::graph::cbGraphSharedMem::push().

| cbMySQLCell * cb::graph::cbComputeGraph::createCell | ( | float | value | ) |
Create a Cell object.
| value | float |
Definition at line 419 of file cbComputeGraph.cpp.
References m_sharedMem, and cb::graph::cbGraphSharedMem::push().

| cbMySQLCell * cb::graph::cbComputeGraph::createCell | ( | int | value | ) |
Create a Cell object.
| value | int |
Definition at line 413 of file cbComputeGraph.cpp.
References m_sharedMem, and cb::graph::cbGraphSharedMem::push().

| cbMySQLCell * cb::graph::cbComputeGraph::createCell | ( | unsigned long long | value | ) |
Create a Cell object.
| value | unsigned long long |
Definition at line 431 of file cbComputeGraph.cpp.
References m_sharedMem, and cb::graph::cbGraphSharedMem::push().

| cbOperatorNode * cb::graph::cbComputeGraph::createCombineNode | ( | const std::vector< std::string > & | keys, |
| const std::string & | name | ||
| ) |
Create a Combine Node object.
| keys | |
| name |
Definition at line 462 of file cbComputeGraph.cpp.
References cbOperatorNode, cb::graph::cbGraphSharedLuaStack::get(), m_sharedLuaStack, cbOpCombine::overload(), and registerNode().
Referenced by cbComputeGraph().


| cbOperatorNode * cb::graph::cbComputeGraph::createFilterNode | ( | const sol::function & | boolF, |
| const sol::function & | exF | ||
| ) |
Create a Filter Node object.
| boolF | |
| exF |
Definition at line 473 of file cbComputeGraph.cpp.
References cbOperatorNode, cb::graph::cbGraphSharedLuaStack::get(), m_sharedLuaStack, cbOpFilter::overload(), and registerNode().
Referenced by cbComputeGraph().


| cbRedisCachingNode * cb::graph::cbComputeGraph::createRedisCachingNode | ( | int32_t | idx | ) |
! for sql only, now.
Create a Redis Caching Node object
| idx |
Definition at line 456 of file cbComputeGraph.cpp.
References cbRedisCachingNode, trivial::cbVirtualDeviceManager::getRedisDevice(), m_virtualDevice, and cb::graph::cbRedisCachingNode::setRedisDevice().
Referenced by cbComputeGraph().


| cbVirtualDeviceNode * cb::graph::cbComputeGraph::createVirtualDeviceNode | ( | int32_t | idx | ) |
create nodes belongs to this graph.
| idx |
Definition at line 449 of file cbComputeGraph.cpp.
References cbVirtualDeviceNode, trivial::cbVirtualDeviceManager::getMySqlDevice(), m_virtualDevice, registerNode(), and cb::graph::cbVirtualDeviceNode::setMySQLDevice().
Referenced by cbComputeGraph().


|
static |
| void cb::graph::cbComputeGraph::execScript | ( | const std::string & | script | ) |
execute the script
| script |
Definition at line 578 of file cbComputeGraph.cpp.
References cb::graph::cbGraphSharedLuaStack::execScript(), and m_sharedLuaStack.
Referenced by cb::apiCPP::addGraph().


| void cb::graph::cbComputeGraph::execScriptFile | ( | const std::string & | filePath | ) |
execute the script from file.
| filePath |
Definition at line 574 of file cbComputeGraph.cpp.
References cb::graph::cbGraphSharedLuaStack::execScriptFile(), and m_sharedLuaStack.

| WFGraphTask * cb::graph::cbComputeGraph::generateGraphTask | ( | const graph_callback & | func = nullptr | ) |
Create the graph task.
| func |
Definition at line 494 of file cbComputeGraph.cpp.
References cb::graph::cbRedisCachingNode::_generateSetTask(), cbVirtualTable::atPtr(), cb::graph::cbGraphSharedMem::clear(), cb::graph::cbGraphSharedMem::getOutStruct(), io, isDAG(), isSingleOutput(), cb::graph::Leaf, m_cacheNode, m_idx, m_nodes, cbOutputTableStruct::m_shape, m_sharedMem, cbOpIO::O, cb::graph::Operator, and cb::graph::Output.

| int32_t cb::graph::cbComputeGraph::getId | ( | ) |
Get the Id object.
Definition at line 492 of file cbComputeGraph.cpp.
References m_idx.
| std::vector< cbNode * > cb::graph::cbComputeGraph::getNodes | ( | ) |
Get the Nodes object.
Definition at line 587 of file cbComputeGraph.cpp.
References m_nodes.
Referenced by cb::pipeline::app::initRHttp().

| cbOutputTableStruct * cb::graph::cbComputeGraph::getOutput | ( | ) |
Get the Output object.
Definition at line 585 of file cbComputeGraph.cpp.
References cb::graph::cbGraphSharedMem::getOutStruct(), and m_sharedMem.
Referenced by cb::pipeline::app::initRHttp().


| bool cb::graph::cbComputeGraph::isDAG | ( | ) |
To judge the Graph is DAG or not.
Definition at line 382 of file cbComputeGraph.cpp.
References isSingleOutput(), m_nodes, and cb::graph::cbNode::nextNode.
Referenced by cbComputeGraph(), and generateGraphTask().


| bool cb::graph::cbComputeGraph::isSingleOutput | ( | ) |
To judge the graph has single output or not.
Definition at line 396 of file cbComputeGraph.cpp.
References m_nodes.
Referenced by cbComputeGraph(), generateGraphTask(), and isDAG().

| void cb::graph::cbComputeGraph::registerNode | ( | cbNode * | node | ) |
register a node. Not used by lua binding.
| node |
Definition at line 487 of file cbComputeGraph.cpp.
References m_nodes.
Referenced by createCombineNode(), createFilterNode(), and createVirtualDeviceNode().

| void cb::graph::cbComputeGraph::setVirtualDeviceManager | ( | trivial::cbVirtualDeviceManager * | virtualDeviceM | ) |
Set the Virtual Device Manager object.
| virtualDeviceM |
Definition at line 483 of file cbComputeGraph.cpp.
References m_virtualDevice.
Referenced by cb::apiCPP::addGraph().

| friend cb::graph::cbComputeGraph::cbOperatorNode |
Definition at line 346 of file cbComputeGraph.hpp.
Referenced by createCombineNode(), and createFilterNode().
| friend cb::graph::cbComputeGraph::cbRedisCachingNode |
Definition at line 345 of file cbComputeGraph.hpp.
Referenced by createRedisCachingNode().
| friend cb::graph::cbComputeGraph::cbVirtualDeviceNode |
Definition at line 344 of file cbComputeGraph.hpp.
Referenced by createVirtualDeviceNode().
|
private |
Definition at line 532 of file cbComputeGraph.hpp.
Referenced by generateGraphTask(), and cb::graph::cbVirtualDeviceNode::generateTask().
|
private |
Definition at line 534 of file cbComputeGraph.hpp.
Referenced by addCacheServer(), generateGraphTask(), and ~cbComputeGraph().
|
private |
Definition at line 531 of file cbComputeGraph.hpp.
Referenced by generateGraphTask(), and getId().
|
private |
Definition at line 533 of file cbComputeGraph.hpp.
Referenced by generateGraphTask(), getNodes(), isDAG(), isSingleOutput(), registerNode(), and ~cbComputeGraph().
|
private |
Definition at line 536 of file cbComputeGraph.hpp.
Referenced by cbComputeGraph(), createCombineNode(), createFilterNode(), execScript(), execScriptFile(), and ~cbComputeGraph().
|
private |
Definition at line 535 of file cbComputeGraph.hpp.
Referenced by createCell(), generateGraphTask(), cb::graph::cbVirtualDeviceNode::generateTask(), getOutput(), and ~cbComputeGraph().
|
private |
Definition at line 538 of file cbComputeGraph.hpp.
Referenced by createRedisCachingNode(), createVirtualDeviceNode(), and setVirtualDeviceManager().
1.8.17