Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

TGenBank Class Reference

GenBank format import/export class. More...

#include <GenBank.h>

List of all members.

Public Member Functions

 TGenBank ()
 Constructor.
 ~TGenBank ()
 Destructor, empty.
void load (wxString s)
 Loads text from file, calles parser.
void paste (wxString s)
 Calls parser for text.
void remap (TVector *v)
 Wrapper to map the current sequence to a TVector.
void remap (TVector *v, const wxArrayString &vs, const wxArrayInt &vi)
 Remaps the given data to a TVector.
void doExport (TVector *v, wxArrayString &ex)
 Create a GenBank-format list of lines from a TVector.
wxString trim (wxString s)
 Removes the leading blanks from a string.
void itrim (wxString &s)
 Removes the leading blanks from a string.
void multitrim (wxString &s, bool quotes=true)
 Removes the leading and ending blanks and/or quotes from a string.
wxString trimQuotes (wxString s)
 Removes the leading and ending quotes from a string.
wxString quote (wxString pre, wxString q)
 ???
void wrapit (wxArrayString &ex, wxString init, wxString data, int limit=80)
 Formats a new GenBank entry to a certein width.
wxString expand (wxString init, int to, wxString with=_T(" "))
 Sets a string to a certain width, and fills it up if necessary.
int count_blanks (wxString &s)
 Counts the leading blanks in a string.

Public Attributes

bool success
 Did we encounter any errors while parsing?

Private Member Functions

void parseLines ()
 The parser.
void addItem (TVector *v, wxArrayString &va)
 Adds an item to a TVector.
void iterateItem (TVector *v, TVectorItem &i, wxString l, int tag=0)
 Used for generating multiple items from a single GenBank item entry.
bool isValidSequence (char a)
 Checks if the given char is "-", A-Z, or a-z.

Private Attributes

vector< wxArrayString > vs_l
 All the lines, grouped by sequences.
vector< wxArrayInt > vi_l
 All the line indentations.
wxArrayString vs
 Current sequence.
wxArrayInt vi
 Current line indentations.
wxString params
 ???
wxString title
 Sequence title.
wxString description
 Sequence description.
bool perm [256]
 Allowed chars.
bool validseq [256]
 Allowed sequence chars.
bool isblank [256]
 Blank chars.
bool isblankorquote [256]
 Blank or quote chars.

Friends

class TAlignment
class MyFrame


Detailed Description

GenBank format import/export class.


Constructor & Destructor Documentation

TGenBank::TGenBank  ) 
 

Constructor.

TGenBank::~TGenBank  ) 
 

Destructor, empty.


Member Function Documentation

void TGenBank::addItem TVector v,
wxArrayString &  va
[private]
 

Adds an item to a TVector.

Parameters:
v Pointer to the TVector
va Array of lines containing the item, GenBank-encoded

int TGenBank::count_blanks wxString &  s  ) 
 

Counts the leading blanks in a string.

Parameters:
s The string

void TGenBank::doExport TVector v,
wxArrayString &  ex
 

Create a GenBank-format list of lines from a TVector.

Parameters:
v The TVector
ex The array of lines (as reference)

wxString TGenBank::expand wxString  init,
int  to,
wxString  with = _T(" ")
 

Sets a string to a certain width, and fills it up if necessary.

Parameters:
init The string to expand/cut
to The desired length
with To fill the string with, if needed

bool TGenBank::isValidSequence char  a  )  [private]
 

Checks if the given char is "-", A-Z, or a-z.

Parameters:
a The char to check

void TGenBank::iterateItem TVector v,
TVectorItem i,
wxString  l,
int  tag = 0
[private]
 

Used for generating multiple items from a single GenBank item entry.

Parameters:
Pointer to the TVector
i The TVectorItem new items should be based on
l ???
tag ???

void TGenBank::itrim wxString &  s  ) 
 

Removes the leading blanks from a string.

Parameters:
s The string (as reference)

void TGenBank::load wxString  s  ) 
 

Loads text from file, calles parser.

Parameters:
s Filename

void TGenBank::multitrim wxString &  s,
bool  quotes = true
 

Removes the leading and ending blanks and/or quotes from a string.

Parameters:
s The string (as reference)

void TGenBank::parseLines  )  [private]
 

The parser.

void TGenBank::paste wxString  s  ) 
 

Calls parser for text.

Parameters:
s The text in GenBank format

wxString TGenBank::quote wxString  pre,
wxString  q
 

???

Parameters:
pre ???
q ???

void TGenBank::remap TVector v,
const wxArrayString &  vs,
const wxArrayInt &  vi
 

Remaps the given data to a TVector.

Parameters:
v Pointer to the TVector
vs The lines
vi The line indentations

void TGenBank::remap TVector v  ) 
 

Wrapper to map the current sequence to a TVector.

wxString TGenBank::trim wxString  s  ) 
 

Removes the leading blanks from a string.

Parameters:
s The string

wxString TGenBank::trimQuotes wxString  s  ) 
 

Removes the leading and ending quotes from a string.

Parameters:
s The string

void TGenBank::wrapit wxArrayString &  ex,
wxString  init,
wxString  data,
int  limit = 80
 

Formats a new GenBank entry to a certein width.

Parameters:
ex The output
init The GenBank "command"
data The data (to be wrapped)
limit The maximum line width


Friends And Related Function Documentation

friend class MyFrame [friend]
 

friend class TAlignment [friend]
 


Member Data Documentation

wxString TGenBank::description [private]
 

Sequence description.

bool TGenBank::isblank[256] [private]
 

Blank chars.

bool TGenBank::isblankorquote[256] [private]
 

Blank or quote chars.

wxString TGenBank::params [private]
 

???

bool TGenBank::perm[256] [private]
 

Allowed chars.

bool TGenBank::success
 

Did we encounter any errors while parsing?

wxString TGenBank::title [private]
 

Sequence title.

bool TGenBank::validseq[256] [private]
 

Allowed sequence chars.

wxArrayInt TGenBank::vi [private]
 

Current line indentations.

vector<wxArrayInt> TGenBank::vi_l [private]
 

All the line indentations.

wxArrayString TGenBank::vs [private]
 

Current sequence.

vector<wxArrayString> TGenBank::vs_l [private]
 

All the lines, grouped by sequences.


The documentation for this class was generated from the following files:
Generated on Fri Aug 11 16:19:46 2006 for GENtle by  doxygen 1.4.1