* This operation updates the config vectors of all protos * in Class to indicate that the protos with 1's in Config * belong to a new configuration identified by ConfigId. * It is assumed that the length of the Config bit vector is * equal to the number of protos in Class. * @param Config config to be added to class * @param ConfigId id to be used for new config * @param Class class t
| 485 | * @note History: Mon Feb 11 14:57:31 1991, DSJ, Created. |
| 486 | */ |
| 487 | void ConvertConfig(BIT_VECTOR Config, int ConfigId, INT_CLASS Class) { |
| 488 | int ProtoId; |
| 489 | INT_PROTO Proto; |
| 490 | int TotalLength; |
| 491 | |
| 492 | for (ProtoId = 0, TotalLength = 0; |
| 493 | ProtoId < Class->NumProtos; ProtoId++) { |
| 494 | if (test_bit(Config, ProtoId)) { |
| 495 | Proto = ProtoForProtoId(Class, ProtoId); |
| 496 | SET_BIT(Proto->Configs, ConfigId); |
| 497 | TotalLength += Class->ProtoLengths[ProtoId]; |
| 498 | } |
| 499 | } |
| 500 | Class->ConfigLengths[ConfigId] = TotalLength; |
| 501 | } /* ConvertConfig */ |
| 502 | |
| 503 | |
| 504 | namespace tesseract { |
no outgoing calls
no test coverage detected