Column: Made ::validate const
This commit is contained in:
@@ -47,7 +47,7 @@ ColumnUDAString::ColumnUDAString ()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool ColumnUDAString::validate (std::string& value)
|
||||
bool ColumnUDAString::validate (const std::string& value) const
|
||||
{
|
||||
// No restrictions.
|
||||
if (_values.size () == 0)
|
||||
@@ -143,7 +143,7 @@ ColumnUDANumeric::ColumnUDANumeric ()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool ColumnUDANumeric::validate (std::string& value)
|
||||
bool ColumnUDANumeric::validate (const std::string& value) const
|
||||
{
|
||||
// No restrictions.
|
||||
if (_values.size () == 0)
|
||||
@@ -231,7 +231,7 @@ ColumnUDADate::ColumnUDADate ()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool ColumnUDADate::validate (std::string& value)
|
||||
bool ColumnUDADate::validate (const std::string& value) const
|
||||
{
|
||||
// No restrictions.
|
||||
if (_values.size () == 0)
|
||||
@@ -345,7 +345,7 @@ ColumnUDADuration::ColumnUDADuration ()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool ColumnUDADuration::validate (std::string& value)
|
||||
bool ColumnUDADuration::validate (const std::string& value) const
|
||||
{
|
||||
// No restrictions.
|
||||
if (_values.size () == 0)
|
||||
|
||||
@@ -37,7 +37,7 @@ class ColumnUDAString : public ColumnTypeString
|
||||
{
|
||||
public:
|
||||
ColumnUDAString ();
|
||||
bool validate (std::string&);
|
||||
bool validate (const std::string&) const;
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
@@ -53,7 +53,7 @@ class ColumnUDANumeric : public ColumnTypeNumeric
|
||||
{
|
||||
public:
|
||||
ColumnUDANumeric ();
|
||||
bool validate (std::string&);
|
||||
bool validate (const std::string&) const;
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
@@ -66,7 +66,7 @@ class ColumnUDADate : public ColumnTypeDate
|
||||
{
|
||||
public:
|
||||
ColumnUDADate ();
|
||||
bool validate (std::string&);
|
||||
bool validate (const std::string&) const;
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
@@ -79,7 +79,7 @@ class ColumnUDADuration : public ColumnTypeDuration
|
||||
{
|
||||
public:
|
||||
ColumnUDADuration ();
|
||||
bool validate (std::string&);
|
||||
bool validate (const std::string&) const;
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ void Column::setStyle (const std::string& style)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Column::validate (std::string& input)
|
||||
bool Column::validate (const std::string& input) const
|
||||
{
|
||||
return input.length () ? true : false;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
virtual void setLabel (const std::string& value) { _label = value; }
|
||||
virtual void setReport (const std::string& value) { _report = value; }
|
||||
|
||||
virtual bool validate (std::string&);
|
||||
virtual bool validate (const std::string&) const;
|
||||
virtual void measure (const std::string&, unsigned int&, unsigned int&) {};
|
||||
virtual void measure (Task&, unsigned int&, unsigned int&) {};
|
||||
virtual void renderHeader (std::vector <std::string>&, int, Color&);
|
||||
|
||||
Reference in New Issue
Block a user