TableDebugView.inl
Go to the documentation of this file.
1 namespace iv
2 {
3 
4 namespace table_debug_context
5 {
6 
7 //---------------------------------- RowHandle -----------------------------------------------------
8 template< class ColumnT >
9 ColumnHandle RowHandle::Column( char const * col_name, ColumnT && value )
10 {
11  return ColumnHandle( this->_row, col_name, value );
12 }
13 
14 //---------------------------------- ColumnHandle --------------------------------------------------
15 template< class ColumnT >
16 ColumnHandle::ColumnHandle( RowData * _row, const char * col_name, ColumnT && value )
17 {
18  //
19  StringIOIndex::Register< ColumnT >();
20 
21  //
22  auto it = _row->columns.insert( std::pair( std::string( col_name ), ColumnData() ) ).first;
23  it->second.value = std::any( value );
24  this->_column = &it->second;
25 }
26 
27 template< class HintT >
28 ColumnHandle & ColumnHandle::Hint( const char * hint_name, HintT && value )
29 {
30  //
31  StringIOIndex::Register< HintT >();
32 
33  //
34  HintData data;
35  data.name = hint_name;
36  data.hint = std::any( value );
37  this->_column->hints.push_back( data );
38  return *this;
39 }
40 
41 }
42 
43 }