| 478 | } |
| 479 | |
| 480 | bool ImageFileImpl::isElementNameExtended( const ustring &elementName ) |
| 481 | { |
| 482 | // don't checkImageFileOpen |
| 483 | |
| 484 | // Make sure doesn't have any "/" in it |
| 485 | size_t found = elementName.find_first_of( '/' ); |
| 486 | |
| 487 | if ( found != std::string::npos ) |
| 488 | { |
| 489 | return false; |
| 490 | } |
| 491 | |
| 492 | ustring prefix; |
| 493 | ustring localPart; |
| 494 | |
| 495 | try |
| 496 | { |
| 497 | // Throws if elementName bad |
| 498 | elementNameParse( elementName, prefix, localPart ); |
| 499 | } |
| 500 | catch ( E57Exception & /*ex*/ ) |
| 501 | { |
| 502 | return false; |
| 503 | } |
| 504 | |
| 505 | // If get here, the name was good, so test if found a prefix part |
| 506 | return ( prefix.length() > 0 ); |
| 507 | } |
| 508 | |
| 509 | bool ImageFileImpl::isElementNameLegal( const ustring &elementName, bool allowNumber ) |
| 510 | { |