diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-10 11:48:58 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-10 11:48:58 -0500 |
commit | f625e90a0721483f7f44b94b9bb57cc9d59565e8 (patch) | |
tree | 6d8bfe0fb1f1bea9e9c1cc96805ffd77c32411e6 /lib/notion.h | |
parent | 4208387c4a6b7ecf43d756a8bba96b9cfc5227b9 (diff) | |
download | verbly-f625e90a0721483f7f44b94b9bb57cc9d59565e8.tar.gz verbly-f625e90a0721483f7f44b94b9bb57cc9d59565e8.tar.bz2 verbly-f625e90a0721483f7f44b94b9bb57cc9d59565e8.zip |
Added negative filter conversions to objects
Diffstat (limited to 'lib/notion.h')
-rw-r--r-- | lib/notion.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/notion.h b/lib/notion.h index 69f5cef..5388e17 100644 --- a/lib/notion.h +++ b/lib/notion.h | |||
@@ -119,9 +119,24 @@ namespace verbly { | |||
119 | 119 | ||
120 | operator filter() const | 120 | operator filter() const |
121 | { | 121 | { |
122 | if (!valid_) | ||
123 | { | ||
124 | throw std::domain_error("Bad access to uninitialized notion"); | ||
125 | } | ||
126 | |||
122 | return (id == id_); | 127 | return (id == id_); |
123 | } | 128 | } |
124 | 129 | ||
130 | filter operator!() const | ||
131 | { | ||
132 | if (!valid_) | ||
133 | { | ||
134 | throw std::domain_error("Bad access to uninitialized notion"); | ||
135 | } | ||
136 | |||
137 | return (id != id_); | ||
138 | } | ||
139 | |||
125 | // Relationships with other objects | 140 | // Relationships with other objects |
126 | 141 | ||
127 | static const field words; | 142 | static const field words; |