Extern/DXF/Header/libdwgr.cpp
/*start reading dwg file header and, if can read it, continue reading all*/
start reading dwg file header and, if can read it, continue reading all
start reading dwg file header and if can read it continue reading all
bool dwgR::read(DRW_Interface *interface_, bool ext){
    bool isOk = false;
    applyExt = ext;
    iface = interface_;
    std::ifstream filestr;
    isOk = openFile(&filestr);
    if (!isOk)
        return false;
    isOk = reader->readMetaData();
    if (isOk) {
        isOk = reader->readFileHeader();
        if (isOk) {
            isOk = processDwg();
        } else
            error = DRW::BAD_READ_FILE_HEADER;
    } else
        error = DRW::BAD_READ_METADATA;
    filestr.close();
    if (reader != NULL) {
        delete reader;
        reader = NULL;
    }
    return isOk;
}
bool dwgR :: read ( DRW_Interface * interface_ , bool ext ) { bool isOk = false ; applyExt = ext ; iface = interface_ ; std :: ifstream filestr ; isOk = openFile ( & filestr ) ; if ( ! isOk ) return false ; isOk = reader -> readMetaData ( ) ; if ( isOk ) { isOk = reader -> readFileHeader ( ) ; if ( isOk ) { isOk = processDwg ( ) ; } else error = DRW :: BAD_READ_FILE_HEADER ; } else error = DRW :: BAD_READ_METADATA ; filestr . close ( ) ; if ( reader != NULL ) { delete reader ; reader = NULL ; } return isOk ; }
start reading dwg file header and, if can read it, continue reading all
start reading dwg file header and if can read it continue reading all
//testReader();return false;