Covalent Bond  0.0.1-alpha
'covalent bond' is a data middle office. As a 2022-2023 Fall SWE final project.
Public Member Functions | Private Attributes | List of all members
cbVirtualTable Class Reference

cbVirtualTable works as a reference from shared memory. It only use a shape and SqlCell to define different tables. More...

#include <cbTable.hpp>

Collaboration diagram for cbVirtualTable:
Collaboration graph
[legend]

Public Member Functions

 cbVirtualTable ()=default
 
 ~cbVirtualTable ()
 
 cbVirtualTable (const cbVirtualTable &rhs)
 
 cbVirtualTable (cbShape< 2 > &shape)
 
 cbVirtualTable (const cbShape< 2 > &shape)
 
void resetShape (const cbShape< 2 > &shape)
 
void resetShapeH (const cbShape< 2 > &shape)
 
cbMySQLField ** getInfo ()
 Get the Info object. More...
 
void setInfo (cbMySQLField **v)
 Set the Info object. More...
 
void setInfoAt (int32_t i, cbMySQLField *v)
 Set the Info At object. More...
 
cbMySQLFieldgetInfoAt (int32_t i)
 Get the Info At object. More...
 
std::vector< std::vector< cbMySQLCell * > > & getData ()
 Get the Data object. More...
 
cbShape< 2 > getShape ()
 Get the Shape object. More...
 
cbMySQLCellatPtr (int32_t i, int32_t j)
 row major More...
 
cbMySQLCell *& atPtrRef (int32_t i, int32_t j)
 
void setPtrAt (int32_t i, int32_t j, cbMySQLCell *v)
 Set the Ptr At object. More...
 
cbVirtualTable getRow (int32_t i)
 Get the Row object. More...
 
cbVirtualTable getCol (int32_t i)
 Get the Col object. More...
 
std::map< int32_t, int32_t > keyBy (const std::string &colName) const
 
void pushRow (const std::vector< cbMySQLCell * > &row)
 
std::string colNameAt (int32_t i)
 
std::string colTypeAt (int32_t i)
 
void str ()
 

Private Attributes

bool m_isInfoExtent = false
 
cbMySQLField ** m_info = nullptr
 
cbShape< 2 > m_shape
 
std::vector< std::vector< cbMySQLCell * > > m_data
 

Detailed Description

cbVirtualTable works as a reference from shared memory. It only use a shape and SqlCell to define different tables.

Definition at line 605 of file cbTable.hpp.

Constructor & Destructor Documentation

◆ cbVirtualTable() [1/4]

cbVirtualTable::cbVirtualTable ( )
default

Referenced by getCol(), and getRow().

Here is the caller graph for this function:

◆ ~cbVirtualTable()

cbVirtualTable::~cbVirtualTable ( )
inline

Definition at line 608 of file cbTable.hpp.

References m_info, and m_isInfoExtent.

◆ cbVirtualTable() [2/4]

cbVirtualTable::cbVirtualTable ( const cbVirtualTable rhs)
inline

Definition at line 611 of file cbTable.hpp.

References m_data, m_info, and m_shape.

◆ cbVirtualTable() [3/4]

cbVirtualTable::cbVirtualTable ( cbShape< 2 > &  shape)
inline

Definition at line 616 of file cbTable.hpp.

References m_data.

◆ cbVirtualTable() [4/4]

cbVirtualTable::cbVirtualTable ( const cbShape< 2 > &  shape)
inline

Definition at line 620 of file cbTable.hpp.

References m_data.

Member Function Documentation

◆ atPtr()

cbMySQLCell * cbVirtualTable::atPtr ( int32_t  i,
int32_t  j 
)

row major

Parameters
irow
jcol
Returns
cbMySQLCell*

Definition at line 128 of file cbTable.cpp.

References m_data.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph(), and cb::graph::cbComputeGraph::generateGraphTask().

Here is the caller graph for this function:

◆ atPtrRef()

cbMySQLCell *& cbVirtualTable::atPtrRef ( int32_t  i,
int32_t  j 
)
Parameters
i
j
Returns
cbMySQLCell*&

Definition at line 130 of file cbTable.cpp.

References m_data.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph(), getCol(), getRow(), mapShared2Virtual(), and setPtrAt().

Here is the caller graph for this function:

◆ colNameAt()

std::string cbVirtualTable::colNameAt ( int32_t  i)
Parameters
i
Returns
std::string

Definition at line 195 of file cbTable.cpp.

References cbMySQLField::getName(), and m_info.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ colTypeAt()

std::string cbVirtualTable::colTypeAt ( int32_t  i)
Parameters
i
Returns
std::string

Definition at line 197 of file cbTable.cpp.

References m_info.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ getCol()

