src/utilities/idd/IddRegex.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "IddRegex.hpp" | ||
| 7 | |||
| 8 | namespace openstudio { | ||
| 9 | namespace iddRegex { | ||
| 10 | |||
| 11 | /// name of the comment only object automatically added to the idd | ||
| 12 | 961184 | const std::string& commentOnlyObjectName() { | |
| 13 |
3/4✓ Branch 0 taken 252 times.
✓ Branch 1 taken 960932 times.
✓ Branch 3 taken 252 times.
✗ Branch 4 not taken.
|
961184 | static const std::string result("CommentOnly"); |
| 14 | 961184 | return result; | |
| 15 | } | ||
| 16 | |||
| 17 | /// text of the comment only object automatically added to the idd | ||
| 18 | 1741 | const std::string& commentOnlyObjectText() { | |
| 19 |
4/7✓ Branch 0 taken 151 times.
✓ Branch 1 taken 1590 times.
✓ Branch 3 taken 151 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 151 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
2043 | static const std::string result("CommentOnly; ! Autogenerated comment only object."); |
| 20 | 1741 | return result; | |
| 21 | } | ||
| 22 | |||
| 23 | /// Search for IDD version in line | ||
| 24 | /// matches[1], version identifier | ||
| 25 | 1741 | const boost::regex& version() { | |
| 26 |
4/7✓ Branch 0 taken 151 times.
✓ Branch 1 taken 1590 times.
✓ Branch 3 taken 151 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 151 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1741 | static const boost::regex result("^!IDD_Version (\\S+)"); |
| 27 | 1741 | return result; | |
| 28 | } | ||
| 29 | |||
| 30 | /// Search for IDD build in line | ||
| 31 | /// matches[1], build identifier | ||
| 32 | 972638 | const boost::regex& build() { | |
| 33 |
4/7✓ Branch 0 taken 151 times.
✓ Branch 1 taken 972487 times.
✓ Branch 3 taken 151 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 151 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
972638 | static const boost::regex result("^!IDD_BUILD (\\S+)"); |
| 34 | 972638 | return result; | |
| 35 | } | ||
| 36 | |||
| 37 | /// Search for IDD header, each line must start with '!', no preceding whitespace | ||
| 38 | /// matches[1], header | ||
| 39 | ✗ | const boost::regex& header() { | |
| 40 | ✗ | static const boost::regex result("^(^!.*?^[^!])"); | |
| 41 | ✗ | return result; | |
| 42 | } | ||
| 43 | |||
| 44 | /// Match comment only line | ||
| 45 | /// matches[1], comment | ||
| 46 | 974739 | const boost::regex& commentOnlyLine() { | |
| 47 |
4/7✓ Branch 0 taken 363 times.
✓ Branch 1 taken 974376 times.
✓ Branch 3 taken 363 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 363 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
974739 | static const boost::regex result("^[\\s\\t]*[!](.*)"); |
| 48 | 974739 | return result; | |
| 49 | } | ||
| 50 | |||
| 51 | /// Match content then comment | ||
| 52 | /// matches[1], content | ||
| 53 | /// matches[2], comment if any | ||
| 54 | 13273790 | const boost::regex& contentAndCommentLine() { | |
| 55 |
4/7✓ Branch 0 taken 3243 times.
✓ Branch 1 taken 13270547 times.
✓ Branch 3 taken 3243 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3243 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
13273790 | static const boost::regex result("^([^!]*)[!]?(.*)"); |
| 56 | 13273790 | return result; | |
| 57 | } | ||
| 58 | |||
| 59 | /// Match group identifier | ||
| 60 | /// matches[1], group name | ||
| 61 | 922810 | const boost::regex& group() { | |
| 62 |
4/7✓ Branch 0 taken 151 times.
✓ Branch 1 taken 922659 times.
✓ Branch 3 taken 151 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 151 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
922810 | static const boost::regex result("^[\\\\][gG]roup(.*)"); |
| 63 | 922810 | return result; | |
| 64 | } | ||
| 65 | |||
| 66 | /// Match include-file identifier | ||
| 67 | /// matches[1], included Idd file name | ||
| 68 | ✗ | const boost::regex& includeFile() { | |
| 69 | ✗ | static const boost::regex result("^[\\\\][iI]nclude-[fF]ile(.*)"); | |
| 70 | ✗ | return result; | |
| 71 | } | ||
| 72 | |||
| 73 | /// Match remove-object identifier | ||
| 74 | /// matches[1], object in included Idd file that should not be included in this file | ||
| 75 | ✗ | const boost::regex& removeObject() { | |
| 76 | ✗ | static const boost::regex result("^[\\\\][rR]emove-[oO]bject(.*)"); | |
| 77 | ✗ | return result; | |
| 78 | } | ||
| 79 | |||
| 80 | /// Match line with either a ',' or a ';' that are not preceded by '!' | ||
| 81 | /// matches[1], before separator | ||
| 82 | /// matches[2], after separator | ||
| 83 | 1979863 | const boost::regex& line() { | |
| 84 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 1975860 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1979863 | static const boost::regex result("^([^!]*?)[,;](.*)"); |
| 85 | 1979863 | return result; | |
| 86 | } | ||
| 87 | |||
| 88 | /// Match an object memo property | ||
| 89 | /// matches[1], memo text | ||
| 90 | 3050361 | const boost::regex& memoProperty() { | |
| 91 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 3046358 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
3050361 | static const boost::regex result("^[mM]emo(.*)"); |
| 92 | 3050361 | return result; | |
| 93 | } | ||
| 94 | |||
| 95 | /// Match an object note property | ||
| 96 | /// matches[1], note text | ||
| 97 | 12771030 | const boost::regex& noteProperty() { | |
| 98 |
4/7✓ Branch 0 taken 3235 times.
✓ Branch 1 taken 12767795 times.
✓ Branch 3 taken 3235 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3235 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
12771030 | static const boost::regex result("^[nN]ote(.*)"); |
| 99 | 12771030 | return result; | |
| 100 | } | ||
| 101 | |||
| 102 | /// Match an object with no fields in the idd | ||
| 103 | /// matches[1], before separator | ||
| 104 | /// matches[2], after separator | ||
| 105 | 883600 | const boost::regex& objectNoFields() { | |
| 106 |
4/7✓ Branch 0 taken 363 times.
✓ Branch 1 taken 883237 times.
✓ Branch 3 taken 363 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 363 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
883600 | static const boost::regex result("^([^!^,]*?)[;](.*)"); |
| 107 | 883600 | return result; | |
| 108 | } | ||
| 109 | |||
| 110 | /// Match an object with one or more fields in the idd | ||
| 111 | /// matches[1], object text | ||
| 112 | /// matches[2], field(s) text | ||
| 113 | 1098760 | const boost::regex& objectAndFields() { | |
| 114 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 1094757 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1098760 | static const boost::regex result("^(.*?[,].*?)([AN][0-9]+[\\s\\t]*[,;].*)"); |
| 115 | 1098760 | return result; | |
| 116 | } | ||
| 117 | |||
| 118 | /// Match an object unique property | ||
| 119 | 1209352 | const boost::regex& uniqueProperty() { | |
| 120 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 1205349 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1209352 | static const boost::regex result("^[uU]nique-[oO]bject"); |
| 121 | 1209352 | return result; | |
| 122 | } | ||
| 123 | |||
| 124 | /// Match an object required property | ||
| 125 | 1099437 | const boost::regex& requiredObjectProperty() { | |
| 126 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 1095434 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1099437 | static const boost::regex result("^[rR]equired-[oO]bject"); |
| 127 | 1099437 | return result; | |
| 128 | } | ||
| 129 | |||
| 130 | /// Match an object obsolete property | ||
| 131 | /// matches[1], reason for obsolete | ||
| 132 | 1087473 | const boost::regex& obsoleteProperty() { | |
| 133 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 1083470 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1087473 | static const boost::regex result("^[oO]bsolete(.*)"); |
| 134 | 1087473 | return result; | |
| 135 | } | ||
| 136 | |||
| 137 | 1085177 | const boost::regex& hasurlProperty() { | |
| 138 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 1081174 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1085177 | static const boost::regex result("^(URL-[Oo]bject|url-[Oo]bject)"); |
| 139 | 1085177 | return result; | |
| 140 | } | ||
| 141 | |||
| 142 | /// Match an object extensible property | ||
| 143 | /// matches[1], number of last fields to extend | ||
| 144 | 1077646 | const boost::regex& extensibleProperty() { | |
| 145 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 1073643 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1077646 | static const boost::regex result("^[eE]xtensible[\\s\\t]*:[\\s\\t]*([1-9][0-9]*)"); |
| 146 | 1077646 | return result; | |
| 147 | } | ||
| 148 | |||
| 149 | /// Match an object format property | ||
| 150 | /// matches[1], format text | ||
| 151 | 906883 | const boost::regex& formatProperty() { | |
| 152 |
4/7✓ Branch 0 taken 4001 times.
✓ Branch 1 taken 902882 times.
✓ Branch 3 taken 4001 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4001 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
906883 | static const boost::regex result("^[fF]ormat([^!]*)"); |
| 153 | 906883 | return result; | |
| 154 | } | ||
| 155 | |||
| 156 | /// Match an object min fields property | ||
| 157 | /// matches[1], min number of fields | ||
| 158 | 843843 | const boost::regex& minFieldsProperty() { | |
| 159 |
4/7✓ Branch 0 taken 4001 times.
✓ Branch 1 taken 839842 times.
✓ Branch 3 taken 4001 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4001 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
843843 | static const boost::regex result("^[mM]in-[fF]ields[\\s\\t]*([0-9]+)"); |
| 160 | 843843 | return result; | |
| 161 | } | ||
| 162 | |||
| 163 | 29981 | const boost::regex& maxFieldsProperty() { | |
| 164 |
4/7✓ Branch 0 taken 805 times.
✓ Branch 1 taken 29176 times.
✓ Branch 3 taken 805 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 805 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
29981 | static const boost::regex result("^[mM]ax-[fF]ields[\\s\\t]*([0-9]+)"); |
| 165 | 29981 | return result; | |
| 166 | } | ||
| 167 | |||
| 168 | /// Match a field declaration in the idd | ||
| 169 | /// A or N, then one or more numbers then white space and then a ',' or ';' | ||
| 170 | /// matches[1], alpha or numeric indicator | ||
| 171 | /// matches[2], alpha or numeric number | ||
| 172 | /// matches[3], after separator | ||
| 173 | 13996518 | const boost::regex& field() { | |
| 174 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 13992515 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
13996518 | static const boost::regex result("^[\\s\\t]*?([AN])([0-9]+)[\\s\\t]*[,;](.*)"); |
| 175 | 13996518 | return result; | |
| 176 | } | ||
| 177 | |||
| 178 | /// Match the closing field in an idd object | ||
| 179 | /// matches[1], all previous text | ||
| 180 | /// matches[2], the last field | ||
| 181 | 61038980 | const boost::regex& closingField() { | |
| 182 |
4/7✓ Branch 0 taken 151 times.
✓ Branch 1 taken 61038829 times.
✓ Branch 3 taken 151 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 151 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
61038980 | static const boost::regex result("(.*)([AN][0-9]+[\\s\\t]*[;].*?)$"); |
| 183 | 61038980 | return result; | |
| 184 | } | ||
| 185 | |||
| 186 | /// Match the last field declaration in a string, may or may not be the closing field | ||
| 187 | /// matches[1], all previous text | ||
| 188 | /// matches[2], the last field | ||
| 189 | 1 | const boost::regex& lastField() { | |
| 190 |
3/7✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 6 taken 1 time.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1 | static const boost::regex result("(.*)([AN][0-9]+[\\s\\t]*[,;].*)$"); |
| 191 | 1 | return result; | |
| 192 | } | ||
| 193 | |||
| 194 | /// Match a field name | ||
| 195 | /// matches[1], the field name | ||
| 196 | 13535700 | const boost::regex& name() { | |
| 197 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 13531697 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
13535700 | static const boost::regex result("[\\\\][fF]ield([^\\\\^!]*)"); |
| 198 | 13535700 | return result; | |
| 199 | } | ||
| 200 | |||
| 201 | /// Match a field field name property | ||
| 202 | /// matches[1], the field name | ||
| 203 | 13973218 | const boost::regex& nameProperty() { | |
| 204 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 13969215 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
13973218 | static const boost::regex result("^[fF]ield([^!]*)"); |
| 205 | 13973218 | return result; | |
| 206 | } | ||
| 207 | |||
| 208 | /// Match a field required property | ||
| 209 | ✗ | const boost::regex& requiredFieldProperty() { | |
| 210 | ✗ | static const boost::regex result("^[rR]equired-[fF]ield"); | |
| 211 | ✗ | return result; | |
| 212 | } | ||
| 213 | |||
| 214 | /// Match a field autosizable property | ||
| 215 | ✗ | const boost::regex& autosizableProperty() { | |
| 216 | ✗ | static const boost::regex result("^[aA]utosizable"); | |
| 217 | ✗ | return result; | |
| 218 | } | ||
| 219 | |||
| 220 | /// Match a field autocalculatable property | ||
| 221 | ✗ | const boost::regex& autocalculatableProperty() { | |
| 222 | ✗ | static const boost::regex result("^[aA]utocalculatable"); | |
| 223 | ✗ | return result; | |
| 224 | } | ||
| 225 | |||
| 226 | /// Match a field retaincase property | ||
| 227 | ✗ | const boost::regex& retaincaseProperty() { | |
| 228 | ✗ | static const boost::regex result("^[rR]etaincase"); | |
| 229 | ✗ | return result; | |
| 230 | } | ||
| 231 | |||
| 232 | /// Match a field units property | ||
| 233 | /// matches[1], the field units | ||
| 234 | 4092512 | const boost::regex& unitsProperty() { | |
| 235 |
4/7✓ Branch 0 taken 3127 times.
✓ Branch 1 taken 4089385 times.
✓ Branch 3 taken 3127 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3127 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
4092512 | static const boost::regex result("^[uU]nits([^!]*)"); |
| 236 | 4092512 | return result; | |
| 237 | } | ||
| 238 | |||
| 239 | /// Match a field ip units property | ||
| 240 | /// matches[1], the field ip units | ||
| 241 | 673672 | const boost::regex& ipUnitsProperty() { | |
| 242 |
4/7✓ Branch 0 taken 2040 times.
✓ Branch 1 taken 671632 times.
✓ Branch 3 taken 2040 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2040 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
673672 | static const boost::regex result("^[iI][pP]-[uU]nits([^!]*)"); |
| 243 | 673672 | return result; | |
| 244 | } | ||
| 245 | |||
| 246 | /// Match a field exclusive minimum property | ||
| 247 | /// matches[1], the field exclusive minimum | ||
| 248 | 3898889 | const boost::regex& minExclusiveProperty() { | |
| 249 |
4/7✓ Branch 0 taken 3091 times.
✓ Branch 1 taken 3895798 times.
✓ Branch 3 taken 3091 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3091 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
3898889 | static const boost::regex result("^[mM]inimum[\\s\\t]*[>]([^!]*)"); |
| 250 | 3898889 | return result; | |
| 251 | } | ||
| 252 | |||
| 253 | /// Match a field inclusive minimum property | ||
| 254 | /// matches[1], the field inclusive minimum | ||
| 255 | 2462828 | const boost::regex& minInclusiveProperty() { | |
| 256 |
4/7✓ Branch 0 taken 2978 times.
✓ Branch 1 taken 2459850 times.
✓ Branch 3 taken 2978 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2978 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
2462828 | static const boost::regex result("^[mM]inimum([^>!]*)"); |
| 257 | 2462828 | return result; | |
| 258 | } | ||
| 259 | |||
| 260 | /// Match a field exclusive maximum property | ||
| 261 | /// matches[1], the field exclusive maximum | ||
| 262 | 1375081 | const boost::regex& maxExclusiveProperty() { | |
| 263 |
4/7✓ Branch 0 taken 2795 times.
✓ Branch 1 taken 1372286 times.
✓ Branch 3 taken 2795 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2795 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1375081 | static const boost::regex result("^[mM]aximum[\\s\\t]*[<]([^!]*)"); |
| 264 | 1375081 | return result; | |
| 265 | } | ||
| 266 | |||
| 267 | /// Match a field inclusive maximum property | ||
| 268 | /// matches[1], the field inclusive maximum | ||
| 269 | 1225931 | const boost::regex& maxInclusiveProperty() { | |
| 270 |
4/7✓ Branch 0 taken 2775 times.
✓ Branch 1 taken 1223156 times.
✓ Branch 3 taken 2775 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2775 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1225931 | static const boost::regex result("^[mM]aximum([^<!]*)"); |
| 271 | 1225931 | return result; | |
| 272 | } | ||
| 273 | |||
| 274 | /// Match a field deprecated property | ||
| 275 | /// matches[1], reason for deprecated | ||
| 276 | ✗ | const boost::regex& deprecatedProperty() { | |
| 277 | ✗ | static const boost::regex result("^[dD]eprecated(.*)"); | |
| 278 | ✗ | return result; | |
| 279 | } | ||
| 280 | |||
| 281 | /// Match a field default property | ||
| 282 | /// matches[1], default value | ||
| 283 | 2816436 | const boost::regex& defaultProperty() { | |
| 284 |
4/7✓ Branch 0 taken 4002 times.
✓ Branch 1 taken 2812434 times.
✓ Branch 3 taken 4002 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4002 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
2816436 | static const boost::regex result("^[dD]efault([^!]*)"); |
| 285 | 2816436 | return result; | |
| 286 | } | ||
| 287 | |||
| 288 | /// Match a field default property with either autocalculate or autosize | ||
| 289 | 1932248 | const boost::regex& automaticDefault() { | |
| 290 |
4/7✓ Branch 0 taken 2826 times.
✓ Branch 1 taken 1929422 times.
✓ Branch 3 taken 2826 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2826 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1932248 | static const boost::regex result(".*(autocalculate|autosize).*", boost::regex_constants::icase); |
| 291 | 1932248 | return result; | |
| 292 | } | ||
| 293 | |||
| 294 | /// Match a field type property | ||
| 295 | /// matches[1], type | ||
| 296 | 13123591 | const boost::regex& typeProperty() { | |
| 297 | static const boost::regex result("^type[\\s\\t]*(integer|real|alpha|choice|node|object-list|external-list|url|handle)", | ||
| 298 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 13119588 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
13123591 | boost::regbase::normal | boost::regbase::icase); |
| 299 | 13123591 | return result; | |
| 300 | } | ||
| 301 | |||
| 302 | /// Match a field key property | ||
| 303 | /// matches[1], key value | ||
| 304 | 6636895 | const boost::regex& keyProperty() { | |
| 305 |
4/7✓ Branch 0 taken 3243 times.
✓ Branch 1 taken 6633652 times.
✓ Branch 3 taken 3243 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3243 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
6636895 | static const boost::regex result("^[kK]ey(.*)"); |
| 306 | 6636895 | return result; | |
| 307 | } | ||
| 308 | |||
| 309 | /// Match a field object-list property | ||
| 310 | /// matches[1], object-list value | ||
| 311 | 3535505 | const boost::regex& objectListProperty() { | |
| 312 |
4/7✓ Branch 0 taken 3084 times.
✓ Branch 1 taken 3532421 times.
✓ Branch 3 taken 3084 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3084 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
3535505 | static const boost::regex result("^[oO]bject-[lL]ist([^!]*)"); |
| 313 | 3535505 | return result; | |
| 314 | } | ||
| 315 | |||
| 316 | 2742 | const boost::regex& externalListProperty() { | |
| 317 |
4/7✓ Branch 0 taken 306 times.
✓ Branch 1 taken 2436 times.
✓ Branch 3 taken 306 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 306 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
2742 | static const boost::regex result("^[eE]xternal-[lL]ist([^!]*)"); |
| 318 | 2742 | return result; | |
| 319 | } | ||
| 320 | |||
| 321 | /// Match a field reference property | ||
| 322 | /// matches[1], reference value | ||
| 323 | 1485340 | const boost::regex& referenceProperty() { | |
| 324 |
4/7✓ Branch 0 taken 3232 times.
✓ Branch 1 taken 1482108 times.
✓ Branch 3 taken 3232 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3232 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
1485340 | static const boost::regex result("^[rR]eference([^!]*)"); |
| 325 | 1485340 | return result; | |
| 326 | } | ||
| 327 | |||
| 328 | /// Match a field reference-class-name property | ||
| 329 | /// matches[1], reference-class-name value | ||
| 330 | 15989 | const boost::regex& referenceClassNameProperty() { | |
| 331 |
4/7✓ Branch 0 taken 411 times.
✓ Branch 1 taken 15578 times.
✓ Branch 3 taken 411 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 411 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
15989 | static const boost::regex result("^[rR]eference-[cC]lass-[nN]ame([^!]*)"); |
| 332 | 15989 | return result; | |
| 333 | } | ||
| 334 | |||
| 335 | /// Match begin extensible | ||
| 336 | ✗ | const boost::regex& beginExtensible() { | |
| 337 | ✗ | static const boost::regex result("[\\\\][bB]egin-[eE]xtensible"); | |
| 338 | ✗ | return result; | |
| 339 | } | ||
| 340 | |||
| 341 | /// Match begin extensible | ||
| 342 | ✗ | const boost::regex& beginExtensibleProperty() { | |
| 343 | ✗ | static const boost::regex result("^[bB]egin-[eE]xtensible"); | |
| 344 | ✗ | return result; | |
| 345 | } | ||
| 346 | |||
| 347 | /// Match a field or object level comment | ||
| 348 | /// matches[1], after '\' until next '\' | ||
| 349 | /// matches[2], after second '\' (may be empty) | ||
| 350 | 95982142 | const boost::regex& metaDataComment() { | |
| 351 |
4/7✓ Branch 0 taken 4003 times.
✓ Branch 1 taken 95978139 times.
✓ Branch 3 taken 4003 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4003 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
95982142 | static const boost::regex result("^[\\s\\t]*?[\\\\]([^\\\\]*)(.*)"); |
| 352 | 95982142 | return result; | |
| 353 | } | ||
| 354 | |||
| 355 | 2344041 | const boost::regex& versionObjectName() { | |
| 356 |
4/7✓ Branch 0 taken 1170 times.
✓ Branch 1 taken 2342871 times.
✓ Branch 3 taken 1170 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 1170 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
2344041 | static const boost::regex result(".*[vV]ersion.*"); |
| 357 | 2344041 | return result; | |
| 358 | } | ||
| 359 | |||
| 360 | 346189 | const boost::regex& numberAndPrecedingSpace() { | |
| 361 |
4/7✓ Branch 0 taken 2483 times.
✓ Branch 1 taken 343706 times.
✓ Branch 3 taken 2483 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2483 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
346189 | static const boost::regex result("\\s?[0-9]+"); |
| 362 | 346189 | return result; | |
| 363 | } | ||
| 364 | |||
| 365 | } // namespace iddRegex | ||
| 366 | } // namespace openstudio | ||
| 367 |