bpp-seq  2.2.0
bpp::NexusTools Class Reference

Tools for parsing Nexus files. More...

#include <Bpp/Seq/Io/NexusTools.h>

Static Public Member Functions

static std::string getNextNonCommentLine (std::istream &input)
 
static bool getNextCommand (std::istream &input, std::string &name, std::string &arguments, bool lineBrk=true) throw (IOException)
 parse the next command name within a block. More...
 

Detailed Description

Tools for parsing Nexus files.

The Nexus format is described in the following paper: Maddison D, Swofford D, and Maddison W (1997), Syst Biol 46(4):590-621

Author
Julien Dutheil

Definition at line 58 of file NexusTools.h.

Member Function Documentation

◆ getNextCommand()

bool NexusTools::getNextCommand ( std::istream &  input,
std::string &  name,
std::string &  arguments,
bool  lineBrk = true 
)
throw (IOException
)
static

parse the next command name within a block.

Parameters
input[in] The input stream.
name[out] Will contain the name of the command.
arguments[out] Will contain the arguments of the commans, as raw data. The arguments will not be parsed.
lineBrk[in] Tell is the line break should be preserved in the arguments.
Returns
Whether a command was found in the current block.
Exceptions
IOExceptionIn case of bad format.

Definition at line 72 of file NexusTools.cpp.

Referenced by bpp::NexusIOSequence::appendAlignmentFromStream().

◆ getNextNonCommentLine()

std::string NexusTools::getNextNonCommentLine ( std::istream &  input)
static
Parameters
inputThe input stream.
Returns
A string containing the next line in the file wichi is not empty and is no a comment line.

Definition at line 47 of file NexusTools.cpp.


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