MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / copyBlock

Method copyBlock

src/csvtable.cpp:126–141  ·  view source on GitHub ↗

* Returns a vector of vector of string defined by the given 0-based coordinates. */

Source from the content-addressed store, hash-verified

124 * Returns a vector of vector of string defined by the given 0-based coordinates.
125 */
126std::vector< std::vector<std::string> > CsvTable::copyBlock(table_index_t row_top, table_index_t col_top, table_index_t row_bot, table_index_t col_bot) {
127 std::vector< std::vector<std::string> > block;
128 std::vector<std::string> line;
129 table_index_t rows, cols;
130
131 for( rows = row_top; rows <= row_bot; ++rows ) {
132 for( cols = col_top; cols <= col_bot; ++cols ) {
133 line.push_back( storage.get(rows,cols) );
134 }
135 block.push_back( line );
136 line.clear();
137 }
138
139
140 return block;
141}
142
143
144/**

Callers 1

copySelectionMethod · 0.80

Calls 3

push_backMethod · 0.80
getMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected