@@ -42,6 +42,14 @@ macro_rules! bits {
4242 } ;
4343}
4444
45+ macro_rules! all {
46+ ( ) => {
47+ pub fn all( ) -> Self {
48+ Self ( RawFlags :: MAX )
49+ }
50+ } ;
51+ }
52+
4553macro_rules! contains {
4654 ( ) => {
4755 pub fn contains<I >( & self , bit: I ) -> bool
@@ -199,6 +207,7 @@ impl SimplificationOptions {
199207 => filter_individuals, FILTER_INDIVIDUALS ) ;
200208
201209 bits ! ( ) ;
210+ all ! ( ) ;
202211 contains ! ( ) ;
203212}
204213
@@ -263,6 +272,7 @@ impl TableClearOptions {
263272 /// Set [`CLEAR_PROVENANCE`](crate::TableClearOptions::CLEAR_PROVENANCE)
264273 => clear_provenance, CLEAR_PROVENANCE ) ;
265274 bits ! ( ) ;
275+ all ! ( ) ;
266276 contains ! ( ) ;
267277}
268278
@@ -339,6 +349,7 @@ impl TableEqualityOptions {
339349 /// Set [`IGNORE_TIMESTAMPS`](crate::TableEqualityOptions::IGNORE_TIMESTAMPS)
340350 => ignore_timestamps, IGNORE_TIMESTAMPS ) ;
341351 bits ! ( ) ;
352+ all ! ( ) ;
342353 contains ! ( ) ;
343354}
344355
@@ -376,6 +387,7 @@ impl TableSortOptions {
376387 /// Set [`NO_CHECK_INTEGRITY`](crate::TableSortOptions::NO_CHECK_INTEGRITY)
377388 => no_check_integrity, NO_CHECK_INTEGRITY ) ;
378389 bits ! ( ) ;
390+ all ! ( ) ;
379391 contains ! ( ) ;
380392}
381393
@@ -398,6 +410,7 @@ impl IndividualTableSortOptions {
398410 /// Default behavior.
399411 pub const NONE : RawFlags = 0 ;
400412 bits ! ( ) ;
413+ all ! ( ) ;
401414 contains ! ( ) ;
402415}
403416
@@ -449,6 +462,7 @@ impl TreeFlags {
449462 /// Set [`NO_SAMPLE_COUNTS`](crate::TreeFlags::NO_SAMPLE_COUNTS)
450463 => no_sample_counts, NO_SAMPLE_COUNTS ) ;
451464 bits ! ( ) ;
465+ all ! ( ) ;
452466 contains ! ( ) ;
453467}
454468
@@ -478,6 +492,7 @@ pub struct TableOutputOptions(RawFlags);
478492
479493impl TableOutputOptions {
480494 bits ! ( ) ;
495+ all ! ( ) ;
481496 contains ! ( ) ;
482497}
483498
@@ -517,6 +532,7 @@ impl TreeSequenceFlags {
517532 /// Set [`BUILD_INDEXES`](crate::TreeSequenceFlags::BUILD_INDEXES)
518533 => build_indexes, BUILD_INDEXES ) ;
519534 bits ! ( ) ;
535+ all ! ( ) ;
520536 contains ! ( ) ;
521537}
522538
@@ -632,6 +648,7 @@ impl TableIntegrityCheckFlags {
632648 /// Set [`CHECK_TREES`](crate::TableIntegrityCheckFlags::CHECK_TREES)
633649 => check_trees, CHECK_TREES ) ;
634650 bits ! ( ) ;
651+ all ! ( ) ;
635652 contains ! ( ) ;
636653}
637654
@@ -673,6 +690,7 @@ impl NodeFlags {
673690 }
674691
675692 bits ! ( ) ;
693+ all ! ( ) ;
676694 contains ! ( ) ;
677695
678696 pub fn toggle ( & mut self , bit : tsk_flags_t ) {
@@ -708,6 +726,7 @@ impl IndividualFlags {
708726 true
709727 }
710728 bits ! ( ) ;
729+ all ! ( ) ;
711730 contains ! ( ) ;
712731}
713732
0 commit comments