9 #ifndef RMF_PROVENANCE_DECORATORS_H
10 #define RMF_PROVENANCE_DECORATORS_H
12 #include <RMF/config.h>
19 #include <RMF/internal/paths.h>
21 #include <boost/lexical_cast.hpp>
35 IntKey structure_residue_offset_;
39 IntKey structure_residue_offset):
41 structure_filename_(structure_filename),
42 structure_chain_(structure_chain),
43 structure_residue_offset_(structure_residue_offset) {
47 String get_filename()
const {
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( );
58 return get_node().get_value(structure_chain_);
59 } RMF_DECORATOR_CATCH( );
61 String get_frame_chain()
const {
63 return get_node().get_frame_value(structure_chain_);
64 } RMF_DECORATOR_CATCH( );
66 String get_static_chain()
const {
68 return get_node().get_static_value(structure_chain_);
69 } RMF_DECORATOR_CATCH( );
73 Int get_residue_offset()
const {
75 if (!get_node().get_has_value(structure_residue_offset_))
return 0;
76 return get_node().get_value(structure_residue_offset_);
77 } RMF_DECORATOR_CATCH( );
79 Int get_frame_residue_offset()
const {
81 if (!get_node().get_has_value(structure_residue_offset_))
return 0;
82 return get_node().get_frame_value(structure_residue_offset_);
83 } RMF_DECORATOR_CATCH( );
85 Int get_static_residue_offset()
const {
87 if (!get_node().get_has_value(structure_residue_offset_))
return 0;
88 return get_node().get_static_value(structure_residue_offset_);
89 } RMF_DECORATOR_CATCH( );
92 static std::string get_decorator_type_name() {
93 return "StructureProvenanceConst";
104 IntKey structure_residue_offset):
107 structure_residue_offset) {
111 void set_filename(
String path) {
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( );
120 void set_chain(
String v) {
122 get_node().
set_value(structure_chain_, v);
123 } RMF_DECORATOR_CATCH( );
125 void set_frame_chain(
String v) {
128 } RMF_DECORATOR_CATCH( );
130 void set_static_chain(
String v) {
133 } RMF_DECORATOR_CATCH( );
137 void set_residue_offset(
Int v) {
139 get_node().
set_value(structure_residue_offset_, v);
140 } RMF_DECORATOR_CATCH( );
142 void set_frame_residue_offset(
Int v) {
145 } RMF_DECORATOR_CATCH( );
147 void set_static_residue_offset(
Int v) {
150 } RMF_DECORATOR_CATCH( );
153 static std::string get_decorator_type_name() {
154 return "StructureProvenance";
165 IntKey structure_residue_offset_;
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")) {
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")) {
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");
185 structure_residue_offset_);
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");
194 structure_residue_offset_);
200 && !nh.get_value(structure_filename_).get_is_null();
204 && !nh.get_static_value(structure_filename_).get_is_null()
205 && !nh.get_static_value(structure_chain_).get_is_null();
207 RMF_SHOWABLE(StructureProvenanceFactory,
"StructureProvenanceFactory");
210 struct StructureProvenanceConstFactory:
public StructureProvenanceFactory {
211 StructureProvenanceConstFactory(FileConstHandle fh):
212 StructureProvenanceFactory(fh) {
214 StructureProvenanceConstFactory(FileHandle fh):
215 StructureProvenanceFactory(fh) {
231 IntKey sampling_iterations_;
232 IntKey sampling_replicas_;
236 IntKey sampling_iterations,
237 IntKey sampling_replicas):
239 sampling_method_(sampling_method),
240 sampling_frames_(sampling_frames),
241 sampling_iterations_(sampling_iterations),
242 sampling_replicas_(sampling_replicas) {
246 String get_method()
const {
248 return get_node().get_value(sampling_method_);
249 } RMF_DECORATOR_CATCH( );
251 String get_frame_method()
const {
253 return get_node().get_frame_value(sampling_method_);
254 } RMF_DECORATOR_CATCH( );
256 String get_static_method()
const {
258 return get_node().get_static_value(sampling_method_);
259 } RMF_DECORATOR_CATCH( );
263 Int get_frames()
const {
265 return get_node().get_value(sampling_frames_);
266 } RMF_DECORATOR_CATCH( );
268 Int get_frame_frames()
const {
270 return get_node().get_frame_value(sampling_frames_);
271 } RMF_DECORATOR_CATCH( );
273 Int get_static_frames()
const {
275 return get_node().get_static_value(sampling_frames_);
276 } RMF_DECORATOR_CATCH( );
280 Int get_iterations()
const {
282 return get_node().get_value(sampling_iterations_);
283 } RMF_DECORATOR_CATCH( );
285 Int get_frame_iterations()
const {
287 return get_node().get_frame_value(sampling_iterations_);
288 } RMF_DECORATOR_CATCH( );
290 Int get_static_iterations()
const {
292 return get_node().get_static_value(sampling_iterations_);
293 } RMF_DECORATOR_CATCH( );
297 Int get_replicas()
const {
299 return get_node().get_value(sampling_replicas_);
300 } RMF_DECORATOR_CATCH( );
302 Int get_frame_replicas()
const {
304 return get_node().get_frame_value(sampling_replicas_);
305 } RMF_DECORATOR_CATCH( );
307 Int get_static_replicas()
const {
309 return get_node().get_static_value(sampling_replicas_);
310 } RMF_DECORATOR_CATCH( );
313 static std::string get_decorator_type_name() {
314 return "SampleProvenanceConst";
325 IntKey sampling_iterations,
326 IntKey sampling_replicas):
334 void set_method(
String v) {
336 get_node().
set_value(sampling_method_, v);
337 } RMF_DECORATOR_CATCH( );
339 void set_frame_method(
String v) {
342 } RMF_DECORATOR_CATCH( );
344 void set_static_method(
String v) {
347 } RMF_DECORATOR_CATCH( );
351 void set_frames(
Int v) {
353 get_node().
set_value(sampling_frames_, v);
354 } RMF_DECORATOR_CATCH( );
356 void set_frame_frames(
Int v) {
359 } RMF_DECORATOR_CATCH( );
361 void set_static_frames(
Int v) {
364 } RMF_DECORATOR_CATCH( );
368 void set_iterations(
Int v) {
370 get_node().
set_value(sampling_iterations_, v);
371 } RMF_DECORATOR_CATCH( );
373 void set_frame_iterations(
Int v) {
376 } RMF_DECORATOR_CATCH( );
378 void set_static_iterations(
Int v) {
381 } RMF_DECORATOR_CATCH( );
385 void set_replicas(
Int v) {
387 get_node().
set_value(sampling_replicas_, v);
388 } RMF_DECORATOR_CATCH( );
390 void set_frame_replicas(
Int v) {
393 } RMF_DECORATOR_CATCH( );
395 void set_static_replicas(
Int v) {
398 } RMF_DECORATOR_CATCH( );
401 static std::string get_decorator_type_name() {
402 return "SampleProvenance";
413 IntKey sampling_iterations_;
414 IntKey sampling_replicas_;
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")) {
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")) {
431 + boost::lexical_cast<std::string>(nh.
get_type())
432 +
"\" in decorator type SampleProvenance");
435 sampling_iterations_,
441 + boost::lexical_cast<std::string>(nh.
get_type())
442 +
"\" in decorator type SampleProvenance");
445 sampling_iterations_,
452 && !nh.get_value(sampling_method_).get_is_null();
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();
461 RMF_SHOWABLE(SampleProvenanceFactory,
"SampleProvenanceFactory");
464 struct SampleProvenanceConstFactory:
public SampleProvenanceFactory {
465 SampleProvenanceConstFactory(FileConstHandle fh):
466 SampleProvenanceFactory(fh) {
468 SampleProvenanceConstFactory(FileHandle fh):
469 SampleProvenanceFactory(fh) {
489 combined_runs_(combined_runs),
490 combined_frames_(combined_frames) {
494 Int get_runs()
const {
496 return get_node().get_value(combined_runs_);
497 } RMF_DECORATOR_CATCH( );
499 Int get_frame_runs()
const {
501 return get_node().get_frame_value(combined_runs_);
502 } RMF_DECORATOR_CATCH( );
504 Int get_static_runs()
const {
506 return get_node().get_static_value(combined_runs_);
507 } RMF_DECORATOR_CATCH( );
511 Int get_frames()
const {
513 return get_node().get_value(combined_frames_);
514 } RMF_DECORATOR_CATCH( );
516 Int get_frame_frames()
const {
518 return get_node().get_frame_value(combined_frames_);
519 } RMF_DECORATOR_CATCH( );
521 Int get_static_frames()
const {
523 return get_node().get_static_value(combined_frames_);
524 } RMF_DECORATOR_CATCH( );
527 static std::string get_decorator_type_name() {
528 return "CombineProvenanceConst";
544 void set_runs(
Int v) {
547 } RMF_DECORATOR_CATCH( );
549 void set_frame_runs(
Int v) {
552 } RMF_DECORATOR_CATCH( );
554 void set_static_runs(
Int v) {
557 } RMF_DECORATOR_CATCH( );
561 void set_frames(
Int v) {
563 get_node().
set_value(combined_frames_, v);
564 } RMF_DECORATOR_CATCH( );
566 void set_frame_frames(
Int v) {
569 } RMF_DECORATOR_CATCH( );
571 void set_static_frames(
Int v) {
574 } RMF_DECORATOR_CATCH( );
577 static std::string get_decorator_type_name() {
578 return "CombineProvenance";
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")) {
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")) {
603 + boost::lexical_cast<std::string>(nh.
get_type())
604 +
"\" in decorator type CombineProvenance");
611 + boost::lexical_cast<std::string>(nh.
get_type())
612 +
"\" in decorator type CombineProvenance");
620 && !nh.get_value(combined_runs_).get_is_null();
624 && !nh.get_static_value(combined_runs_).get_is_null()
625 && !nh.get_static_value(combined_frames_).get_is_null();
627 RMF_SHOWABLE(CombineProvenanceFactory,
"CombineProvenanceFactory");
630 struct CombineProvenanceConstFactory:
public CombineProvenanceFactory {
631 CombineProvenanceConstFactory(FileConstHandle fh):
632 CombineProvenanceFactory(fh) {
634 CombineProvenanceConstFactory(FileHandle fh):
635 CombineProvenanceFactory(fh) {
657 filter_method_(filter_method),
658 filter_threshold_(filter_threshold),
659 filter_frames_(filter_frames) {
663 String get_method()
const {
665 return get_node().get_value(filter_method_);
666 } RMF_DECORATOR_CATCH( );
668 String get_frame_method()
const {
670 return get_node().get_frame_value(filter_method_);
671 } RMF_DECORATOR_CATCH( );
673 String get_static_method()
const {
675 return get_node().get_static_value(filter_method_);
676 } RMF_DECORATOR_CATCH( );
680 Float get_threshold()
const {
682 return get_node().get_value(filter_threshold_);
683 } RMF_DECORATOR_CATCH( );
685 Float get_frame_threshold()
const {
687 return get_node().get_frame_value(filter_threshold_);
688 } RMF_DECORATOR_CATCH( );
690 Float get_static_threshold()
const {
692 return get_node().get_static_value(filter_threshold_);
693 } RMF_DECORATOR_CATCH( );
697 Int get_frames()
const {
699 return get_node().get_value(filter_frames_);
700 } RMF_DECORATOR_CATCH( );
702 Int get_frame_frames()
const {
704 return get_node().get_frame_value(filter_frames_);
705 } RMF_DECORATOR_CATCH( );
707 Int get_static_frames()
const {
709 return get_node().get_static_value(filter_frames_);
710 } RMF_DECORATOR_CATCH( );
713 static std::string get_decorator_type_name() {
714 return "FilterProvenanceConst";
732 void set_method(
String v) {
735 } RMF_DECORATOR_CATCH( );
737 void set_frame_method(
String v) {
740 } RMF_DECORATOR_CATCH( );
742 void set_static_method(
String v) {
745 } RMF_DECORATOR_CATCH( );
749 void set_threshold(
Float v) {
751 get_node().
set_value(filter_threshold_, v);
752 } RMF_DECORATOR_CATCH( );
754 void set_frame_threshold(
Float v) {
757 } RMF_DECORATOR_CATCH( );
759 void set_static_threshold(
Float v) {
762 } RMF_DECORATOR_CATCH( );
766 void set_frames(
Int v) {
769 } RMF_DECORATOR_CATCH( );
771 void set_frame_frames(
Int v) {
774 } RMF_DECORATOR_CATCH( );
776 void set_static_frames(
Int v) {
779 } RMF_DECORATOR_CATCH( );
782 static std::string get_decorator_type_name() {
783 return "FilterProvenance";
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")) {
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")) {
810 + boost::lexical_cast<std::string>(nh.
get_type())
811 +
"\" in decorator type FilterProvenance");
819 + boost::lexical_cast<std::string>(nh.
get_type())
820 +
"\" in decorator type FilterProvenance");
829 && !nh.get_value(filter_method_).get_is_null();
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();
837 RMF_SHOWABLE(FilterProvenanceFactory,
"FilterProvenanceFactory");
840 struct FilterProvenanceConstFactory:
public FilterProvenanceFactory {
841 FilterProvenanceConstFactory(FileConstHandle fh):
842 FilterProvenanceFactory(fh) {
844 FilterProvenanceConstFactory(FileHandle fh):
845 FilterProvenanceFactory(fh) {
867 cluster_members_(cluster_members),
868 cluster_precision_(cluster_precision),
869 cluster_density_(cluster_density) {
873 Int get_members()
const {
875 return get_node().get_value(cluster_members_);
876 } RMF_DECORATOR_CATCH( );
878 Int get_frame_members()
const {
880 return get_node().get_frame_value(cluster_members_);
881 } RMF_DECORATOR_CATCH( );
883 Int get_static_members()
const {
885 return get_node().get_static_value(cluster_members_);
886 } RMF_DECORATOR_CATCH( );
890 Float get_precision()
const {
892 if (!get_node().get_has_value(cluster_precision_))
return 0.0;
893 return get_node().get_value(cluster_precision_);
894 } RMF_DECORATOR_CATCH( );
896 Float get_frame_precision()
const {
898 if (!get_node().get_has_value(cluster_precision_))
return 0.0;
899 return get_node().get_frame_value(cluster_precision_);
900 } RMF_DECORATOR_CATCH( );
902 Float get_static_precision()
const {
904 if (!get_node().get_has_value(cluster_precision_))
return 0.0;
905 return get_node().get_static_value(cluster_precision_);
906 } RMF_DECORATOR_CATCH( );
910 String get_density()
const {
912 if (!get_node().get_has_value(cluster_density_)) {
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);
919 } RMF_DECORATOR_CATCH( );
922 static std::string get_decorator_type_name() {
923 return "ClusterProvenanceConst";
941 void set_members(
Int v) {
943 get_node().
set_value(cluster_members_, v);
944 } RMF_DECORATOR_CATCH( );
946 void set_frame_members(
Int v) {
949 } RMF_DECORATOR_CATCH( );
951 void set_static_members(
Int v) {
954 } RMF_DECORATOR_CATCH( );
958 void set_precision(
Float v) {
960 get_node().
set_value(cluster_precision_, v);
961 } RMF_DECORATOR_CATCH( );
963 void set_frame_precision(
Float v) {
966 } RMF_DECORATOR_CATCH( );
968 void set_static_precision(
Float v) {
971 } RMF_DECORATOR_CATCH( );
975 void set_density(
String path) {
978 get_node().
set_value(cluster_density_, path);
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);
984 } RMF_DECORATOR_CATCH( );
987 static std::string get_decorator_type_name() {
988 return "ClusterProvenance";
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")) {
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")) {
1015 + boost::lexical_cast<std::string>(nh.
get_type())
1016 +
"\" in decorator type ClusterProvenance");
1024 + boost::lexical_cast<std::string>(nh.
get_type())
1025 +
"\" in decorator type ClusterProvenance");
1034 && !nh.get_value(cluster_members_).get_is_null();
1038 && !nh.get_static_value(cluster_members_).get_is_null()
1039 && !nh.get_static_value(cluster_density_).get_is_null();
1041 RMF_SHOWABLE(ClusterProvenanceFactory,
"ClusterProvenanceFactory");
1044 struct ClusterProvenanceConstFactory:
public ClusterProvenanceFactory {
1045 ClusterProvenanceConstFactory(FileConstHandle fh):
1046 ClusterProvenanceFactory(fh) {
1048 ClusterProvenanceConstFactory(FileHandle fh):
1049 ClusterProvenanceFactory(fh) {
1067 script_filename_(script_filename) {
1071 String get_filename()
const {
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( );
1079 static std::string get_decorator_type_name() {
1080 return "ScriptProvenanceConst";
1094 void set_filename(
String path) {
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( );
1102 static std::string get_decorator_type_name() {
1103 return "ScriptProvenance";
1116 cat_(fh.get_category(
"provenance")),
1117 script_filename_(fh.
get_key<StringTag>(cat_,
"script filename")) {
1120 cat_(fh.get_category(
"provenance")),
1121 script_filename_(fh.
get_key<StringTag>(cat_,
"script filename")) {
1126 + boost::lexical_cast<std::string>(nh.
get_type())
1127 +
"\" in decorator type ScriptProvenance");
1133 + boost::lexical_cast<std::string>(nh.
get_type())
1134 +
"\" in decorator type ScriptProvenance");
1141 && !nh.get_value(script_filename_).get_is_null();
1145 && !nh.get_static_value(script_filename_).get_is_null();
1147 RMF_SHOWABLE(ScriptProvenanceFactory,
"ScriptProvenanceFactory");
1150 struct ScriptProvenanceConstFactory:
public ScriptProvenanceFactory {
1151 ScriptProvenanceConstFactory(FileConstHandle fh):
1152 ScriptProvenanceFactory(fh) {
1154 ScriptProvenanceConstFactory(FileHandle fh):
1155 ScriptProvenanceFactory(fh) {
1177 software_name_(software_name),
1178 software_version_(software_version),
1179 software_location_(software_location) {
1183 String get_name()
const {
1185 return get_node().get_value(software_name_);
1186 } RMF_DECORATOR_CATCH( );
1188 String get_frame_name()
const {
1190 return get_node().get_frame_value(software_name_);
1191 } RMF_DECORATOR_CATCH( );
1193 String get_static_name()
const {
1195 return get_node().get_static_value(software_name_);
1196 } RMF_DECORATOR_CATCH( );
1200 String get_version()
const {
1202 return get_node().get_value(software_version_);
1203 } RMF_DECORATOR_CATCH( );
1205 String get_frame_version()
const {
1207 return get_node().get_frame_value(software_version_);
1208 } RMF_DECORATOR_CATCH( );
1210 String get_static_version()
const {
1212 return get_node().get_static_value(software_version_);
1213 } RMF_DECORATOR_CATCH( );
1217 String get_location()
const {
1219 return get_node().get_value(software_location_);
1220 } RMF_DECORATOR_CATCH( );
1222 String get_frame_location()
const {
1224 return get_node().get_frame_value(software_location_);
1225 } RMF_DECORATOR_CATCH( );
1227 String get_static_location()
const {
1229 return get_node().get_static_value(software_location_);
1230 } RMF_DECORATOR_CATCH( );
1233 static std::string get_decorator_type_name() {
1234 return "SoftwareProvenanceConst";
1248 software_location) {
1252 void set_name(
String v) {
1254 get_node().
set_value(software_name_, v);
1255 } RMF_DECORATOR_CATCH( );
1257 void set_frame_name(
String v) {
1260 } RMF_DECORATOR_CATCH( );
1262 void set_static_name(
String v) {
1265 } RMF_DECORATOR_CATCH( );
1269 void set_version(
String v) {
1271 get_node().
set_value(software_version_, v);
1272 } RMF_DECORATOR_CATCH( );
1274 void set_frame_version(
String v) {
1277 } RMF_DECORATOR_CATCH( );
1279 void set_static_version(
String v) {
1282 } RMF_DECORATOR_CATCH( );
1286 void set_location(
String v) {
1288 get_node().
set_value(software_location_, v);
1289 } RMF_DECORATOR_CATCH( );
1291 void set_frame_location(
String v) {
1294 } RMF_DECORATOR_CATCH( );
1296 void set_static_location(
String v) {
1299 } RMF_DECORATOR_CATCH( );
1302 static std::string get_decorator_type_name() {
1303 return "SoftwareProvenance";
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")) {
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")) {
1330 + boost::lexical_cast<std::string>(nh.
get_type())
1331 +
"\" in decorator type SoftwareProvenance");
1334 software_location_);
1339 + boost::lexical_cast<std::string>(nh.
get_type())
1340 +
"\" in decorator type SoftwareProvenance");
1343 software_location_);
1349 && !nh.get_value(software_name_).get_is_null();
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();
1357 RMF_SHOWABLE(SoftwareProvenanceFactory,
"SoftwareProvenanceFactory");
1360 struct SoftwareProvenanceConstFactory:
public SoftwareProvenanceFactory {
1361 SoftwareProvenanceConstFactory(FileConstHandle fh):
1362 SoftwareProvenanceFactory(fh) {
1364 SoftwareProvenanceConstFactory(FileHandle fh):
1365 SoftwareProvenanceFactory(fh) {
1375 RMF_DISABLE_WARNINGS
Mostly empty base classes for decorators and factories.
A handle for a particular node in the hierarchy.
bool get_is(NodeConstHandle nh) const
bool get_is(NodeConstHandle nh) const
The base class for decorators.
NodeType get_type() const
get the type of this node
A handle for a particular node in a read-only hierarchy.
A handle for a read-only RMF file.
bool get_is(NodeConstHandle nh) const
const NodeType PROVENANCE
Represent the process by which a structure was created.
void set_value(ID< Tag > k, typename Tag::ArgumentType v) const
A handle for an RMF file.
bool get_is(NodeConstHandle nh) const
The base class for Factories.
bool get_is(NodeConstHandle nh) const
Declaration for RMF::FileHandle.
Declaration of NodeHandle.
void set_static_value(ID< Tag > k, typename Tag::ArgumentType v) const
set the value of the attribute k for all frames.
ID< Tag > get_key(Category category, std::string name) const
bool get_is(NodeConstHandle nh) const
Various general useful macros for IMP.
bool get_is(NodeConstHandle nh) const
void set_frame_value(ID< Tag > k, typename Tag::ArgumentType v) const
set the value of the attribute k for this node on the current frame.