forked from jasp-stats/jasp-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemptyvalues.h
46 lines (34 loc) · 1.29 KB
/
emptyvalues.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef EMPTYVALUES_H
#define EMPTYVALUES_H
#include "utils.h"
#include "json/value.h"
class EmptyValues
{
public:
explicit EmptyValues(EmptyValues * parent = nullptr);
~EmptyValues();
void resetEmptyValues();
void fromJson( const Json::Value & json);
Json::Value toJson() const;
bool isEmptyValue(const std::string & data) const;
bool isEmptyValue(double data) const;
const stringset & emptyStrings() const;
const stringset & emptyStringsColumnModel() const;
const doubleset & emptyDoubles() const;
bool hasEmptyValues() const;
void setHasCustomEmptyValues(bool hasThem);
void setEmptyValues(const stringset & values);
void setEmptyValues(const stringset & values, bool custom);
static void setDisplayString(const std::string & str) { _displayString = str;}
static std::string & displayString() { return _displayString; }
static const int missingValueInteger;
static const double missingValueDouble;
private:
private:
static std::string _displayString;
EmptyValues * _parent = nullptr;
stringset _emptyStrings;
doubleset _emptyDoubles;
bool _hasEmptyValues = false;
};
#endif // EMPTYVALUES_H