SGL
Public Member Functions | Public Attributes | List of all members
GTableIndex Struct Reference

This is a small structure representing a row and column in a table. More...

#include "gtable.h"

Public Member Functions

 GTableIndex(int row, int col)
 Constructs a location representing the given row and column. More...
 
 GTableIndex()
 Constructs a default location 0, 0. More...
 
string toString() const
 Returns a string representation of this location, such as "r2c17". More...
 

Public Attributes

int col
 
int row
 

Detailed Description

This is a small structure representing a row and column in a table.

Several GTable methods return row/column locations in a single value using this structure.

Version
2021/04/03
  • removed dependencies
  • removed hashCode
  • added to_string
2018/03/12
  • initial version

Constructor & Destructor Documentation

◆ GTableIndex() [1/2]

GTableIndex ( int  row,
int  col 
)

Constructs a location representing the given row and column.

Any indexes are allowed, including negatives and out-of-bounds indexes.

◆ GTableIndex() [2/2]

Constructs a default location 0, 0.

Member Function Documentation

◆ toString()

string toString ( ) const

Returns a string representation of this location, such as "r2c17".

Member Data Documentation

◆ col

int col

◆ row

int row