| 83 | } |
| 84 | |
| 85 | std::string repr( const ObjectMatrix &m ) |
| 86 | { |
| 87 | std::stringstream s; |
| 88 | |
| 89 | s << "IECore.ObjectMatrix("; |
| 90 | |
| 91 | if( m.numRows() > 0 ) |
| 92 | { |
| 93 | s << " ["; |
| 94 | |
| 95 | for( size_t x = 0; x < m.numRows(); x++ ) |
| 96 | { |
| 97 | s << " ["; |
| 98 | |
| 99 | for( size_t y = 0; y < m.numColumns(); y++ ) |
| 100 | { |
| 101 | object item( m[x][y] ); |
| 102 | std::string v = call_method< std::string >( item.ptr(), "__repr__" ); |
| 103 | s << " " << v << ( y == m.numColumns() -1 ? " " : "," ); |
| 104 | } |
| 105 | |
| 106 | s << "]" << ( x == m.numRows() - 1 ? " " : "," ); |
| 107 | } |
| 108 | |
| 109 | s << "] "; |
| 110 | } |
| 111 | |
| 112 | s << ")"; |
| 113 | |
| 114 | return s.str(); |
| 115 | } |
| 116 | |
| 117 | size_t convertRowIndex( const ObjectMatrix &m, tuple index ) |
| 118 | { |
nothing calls this directly
no test coverage detected