| 111 | |
| 112 | |
| 113 | void Foam::timeSelector::addOptions |
| 114 | ( |
| 115 | const bool constant, |
| 116 | const bool withZero |
| 117 | ) |
| 118 | { |
| 119 | if (constant) |
| 120 | { |
| 121 | argList::addBoolOption |
| 122 | ( |
| 123 | "constant", |
| 124 | "include the 'constant/' dir in the times list" |
| 125 | ); |
| 126 | } |
| 127 | if (withZero) |
| 128 | { |
| 129 | argList::addBoolOption |
| 130 | ( |
| 131 | "withZero", |
| 132 | "include the '0/' dir in the times list" |
| 133 | ); |
| 134 | } |
| 135 | argList::addBoolOption |
| 136 | ( |
| 137 | "noZero", |
| 138 | string("exclude the '0/' dir from the times list") |
| 139 | + ( |
| 140 | withZero |
| 141 | ? ", has precedence over the -withZero option" |
| 142 | : "" |
| 143 | ) |
| 144 | ); |
| 145 | argList::addBoolOption |
| 146 | ( |
| 147 | "latestTime", |
| 148 | "select the latest time" |
| 149 | ); |
| 150 | argList::addBoolOption |
| 151 | ( |
| 152 | "newTimes", |
| 153 | "select the new times" |
| 154 | ); |
| 155 | argList::addOption |
| 156 | ( |
| 157 | "time", |
| 158 | "ranges", |
| 159 | "comma-separated time ranges - eg, ':10,20,40:70,1000:'" |
| 160 | ); |
| 161 | } |
| 162 | |
| 163 | |
| 164 | Foam::instantList Foam::timeSelector::select |