From 040ee58fecdc9c478004bc2e554e1ae126ec4602 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 15 Apr 2016 17:24:44 -0400 Subject: Added support for ImageNet and fixed bug with query interface Datafile change: nouns now know how many images are associated with them on ImageNet, and also have their WordNet synset ID saved so that you can query for images of that noun via the ImageNet API. So far, verbly only exposes the ImageNet API URL, and doesn't actually interact with it itself. This may be changed in the future. The query interface had a huge issue in which multiple instances of the same condition would overwrite each other. This has been fixed. --- lib/data.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'lib/data.h') diff --git a/lib/data.h b/lib/data.h index 0d599c4..b8b12b9 100644 --- a/lib/data.h +++ b/lib/data.h @@ -343,6 +343,38 @@ namespace verbly { }; }; + class binding { + public: + enum class type { + integer, + string + }; + + type get_type() const; + binding(const binding& other); + ~binding(); + binding& operator=(const binding& other); + + // Integer + binding(int _arg); + int get_integer() const; + void set_integer(int _arg); + binding& operator=(int _arg); + + // String + binding(std::string _arg); + std::string get_string() const; + void set_string(std::string _arg); + binding& operator=(std::string _arg); + + private: + union { + int _integer; + std::string _string; + }; + type _type; + }; + }; #endif /* end of include guard: DATA_H_C4AEC3DD */ -- cgit 1.4.1