RMF
sequence.h
Go to the documentation of this file.
1 /**
2  * \file RMF/decorator/sequence.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_SEQUENCE_DECORATORS_H
10 #define RMF_SEQUENCE_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 
23 RMF_ENABLE_WARNINGS
24 namespace RMF {
25 namespace decorator {
26 
27 
28  /** See also Residue and ResidueFactory.
29  */
30  class ResidueConst: public Decorator {
31  friend class ResidueFactory;
32  protected:
33  IntKey residue_index_;
34 StringKey residue_type_;
36  IntKey residue_index,
37 StringKey residue_type):
38  Decorator(nh),
39 residue_index_(residue_index),
40 residue_type_(residue_type) {
41  }
42  public:
43 
44  Int get_residue_index() const {
45  try {
46  return get_node().get_value(residue_index_);
47  } RMF_DECORATOR_CATCH( );
48  }
49  Int get_frame_residue_index() const {
50  try {
51  return get_node().get_frame_value(residue_index_);
52  } RMF_DECORATOR_CATCH( );
53  }
54  Int get_static_residue_index() const {
55  try {
56  return get_node().get_static_value(residue_index_);
57  } RMF_DECORATOR_CATCH( );
58  }
59 
60 
61  String get_residue_type() const {
62  try {
63  return get_node().get_value(residue_type_);
64  } RMF_DECORATOR_CATCH( );
65  }
66  String get_frame_residue_type() const {
67  try {
68  return get_node().get_frame_value(residue_type_);
69  } RMF_DECORATOR_CATCH( );
70  }
71  String get_static_residue_type() const {
72  try {
73  return get_node().get_static_value(residue_type_);
74  } RMF_DECORATOR_CATCH( );
75  }
76 
77  static std::string get_decorator_type_name() {
78  return "ResidueConst";
79  }
80  RMF_SHOWABLE(ResidueConst, "Residue: " << get_node());
81  };
82  /** See also ResidueFactory.
83  */
84  class Residue: public ResidueConst {
85  friend class ResidueFactory;
87  IntKey residue_index,
88 StringKey residue_type):
89  ResidueConst(nh, residue_index,
90 residue_type) {
91  }
92  public:
93 
94  void set_residue_index(Int v) {
95  try {
96  get_node().set_value(residue_index_, v);
97  } RMF_DECORATOR_CATCH( );
98  }
99  void set_frame_residue_index(Int v) {
100  try {
101  get_node().set_frame_value(residue_index_, v);
102  } RMF_DECORATOR_CATCH( );
103  }
104  void set_static_residue_index(Int v) {
105  try {
106  get_node().set_static_value(residue_index_, v);
107  } RMF_DECORATOR_CATCH( );
108  }
109 
110 
111  void set_residue_type(String v) {
112  try {
113  get_node().set_value(residue_type_, v);
114  } RMF_DECORATOR_CATCH( );
115  }
116  void set_frame_residue_type(String v) {
117  try {
118  get_node().set_frame_value(residue_type_, v);
119  } RMF_DECORATOR_CATCH( );
120  }
121  void set_static_residue_type(String v) {
122  try {
123  get_node().set_static_value(residue_type_, v);
124  } RMF_DECORATOR_CATCH( );
125  }
126 
127  static std::string get_decorator_type_name() {
128  return "Residue";
129  }
130  };
131 
132 
133  /** Create decorators of type Residue.
134  */
135  class ResidueFactory: public Factory {
136  Category cat_;
137 IntKey residue_index_;
138 StringKey residue_type_;
139 
140 
141  public:
143  cat_(fh.get_category("sequence")),
144  residue_index_(fh.get_key<IntTag>(cat_, "residue index")), residue_type_(fh.get_key<StringTag>(cat_, "residue type")) {
145  }
147  cat_(fh.get_category("sequence")),
148  residue_index_(fh.get_key<IntTag>(cat_, "residue index")), residue_type_(fh.get_key<StringTag>(cat_, "residue type")) {
149  }
150  /** Get a ResidueConst for nh.*/
152  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
153  + boost::lexical_cast<std::string>(nh.get_type())
154  + "\" in decorator type Residue");
155  return ResidueConst(nh, residue_index_,
156 residue_type_);
157  }
158  /** Get a Residue for nh.*/
159  Residue get(NodeHandle nh) const {
160  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
161  + boost::lexical_cast<std::string>(nh.get_type())
162  + "\" in decorator type Residue");
163  return Residue(nh, residue_index_,
164 residue_type_);
165  }
166  /** Check whether nh has all the attributes required to be a
167  ResidueConst.*/
168  bool get_is(NodeConstHandle nh) const {
169  return (nh.get_type() == RMF::REPRESENTATION)
170  && !nh.get_value(residue_index_).get_is_null();
171  }
172  bool get_is_static(NodeConstHandle nh) const {
173  return (nh.get_type() == RMF::REPRESENTATION)
174  && !nh.get_static_value(residue_index_).get_is_null()
175  && !nh.get_static_value(residue_type_).get_is_null();
176  }
177  RMF_SHOWABLE(ResidueFactory, "ResidueFactory");
178  };
179  #ifndef RMF_DOXYGEN
180 struct ResidueConstFactory: public ResidueFactory {
181  ResidueConstFactory(FileConstHandle fh):
182  ResidueFactory(fh) {
183  }
184  ResidueConstFactory(FileHandle fh):
185  ResidueFactory(fh) {
186  }
187 
188 };
189  #endif
190 
191 
192 
193 
194  /** See also Chain and ChainFactory.
195  */
196  class ChainConst: public Decorator {
197  friend class ChainFactory;
198  protected:
199  StringKey chain_id_;
200 StringKey sequence_;
201 IntKey sequence_offset_;
202 StringKey uniprot_accession_;
203 StringKey label_asym_id_;
204 StringKey chain_type_;
206  StringKey chain_id,
207 StringKey sequence,
208 IntKey sequence_offset,
209 StringKey uniprot_accession,
210 StringKey label_asym_id,
211 StringKey chain_type):
212  Decorator(nh),
213 chain_id_(chain_id),
214 sequence_(sequence),
215 sequence_offset_(sequence_offset),
216 uniprot_accession_(uniprot_accession),
217 label_asym_id_(label_asym_id),
218 chain_type_(chain_type) {
219  }
220  public:
221 
222  String get_chain_id() const {
223  try {
224  return get_node().get_value(chain_id_);
225  } RMF_DECORATOR_CATCH( );
226  }
227  String get_frame_chain_id() const {
228  try {
229  return get_node().get_frame_value(chain_id_);
230  } RMF_DECORATOR_CATCH( );
231  }
232  String get_static_chain_id() const {
233  try {
234  return get_node().get_static_value(chain_id_);
235  } RMF_DECORATOR_CATCH( );
236  }
237 
238 
239  String get_sequence() const {
240  try {
241  if (!get_node().get_has_value(sequence_)) return "";
242 return get_node().get_value(sequence_);
243  } RMF_DECORATOR_CATCH( );
244  }
245  String get_frame_sequence() const {
246  try {
247  if (!get_node().get_has_value(sequence_)) return "";
248 return get_node().get_frame_value(sequence_);
249  } RMF_DECORATOR_CATCH( );
250  }
251  String get_static_sequence() const {
252  try {
253  if (!get_node().get_has_value(sequence_)) return "";
254 return get_node().get_static_value(sequence_);
255  } RMF_DECORATOR_CATCH( );
256  }
257 
258 
259  Int get_sequence_offset() const {
260  try {
261  if (!get_node().get_has_value(sequence_offset_)) return 0;
262 return get_node().get_value(sequence_offset_);
263  } RMF_DECORATOR_CATCH( );
264  }
265  Int get_frame_sequence_offset() const {
266  try {
267  if (!get_node().get_has_value(sequence_offset_)) return 0;
268 return get_node().get_frame_value(sequence_offset_);
269  } RMF_DECORATOR_CATCH( );
270  }
271  Int get_static_sequence_offset() const {
272  try {
273  if (!get_node().get_has_value(sequence_offset_)) return 0;
274 return get_node().get_static_value(sequence_offset_);
275  } RMF_DECORATOR_CATCH( );
276  }
277 
278 
279  String get_uniprot_accession() const {
280  try {
281  if (!get_node().get_has_value(uniprot_accession_)) return "";
282 return get_node().get_value(uniprot_accession_);
283  } RMF_DECORATOR_CATCH( );
284  }
285  String get_frame_uniprot_accession() const {
286  try {
287  if (!get_node().get_has_value(uniprot_accession_)) return "";
288 return get_node().get_frame_value(uniprot_accession_);
289  } RMF_DECORATOR_CATCH( );
290  }
291  String get_static_uniprot_accession() const {
292  try {
293  if (!get_node().get_has_value(uniprot_accession_)) return "";
294 return get_node().get_static_value(uniprot_accession_);
295  } RMF_DECORATOR_CATCH( );
296  }
297 
298 
299  String get_label_asym_id() const {
300  try {
301  if (!get_node().get_has_value(label_asym_id_)) return "";
302 return get_node().get_value(label_asym_id_);
303  } RMF_DECORATOR_CATCH( );
304  }
305  String get_frame_label_asym_id() const {
306  try {
307  if (!get_node().get_has_value(label_asym_id_)) return "";
308 return get_node().get_frame_value(label_asym_id_);
309  } RMF_DECORATOR_CATCH( );
310  }
311  String get_static_label_asym_id() const {
312  try {
313  if (!get_node().get_has_value(label_asym_id_)) return "";
314 return get_node().get_static_value(label_asym_id_);
315  } RMF_DECORATOR_CATCH( );
316  }
317 
318 
319  String get_chain_type() const {
320  try {
321  if (!get_node().get_has_value(chain_type_)) return "UnknownChainType";
322 return get_node().get_value(chain_type_);
323  } RMF_DECORATOR_CATCH( );
324  }
325  String get_frame_chain_type() const {
326  try {
327  if (!get_node().get_has_value(chain_type_)) return "UnknownChainType";
328 return get_node().get_frame_value(chain_type_);
329  } RMF_DECORATOR_CATCH( );
330  }
331  String get_static_chain_type() const {
332  try {
333  if (!get_node().get_has_value(chain_type_)) return "UnknownChainType";
334 return get_node().get_static_value(chain_type_);
335  } RMF_DECORATOR_CATCH( );
336  }
337 
338  static std::string get_decorator_type_name() {
339  return "ChainConst";
340  }
341  RMF_SHOWABLE(ChainConst, "Chain: " << get_node());
342  };
343  /** See also ChainFactory.
344  */
345  class Chain: public ChainConst {
346  friend class ChainFactory;
347  Chain(NodeHandle nh,
348  StringKey chain_id,
349 StringKey sequence,
350 IntKey sequence_offset,
351 StringKey uniprot_accession,
352 StringKey label_asym_id,
353 StringKey chain_type):
354  ChainConst(nh, chain_id,
355 sequence,
356 sequence_offset,
357 uniprot_accession,
358 label_asym_id,
359 chain_type) {
360  }
361  public:
362 
363  void set_chain_id(String v) {
364  try {
365  get_node().set_value(chain_id_, v);
366  } RMF_DECORATOR_CATCH( );
367  }
368  void set_frame_chain_id(String v) {
369  try {
370  get_node().set_frame_value(chain_id_, v);
371  } RMF_DECORATOR_CATCH( );
372  }
373  void set_static_chain_id(String v) {
374  try {
375  get_node().set_static_value(chain_id_, v);
376  } RMF_DECORATOR_CATCH( );
377  }
378 
379 
380  void set_sequence(String v) {
381  try {
382  get_node().set_value(sequence_, v);
383  } RMF_DECORATOR_CATCH( );
384  }
385  void set_frame_sequence(String v) {
386  try {
387  get_node().set_frame_value(sequence_, v);
388  } RMF_DECORATOR_CATCH( );
389  }
390  void set_static_sequence(String v) {
391  try {
392  get_node().set_static_value(sequence_, v);
393  } RMF_DECORATOR_CATCH( );
394  }
395 
396 
397  void set_sequence_offset(Int v) {
398  try {
399  get_node().set_value(sequence_offset_, v);
400  } RMF_DECORATOR_CATCH( );
401  }
402  void set_frame_sequence_offset(Int v) {
403  try {
404  get_node().set_frame_value(sequence_offset_, v);
405  } RMF_DECORATOR_CATCH( );
406  }
407  void set_static_sequence_offset(Int v) {
408  try {
409  get_node().set_static_value(sequence_offset_, v);
410  } RMF_DECORATOR_CATCH( );
411  }
412 
413 
414  void set_uniprot_accession(String v) {
415  try {
416  get_node().set_value(uniprot_accession_, v);
417  } RMF_DECORATOR_CATCH( );
418  }
419  void set_frame_uniprot_accession(String v) {
420  try {
421  get_node().set_frame_value(uniprot_accession_, v);
422  } RMF_DECORATOR_CATCH( );
423  }
424  void set_static_uniprot_accession(String v) {
425  try {
426  get_node().set_static_value(uniprot_accession_, v);
427  } RMF_DECORATOR_CATCH( );
428  }
429 
430 
431  void set_label_asym_id(String v) {
432  try {
433  get_node().set_value(label_asym_id_, v);
434  } RMF_DECORATOR_CATCH( );
435  }
436  void set_frame_label_asym_id(String v) {
437  try {
438  get_node().set_frame_value(label_asym_id_, v);
439  } RMF_DECORATOR_CATCH( );
440  }
441  void set_static_label_asym_id(String v) {
442  try {
443  get_node().set_static_value(label_asym_id_, v);
444  } RMF_DECORATOR_CATCH( );
445  }
446 
447 
448  void set_chain_type(String v) {
449  try {
450  get_node().set_value(chain_type_, v);
451  } RMF_DECORATOR_CATCH( );
452  }
453  void set_frame_chain_type(String v) {
454  try {
455  get_node().set_frame_value(chain_type_, v);
456  } RMF_DECORATOR_CATCH( );
457  }
458  void set_static_chain_type(String v) {
459  try {
460  get_node().set_static_value(chain_type_, v);
461  } RMF_DECORATOR_CATCH( );
462  }
463 
464  static std::string get_decorator_type_name() {
465  return "Chain";
466  }
467  };
468 
469 
470  /** Create decorators of type Chain.
471  */
472  class ChainFactory: public Factory {
473  Category cat_;
474 StringKey chain_id_;
475 StringKey sequence_;
476 IntKey sequence_offset_;
477 StringKey uniprot_accession_;
478 StringKey label_asym_id_;
479 StringKey chain_type_;
480 
481 
482 
483 
484 
485 
486  public:
488  cat_(fh.get_category("sequence")),
489  chain_id_(fh.get_key<StringTag>(cat_, "chain id")), sequence_(fh.get_key<StringTag>(cat_, "sequence")), sequence_offset_(fh.get_key<IntTag>(cat_, "sequence offset")), uniprot_accession_(fh.get_key<StringTag>(cat_, "uniprot accession")), label_asym_id_(fh.get_key<StringTag>(cat_, "label asym id")), chain_type_(fh.get_key<StringTag>(cat_, "chain type")) {
490  }
492  cat_(fh.get_category("sequence")),
493  chain_id_(fh.get_key<StringTag>(cat_, "chain id")), sequence_(fh.get_key<StringTag>(cat_, "sequence")), sequence_offset_(fh.get_key<IntTag>(cat_, "sequence offset")), uniprot_accession_(fh.get_key<StringTag>(cat_, "uniprot accession")), label_asym_id_(fh.get_key<StringTag>(cat_, "label asym id")), chain_type_(fh.get_key<StringTag>(cat_, "chain type")) {
494  }
495  /** Get a ChainConst for nh.*/
496  ChainConst get(NodeConstHandle nh) const {
497  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
498  + boost::lexical_cast<std::string>(nh.get_type())
499  + "\" in decorator type Chain");
500  return ChainConst(nh, chain_id_,
501 sequence_,
502 sequence_offset_,
503 uniprot_accession_,
504 label_asym_id_,
505 chain_type_);
506  }
507  /** Get a Chain for nh.*/
508  Chain get(NodeHandle nh) const {
509  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
510  + boost::lexical_cast<std::string>(nh.get_type())
511  + "\" in decorator type Chain");
512  return Chain(nh, chain_id_,
513 sequence_,
514 sequence_offset_,
515 uniprot_accession_,
516 label_asym_id_,
517 chain_type_);
518  }
519  /** Check whether nh has all the attributes required to be a
520  ChainConst.*/
521  bool get_is(NodeConstHandle nh) const {
522  return (nh.get_type() == RMF::REPRESENTATION)
523  && !nh.get_value(chain_id_).get_is_null();
524  }
525  bool get_is_static(NodeConstHandle nh) const {
526  return (nh.get_type() == RMF::REPRESENTATION)
527  && !nh.get_static_value(chain_id_).get_is_null();
528  }
529  RMF_SHOWABLE(ChainFactory, "ChainFactory");
530  };
531  #ifndef RMF_DOXYGEN
532 struct ChainConstFactory: public ChainFactory {
533  ChainConstFactory(FileConstHandle fh):
534  ChainFactory(fh) {
535  }
536  ChainConstFactory(FileHandle fh):
537  ChainFactory(fh) {
538  }
539 
540 };
541  #endif
542 
543 
544 
545 
546  /** See also Fragment and FragmentFactory.
547  */
548  class FragmentConst: public Decorator {
549  friend class FragmentFactory;
550  protected:
551  IntsKey residue_indexes_;
553  IntsKey residue_indexes):
554  Decorator(nh),
555 residue_indexes_(residue_indexes) {
556  }
557  public:
558 
559  Ints get_residue_indexes() const {
560  try {
561  return get_node().get_value(residue_indexes_);
562  } RMF_DECORATOR_CATCH( );
563  }
564  Ints get_frame_residue_indexes() const {
565  try {
566  return get_node().get_frame_value(residue_indexes_);
567  } RMF_DECORATOR_CATCH( );
568  }
569  Ints get_static_residue_indexes() const {
570  try {
571  return get_node().get_static_value(residue_indexes_);
572  } RMF_DECORATOR_CATCH( );
573  }
574 
575  static std::string get_decorator_type_name() {
576  return "FragmentConst";
577  }
578  RMF_SHOWABLE(FragmentConst, "Fragment: " << get_node());
579  };
580  /** See also FragmentFactory.
581  */
582  class Fragment: public FragmentConst {
583  friend class FragmentFactory;
584  Fragment(NodeHandle nh,
585  IntsKey residue_indexes):
586  FragmentConst(nh, residue_indexes) {
587  }
588  public:
589 
590  void set_residue_indexes(Ints v) {
591  try {
592  get_node().set_value(residue_indexes_, v);
593  } RMF_DECORATOR_CATCH( );
594  }
595  void set_frame_residue_indexes(Ints v) {
596  try {
597  get_node().set_frame_value(residue_indexes_, v);
598  } RMF_DECORATOR_CATCH( );
599  }
600  void set_static_residue_indexes(Ints v) {
601  try {
602  get_node().set_static_value(residue_indexes_, v);
603  } RMF_DECORATOR_CATCH( );
604  }
605 
606  static std::string get_decorator_type_name() {
607  return "Fragment";
608  }
609  };
610 
611 
612  /** Create decorators of type Fragment.
613  */
614  class FragmentFactory: public Factory {
615  Category cat_;
616 IntsKey residue_indexes_;
617 
618  public:
620  cat_(fh.get_category("sequence")),
621  residue_indexes_(fh.get_key<IntsTag>(cat_, "residue indexes")) {
622  }
624  cat_(fh.get_category("sequence")),
625  residue_indexes_(fh.get_key<IntsTag>(cat_, "residue indexes")) {
626  }
627  /** Get a FragmentConst for nh.*/
629  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
630  + boost::lexical_cast<std::string>(nh.get_type())
631  + "\" in decorator type Fragment");
632  return FragmentConst(nh, residue_indexes_);
633  }
634  /** Get a Fragment for nh.*/
635  Fragment get(NodeHandle nh) const {
636  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
637  + boost::lexical_cast<std::string>(nh.get_type())
638  + "\" in decorator type Fragment");
639  return Fragment(nh, residue_indexes_);
640  }
641  /** Check whether nh has all the attributes required to be a
642  FragmentConst.*/
643  bool get_is(NodeConstHandle nh) const {
644  return (nh.get_type() == RMF::REPRESENTATION)
645  && !nh.get_value(residue_indexes_).get_is_null();
646  }
647  bool get_is_static(NodeConstHandle nh) const {
648  return (nh.get_type() == RMF::REPRESENTATION)
649  && !nh.get_static_value(residue_indexes_).get_is_null();
650  }
651  RMF_SHOWABLE(FragmentFactory, "FragmentFactory");
652  };
653  #ifndef RMF_DOXYGEN
654 struct FragmentConstFactory: public FragmentFactory {
655  FragmentConstFactory(FileConstHandle fh):
656  FragmentFactory(fh) {
657  }
658  FragmentConstFactory(FileHandle fh):
659  FragmentFactory(fh) {
660  }
661 
662 };
663  #endif
664 
665 
666 
667 
668  /** See also BackwardsCompatibilityFragment and BackwardsCompatibilityFragmentFactory.
669  */
672  protected:
673  IntsKey indexes_;
675  IntsKey indexes):
676  Decorator(nh),
677 indexes_(indexes) {
678  }
679  public:
680 
681  Ints get_indexes() const {
682  try {
683  return get_node().get_value(indexes_);
684  } RMF_DECORATOR_CATCH( );
685  }
686  Ints get_frame_indexes() const {
687  try {
688  return get_node().get_frame_value(indexes_);
689  } RMF_DECORATOR_CATCH( );
690  }
691  Ints get_static_indexes() const {
692  try {
693  return get_node().get_static_value(indexes_);
694  } RMF_DECORATOR_CATCH( );
695  }
696 
697  static std::string get_decorator_type_name() {
698  return "BackwardsCompatibilityFragmentConst";
699  }
700  RMF_SHOWABLE(BackwardsCompatibilityFragmentConst, "BackwardsCompatibilityFragment: " << get_node());
701  };
702  /** See also BackwardsCompatibilityFragmentFactory.
703  */
707  IntsKey indexes):
709  }
710  public:
711 
712  void set_indexes(Ints v) {
713  try {
714  get_node().set_value(indexes_, v);
715  } RMF_DECORATOR_CATCH( );
716  }
717  void set_frame_indexes(Ints v) {
718  try {
719  get_node().set_frame_value(indexes_, v);
720  } RMF_DECORATOR_CATCH( );
721  }
722  void set_static_indexes(Ints v) {
723  try {
724  get_node().set_static_value(indexes_, v);
725  } RMF_DECORATOR_CATCH( );
726  }
727 
728  static std::string get_decorator_type_name() {
729  return "BackwardsCompatibilityFragment";
730  }
731  };
732 
733 
734  /** Create decorators of type BackwardsCompatibilityFragment.
735  */
737  Category cat_;
738 IntsKey indexes_;
739 
740  public:
742  cat_(fh.get_category("sequence")),
743  indexes_(fh.get_key<IntsTag>(cat_, "indexes")) {
744  }
746  cat_(fh.get_category("sequence")),
747  indexes_(fh.get_key<IntsTag>(cat_, "indexes")) {
748  }
749  /** Get a BackwardsCompatibilityFragmentConst for nh.*/
751  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
752  + boost::lexical_cast<std::string>(nh.get_type())
753  + "\" in decorator type BackwardsCompatibilityFragment");
754  return BackwardsCompatibilityFragmentConst(nh, indexes_);
755  }
756  /** Get a BackwardsCompatibilityFragment for nh.*/
758  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
759  + boost::lexical_cast<std::string>(nh.get_type())
760  + "\" in decorator type BackwardsCompatibilityFragment");
761  return BackwardsCompatibilityFragment(nh, indexes_);
762  }
763  /** Check whether nh has all the attributes required to be a
764  BackwardsCompatibilityFragmentConst.*/
765  bool get_is(NodeConstHandle nh) const {
766  return (nh.get_type() == RMF::REPRESENTATION)
767  && !nh.get_value(indexes_).get_is_null();
768  }
769  bool get_is_static(NodeConstHandle nh) const {
770  return (nh.get_type() == RMF::REPRESENTATION)
771  && !nh.get_static_value(indexes_).get_is_null();
772  }
773  RMF_SHOWABLE(BackwardsCompatibilityFragmentFactory, "BackwardsCompatibilityFragmentFactory");
774  };
775  #ifndef RMF_DOXYGEN
776 struct BackwardsCompatibilityFragmentConstFactory: public BackwardsCompatibilityFragmentFactory {
777  BackwardsCompatibilityFragmentConstFactory(FileConstHandle fh):
778  BackwardsCompatibilityFragmentFactory(fh) {
779  }
780  BackwardsCompatibilityFragmentConstFactory(FileHandle fh):
781  BackwardsCompatibilityFragmentFactory(fh) {
782  }
783 
784 };
785  #endif
786 
787 
788 
789 
790  /** See also Domain and DomainFactory.
791  */
792  class DomainConst: public Decorator {
793  friend class DomainFactory;
794  protected:
795  std::array<IntKey, 2> residue_indexes_;
797  std::array<IntKey, 2> residue_indexes):
798  Decorator(nh),
799 residue_indexes_(residue_indexes) {
800  }
801  public:
802 
803  IntRange get_residue_indexes() const {
804  try {
805  IntRange ret;
806  ret[0] = get_node().get_value(residue_indexes_[0]);
807  ret[1] = get_node().get_value(residue_indexes_[1]);
808  return ret;
809  } RMF_DECORATOR_CATCH( );
810  }
811  IntRange get_static_residue_indexes() const {
812  try {
813  IntRange ret;
814  ret[0] = get_node().get_static_value(residue_indexes_[0]);
815  ret[1] = get_node().get_static_value(residue_indexes_[1]);
816  return ret;
817  } RMF_DECORATOR_CATCH( );
818  }
819  IntRange get_frame_residue_indexes() const {
820  try {
821  IntRange ret;
822  ret[0] = get_node().get_frame_value(residue_indexes_[0]);
823  ret[1] = get_node().get_frame_value(residue_indexes_[1]);
824  return ret;
825  } RMF_DECORATOR_CATCH( );
826  }
827 
828  static std::string get_decorator_type_name() {
829  return "DomainConst";
830  }
831  RMF_SHOWABLE(DomainConst, "Domain: " << get_node());
832  };
833  /** See also DomainFactory.
834  */
835  class Domain: public DomainConst {
836  friend class DomainFactory;
837  Domain(NodeHandle nh,
838  std::array<IntKey, 2> residue_indexes):
839  DomainConst(nh, residue_indexes) {
840  }
841  public:
842 
843  void set_residue_indexes(Int v0, Int v1) {
844  try {
845  get_node().set_value(residue_indexes_[0], v0);
846  get_node().set_value(residue_indexes_[1], v1);
847  } RMF_DECORATOR_CATCH( );
848  }
849  void set_frame_residue_indexes(Int v0, Int v1) {
850  try {
851  get_node().set_frame_value(residue_indexes_[0], v0);
852  get_node().set_frame_value(residue_indexes_[1], v1);
853  } RMF_DECORATOR_CATCH( );
854  }
855  void set_static_residue_indexes(Int v0, Int v1) {
856  try {
857  get_node().set_static_value(residue_indexes_[0], v0);
858  get_node().set_static_value(residue_indexes_[1], v1);
859  } RMF_DECORATOR_CATCH( );
860  }
861 
862  static std::string get_decorator_type_name() {
863  return "Domain";
864  }
865  };
866 
867 
868  /** Create decorators of type Domain.
869  */
870  class DomainFactory: public Factory {
871  Category cat_;
872 std::array<IntKey, 2> residue_indexes_;
873  template <class H> std::array<IntKey, 2> get_residue_indexes_keys(H fh) const {
874  std::array<IntKey, 2> ret;
875  ret[0] = fh.template get_key<IntTag>(cat_, "first residue index");
876  ret[1] = fh.template get_key<IntTag>(cat_, "last residue index");
877  return ret;
878  }
879 
880  public:
882  cat_(fh.get_category("sequence")),
883  residue_indexes_(get_residue_indexes_keys(fh)) {
884  }
886  cat_(fh.get_category("sequence")),
887  residue_indexes_(get_residue_indexes_keys(fh)) {
888  }
889  /** Get a DomainConst for nh.*/
890  DomainConst get(NodeConstHandle nh) const {
891  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
892  + boost::lexical_cast<std::string>(nh.get_type())
893  + "\" in decorator type Domain");
894  return DomainConst(nh, residue_indexes_);
895  }
896  /** Get a Domain for nh.*/
897  Domain get(NodeHandle nh) const {
898  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
899  + boost::lexical_cast<std::string>(nh.get_type())
900  + "\" in decorator type Domain");
901  return Domain(nh, residue_indexes_);
902  }
903  /** Check whether nh has all the attributes required to be a
904  DomainConst.*/
905  bool get_is(NodeConstHandle nh) const {
906  return (nh.get_type() == RMF::REPRESENTATION)
907  && !nh.get_value(residue_indexes_[0]).get_is_null() && !nh.get_value(residue_indexes_[1]).get_is_null() && nh.get_value(residue_indexes_[0]) < nh.get_value(residue_indexes_[1]);
908  }
909  bool get_is_static(NodeConstHandle nh) const {
910  return (nh.get_type() == RMF::REPRESENTATION)
911  && !nh.get_static_value(residue_indexes_[0]).get_is_null() && !nh.get_static_value(residue_indexes_[1]).get_is_null() && nh.get_value(residue_indexes_[0]) < nh.get_value(residue_indexes_[1]);
912  }
913  RMF_SHOWABLE(DomainFactory, "DomainFactory");
914  };
915  #ifndef RMF_DOXYGEN
916 struct DomainConstFactory: public DomainFactory {
917  DomainConstFactory(FileConstHandle fh):
918  DomainFactory(fh) {
919  }
920  DomainConstFactory(FileHandle fh):
921  DomainFactory(fh) {
922  }
923 
924 };
925  #endif
926 
927 
928 
929 
930  /** See also Typed and TypedFactory.
931  */
932  class TypedConst: public Decorator {
933  friend class TypedFactory;
934  protected:
935  StringKey type_name_;
937  StringKey type_name):
938  Decorator(nh),
939 type_name_(type_name) {
940  }
941  public:
942 
943  String get_type_name() const {
944  try {
945  return get_node().get_value(type_name_);
946  } RMF_DECORATOR_CATCH( );
947  }
948  String get_frame_type_name() const {
949  try {
950  return get_node().get_frame_value(type_name_);
951  } RMF_DECORATOR_CATCH( );
952  }
953  String get_static_type_name() const {
954  try {
955  return get_node().get_static_value(type_name_);
956  } RMF_DECORATOR_CATCH( );
957  }
958 
959  static std::string get_decorator_type_name() {
960  return "TypedConst";
961  }
962  RMF_SHOWABLE(TypedConst, "Typed: " << get_node());
963  };
964  /** See also TypedFactory.
965  */
966  class Typed: public TypedConst {
967  friend class TypedFactory;
968  Typed(NodeHandle nh,
969  StringKey type_name):
970  TypedConst(nh, type_name) {
971  }
972  public:
973 
974  void set_type_name(String v) {
975  try {
976  get_node().set_value(type_name_, v);
977  } RMF_DECORATOR_CATCH( );
978  }
979  void set_frame_type_name(String v) {
980  try {
981  get_node().set_frame_value(type_name_, v);
982  } RMF_DECORATOR_CATCH( );
983  }
984  void set_static_type_name(String v) {
985  try {
986  get_node().set_static_value(type_name_, v);
987  } RMF_DECORATOR_CATCH( );
988  }
989 
990  static std::string get_decorator_type_name() {
991  return "Typed";
992  }
993  };
994 
995 
996  /** Create decorators of type Typed.
997  */
998  class TypedFactory: public Factory {
999  Category cat_;
1000 StringKey type_name_;
1001 
1002  public:
1004  cat_(fh.get_category("sequence")),
1005  type_name_(fh.get_key<StringTag>(cat_, "type name")) {
1006  }
1008  cat_(fh.get_category("sequence")),
1009  type_name_(fh.get_key<StringTag>(cat_, "type name")) {
1010  }
1011  /** Get a TypedConst for nh.*/
1012  TypedConst get(NodeConstHandle nh) const {
1013  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1014  + boost::lexical_cast<std::string>(nh.get_type())
1015  + "\" in decorator type Typed");
1016  return TypedConst(nh, type_name_);
1017  }
1018  /** Get a Typed for nh.*/
1019  Typed get(NodeHandle nh) const {
1020  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1021  + boost::lexical_cast<std::string>(nh.get_type())
1022  + "\" in decorator type Typed");
1023  return Typed(nh, type_name_);
1024  }
1025  /** Check whether nh has all the attributes required to be a
1026  TypedConst.*/
1027  bool get_is(NodeConstHandle nh) const {
1028  return (nh.get_type() == RMF::REPRESENTATION)
1029  && !nh.get_value(type_name_).get_is_null();
1030  }
1031  bool get_is_static(NodeConstHandle nh) const {
1032  return (nh.get_type() == RMF::REPRESENTATION)
1033  && !nh.get_static_value(type_name_).get_is_null();
1034  }
1035  RMF_SHOWABLE(TypedFactory, "TypedFactory");
1036  };
1037  #ifndef RMF_DOXYGEN
1038 struct TypedConstFactory: public TypedFactory {
1039  TypedConstFactory(FileConstHandle fh):
1040  TypedFactory(fh) {
1041  }
1042  TypedConstFactory(FileHandle fh):
1043  TypedFactory(fh) {
1044  }
1045 
1046 };
1047  #endif
1048 
1049 
1050 
1051 
1052  /** See also Copy and CopyFactory.
1053  */
1054  class CopyConst: public Decorator {
1055  friend class CopyFactory;
1056  protected:
1057  IntKey copy_index_;
1059  IntKey copy_index):
1060  Decorator(nh),
1061 copy_index_(copy_index) {
1062  }
1063  public:
1064 
1065  Int get_copy_index() const {
1066  try {
1067  return get_node().get_value(copy_index_);
1068  } RMF_DECORATOR_CATCH( );
1069  }
1070  Int get_frame_copy_index() const {
1071  try {
1072  return get_node().get_frame_value(copy_index_);
1073  } RMF_DECORATOR_CATCH( );
1074  }
1075  Int get_static_copy_index() const {
1076  try {
1077  return get_node().get_static_value(copy_index_);
1078  } RMF_DECORATOR_CATCH( );
1079  }
1080 
1081  static std::string get_decorator_type_name() {
1082  return "CopyConst";
1083  }
1084  RMF_SHOWABLE(CopyConst, "Copy: " << get_node());
1085  };
1086  /** See also CopyFactory.
1087  */
1088  class Copy: public CopyConst {
1089  friend class CopyFactory;
1090  Copy(NodeHandle nh,
1091  IntKey copy_index):
1092  CopyConst(nh, copy_index) {
1093  }
1094  public:
1095 
1096  void set_copy_index(Int v) {
1097  try {
1098  get_node().set_value(copy_index_, v);
1099  } RMF_DECORATOR_CATCH( );
1100  }
1101  void set_frame_copy_index(Int v) {
1102  try {
1103  get_node().set_frame_value(copy_index_, v);
1104  } RMF_DECORATOR_CATCH( );
1105  }
1106  void set_static_copy_index(Int v) {
1107  try {
1108  get_node().set_static_value(copy_index_, v);
1109  } RMF_DECORATOR_CATCH( );
1110  }
1111 
1112  static std::string get_decorator_type_name() {
1113  return "Copy";
1114  }
1115  };
1116 
1117 
1118  /** Create decorators of type Copy.
1119  */
1120  class CopyFactory: public Factory {
1121  Category cat_;
1122 IntKey copy_index_;
1123 
1124  public:
1126  cat_(fh.get_category("sequence")),
1127  copy_index_(fh.get_key<IntTag>(cat_, "copy index")) {
1128  }
1129  CopyFactory(FileHandle fh):
1130  cat_(fh.get_category("sequence")),
1131  copy_index_(fh.get_key<IntTag>(cat_, "copy index")) {
1132  }
1133  /** Get a CopyConst for nh.*/
1134  CopyConst get(NodeConstHandle nh) const {
1135  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1136  + boost::lexical_cast<std::string>(nh.get_type())
1137  + "\" in decorator type Copy");
1138  return CopyConst(nh, copy_index_);
1139  }
1140  /** Get a Copy for nh.*/
1141  Copy get(NodeHandle nh) const {
1142  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1143  + boost::lexical_cast<std::string>(nh.get_type())
1144  + "\" in decorator type Copy");
1145  return Copy(nh, copy_index_);
1146  }
1147  /** Check whether nh has all the attributes required to be a
1148  CopyConst.*/
1149  bool get_is(NodeConstHandle nh) const {
1150  return (nh.get_type() == RMF::REPRESENTATION)
1151  && !nh.get_value(copy_index_).get_is_null();
1152  }
1153  bool get_is_static(NodeConstHandle nh) const {
1154  return (nh.get_type() == RMF::REPRESENTATION)
1155  && !nh.get_static_value(copy_index_).get_is_null();
1156  }
1157  RMF_SHOWABLE(CopyFactory, "CopyFactory");
1158  };
1159  #ifndef RMF_DOXYGEN
1160 struct CopyConstFactory: public CopyFactory {
1161  CopyConstFactory(FileConstHandle fh):
1162  CopyFactory(fh) {
1163  }
1164  CopyConstFactory(FileHandle fh):
1165  CopyFactory(fh) {
1166  }
1167 
1168 };
1169  #endif
1170 
1171 
1172 
1173 
1174  /** See also State and StateFactory.
1175  */
1176  class StateConst: public Decorator {
1177  friend class StateFactory;
1178  protected:
1179  IntKey state_index_;
1181  IntKey state_index):
1182  Decorator(nh),
1183 state_index_(state_index) {
1184  }
1185  public:
1186 
1187  Int get_state_index() const {
1188  try {
1189  return get_node().get_value(state_index_);
1190  } RMF_DECORATOR_CATCH( );
1191  }
1192  Int get_frame_state_index() const {
1193  try {
1194  return get_node().get_frame_value(state_index_);
1195  } RMF_DECORATOR_CATCH( );
1196  }
1197  Int get_static_state_index() const {
1198  try {
1199  return get_node().get_static_value(state_index_);
1200  } RMF_DECORATOR_CATCH( );
1201  }
1202 
1203  static std::string get_decorator_type_name() {
1204  return "StateConst";
1205  }
1206  RMF_SHOWABLE(StateConst, "State: " << get_node());
1207  };
1208  /** See also StateFactory.
1209  */
1210  class State: public StateConst {
1211  friend class StateFactory;
1212  State(NodeHandle nh,
1213  IntKey state_index):
1214  StateConst(nh, state_index) {
1215  }
1216  public:
1217 
1218  void set_state_index(Int v) {
1219  try {
1220  get_node().set_value(state_index_, v);
1221  } RMF_DECORATOR_CATCH( );
1222  }
1223  void set_frame_state_index(Int v) {
1224  try {
1225  get_node().set_frame_value(state_index_, v);
1226  } RMF_DECORATOR_CATCH( );
1227  }
1228  void set_static_state_index(Int v) {
1229  try {
1230  get_node().set_static_value(state_index_, v);
1231  } RMF_DECORATOR_CATCH( );
1232  }
1233 
1234  static std::string get_decorator_type_name() {
1235  return "State";
1236  }
1237  };
1238 
1239 
1240  /** Create decorators of type State.
1241  */
1242  class StateFactory: public Factory {
1243  Category cat_;
1244 IntKey state_index_;
1245 
1246  public:
1248  cat_(fh.get_category("sequence")),
1249  state_index_(fh.get_key<IntTag>(cat_, "state index")) {
1250  }
1252  cat_(fh.get_category("sequence")),
1253  state_index_(fh.get_key<IntTag>(cat_, "state index")) {
1254  }
1255  /** Get a StateConst for nh.*/
1256  StateConst get(NodeConstHandle nh) const {
1257  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1258  + boost::lexical_cast<std::string>(nh.get_type())
1259  + "\" in decorator type State");
1260  return StateConst(nh, state_index_);
1261  }
1262  /** Get a State for nh.*/
1263  State get(NodeHandle nh) const {
1264  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1265  + boost::lexical_cast<std::string>(nh.get_type())
1266  + "\" in decorator type State");
1267  return State(nh, state_index_);
1268  }
1269  /** Check whether nh has all the attributes required to be a
1270  StateConst.*/
1271  bool get_is(NodeConstHandle nh) const {
1272  return (nh.get_type() == RMF::REPRESENTATION)
1273  && !nh.get_value(state_index_).get_is_null();
1274  }
1275  bool get_is_static(NodeConstHandle nh) const {
1276  return (nh.get_type() == RMF::REPRESENTATION)
1277  && !nh.get_static_value(state_index_).get_is_null();
1278  }
1279  RMF_SHOWABLE(StateFactory, "StateFactory");
1280  };
1281  #ifndef RMF_DOXYGEN
1282 struct StateConstFactory: public StateFactory {
1283  StateConstFactory(FileConstHandle fh):
1284  StateFactory(fh) {
1285  }
1286  StateConstFactory(FileHandle fh):
1287  StateFactory(fh) {
1288  }
1289 
1290 };
1291  #endif
1292 
1293 
1294 
1295 
1296  /** See also ExplicitResolution and ExplicitResolutionFactory.
1297  */
1299  friend class ExplicitResolutionFactory;
1300  protected:
1301  FloatKey explicit_resolution_;
1303  FloatKey explicit_resolution):
1304  Decorator(nh),
1305 explicit_resolution_(explicit_resolution) {
1306  }
1307  public:
1308 
1309  Float get_explicit_resolution() const {
1310  try {
1311  return get_node().get_value(explicit_resolution_);
1312  } RMF_DECORATOR_CATCH( );
1313  }
1314  Float get_frame_explicit_resolution() const {
1315  try {
1316  return get_node().get_frame_value(explicit_resolution_);
1317  } RMF_DECORATOR_CATCH( );
1318  }
1319  Float get_static_explicit_resolution() const {
1320  try {
1321  return get_node().get_static_value(explicit_resolution_);
1322  } RMF_DECORATOR_CATCH( );
1323  }
1324 
1325  static std::string get_decorator_type_name() {
1326  return "ExplicitResolutionConst";
1327  }
1328  RMF_SHOWABLE(ExplicitResolutionConst, "ExplicitResolution: " << get_node());
1329  };
1330  /** See also ExplicitResolutionFactory.
1331  */
1333  friend class ExplicitResolutionFactory;
1335  FloatKey explicit_resolution):
1336  ExplicitResolutionConst(nh, explicit_resolution) {
1337  }
1338  public:
1339 
1340  void set_explicit_resolution(Float v) {
1341  try {
1342  get_node().set_value(explicit_resolution_, v);
1343  } RMF_DECORATOR_CATCH( );
1344  }
1345  void set_frame_explicit_resolution(Float v) {
1346  try {
1347  get_node().set_frame_value(explicit_resolution_, v);
1348  } RMF_DECORATOR_CATCH( );
1349  }
1350  void set_static_explicit_resolution(Float v) {
1351  try {
1352  get_node().set_static_value(explicit_resolution_, v);
1353  } RMF_DECORATOR_CATCH( );
1354  }
1355 
1356  static std::string get_decorator_type_name() {
1357  return "ExplicitResolution";
1358  }
1359  };
1360 
1361 
1362  /** Create decorators of type ExplicitResolution.
1363  */
1365  Category cat_;
1366 FloatKey explicit_resolution_;
1367 
1368  public:
1370  cat_(fh.get_category("sequence")),
1371  explicit_resolution_(fh.get_key<FloatTag>(cat_, "explicit resolution")) {
1372  }
1374  cat_(fh.get_category("sequence")),
1375  explicit_resolution_(fh.get_key<FloatTag>(cat_, "explicit resolution")) {
1376  }
1377  /** Get a ExplicitResolutionConst for nh.*/
1379  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1380  + boost::lexical_cast<std::string>(nh.get_type())
1381  + "\" in decorator type ExplicitResolution");
1382  return ExplicitResolutionConst(nh, explicit_resolution_);
1383  }
1384  /** Get a ExplicitResolution for nh.*/
1386  RMF_USAGE_CHECK((nh.get_type() == RMF::REPRESENTATION), std::string("Bad node type. Got \"")
1387  + boost::lexical_cast<std::string>(nh.get_type())
1388  + "\" in decorator type ExplicitResolution");
1389  return ExplicitResolution(nh, explicit_resolution_);
1390  }
1391  /** Check whether nh has all the attributes required to be a
1392  ExplicitResolutionConst.*/
1393  bool get_is(NodeConstHandle nh) const {
1394  return (nh.get_type() == RMF::REPRESENTATION)
1395  && !nh.get_value(explicit_resolution_).get_is_null();
1396  }
1397  bool get_is_static(NodeConstHandle nh) const {
1398  return (nh.get_type() == RMF::REPRESENTATION)
1399  && !nh.get_static_value(explicit_resolution_).get_is_null();
1400  }
1401  RMF_SHOWABLE(ExplicitResolutionFactory, "ExplicitResolutionFactory");
1402  };
1403  #ifndef RMF_DOXYGEN
1404 struct ExplicitResolutionConstFactory: public ExplicitResolutionFactory {
1405  ExplicitResolutionConstFactory(FileConstHandle fh):
1406  ExplicitResolutionFactory(fh) {
1407  }
1408  ExplicitResolutionConstFactory(FileHandle fh):
1409  ExplicitResolutionFactory(fh) {
1410  }
1411 
1412 };
1413  #endif
1414 
1415 
1416 
1417 } /* namespace decorator */
1418 } /* namespace RMF */
1419 RMF_DISABLE_WARNINGS
1420 
1421 #endif /* RMF_SEQUENCE_DECORATORS_H */
Mostly empty base classes for decorators and factories.
const NodeType REPRESENTATION
Represent part of a molecule.
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:1149
A handle for a particular node in the hierarchy.
Definition: NodeHandle.h:60
float Float
Definition: types.h:33
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:905
The base class for decorators.
Definition: Decorator.h:29
NodeType get_type() const
get the type of this node
Various constants.
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:1393
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:1027
A handle for a particular node in a read-only hierarchy.
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:1271
A handle for a read-only RMF file.
void set_value(ID< Tag > k, typename Tag::ArgumentType v) const
Definition: NodeHandle.h:115
std::vector< Int > Ints
Definition: types.h:31
A handle for an RMF file.
Definition: FileHandle.h:54
The base class for Factories.
Definition: Decorator.h:46
Declaration for RMF::FileHandle.
Represent coordinates.
Declaration of NodeHandle.
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:765
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:643
void set_static_value(ID< Tag > k, typename Tag::ArgumentType v) const
set the value of the attribute k for all frames.
Definition: NodeHandle.h:122
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:168
std::string String
Definition: types.h:39
ID< Tag > get_key(Category category, std::string name) const
int Int
Definition: types.h:29
Various general useful macros for IMP.
bool get_is(NodeConstHandle nh) const
Definition: sequence.h:521
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.
Definition: NodeHandle.h:103