cbVirtualTable cbVirtualTable::getCol ( int32_t  i)

Get the Col object.

Parameters
i
Returns
cbVirtualTable

Definition at line 145 of file cbTable.cpp.

References atPtrRef(), cbVirtualTable(), getInfo(), m_shape, makeShapeFull(), and setInfo().

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getData()

std::vector< std::vector< cbMySQLCell * > > & cbVirtualTable::getData ( )

Get the Data object.

Returns
std::vector<std::vector<cbMySQLCell*>>&

Definition at line 126 of file cbTable.cpp.

References m_data.

◆ getInfo()

cbMySQLField ** cbVirtualTable::getInfo ( )

Get the Info object.

Returns
cbMySQLField**

Definition at line 115 of file cbTable.cpp.

References m_info.

Referenced by cb::graph::cbVirtualDeviceNode::generateTask(), and getCol().

Here is the caller graph for this function:

◆ getInfoAt()

cbMySQLField * cbVirtualTable::getInfoAt ( int32_t  i)

Get the Info At object.

Definition at line 124 of file cbTable.cpp.

References m_info.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ getRow()

cbVirtualTable cbVirtualTable::getRow ( int32_t  i)

Get the Row object.

Parameters
i
Returns
cbVirtualTable

Definition at line 134 of file cbTable.cpp.

References atPtrRef(), cbVirtualTable(), m_info, m_shape, makeShapeFull(), and setInfo().

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getShape()

cbShape<2> cbVirtualTable::getShape ( )
inline

Get the Shape object.

Returns
cbShape<2>

Definition at line 687 of file cbTable.hpp.

References m_shape.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph(), cb::graph::cbVirtualDeviceNode::generateTask(), and mapShared2Virtual().

Here is the caller graph for this function:

◆ keyBy()

std::map< int32_t, int32_t > cbVirtualTable::keyBy ( const std::string &  colName) const
Parameters
colName
Returns
std::map<int32_t, int32_t>

Definition at line 156 of file cbTable.cpp.

References DataTime, Date, Double, Float, Int, m_data, m_info, m_shape, Null, String, Time, and ULL.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ pushRow()

void cbVirtualTable::pushRow ( const std::vector< cbMySQLCell * > &  row)
Parameters
vt

Definition at line 189 of file cbTable.cpp.

References m_data, and m_shape.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ resetShape()

void cbVirtualTable::resetShape ( const cbShape< 2 > &  shape)
Parameters
shape

Definition at line 98 of file cbTable.cpp.

References m_data, and m_shape.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph(), mapShared2Virtual(), and resetShapeH().

Here is the caller graph for this function:

◆ resetShapeH()

void cbVirtualTable::resetShapeH ( const cbShape< 2 > &  shape)
Parameters
shape
withHead

Definition at line 109 of file cbTable.cpp.

References m_info, m_isInfoExtent, and resetShape().

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setInfo()

void cbVirtualTable::setInfo ( cbMySQLField **  v)

Set the Info object.

Parameters
v

Definition at line 117 of file cbTable.cpp.

References m_info.

Referenced by getCol(), getRow(), and mapShared2Virtual().

Here is the caller graph for this function:

◆ setInfoAt()

void cbVirtualTable::setInfoAt ( int32_t  i,
cbMySQLField v 
)

Set the Info At object.

Parameters
v

Definition at line 119 of file cbTable.cpp.

References m_info, and m_isInfoExtent.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ setPtrAt()

void cbVirtualTable::setPtrAt ( int32_t  i,
int32_t  j,
cbMySQLCell v 
)

Set the Ptr At object.

Parameters
i
j
v

Definition at line 132 of file cbTable.cpp.

References atPtrRef().

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str()

void cbVirtualTable::str ( )

Definition at line 199 of file cbTable.cpp.

References m_shape.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

Member Data Documentation

◆ m_data

std::vector<std::vector<cbMySQLCell*> > cbVirtualTable::m_data
private

Definition at line 773 of file cbTable.hpp.

Referenced by atPtr(), atPtrRef(), cbVirtualTable(), getData(), keyBy(), pushRow(), and resetShape().

◆ m_info

cbMySQLField** cbVirtualTable::m_info = nullptr
private

◆ m_isInfoExtent

bool cbVirtualTable::m_isInfoExtent = false
private

Definition at line 770 of file cbTable.hpp.

Referenced by resetShapeH(), setInfoAt(), and ~cbVirtualTable().

◆ m_shape

cbShape<2> cbVirtualTable::m_shape
private

Definition at line 772 of file cbTable.hpp.

Referenced by cbVirtualTable(), getCol(), getRow(), getShape(), keyBy(), pushRow(), resetShape(), and str().


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