13#include <boost/variant.hpp>
17namespace DataObjects {
32 PeakColumn(std::vector<T> &peaks,
const std::string &name);
35 size_t size()
const override {
return m_peaks.size(); }
38 const std::type_info &get_type_info()
const override;
41 const std::type_info &get_pointer_type_info()
const override;
43 bool getReadOnly()
const override;
46 void print(
size_t index, std::ostream &s)
const override;
48 void read(
size_t index,
const std::string &text)
override;
51 void read(
const size_t index, std::istringstream &in)
override;
54 bool isBool()
const override;
56 bool isNumber()
const override;
59 long int sizeOfData()
const override;
65 double toDouble(
size_t i)
const override;
68 void fromDouble(
size_t i,
double value)
override;
71 const std::vector<T> &
data()
const {
return m_peaks; }
76 throw std::runtime_error(
"equals not implemented, to compare use CompareWorkspace");
81 void resize(
size_t count)
override;
83 void insert(
size_t index)
override;
85 void remove(
size_t index)
override;
87 void *void_pointer(
size_t index)
override;
89 const void *void_pointer(
size_t index)
const override;
98 using CacheValueType = boost::variant<double, int, std::string, Kernel::V3D>;
102 void setPeakHKLOrRunNumber(
const size_t index,
const double val);
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
Column is the base class for columns of TableWorkspace.
PeakColumn : a Column sub-class used to display peak information as a TableWorkspace.
bool equals(const Column &otherColumn, double tolerance) const override
const std::vector< T > & data() const
Reference to the data.
std::vector< T > & m_peaks
Reference to the peaks object saved in the PeaksWorkspace.
int m_hklPrec
Precision of hkl in table workspace.
std::list< CacheValueType > m_oldRows
boost::variant< double, int, std::string, Kernel::V3D > CacheValueType
Type of the row cache value.
size_t size() const override
Number of individual elements in the column.
Helper class which provides the Collimation Length for SANS instruments.