RMF
provenance.h
Go to the documentation of this file.
1/**
2 * \file RMF/decorator/provenance.h
3 * \brief Helper functions for manipulating RMF files.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 *
7 */
8
9#ifndef RMF_PROVENANCE_DECORATORS_H
10#define RMF_PROVENANCE_DECORATORS_H
11
12#include <RMF/config.h>
14#include <RMF/NodeHandle.h>
15#include <RMF/FileHandle.h>
16#include <RMF/Decorator.h>
17#include <RMF/constants.h>
18#include <RMF/Vector.h>
19#include <RMF/internal/paths.h>
20#include <array>
21#include <boost/lexical_cast.hpp>
22
23RMF_ENABLE_WARNINGS
24namespace RMF {
25namespace decorator {
26
27
28 /** See also StructureProvenance and StructureProvenanceFactory.
29 */
30 class StructureProvenanceConst: public Decorator {
31 friend class StructureProvenanceFactory;
32 protected:
33 StringKey structure_filename_;
34StringKey structure_chain_;
35IntKey structure_residue_offset_;
36 StructureProvenanceConst(NodeConstHandle nh,
37 StringKey structure_filename,
38StringKey structure_chain,
39IntKey structure_residue_offset):
40 Decorator(nh),
41structure_filename_(structure_filename),
42structure_chain_(structure_chain),
43structure_residue_offset_(structure_residue_offset) {
44 }
45 public:
46
47 String get_filename() const {
48 try {
49 String relpath = get_node().get_value(structure_filename_);
50 String filename = get_node().get_file().get_path();
51 return internal::get_absolute_path(filename, relpath);
52 } RMF_DECORATOR_CATCH( );
53 }
54
55
56 String get_chain() const {
57 try {
58 return get_node().get_value(structure_chain_);
59 } RMF_DECORATOR_CATCH( );
60 }
61 String get_frame_chain() const {
62 try {
63 return get_node().get_frame_value(structure_chain_);
64 } RMF_DECORATOR_CATCH( );
65 }
66 String get_static_chain() const {
67 try {
68 return get_node().get_static_value(structure_chain_);
69 } RMF_DECORATOR_CATCH( );
70 }
71
72
73 Int get_residue_offset() const {
74 try {
75 if (!get_node().get_has_value(structure_residue_offset_)) return 0;
76return get_node().get_value(structure_residue_offset_);
77 } RMF_DECORATOR_CATCH( );
78 }
79 Int get_frame_residue_offset() const {
80 try {
81 if (!get_node().get_has_value(structure_residue_offset_)) return 0;
82return get_node().get_frame_value(structure_residue_offset_);
83 } RMF_DECORATOR_CATCH( );
84 }
85 Int get_static_residue_offset() const {
86 try {
87 if (!get_node().get_has_value(structure_residue_offset_)) return 0;
88return get_node().get_static_value(structure_residue_offset_);
89 } RMF_DECORATOR_CATCH( );
90 }
91
92 static std::string get_decorator_type_name() {
93 return "StructureProvenanceConst";
94 }
95 RMF_SHOWABLE(StructureProvenanceConst, "StructureProvenance: " << get_node());
96 };
97 /** See also StructureProvenanceFactory.
98 */
99 class StructureProvenance: public StructureProvenanceConst {
100 friend class StructureProvenanceFactory;
101 StructureProvenance(NodeHandle nh,
102 StringKey structure_filename,
103StringKey structure_chain,
104IntKey structure_residue_offset):
105 StructureProvenanceConst(nh, structure_filename,
106structure_chain,
107structure_residue_offset) {
108 }
109 public:
110
111 void set_filename(String path) {
112 try {
113 String filename = get_node().get_file().get_path();
114 String relpath = internal::get_relative_path(filename, path);
115 get_node().set_value(structure_filename_, relpath);
116 } RMF_DECORATOR_CATCH( );
117 }
118
119
120 void set_chain(String v) {
121 try {
122 get_node().set_value(structure_chain_, v);
123 } RMF_DECORATOR_CATCH( );
124 }
125 void set_frame_chain(String v) {
126 try {
127 get_node().set_frame_value(structure_chain_, v);
128 } RMF_DECORATOR_CATCH( );
129 }
130 void set_static_chain(String v) {
131 try {
132 get_node().set_static_value(structure_chain_, v);
133 } RMF_DECORATOR_CATCH( );
134 }
135
136
137 void set_residue_offset(Int v) {
138 try {
139 get_node().set_value(structure_residue_offset_, v);
140 } RMF_DECORATOR_CATCH( );
141 }
142 void set_frame_residue_offset(Int v) {
143 try {
144 get_node().set_frame_value(structure_residue_offset_, v);
145 } RMF_DECORATOR_CATCH( );
146 }
147 void set_static_residue_offset(Int v) {
148 try {
149 get_node().set_static_value(structure_residue_offset_, v);
150 } RMF_DECORATOR_CATCH( );
151 }
152
153 static std::string get_decorator_type_name() {
154 return "StructureProvenance";
155 }
156 };
157
158
159 /** Create decorators of type StructureProvenance.
160 */
161 class StructureProvenanceFactory: public Factory {
162 Category cat_;
163StringKey structure_filename_;
164StringKey structure_chain_;
165IntKey structure_residue_offset_;
166
167
168
169 public:
170 StructureProvenanceFactory(FileConstHandle fh):
171 cat_(fh.get_category("provenance")),
172 structure_filename_(fh.get_key<StringTag>(cat_, "structure filename")), structure_chain_(fh.get_key<StringTag>(cat_, "structure chain")), structure_residue_offset_(fh.get_key<IntTag>(cat_, "structure residue offset")) {
173 }
174 StructureProvenanceFactory(FileHandle fh):
175 cat_(fh.get_category("provenance")),
176 structure_filename_(fh.get_key<StringTag>(cat_, "structure filename")), structure_chain_(fh.get_key<StringTag>(cat_, "structure chain")), structure_residue_offset_(fh.get_key<IntTag>(cat_, "structure residue offset")) {
177 }
178 /** Get a StructureProvenanceConst for nh.*/
180 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
181 + boost::lexical_cast<std::string>(nh.get_type())
182 + "\" in decorator type StructureProvenance");
183 return StructureProvenanceConst(nh, structure_filename_,
184structure_chain_,
185structure_residue_offset_);
186 }
187 /** Get a StructureProvenance for nh.*/
189 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
190 + boost::lexical_cast<std::string>(nh.get_type())
191 + "\" in decorator type StructureProvenance");
192 return StructureProvenance(nh, structure_filename_,
193structure_chain_,
194structure_residue_offset_);
195 }
196 /** Check whether nh has all the attributes required to be a
197 StructureProvenanceConst.*/
198 bool get_is(NodeConstHandle nh) const {
199 return (nh.get_type() == RMF::PROVENANCE)
200 && !nh.get_value(structure_filename_).get_is_null();
201 }
202 bool get_is_static(NodeConstHandle nh) const {
203 return (nh.get_type() == RMF::PROVENANCE)
204 && !nh.get_static_value(structure_filename_).get_is_null()
205 && !nh.get_static_value(structure_chain_).get_is_null();
206 }
207 RMF_SHOWABLE(StructureProvenanceFactory, "StructureProvenanceFactory");
208 };
209 #ifndef RMF_DOXYGEN
210struct StructureProvenanceConstFactory: public StructureProvenanceFactory {
211 StructureProvenanceConstFactory(FileConstHandle fh):
212 StructureProvenanceFactory(fh) {
213 }
214 StructureProvenanceConstFactory(FileHandle fh):
215 StructureProvenanceFactory(fh) {
216 }
217
218};
219 #endif
220
221
222
223
224 /** See also SampleProvenance and SampleProvenanceFactory.
225 */
226 class SampleProvenanceConst: public Decorator {
227 friend class SampleProvenanceFactory;
228 protected:
229 StringKey sampling_method_;
230IntKey sampling_frames_;
231IntKey sampling_iterations_;
232IntKey sampling_replicas_;
233 SampleProvenanceConst(NodeConstHandle nh,
234 StringKey sampling_method,
235IntKey sampling_frames,
236IntKey sampling_iterations,
237IntKey sampling_replicas):
238 Decorator(nh),
239sampling_method_(sampling_method),
240sampling_frames_(sampling_frames),
241sampling_iterations_(sampling_iterations),
242sampling_replicas_(sampling_replicas) {
243 }
244 public:
245
246 String get_method() const {
247 try {
248 return get_node().get_value(sampling_method_);
249 } RMF_DECORATOR_CATCH( );
250 }
251 String get_frame_method() const {
252 try {
253 return get_node().get_frame_value(sampling_method_);
254 } RMF_DECORATOR_CATCH( );
255 }
256 String get_static_method() const {
257 try {
258 return get_node().get_static_value(sampling_method_);
259 } RMF_DECORATOR_CATCH( );
260 }
261
262
263 Int get_frames() const {
264 try {
265 return get_node().get_value(sampling_frames_);
266 } RMF_DECORATOR_CATCH( );
267 }
268 Int get_frame_frames() const {
269 try {
270 return get_node().get_frame_value(sampling_frames_);
271 } RMF_DECORATOR_CATCH( );
272 }
273 Int get_static_frames() const {
274 try {
275 return get_node().get_static_value(sampling_frames_);
276 } RMF_DECORATOR_CATCH( );
277 }
278
279
280 Int get_iterations() const {
281 try {
282 return get_node().get_value(sampling_iterations_);
283 } RMF_DECORATOR_CATCH( );
284 }
285 Int get_frame_iterations() const {
286 try {
287 return get_node().get_frame_value(sampling_iterations_);
288 } RMF_DECORATOR_CATCH( );
289 }
290 Int get_static_iterations() const {
291 try {
292 return get_node().get_static_value(sampling_iterations_);
293 } RMF_DECORATOR_CATCH( );
294 }
295
296
297 Int get_replicas() const {
298 try {
299 return get_node().get_value(sampling_replicas_);
300 } RMF_DECORATOR_CATCH( );
301 }
302 Int get_frame_replicas() const {
303 try {
304 return get_node().get_frame_value(sampling_replicas_);
305 } RMF_DECORATOR_CATCH( );
306 }
307 Int get_static_replicas() const {
308 try {
309 return get_node().get_static_value(sampling_replicas_);
310 } RMF_DECORATOR_CATCH( );
311 }
312
313 static std::string get_decorator_type_name() {
314 return "SampleProvenanceConst";
315 }
316 RMF_SHOWABLE(SampleProvenanceConst, "SampleProvenance: " << get_node());
317 };
318 /** See also SampleProvenanceFactory.
319 */
320 class SampleProvenance: public SampleProvenanceConst {
321 friend class SampleProvenanceFactory;
322 SampleProvenance(NodeHandle nh,
323 StringKey sampling_method,
324IntKey sampling_frames,
325IntKey sampling_iterations,
326IntKey sampling_replicas):
327 SampleProvenanceConst(nh, sampling_method,
328sampling_frames,
329sampling_iterations,
330sampling_replicas) {
331 }
332 public:
333
334 void set_method(String v) {
335 try {
336 get_node().set_value(sampling_method_, v);
337 } RMF_DECORATOR_CATCH( );
338 }
339 void set_frame_method(String v) {
340 try {
341 get_node().set_frame_value(sampling_method_, v);
342 } RMF_DECORATOR_CATCH( );
343 }
344 void set_static_method(String v) {
345 try {
346 get_node().set_static_value(sampling_method_, v);
347 } RMF_DECORATOR_CATCH( );
348 }
349
350
351 void set_frames(Int v) {
352 try {
353 get_node().set_value(sampling_frames_, v);
354 } RMF_DECORATOR_CATCH( );
355 }
356 void set_frame_frames(Int v) {
357 try {
358 get_node().set_frame_value(sampling_frames_, v);
359 } RMF_DECORATOR_CATCH( );
360 }
361 void set_static_frames(Int v) {
362 try {
363 get_node().set_static_value(sampling_frames_, v);
364 } RMF_DECORATOR_CATCH( );
365 }
366
367
368 void set_iterations(Int v) {
369 try {
370 get_node().set_value(sampling_iterations_, v);
371 } RMF_DECORATOR_CATCH( );
372 }
373 void set_frame_iterations(Int v) {
374 try {
375 get_node().set_frame_value(sampling_iterations_, v);
376 } RMF_DECORATOR_CATCH( );
377 }
378 void set_static_iterations(Int v) {
379 try {
380 get_node().set_static_value(sampling_iterations_, v);
381 } RMF_DECORATOR_CATCH( );
382 }
383
384
385 void set_replicas(Int v) {
386 try {
387 get_node().set_value(sampling_replicas_, v);
388 } RMF_DECORATOR_CATCH( );
389 }
390 void set_frame_replicas(Int v) {
391 try {
392 get_node().set_frame_value(sampling_replicas_, v);
393 } RMF_DECORATOR_CATCH( );
394 }
395 void set_static_replicas(Int v) {
396 try {
397 get_node().set_static_value(sampling_replicas_, v);
398 } RMF_DECORATOR_CATCH( );
399 }
400
401 static std::string get_decorator_type_name() {
402 return "SampleProvenance";
403 }
404 };
405
406
407 /** Create decorators of type SampleProvenance.
408 */
409 class SampleProvenanceFactory: public Factory {
410 Category cat_;
411StringKey sampling_method_;
412IntKey sampling_frames_;
413IntKey sampling_iterations_;
414IntKey sampling_replicas_;
415
416
417
418
419 public:
420 SampleProvenanceFactory(FileConstHandle fh):
421 cat_(fh.get_category("provenance")),
422 sampling_method_(fh.get_key<StringTag>(cat_, "sampling method")), sampling_frames_(fh.get_key<IntTag>(cat_, "sampling frames")), sampling_iterations_(fh.get_key<IntTag>(cat_, "sampling iterations")), sampling_replicas_(fh.get_key<IntTag>(cat_, "sampling replicas")) {
423 }
424 SampleProvenanceFactory(FileHandle fh):
425 cat_(fh.get_category("provenance")),
426 sampling_method_(fh.get_key<StringTag>(cat_, "sampling method")), sampling_frames_(fh.get_key<IntTag>(cat_, "sampling frames")), sampling_iterations_(fh.get_key<IntTag>(cat_, "sampling iterations")), sampling_replicas_(fh.get_key<IntTag>(cat_, "sampling replicas")) {
427 }
428 /** Get a SampleProvenanceConst for nh.*/
430 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
431 + boost::lexical_cast<std::string>(nh.get_type())
432 + "\" in decorator type SampleProvenance");
433 return SampleProvenanceConst(nh, sampling_method_,
434sampling_frames_,
435sampling_iterations_,
436sampling_replicas_);
437 }
438 /** Get a SampleProvenance for nh.*/
440 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
441 + boost::lexical_cast<std::string>(nh.get_type())
442 + "\" in decorator type SampleProvenance");
443 return SampleProvenance(nh, sampling_method_,
444sampling_frames_,
445sampling_iterations_,
446sampling_replicas_);
447 }
448 /** Check whether nh has all the attributes required to be a
449 SampleProvenanceConst.*/
450 bool get_is(NodeConstHandle nh) const {
451 return (nh.get_type() == RMF::PROVENANCE)
452 && !nh.get_value(sampling_method_).get_is_null();
453 }
454 bool get_is_static(NodeConstHandle nh) const {
455 return (nh.get_type() == RMF::PROVENANCE)
456 && !nh.get_static_value(sampling_method_).get_is_null()
457 && !nh.get_static_value(sampling_frames_).get_is_null()
458 && !nh.get_static_value(sampling_iterations_).get_is_null()
459 && !nh.get_static_value(sampling_replicas_).get_is_null();
460 }
461 RMF_SHOWABLE(SampleProvenanceFactory, "SampleProvenanceFactory");
462 };
463 #ifndef RMF_DOXYGEN
464struct SampleProvenanceConstFactory: public SampleProvenanceFactory {
465 SampleProvenanceConstFactory(FileConstHandle fh):
466 SampleProvenanceFactory(fh) {
467 }
468 SampleProvenanceConstFactory(FileHandle fh):
469 SampleProvenanceFactory(fh) {
470 }
471
472};
473 #endif
474
475
476
477
478 /** See also CombineProvenance and CombineProvenanceFactory.
479 */
480 class CombineProvenanceConst: public Decorator {
481 friend class CombineProvenanceFactory;
482 protected:
483 IntKey combined_runs_;
484IntKey combined_frames_;
485 CombineProvenanceConst(NodeConstHandle nh,
486 IntKey combined_runs,
487IntKey combined_frames):
488 Decorator(nh),
489combined_runs_(combined_runs),
490combined_frames_(combined_frames) {
491 }
492 public:
493
494 Int get_runs() const {
495 try {
496 return get_node().get_value(combined_runs_);
497 } RMF_DECORATOR_CATCH( );
498 }
499 Int get_frame_runs() const {
500 try {
501 return get_node().get_frame_value(combined_runs_);
502 } RMF_DECORATOR_CATCH( );
503 }
504 Int get_static_runs() const {
505 try {
506 return get_node().get_static_value(combined_runs_);
507 } RMF_DECORATOR_CATCH( );
508 }
509
510
511 Int get_frames() const {
512 try {
513 return get_node().get_value(combined_frames_);
514 } RMF_DECORATOR_CATCH( );
515 }
516 Int get_frame_frames() const {
517 try {
518 return get_node().get_frame_value(combined_frames_);
519 } RMF_DECORATOR_CATCH( );
520 }
521 Int get_static_frames() const {
522 try {
523 return get_node().get_static_value(combined_frames_);
524 } RMF_DECORATOR_CATCH( );
525 }
526
527 static std::string get_decorator_type_name() {
528 return "CombineProvenanceConst";
529 }
530 RMF_SHOWABLE(CombineProvenanceConst, "CombineProvenance: " << get_node());
531 };
532 /** See also CombineProvenanceFactory.
533 */
534 class CombineProvenance: public CombineProvenanceConst {
535 friend class CombineProvenanceFactory;
536 CombineProvenance(NodeHandle nh,
537 IntKey combined_runs,
538IntKey combined_frames):
539 CombineProvenanceConst(nh, combined_runs,
540combined_frames) {
541 }
542 public:
543
544 void set_runs(Int v) {
545 try {
546 get_node().set_value(combined_runs_, v);
547 } RMF_DECORATOR_CATCH( );
548 }
549 void set_frame_runs(Int v) {
550 try {
551 get_node().set_frame_value(combined_runs_, v);
552 } RMF_DECORATOR_CATCH( );
553 }
554 void set_static_runs(Int v) {
555 try {
556 get_node().set_static_value(combined_runs_, v);
557 } RMF_DECORATOR_CATCH( );
558 }
559
560
561 void set_frames(Int v) {
562 try {
563 get_node().set_value(combined_frames_, v);
564 } RMF_DECORATOR_CATCH( );
565 }
566 void set_frame_frames(Int v) {
567 try {
568 get_node().set_frame_value(combined_frames_, v);
569 } RMF_DECORATOR_CATCH( );
570 }
571 void set_static_frames(Int v) {
572 try {
573 get_node().set_static_value(combined_frames_, v);
574 } RMF_DECORATOR_CATCH( );
575 }
576
577 static std::string get_decorator_type_name() {
578 return "CombineProvenance";
579 }
580 };
581
582
583 /** Create decorators of type CombineProvenance.
584 */
585 class CombineProvenanceFactory: public Factory {
586 Category cat_;
587IntKey combined_runs_;
588IntKey combined_frames_;
589
590
591 public:
592 CombineProvenanceFactory(FileConstHandle fh):
593 cat_(fh.get_category("provenance")),
594 combined_runs_(fh.get_key<IntTag>(cat_, "combined runs")), combined_frames_(fh.get_key<IntTag>(cat_, "combined frames")) {
595 }
596 CombineProvenanceFactory(FileHandle fh):
597 cat_(fh.get_category("provenance")),
598 combined_runs_(fh.get_key<IntTag>(cat_, "combined runs")), combined_frames_(fh.get_key<IntTag>(cat_, "combined frames")) {
599 }
600 /** Get a CombineProvenanceConst for nh.*/
602 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
603 + boost::lexical_cast<std::string>(nh.get_type())
604 + "\" in decorator type CombineProvenance");
605 return CombineProvenanceConst(nh, combined_runs_,
606combined_frames_);
607 }
608 /** Get a CombineProvenance for nh.*/
610 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
611 + boost::lexical_cast<std::string>(nh.get_type())
612 + "\" in decorator type CombineProvenance");
613 return CombineProvenance(nh, combined_runs_,
614combined_frames_);
615 }
616 /** Check whether nh has all the attributes required to be a
617 CombineProvenanceConst.*/
618 bool get_is(NodeConstHandle nh) const {
619 return (nh.get_type() == RMF::PROVENANCE)
620 && !nh.get_value(combined_runs_).get_is_null();
621 }
622 bool get_is_static(NodeConstHandle nh) const {
623 return (nh.get_type() == RMF::PROVENANCE)
624 && !nh.get_static_value(combined_runs_).get_is_null()
625 && !nh.get_static_value(combined_frames_).get_is_null();
626 }
627 RMF_SHOWABLE(CombineProvenanceFactory, "CombineProvenanceFactory");
628 };
629 #ifndef RMF_DOXYGEN
630struct CombineProvenanceConstFactory: public CombineProvenanceFactory {
631 CombineProvenanceConstFactory(FileConstHandle fh):
632 CombineProvenanceFactory(fh) {
633 }
634 CombineProvenanceConstFactory(FileHandle fh):
635 CombineProvenanceFactory(fh) {
636 }
637
638};
639 #endif
640
641
642
643
644 /** See also FilterProvenance and FilterProvenanceFactory.
645 */
646 class FilterProvenanceConst: public Decorator {
647 friend class FilterProvenanceFactory;
648 protected:
649 StringKey filter_method_;
650FloatKey filter_threshold_;
651IntKey filter_frames_;
652 FilterProvenanceConst(NodeConstHandle nh,
653 StringKey filter_method,
654FloatKey filter_threshold,
655IntKey filter_frames):
656 Decorator(nh),
657filter_method_(filter_method),
658filter_threshold_(filter_threshold),
659filter_frames_(filter_frames) {
660 }
661 public:
662
663 String get_method() const {
664 try {
665 return get_node().get_value(filter_method_);
666 } RMF_DECORATOR_CATCH( );
667 }
668 String get_frame_method() const {
669 try {
670 return get_node().get_frame_value(filter_method_);
671 } RMF_DECORATOR_CATCH( );
672 }
673 String get_static_method() const {
674 try {
675 return get_node().get_static_value(filter_method_);
676 } RMF_DECORATOR_CATCH( );
677 }
678
679
680 Float get_threshold() const {
681 try {
682 return get_node().get_value(filter_threshold_);
683 } RMF_DECORATOR_CATCH( );
684 }
685 Float get_frame_threshold() const {
686 try {
687 return get_node().get_frame_value(filter_threshold_);
688 } RMF_DECORATOR_CATCH( );
689 }
690 Float get_static_threshold() const {
691 try {
692 return get_node().get_static_value(filter_threshold_);
693 } RMF_DECORATOR_CATCH( );
694 }
695
696
697 Int get_frames() const {
698 try {
699 return get_node().get_value(filter_frames_);
700 } RMF_DECORATOR_CATCH( );
701 }
702 Int get_frame_frames() const {
703 try {
704 return get_node().get_frame_value(filter_frames_);
705 } RMF_DECORATOR_CATCH( );
706 }
707 Int get_static_frames() const {
708 try {
709 return get_node().get_static_value(filter_frames_);
710 } RMF_DECORATOR_CATCH( );
711 }
712
713 static std::string get_decorator_type_name() {
714 return "FilterProvenanceConst";
715 }
716 RMF_SHOWABLE(FilterProvenanceConst, "FilterProvenance: " << get_node());
717 };
718 /** See also FilterProvenanceFactory.
719 */
720 class FilterProvenance: public FilterProvenanceConst {
721 friend class FilterProvenanceFactory;
722 FilterProvenance(NodeHandle nh,
723 StringKey filter_method,
724FloatKey filter_threshold,
725IntKey filter_frames):
726 FilterProvenanceConst(nh, filter_method,
727filter_threshold,
728filter_frames) {
729 }
730 public:
731
732 void set_method(String v) {
733 try {
734 get_node().set_value(filter_method_, v);
735 } RMF_DECORATOR_CATCH( );
736 }
737 void set_frame_method(String v) {
738 try {
739 get_node().set_frame_value(filter_method_, v);
740 } RMF_DECORATOR_CATCH( );
741 }
742 void set_static_method(String v) {
743 try {
744 get_node().set_static_value(filter_method_, v);
745 } RMF_DECORATOR_CATCH( );
746 }
747
748
749 void set_threshold(Float v) {
750 try {
751 get_node().set_value(filter_threshold_, v);
752 } RMF_DECORATOR_CATCH( );
753 }
754 void set_frame_threshold(Float v) {
755 try {
756 get_node().set_frame_value(filter_threshold_, v);
757 } RMF_DECORATOR_CATCH( );
758 }
759 void set_static_threshold(Float v) {
760 try {
761 get_node().set_static_value(filter_threshold_, v);
762 } RMF_DECORATOR_CATCH( );
763 }
764
765
766 void set_frames(Int v) {
767 try {
768 get_node().set_value(filter_frames_, v);
769 } RMF_DECORATOR_CATCH( );
770 }
771 void set_frame_frames(Int v) {
772 try {
773 get_node().set_frame_value(filter_frames_, v);
774 } RMF_DECORATOR_CATCH( );
775 }
776 void set_static_frames(Int v) {
777 try {
778 get_node().set_static_value(filter_frames_, v);
779 } RMF_DECORATOR_CATCH( );
780 }
781
782 static std::string get_decorator_type_name() {
783 return "FilterProvenance";
784 }
785 };
786
787
788 /** Create decorators of type FilterProvenance.
789 */
790 class FilterProvenanceFactory: public Factory {
791 Category cat_;
792StringKey filter_method_;
793FloatKey filter_threshold_;
794IntKey filter_frames_;
795
796
797
798 public:
799 FilterProvenanceFactory(FileConstHandle fh):
800 cat_(fh.get_category("provenance")),
801 filter_method_(fh.get_key<StringTag>(cat_, "filter method")), filter_threshold_(fh.get_key<FloatTag>(cat_, "filter threshold")), filter_frames_(fh.get_key<IntTag>(cat_, "filter frames")) {
802 }
803 FilterProvenanceFactory(FileHandle fh):
804 cat_(fh.get_category("provenance")),
805 filter_method_(fh.get_key<StringTag>(cat_, "filter method")), filter_threshold_(fh.get_key<FloatTag>(cat_, "filter threshold")), filter_frames_(fh.get_key<IntTag>(cat_, "filter frames")) {
806 }
807 /** Get a FilterProvenanceConst for nh.*/
809 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
810 + boost::lexical_cast<std::string>(nh.get_type())
811 + "\" in decorator type FilterProvenance");
812 return FilterProvenanceConst(nh, filter_method_,
813filter_threshold_,
814filter_frames_);
815 }
816 /** Get a FilterProvenance for nh.*/
818 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
819 + boost::lexical_cast<std::string>(nh.get_type())
820 + "\" in decorator type FilterProvenance");
821 return FilterProvenance(nh, filter_method_,
822filter_threshold_,
823filter_frames_);
824 }
825 /** Check whether nh has all the attributes required to be a
826 FilterProvenanceConst.*/
827 bool get_is(NodeConstHandle nh) const {
828 return (nh.get_type() == RMF::PROVENANCE)
829 && !nh.get_value(filter_method_).get_is_null();
830 }
831 bool get_is_static(NodeConstHandle nh) const {
832 return (nh.get_type() == RMF::PROVENANCE)
833 && !nh.get_static_value(filter_method_).get_is_null()
834 && !nh.get_static_value(filter_threshold_).get_is_null()
835 && !nh.get_static_value(filter_frames_).get_is_null();
836 }
837 RMF_SHOWABLE(FilterProvenanceFactory, "FilterProvenanceFactory");
838 };
839 #ifndef RMF_DOXYGEN
840struct FilterProvenanceConstFactory: public FilterProvenanceFactory {
841 FilterProvenanceConstFactory(FileConstHandle fh):
842 FilterProvenanceFactory(fh) {
843 }
844 FilterProvenanceConstFactory(FileHandle fh):
845 FilterProvenanceFactory(fh) {
846 }
847
848};
849 #endif
850
851
852
853
854 /** See also ClusterProvenance and ClusterProvenanceFactory.
855 */
856 class ClusterProvenanceConst: public Decorator {
857 friend class ClusterProvenanceFactory;
858 protected:
859 IntKey cluster_members_;
860FloatKey cluster_precision_;
861StringKey cluster_density_;
862 ClusterProvenanceConst(NodeConstHandle nh,
863 IntKey cluster_members,
864FloatKey cluster_precision,
865StringKey cluster_density):
866 Decorator(nh),
867cluster_members_(cluster_members),
868cluster_precision_(cluster_precision),
869cluster_density_(cluster_density) {
870 }
871 public:
872
873 Int get_members() const {
874 try {
875 return get_node().get_value(cluster_members_);
876 } RMF_DECORATOR_CATCH( );
877 }
878 Int get_frame_members() const {
879 try {
880 return get_node().get_frame_value(cluster_members_);
881 } RMF_DECORATOR_CATCH( );
882 }
883 Int get_static_members() const {
884 try {
885 return get_node().get_static_value(cluster_members_);
886 } RMF_DECORATOR_CATCH( );
887 }
888
889
890 Float get_precision() const {
891 try {
892 if (!get_node().get_has_value(cluster_precision_)) return 0.0;
893return get_node().get_value(cluster_precision_);
894 } RMF_DECORATOR_CATCH( );
895 }
896 Float get_frame_precision() const {
897 try {
898 if (!get_node().get_has_value(cluster_precision_)) return 0.0;
899return get_node().get_frame_value(cluster_precision_);
900 } RMF_DECORATOR_CATCH( );
901 }
902 Float get_static_precision() const {
903 try {
904 if (!get_node().get_has_value(cluster_precision_)) return 0.0;
905return get_node().get_static_value(cluster_precision_);
906 } RMF_DECORATOR_CATCH( );
907 }
908
909
910 String get_density() const {
911 try {
912 if (!get_node().get_has_value(cluster_density_)) {
913 return "";
914 } else {
915 String relpath = get_node().get_value(cluster_density_);
916 String filename = get_node().get_file().get_path();
917 return internal::get_absolute_path(filename, relpath);
918 }
919 } RMF_DECORATOR_CATCH( );
920 }
921
922 static std::string get_decorator_type_name() {
923 return "ClusterProvenanceConst";
924 }
925 RMF_SHOWABLE(ClusterProvenanceConst, "ClusterProvenance: " << get_node());
926 };
927 /** See also ClusterProvenanceFactory.
928 */
929 class ClusterProvenance: public ClusterProvenanceConst {
930 friend class ClusterProvenanceFactory;
931 ClusterProvenance(NodeHandle nh,
932 IntKey cluster_members,
933FloatKey cluster_precision,
934StringKey cluster_density):
935 ClusterProvenanceConst(nh, cluster_members,
936cluster_precision,
937cluster_density) {
938 }
939 public:
940
941 void set_members(Int v) {
942 try {
943 get_node().set_value(cluster_members_, v);
944 } RMF_DECORATOR_CATCH( );
945 }
946 void set_frame_members(Int v) {
947 try {
948 get_node().set_frame_value(cluster_members_, v);
949 } RMF_DECORATOR_CATCH( );
950 }
951 void set_static_members(Int v) {
952 try {
953 get_node().set_static_value(cluster_members_, v);
954 } RMF_DECORATOR_CATCH( );
955 }
956
957
958 void set_precision(Float v) {
959 try {
960 get_node().set_value(cluster_precision_, v);
961 } RMF_DECORATOR_CATCH( );
962 }
963 void set_frame_precision(Float v) {
964 try {
965 get_node().set_frame_value(cluster_precision_, v);
966 } RMF_DECORATOR_CATCH( );
967 }
968 void set_static_precision(Float v) {
969 try {
970 get_node().set_static_value(cluster_precision_, v);
971 } RMF_DECORATOR_CATCH( );
972 }
973
974
975 void set_density(String path) {
976 try {
977 if (path.empty()) {
978 get_node().set_value(cluster_density_, path);
979 } else {
980 String filename = get_node().get_file().get_path();
981 String relpath = internal::get_relative_path(filename, path);
982 get_node().set_value(cluster_density_, relpath);
983 }
984 } RMF_DECORATOR_CATCH( );
985 }
986
987 static std::string get_decorator_type_name() {
988 return "ClusterProvenance";
989 }
990 };
991
992
993 /** Create decorators of type ClusterProvenance.
994 */
995 class ClusterProvenanceFactory: public Factory {
996 Category cat_;
997IntKey cluster_members_;
998FloatKey cluster_precision_;
999StringKey cluster_density_;
1000
1001
1002
1003 public:
1004 ClusterProvenanceFactory(FileConstHandle fh):
1005 cat_(fh.get_category("provenance")),
1006 cluster_members_(fh.get_key<IntTag>(cat_, "cluster members")), cluster_precision_(fh.get_key<FloatTag>(cat_, "cluster precision")), cluster_density_(fh.get_key<StringTag>(cat_, "cluster density")) {
1007 }
1008 ClusterProvenanceFactory(FileHandle fh):
1009 cat_(fh.get_category("provenance")),
1010 cluster_members_(fh.get_key<IntTag>(cat_, "cluster members")), cluster_precision_(fh.get_key<FloatTag>(cat_, "cluster precision")), cluster_density_(fh.get_key<StringTag>(cat_, "cluster density")) {
1011 }
1012 /** Get a ClusterProvenanceConst for nh.*/
1014 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
1015 + boost::lexical_cast<std::string>(nh.get_type())
1016 + "\" in decorator type ClusterProvenance");
1017 return ClusterProvenanceConst(nh, cluster_members_,
1018cluster_precision_,
1019cluster_density_);
1020 }
1021 /** Get a ClusterProvenance for nh.*/
1023 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
1024 + boost::lexical_cast<std::string>(nh.get_type())
1025 + "\" in decorator type ClusterProvenance");
1026 return ClusterProvenance(nh, cluster_members_,
1027cluster_precision_,
1028cluster_density_);
1029 }
1030 /** Check whether nh has all the attributes required to be a
1031 ClusterProvenanceConst.*/
1032 bool get_is(NodeConstHandle nh) const {
1033 return (nh.get_type() == RMF::PROVENANCE)
1034 && !nh.get_value(cluster_members_).get_is_null();
1035 }
1036 bool get_is_static(NodeConstHandle nh) const {
1037 return (nh.get_type() == RMF::PROVENANCE)
1038 && !nh.get_static_value(cluster_members_).get_is_null()
1039 && !nh.get_static_value(cluster_density_).get_is_null();
1040 }
1041 RMF_SHOWABLE(ClusterProvenanceFactory, "ClusterProvenanceFactory");
1042 };
1043 #ifndef RMF_DOXYGEN
1044struct ClusterProvenanceConstFactory: public ClusterProvenanceFactory {
1045 ClusterProvenanceConstFactory(FileConstHandle fh):
1046 ClusterProvenanceFactory(fh) {
1047 }
1048 ClusterProvenanceConstFactory(FileHandle fh):
1049 ClusterProvenanceFactory(fh) {
1050 }
1051
1052};
1053 #endif
1054
1055
1056
1057
1058 /** See also ScriptProvenance and ScriptProvenanceFactory.
1059 */
1060 class ScriptProvenanceConst: public Decorator {
1061 friend class ScriptProvenanceFactory;
1062 protected:
1063 StringKey script_filename_;
1064 ScriptProvenanceConst(NodeConstHandle nh,
1065 StringKey script_filename):
1066 Decorator(nh),
1067script_filename_(script_filename) {
1068 }
1069 public:
1070
1071 String get_filename() const {
1072 try {
1073 String relpath = get_node().get_value(script_filename_);
1074 String filename = get_node().get_file().get_path();
1075 return internal::get_absolute_path(filename, relpath);
1076 } RMF_DECORATOR_CATCH( );
1077 }
1078
1079 static std::string get_decorator_type_name() {
1080 return "ScriptProvenanceConst";
1081 }
1082 RMF_SHOWABLE(ScriptProvenanceConst, "ScriptProvenance: " << get_node());
1083 };
1084 /** See also ScriptProvenanceFactory.
1085 */
1086 class ScriptProvenance: public ScriptProvenanceConst {
1087 friend class ScriptProvenanceFactory;
1088 ScriptProvenance(NodeHandle nh,
1089 StringKey script_filename):
1090 ScriptProvenanceConst(nh, script_filename) {
1091 }
1092 public:
1093
1094 void set_filename(String path) {
1095 try {
1096 String filename = get_node().get_file().get_path();
1097 String relpath = internal::get_relative_path(filename, path);
1098 get_node().set_value(script_filename_, relpath);
1099 } RMF_DECORATOR_CATCH( );
1100 }
1101
1102 static std::string get_decorator_type_name() {
1103 return "ScriptProvenance";
1104 }
1105 };
1106
1107
1108 /** Create decorators of type ScriptProvenance.
1109 */
1110 class ScriptProvenanceFactory: public Factory {
1111 Category cat_;
1112StringKey script_filename_;
1113
1114 public:
1115 ScriptProvenanceFactory(FileConstHandle fh):
1116 cat_(fh.get_category("provenance")),
1117 script_filename_(fh.get_key<StringTag>(cat_, "script filename")) {
1118 }
1119 ScriptProvenanceFactory(FileHandle fh):
1120 cat_(fh.get_category("provenance")),
1121 script_filename_(fh.get_key<StringTag>(cat_, "script filename")) {
1122 }
1123 /** Get a ScriptProvenanceConst for nh.*/
1125 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
1126 + boost::lexical_cast<std::string>(nh.get_type())
1127 + "\" in decorator type ScriptProvenance");
1128 return ScriptProvenanceConst(nh, script_filename_);
1129 }
1130 /** Get a ScriptProvenance for nh.*/
1132 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
1133 + boost::lexical_cast<std::string>(nh.get_type())
1134 + "\" in decorator type ScriptProvenance");
1135 return ScriptProvenance(nh, script_filename_);
1136 }
1137 /** Check whether nh has all the attributes required to be a
1138 ScriptProvenanceConst.*/
1139 bool get_is(NodeConstHandle nh) const {
1140 return (nh.get_type() == RMF::PROVENANCE)
1141 && !nh.get_value(script_filename_).get_is_null();
1142 }
1143 bool get_is_static(NodeConstHandle nh) const {
1144 return (nh.get_type() == RMF::PROVENANCE)
1145 && !nh.get_static_value(script_filename_).get_is_null();
1146 }
1147 RMF_SHOWABLE(ScriptProvenanceFactory, "ScriptProvenanceFactory");
1148 };
1149 #ifndef RMF_DOXYGEN
1150struct ScriptProvenanceConstFactory: public ScriptProvenanceFactory {
1151 ScriptProvenanceConstFactory(FileConstHandle fh):
1152 ScriptProvenanceFactory(fh) {
1153 }
1154 ScriptProvenanceConstFactory(FileHandle fh):
1155 ScriptProvenanceFactory(fh) {
1156 }
1157
1158};
1159 #endif
1160
1161
1162
1163
1164 /** See also SoftwareProvenance and SoftwareProvenanceFactory.
1165 */
1166 class SoftwareProvenanceConst: public Decorator {
1167 friend class SoftwareProvenanceFactory;
1168 protected:
1169 StringKey software_name_;
1170StringKey software_version_;
1171StringKey software_location_;
1172 SoftwareProvenanceConst(NodeConstHandle nh,
1173 StringKey software_name,
1174StringKey software_version,
1175StringKey software_location):
1176 Decorator(nh),
1177software_name_(software_name),
1178software_version_(software_version),
1179software_location_(software_location) {
1180 }
1181 public:
1182
1183 String get_name() const {
1184 try {
1185 return get_node().get_value(software_name_);
1186 } RMF_DECORATOR_CATCH( );
1187 }
1188 String get_frame_name() const {
1189 try {
1190 return get_node().get_frame_value(software_name_);
1191 } RMF_DECORATOR_CATCH( );
1192 }
1193 String get_static_name() const {
1194 try {
1195 return get_node().get_static_value(software_name_);
1196 } RMF_DECORATOR_CATCH( );
1197 }
1198
1199
1200 String get_version() const {
1201 try {
1202 return get_node().get_value(software_version_);
1203 } RMF_DECORATOR_CATCH( );
1204 }
1205 String get_frame_version() const {
1206 try {
1207 return get_node().get_frame_value(software_version_);
1208 } RMF_DECORATOR_CATCH( );
1209 }
1210 String get_static_version() const {
1211 try {
1212 return get_node().get_static_value(software_version_);
1213 } RMF_DECORATOR_CATCH( );
1214 }
1215
1216
1217 String get_location() const {
1218 try {
1219 return get_node().get_value(software_location_);
1220 } RMF_DECORATOR_CATCH( );
1221 }
1222 String get_frame_location() const {
1223 try {
1224 return get_node().get_frame_value(software_location_);
1225 } RMF_DECORATOR_CATCH( );
1226 }
1227 String get_static_location() const {
1228 try {
1229 return get_node().get_static_value(software_location_);
1230 } RMF_DECORATOR_CATCH( );
1231 }
1232
1233 static std::string get_decorator_type_name() {
1234 return "SoftwareProvenanceConst";
1235 }
1236 RMF_SHOWABLE(SoftwareProvenanceConst, "SoftwareProvenance: " << get_node());
1237 };
1238 /** See also SoftwareProvenanceFactory.
1239 */
1240 class SoftwareProvenance: public SoftwareProvenanceConst {
1241 friend class SoftwareProvenanceFactory;
1242 SoftwareProvenance(NodeHandle nh,
1243 StringKey software_name,
1244StringKey software_version,
1245StringKey software_location):
1246 SoftwareProvenanceConst(nh, software_name,
1247software_version,
1248software_location) {
1249 }
1250 public:
1251
1252 void set_name(String v) {
1253 try {
1254 get_node().set_value(software_name_, v);
1255 } RMF_DECORATOR_CATCH( );
1256 }
1257 void set_frame_name(String v) {
1258 try {
1259 get_node().set_frame_value(software_name_, v);
1260 } RMF_DECORATOR_CATCH( );
1261 }
1262 void set_static_name(String v) {
1263 try {
1264 get_node().set_static_value(software_name_, v);
1265 } RMF_DECORATOR_CATCH( );
1266 }
1267
1268
1269 void set_version(String v) {
1270 try {
1271 get_node().set_value(software_version_, v);
1272 } RMF_DECORATOR_CATCH( );
1273 }
1274 void set_frame_version(String v) {
1275 try {
1276 get_node().set_frame_value(software_version_, v);
1277 } RMF_DECORATOR_CATCH( );
1278 }
1279 void set_static_version(String v) {
1280 try {
1281 get_node().set_static_value(software_version_, v);
1282 } RMF_DECORATOR_CATCH( );
1283 }
1284
1285
1286 void set_location(String v) {
1287 try {
1288 get_node().set_value(software_location_, v);
1289 } RMF_DECORATOR_CATCH( );
1290 }
1291 void set_frame_location(String v) {
1292 try {
1293 get_node().set_frame_value(software_location_, v);
1294 } RMF_DECORATOR_CATCH( );
1295 }
1296 void set_static_location(String v) {
1297 try {
1298 get_node().set_static_value(software_location_, v);
1299 } RMF_DECORATOR_CATCH( );
1300 }
1301
1302 static std::string get_decorator_type_name() {
1303 return "SoftwareProvenance";
1304 }
1305 };
1306
1307
1308 /** Create decorators of type SoftwareProvenance.
1309 */
1310 class SoftwareProvenanceFactory: public Factory {
1311 Category cat_;
1312StringKey software_name_;
1313StringKey software_version_;
1314StringKey software_location_;
1315
1316
1317
1318 public:
1319 SoftwareProvenanceFactory(FileConstHandle fh):
1320 cat_(fh.get_category("provenance")),
1321 software_name_(fh.get_key<StringTag>(cat_, "software name")), software_version_(fh.get_key<StringTag>(cat_, "software version")), software_location_(fh.get_key<StringTag>(cat_, "software location")) {
1322 }
1323 SoftwareProvenanceFactory(FileHandle fh):
1324 cat_(fh.get_category("provenance")),
1325 software_name_(fh.get_key<StringTag>(cat_, "software name")), software_version_(fh.get_key<StringTag>(cat_, "software version")), software_location_(fh.get_key<StringTag>(cat_, "software location")) {
1326 }
1327 /** Get a SoftwareProvenanceConst for nh.*/
1329 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
1330 + boost::lexical_cast<std::string>(nh.get_type())
1331 + "\" in decorator type SoftwareProvenance");
1332 return SoftwareProvenanceConst(nh, software_name_,
1333software_version_,
1334software_location_);
1335 }
1336 /** Get a SoftwareProvenance for nh.*/
1338 RMF_USAGE_CHECK((nh.get_type() == RMF::PROVENANCE), std::string("Bad node type. Got \"")
1339 + boost::lexical_cast<std::string>(nh.get_type())
1340 + "\" in decorator type SoftwareProvenance");
1341 return SoftwareProvenance(nh, software_name_,
1342software_version_,
1343software_location_);
1344 }
1345 /** Check whether nh has all the attributes required to be a
1346 SoftwareProvenanceConst.*/
1347 bool get_is(NodeConstHandle nh) const {
1348 return (nh.get_type() == RMF::PROVENANCE)
1349 && !nh.get_value(software_name_).get_is_null();
1350 }
1351 bool get_is_static(NodeConstHandle nh) const {
1352 return (nh.get_type() == RMF::PROVENANCE)
1353 && !nh.get_static_value(software_name_).get_is_null()
1354 && !nh.get_static_value(software_version_).get_is_null()
1355 && !nh.get_static_value(software_location_).get_is_null();
1356 }
1357 RMF_SHOWABLE(SoftwareProvenanceFactory, "SoftwareProvenanceFactory");
1358 };
1359 #ifndef RMF_DOXYGEN
1360struct SoftwareProvenanceConstFactory: public SoftwareProvenanceFactory {
1361 SoftwareProvenanceConstFactory(FileConstHandle fh):
1362 SoftwareProvenanceFactory(fh) {
1363 }
1364 SoftwareProvenanceConstFactory(FileHandle fh):
1365 SoftwareProvenanceFactory(fh) {
1366 }
1367
1368};
1369 #endif
1370
1371
1372
1373} /* namespace decorator */
1374} /* namespace RMF */
1375RMF_DISABLE_WARNINGS
1376
1377#endif /* RMF_PROVENANCE_DECORATORS_H */
Mostly empty base classes for decorators and factories.
Declaration for RMF::FileHandle.
Declaration of NodeHandle.
Represent coordinates.
The base class for Factories.
Definition Decorator.h:46
A handle for a read-only RMF file.
A handle for an RMF file.
Definition FileHandle.h:54
A handle for a particular node in a read-only hierarchy.
NodeType get_type() const
get the type of this node
A handle for a particular node in the hierarchy.
Definition NodeHandle.h:60
ClusterProvenance get(NodeHandle nh) const
ClusterProvenanceConst get(NodeConstHandle nh) const
bool get_is(NodeConstHandle nh) const
bool get_is(NodeConstHandle nh) const
Definition provenance.h:618
CombineProvenanceConst get(NodeConstHandle nh) const
Definition provenance.h:601
CombineProvenance get(NodeHandle nh) const
Definition provenance.h:609
FilterProvenance get(NodeHandle nh) const
Definition provenance.h:817
bool get_is(NodeConstHandle nh) const
Definition provenance.h:827
FilterProvenanceConst get(NodeConstHandle nh) const
Definition provenance.h:808
SampleProvenanceConst get(NodeConstHandle nh) const
Definition provenance.h:429
bool get_is(NodeConstHandle nh) const
Definition provenance.h:450
SampleProvenance get(NodeHandle nh) const
Definition provenance.h:439
bool get_is(NodeConstHandle nh) const
ScriptProvenance get(NodeHandle nh) const
ScriptProvenanceConst get(NodeConstHandle nh) const
SoftwareProvenanceConst get(NodeConstHandle nh) const
SoftwareProvenance get(NodeHandle nh) const
bool get_is(NodeConstHandle nh) const
StructureProvenance get(NodeHandle nh) const
Definition provenance.h:188
bool get_is(NodeConstHandle nh) const
Definition provenance.h:198
StructureProvenanceConst get(NodeConstHandle nh) const
Definition provenance.h:179
Various constants.
Various general useful macros for IMP.
See Decorators and Attributes for more information.
The namespace for all functionality in the library.
std::string String
Definition types.h:39
ID< StringTag > StringKey
Definition keys.h:41
int Int
Definition types.h:29
const NodeType PROVENANCE
Represent the process by which a structure was created.
ID< CategoryTag > Category
Definition ID.h:110
float Float
Definition types.h:33
ID< FloatTag > FloatKey
Definition keys.h:41
ID< IntTag > IntKey
Definition keys.h:41