mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-06 17:37:21 +02:00
ColUDA: Split ColUDA into ColUDA{String,Numeric,Date,Duration} to make use of ColType*::modify
This commit is contained in:
parent
73d789c593
commit
6f4f468d0d
3 changed files with 401 additions and 88 deletions
|
@ -27,12 +27,64 @@
|
|||
#ifndef INCLUDED_COLUDA
|
||||
#define INCLUDED_COLUDA
|
||||
|
||||
#include <Column.h>
|
||||
#include <ColTypeString.h>
|
||||
#include <ColTypeNumeric.h>
|
||||
#include <ColTypeDate.h>
|
||||
#include <ColTypeDuration.h>
|
||||
|
||||
class ColumnUDA : public Column
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class ColumnUDAString : public ColumnTypeString
|
||||
{
|
||||
public:
|
||||
ColumnUDA ();
|
||||
ColumnUDAString ();
|
||||
bool validate (std::string&);
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
public:
|
||||
std::vector <std::string> _values;
|
||||
|
||||
private:
|
||||
bool _hyphenate;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class ColumnUDANumeric : public ColumnTypeNumeric
|
||||
{
|
||||
public:
|
||||
ColumnUDANumeric ();
|
||||
bool validate (std::string&);
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
public:
|
||||
std::vector <std::string> _values;
|
||||
|
||||
private:
|
||||
bool _hyphenate;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class ColumnUDADate : public ColumnTypeDate
|
||||
{
|
||||
public:
|
||||
ColumnUDADate ();
|
||||
bool validate (std::string&);
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
||||
public:
|
||||
std::vector <std::string> _values;
|
||||
|
||||
private:
|
||||
bool _hyphenate;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class ColumnUDADuration : public ColumnTypeDuration
|
||||
{
|
||||
public:
|
||||
ColumnUDADuration ();
|
||||
bool validate (std::string&);
|
||||
void measure (Task&, unsigned int&, unsigned int&);
|
||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue