#include <imaging_column.h>

Public Types

typedef std::vector< std::string > string_vector
 

Public Member Functions

 imaging_column ()
 
 imaging_column (const size_t index, const size_t offset)
 
 imaging_column (const size_t index, const size_t offset, const string_vector &sub_columns)
 
column_id id () const
 
const std::string & name () const
 
bool has_children () const
 
size_t offset () const
 
const string_vectorsubcolumns () const
 
std::string full_name (const size_t sub_index) const INTEROP_THROW_SPEC((model
 
void offset (const size_t off)
 
void id (const column_id val)
 
void parse_header_for_id (const std::string &header)
 
size_t size () const
 
size_t column_count () const
 

Static Public Member Functions

static std::string to_header (const column_id id)
 
static std::string to_header (const std::string &name)
 
static std::string to_name (const std::string &header)
 
static std::string to_name (const model::table::imaging_column &header)
 

Friends

std::istream & operator>> (std::istream &in, imaging_column &column)
 
std::ostream & operator<< (std::ostream &out, const imaging_column &column)
 

Detailed Description

Information describing a single column or a group of columns

Member Typedef Documentation

typedef std::vector<std::string> string_vector

Define a vector of strings

Constructor & Destructor Documentation

imaging_column ( )
inline

Constructor

imaging_column ( const size_t  index,
const size_t  offset 
)
inline

Constructor

Parameters
indexcolumn id
offsetoffset of the data into the data array
imaging_column ( const size_t  index,
const size_t  offset,
const string_vector sub_columns 
)
inline

Constructor

Parameters
indexcolumn id
offsetoffset of the data into the data array
sub_columnssub column header names

Member Function Documentation

size_t column_count ( ) const
inline

Get total number of columns in the data up to this column

Returns
total number of columns in the data up to this column
std::string full_name ( const size_t  sub_index) const
inline

Get the full name of the column and sub column

Parameters
sub_indexindex of subcolumn
Returns
name of the column
bool has_children ( ) const
inline

Check if the column has sub column headers

Returns
true if there are sub column headers
column_id id ( ) const
inline

Get the column id enum

Returns
column id enum
void id ( const column_id  val)
inline

Update the offset of the column

Parameters
valnew id
const std::string& name ( ) const
inline

Get the name of the column

Returns
name of the column
size_t offset ( ) const
inline

Get the offset into the data array

Returns
offset into the data array
void offset ( const size_t  off)
inline

Update the offset of the column

Parameters
offnew offset into data array
void parse_header_for_id ( const std::string &  header)
inline

Update the offset of the column

Parameters
headerheader description for new id
size_t size ( ) const
inline

Get total number of subcolumns

Returns
total number of subcolumns
const string_vector& subcolumns ( ) const
inline

Get a vector of subcolumn headers

Returns
vector of subcolumn headers
static std::string to_header ( const column_id  id)
inlinestatic

Convert a column id enum to the string representation

Parameters
idcolumn id enum
Returns
header representation
static std::string to_header ( const std::string &  name)
inlinestatic

Convert name to header

Parameters
namecolumn name
Returns
header representation
static std::string to_name ( const std::string &  header)
inlinestatic

Convert header to name

Parameters
headercolumn header name
Returns
column name
static std::string to_name ( const model::table::imaging_column header)
inlinestatic

Convert header to name

Parameters
headercolumn header
Returns
column name

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const imaging_column column 
)
friend

Write a column header to an output stream

Parameters
outoutput stream
columncolumn header
Returns
output stream
std::istream& operator>> ( std::istream &  in,
imaging_column column 
)
friend

Read a column header from an input stream

Parameters
ininput stream
columncolumn header
Returns
input stream

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