Loading...
Searching...
No Matches
pappso::OboUnimod Class Reference

`#include <obounimod.h>`

## Public Member Functions

| OboUnimod (OboPsiModHandlerInterface &handler)
virtual | ~OboUnimod ()

## Private Member Functions

void | parse ()
| starts reading obo file and reports each term with the callback function

## Private Attributes

OboPsiModTerm | m_term
OboPsiModHandlerInterface & | m_handler

## Detailed Description

Definition at line 38 of file obounimod.h.

## Constructor & Destructor Documentation

## OboUnimod()

pappso::OboUnimod::OboUnimod | ( | pappso::OboPsiModHandlerInterface & | handler | ) |

Definition at line 45 of file obounimod.cpp.

: m_handler(handler)
{
qDebug();
initMyResource();
parse();
}
pappso::OboUnimod::parse
void parse()
starts reading obo file and reports each term with the callback function
Definition obounimod.cpp:59
pappso::OboUnimod::m_handler
OboPsiModHandlerInterface & m_handler
Definition obounimod.h:46
initMyResource
void initMyResource()
Definition obopsimod.cpp:32

References initMyResource(), m_handler, and parse().

## ~OboUnimod()

pappso::OboUnimod::~OboUnimod | ( |  | ) |

virtual

Definition at line 53 of file obounimod.cpp.

{
}

## Member Function Documentation

## parse()

void pappso::OboUnimod::parse | ( |  | ) |

private

starts reading obo file and reports each term with the callback function

Definition at line 59 of file obounimod.cpp.

{
// std::cout << "OboPsiMod::parse Begin parsing OBO file" << std::endl;
qDebug();
QFile obofile(":/obo/resources/obo/unimod.obo");
if(!obofile.exists())
{
throw PappsoException(
QObject::tr("UNIMOD OBO resource file : %1 not found").arg(obofile.fileName()));
}
obofile.open(QIODevice::ReadOnly);
QTextStream p_in(&obofile);
// Search accession conta
// QTextStream in(p_in);
QString line = p_in.readLine();
bool in_term = false;
while(!p_in.atEnd())
{
// qDebug() << "OboPsiMod::parse line "<< line;
if(line.startsWith("[Term]"))
{
in_term = true;
m_term.clearTerm();
}
else if(line.isEmpty())
{
if(in_term)
{
m_handler.setOboPsiModTerm(m_term);
in_term = false;
}
}
else
{
if(in_term)
m_term.parseLine(line);
// m_handler.setSequence(line);
}
line = p_in.readLine();
}
if(in_term)
{
m_handler.setOboPsiModTerm(m_term);
}
// p_in->close();
obofile.close();
}
CardanoResultCase::line
@ line
Definition cardano.h:42
pappso::OboUnimod::m_term
OboPsiModTerm m_term
Definition obounimod.h:45

References line, m_handler, and m_term.

Referenced by OboUnimod().

## Member Data Documentation

## m_handler

OboPsiModHandlerInterface& pappso::OboUnimod::m_handler

private

Definition at line 46 of file obounimod.h.

Referenced by OboUnimod(), and parse().

## m_term

OboPsiModTerm pappso::OboUnimod::m_term

private

Definition at line 45 of file obounimod.h.

Referenced by parse().

The documentation for this class was generated from the following files:

- pappsomspp/core/obo/obounimod.h
- pappsomspp/core/obo/obounimod.cpp