Exemplo n.º 1
0
void PrintFileContents10::print_stl_helper(std::ostream & ostream , ClassValues * cv ) {
    std::vector<FieldDescription*> fieldDescriptions = getPrintableFields(*cv, 0x3 << 2);
    fieldDescriptions.erase(std::remove_if(fieldDescriptions.begin(), fieldDescriptions.end(), [](FieldDescription* field) {return !field->isSTL();}), fieldDescriptions.end());

    if (!fieldDescriptions.size()) {
        return;
    }

    print_open_extern_c(ostream) ;

    for (FieldDescription* field : fieldDescriptions) {
        if (field->isCheckpointable()) {
            print_checkpoint_stl(ostream, field, cv) ;
            print_post_checkpoint_stl(ostream, field, cv) ;
        }
        if (field->isRestorable()) {
            print_restore_stl(ostream, field, cv) ;
            if (field->hasSTLClear()) {
                print_clear_stl(ostream, field, cv) ;
            }
        }
    }

    print_close_extern_c(ostream) ;
}
Exemplo n.º 2
0
void PrintFileContents10::print_stl_helper(std::ofstream & outfile , ClassValues * cv ) {

    unsigned int ii ;
    ClassValues::FieldIterator fit ;

    print_open_extern_c(outfile) ;

    for ( fit = cv->field_begin() ; fit != cv->field_end() ; fit++ ) {
        if ( (*fit)->isSTL() and determinePrintAttr(cv , *fit) ) {
            print_checkpoint_stl(outfile , *fit, cv) ;
            print_post_checkpoint_stl(outfile , *fit, cv) ;
            print_restore_stl(outfile , *fit, cv) ;
            if ((*fit)->hasSTLClear()) {
                print_clear_stl(outfile , *fit, cv) ;
            }
        }
    }
    print_close_extern_c(outfile) ;
}