File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include " exif_bindings.h"
2
+
3
+ exif_bindings::exif_bindings (){
4
+ ExifTag tag;
5
+ int tag_length = exif_tag_table_count ();
6
+ const char * holding;
7
+ std::vector < std::string > names_ (tag_length);
8
+
9
+ for (int i = 0 ; i < tag_length; i++){
10
+ tag = exif_tag_table_get_tag (i);
11
+ holding = exif_tag_get_title (tag);
12
+ if (!holding){
13
+ names_[i] = " " ;
14
+ } else {
15
+ names_[i] = std::string (holding);
16
+ }
17
+ }
18
+ names = names_;
19
+ }
20
+
21
+ std::vector < std::string > exif_bindings::get_names (){
22
+ return names;
23
+ }
Original file line number Diff line number Diff line change
1
+ #include < Rcpp.h>
2
+ #include < libexif/exif-data.h>
3
+ using namespace Rcpp ;
4
+
5
+ #ifndef __EXIF_BINDINGS__
6
+ #define __EXIF_BINDINGS__
7
+
8
+ class exif_bindings {
9
+
10
+ private:
11
+
12
+ std::vector < std::string > names;
13
+
14
+ public:
15
+
16
+ /* *
17
+ * Constructor for populating names and descriptions.
18
+ */
19
+ exif_bindings ();
20
+
21
+ std::vector < std::string > get_names ();
22
+ };
23
+
24
+ #endif
You can’t perform that action at this time.
0 commit comments