![]() |
PhoenixLecture
2.0.0
Set of tools to make lectures
|
#include "pbiblio_parser.h"
Go to the source code of this file.
Functions | |
PString | pbiblio_checkAttrName (const PString &attrName) |
Check the attribute name. More... | |
PString | pbiblio_checkAttrValue (const PString &attrValue) |
Check the attribute value. More... | |
bool | pbiblio_parseAttribute (PFileParser &parser, PString &attrName, PString &attrValue) |
Parse an attribute of the current bibliography entry. More... | |
PBiblioEntryType::PBiblioEntryType | pbiblio_strToEntryType (const PString &str) |
Convert a string into an entry type. More... | |
void | pbliblio_convertMapStrToBibEntry (PBiblioEntry &biblioEntry, PMapStrEntry &mapStrEntry) |
Convert the map of string into a PBiblioEntry. More... | |
bool | pbliblio_file (PMapBiblioEntry &mapBiblioEntry, const PPath &fileName) |
Parse the full bibliography file. More... | |
bool | pbliblio_parser (PFileParser &parser, PMapBiblioEntry &mapBiblioEntry) |
Parse the full bibliography file. More... | |
bool | pbliblio_parserEntry (PFileParser &parser, PMapStrEntry &mapStrEntry, PBiblioEntryType::PBiblioEntryType &type) |
Parse the full bibliography file. More... | |
Check the attribute name.
attrName | : attribute name |
Definition at line 61 of file pbiblio_parser.cpp.
Referenced by pbliblio_parserEntry().
Check the attribute value.
attrValue | : attribute value |
Definition at line 70 of file pbiblio_parser.cpp.
References PString::eraseChar(), and PString::replace().
Referenced by pbliblio_parserEntry().
bool pbiblio_parseAttribute | ( | PFileParser & | parser, |
PString & | attrName, | ||
PString & | attrValue | ||
) |
Parse an attribute of the current bibliography entry.
[out] | parser | : parser to be used |
[out] | attrName | : aatribute name |
[out] | attrValue | : attribute value |
Definition at line 29 of file pbiblio_parser.cpp.
References PString::eraseFirstLastChar(), PFileParser::getLocation(), PFileParser::getNextToken(), PFileParser::getUntilKeyWithoutPatern(), PFileParser::getUntilKeyWithoutPaternRecurse(), PFileParser::isMatch(), PFileParser::setEscapeChar(), and PFileParser::skipWhiteSpace().
Referenced by pbliblio_parserEntry().
PBiblioEntryType::PBiblioEntryType pbiblio_strToEntryType | ( | const PString & | str | ) |
Convert a string into an entry type.
str | : string to be used |
Definition at line 14 of file pbiblio_parser.cpp.
References PBiblioEntryType::ARTICLE, PBiblioEntryType::BOOK, PBiblioEntryType::INPROCEEDINGS, PBiblioEntryType::NONE, PBiblioEntryType::PHDTHESIS, PBiblioEntryType::SOFTWARE, and PBiblioEntryType::TECHREPORT.
Referenced by pbliblio_parserEntry().
void pbliblio_convertMapStrToBibEntry | ( | PBiblioEntry & | biblioEntry, |
PMapStrEntry & | mapStrEntry | ||
) |
Convert the map of string into a PBiblioEntry.
[out] | biblioEntry | : output of the conversion |
mapStrEntry | : map to be converted |
Definition at line 103 of file pbiblio_parser.cpp.
References PBiblioEntry::setAuthor(), PBiblioEntry::setJournal(), PBiblioEntry::setLabel(), PBiblioEntry::setTitle(), PBiblioEntry::setUrl(), and PBiblioEntry::setYear().
Referenced by pbliblio_parser().
bool pbliblio_file | ( | PMapBiblioEntry & | mapBiblioEntry, |
const PPath & | fileName | ||
) |
Parse the full bibliography file.
[out] | mapBiblioEntry | : map of all the bibliography entries |
fileName | : name ofthe file to be parsed |
Definition at line 139 of file pbiblio_parser.cpp.
References PFileParser::open(), pbliblio_parser(), and PFileParser::setSeparator().
Referenced by processAllFile().
bool pbliblio_parser | ( | PFileParser & | parser, |
PMapBiblioEntry & | mapBiblioEntry | ||
) |
Parse the full bibliography file.
[out] | parser | : parser to be used |
[out] | mapBiblioEntry | : map of all the bibliography entries |
Definition at line 117 of file pbiblio_parser.cpp.
References PBiblioEntry::getLabel(), PFileParser::isEndOfFile(), pbliblio_convertMapStrToBibEntry(), pbliblio_parserEntry(), PBiblioEntry::setId(), and PBiblioEntry::setType().
Referenced by pbliblio_file().
bool pbliblio_parserEntry | ( | PFileParser & | parser, |
PMapStrEntry & | mapStrEntry, | ||
PBiblioEntryType::PBiblioEntryType & | type | ||
) |
Parse the full bibliography file.
[out] | parser | : parser to be used |
[out] | mapStrEntry | : map of all the bibliography entries |
type | : type of the biblio entry |
Definition at line 80 of file pbiblio_parser.cpp.
References PString::eraseChar(), PFileParser::getUntilKeyWithoutPatern(), PFileParser::isEndOfFile(), PFileParser::isMatch(), pbiblio_checkAttrName(), pbiblio_checkAttrValue(), pbiblio_parseAttribute(), pbiblio_strToEntryType(), and PString::toLower().
Referenced by pbliblio_parser().