Alexandria 2.31.4
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::Table::ColumnDescription Class Reference

Contains the description of a specific column of a Table. More...

#include <ColumnDescription.h>

Collaboration diagram for Euclid::Table::ColumnDescription:

Public Member Functions

 ColumnDescription (std::string name, std::type_index type=typeid(std::string), std::string unit="", std::string description="")
 
 ColumnDescription (std::string name, std::type_index type, std::size_t size, std::string unit="", std::string description="")
 
 ColumnDescription (const ColumnDescription &)=default
 
 ColumnDescription (ColumnDescription &&)=default
 
ColumnDescriptionoperator= (const ColumnDescription &)=default
 
ColumnDescriptionoperator= (ColumnDescription &&)=default
 
bool operator!= (const ColumnDescription &other) const
 Returns true if the two ColumnDescriptions do not describe the same column.
 
bool operator== (const ColumnDescription &other) const
 

Public Attributes

std::string name
 
std::type_index type
 
std::string unit
 
std::string description
 
std::size_t size
 

Detailed Description

Contains the description of a specific column of a Table.

Each table column is described by the following:

  • name : The name of the column
  • type : The type of its data
  • unit : The unit in which the data are expressed
  • description : A string describing the column

The access to the above is done by directly accessing the public members of the ColumnDescription class.

The ColumnDescription implements the comparison operators by checking only the name, type and unit and by ignoring the description text.

Definition at line 55 of file ColumnDescription.h.

Constructor & Destructor Documentation

◆ ColumnDescription() [1/4]

Euclid::Table::ColumnDescription::ColumnDescription ( std::string name,
std::type_index type = typeid(std::string),
std::string unit = "",
std::string description = "" )

Constructs a new ColumnDescription instance

Exceptions
Elements::Exceptionif the name is the empty string or if it contains whitespaces

Definition at line 32 of file ColumnDescription.cpp.

References ColumnDescription().

Referenced by ColumnDescription(), ColumnDescription(), ColumnDescription(), operator!=(), operator=(), operator=(), and operator==().

Here is the call graph for this function:

◆ ColumnDescription() [2/4]

Euclid::Table::ColumnDescription::ColumnDescription ( std::string name,
std::type_index type,
std::size_t size,
std::string unit = "",
std::string description = "" )

Definition at line 36 of file ColumnDescription.cpp.

References description, std::string::empty(), name, size, type, and unit.

Here is the call graph for this function:

◆ ColumnDescription() [3/4]

Euclid::Table::ColumnDescription::ColumnDescription ( const ColumnDescription & )
default

References ColumnDescription().

Here is the call graph for this function:

◆ ColumnDescription() [4/4]

Euclid::Table::ColumnDescription::ColumnDescription ( ColumnDescription && )
default

References ColumnDescription().

Here is the call graph for this function:

Member Function Documentation

◆ operator!=()

bool Euclid::Table::ColumnDescription::operator!= ( const ColumnDescription & other) const
inline

Returns true if the two ColumnDescriptions do not describe the same column.

Definition at line 75 of file ColumnDescription.h.

References ColumnDescription().

Here is the call graph for this function:

◆ operator=() [1/2]

ColumnDescription & Euclid::Table::ColumnDescription::operator= ( ColumnDescription && )
default

References ColumnDescription().

Here is the call graph for this function:

◆ operator=() [2/2]

ColumnDescription & Euclid::Table::ColumnDescription::operator= ( const ColumnDescription & )
default

References ColumnDescription().

Here is the call graph for this function:

◆ operator==()

bool Euclid::Table::ColumnDescription::operator== ( const ColumnDescription & other) const
inline

Returns true if the two ColumnDescriptions describe the same column (ignoring the description text)

Definition at line 81 of file ColumnDescription.h.

References ColumnDescription(), name, type, and unit.

Here is the call graph for this function:

Member Data Documentation

◆ description

std::string Euclid::Table::ColumnDescription::description

Definition at line 88 of file ColumnDescription.h.

Referenced by ColumnDescription().

◆ name

◆ size

std::size_t Euclid::Table::ColumnDescription::size

Definition at line 89 of file ColumnDescription.h.

Referenced by ColumnDescription().

◆ type

std::type_index Euclid::Table::ColumnDescription::type

Definition at line 86 of file ColumnDescription.h.

Referenced by ColumnDescription(), and operator==().

◆ unit

std::string Euclid::Table::ColumnDescription::unit

Definition at line 87 of file ColumnDescription.h.

Referenced by ColumnDescription(), and operator==().


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