Home / version_2013.08.27
Name Modified Size Downloads / Week Status
Parent folder
Totals: 2 Items   50.9 kB 3
FastMRCLib-bin-win-2013.08.27.0.zip 2013-08-27 48.7 kB 22 weekly downloads
ReadMe.txt 2013-08-27 2.1 kB 11 weekly downloads
FastMRCLib is a small and simple library for reading and parsing MARC records (ISO-2709). This library uses STL and MD5Lib (which has been included) Algoritm based on MARC 21 Specifications for Record Structure: http://www.loc.gov/marc/specifications/specrecstruc.html Features: - read records from stream - read record ID from field 001 - build MD5 digest - iterate over all fields and subfields - get fields by specified tag - get control field data - get subfield data The main classes are: fastmrc::Record fastmrc::Field fastmrc::ControlField fastmrc::DataField fastmrc::Subfield fastmrc::FieldTag fastmrc::MrcException Changes ------- Version 2010.12.23 - initial version Version 2011.02.02 Added checking for out of record's buffer, which prevents fail if stream format is not well-formed. Version 2011.03.17 Added new methods to fastmrc::Record: const char* getData() const; unsigned getDatalen() const; to fastmrc::DataField: SubfieldListCIt getSubfield(char code, SubfieldListCIt _start); Was made some small changes in interface. Version 2013.08.27 Reusing record buffer in Record::readRec New constructor Record(const char* _buf, unsigned _bufsize); // Create record from buffer Refactoring x64 build Example of using this library ----------------------------- #include "FastMRC.h" ifstream ifs("filename.mrc", ios::in|ios::binary); fastmrc::Record rec; int id; unsigned char digest[16]; while(ifs >> rec) { // get ID id = rec.getId(); // get MD5 rec.getMD5(digest); // parse record and get field CAT fastmrc::Record::FieldMapCIt it = rec.getFirstField("CAT"); if (it == rec.getFMapEnd()) printf("Warning! Field 'CAT' not found. rec id: %09d\n", id); else { f = it->second; if (!f->isControl()) { df = (fastmrc::DataField *) f; // parse datafield and get subfields fastmrc::DataField::SubfieldListCIt sfit = df->getSFListBegin(); if (sfit != df->getSFListEnd()) { // doing comething with subfields ... } } } }
Source: ReadMe.txt, updated 2013-08-27

Thanks for helping keep SourceForge clean.

Screenshot instructions:
Windows
Mac
Red Hat Linux   Ubuntu

Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies
X

Briefly describe the problem (required):

Upload screenshot of ad (required):
Select a file, or drag & drop file here.

Please provide the ad click URL, if possible:

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks