Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PianoFile Class Reference

#include <pianofile.h>

Public Types

using FileVersionType = int
 

Public Member Functions

 PianoFile ()
 
 ~PianoFile ()
 
bool read (const std::string &absolutePath, Piano &piano)
 
bool write (const std::string &absolutePath, const Piano &piano, piano::FileType fileType) const
 
void readXmlFile (const std::string &absolutePath, Piano &piano)
 
void writeXmlFile (const std::string &absolutePath, const Piano &piano) const
 
void writeCsvFile (const std::string &absolutePath, const Piano &piano) const
 

Static Public Attributes

static const std::string FILE_TYPE_NAME
 
static const FileVersionType UNSET_FILE_VERSION
 
static const FileVersionType CURRENT_FILE_VERSION
 
static const FileVersionType MIN_SUPPORTED_FILE_VERSION
 

Protected Member Functions

std::string getText (const tinyxml2::XMLElement *element)
 
void createTextXMLElement (tinyxml2::XMLElement *parent, const char *label, const char *text) const
 
void read (const tinyxml2::XMLElement *e, Piano &piano)
 
void write (tinyxml2::XMLElement *e, const Piano &piano) const
 
void read (const tinyxml2::XMLElement *e, Keyboard &keyboard)
 
void write (tinyxml2::XMLElement *e, const Keyboard &keyboard) const
 

Private Attributes

FileVersionType mFileVersion
 file version as integer More...
 

Detailed Description

Definition at line 28 of file pianofile.h.

Member Typedef Documentation

Definition at line 31 of file pianofile.h.

Constructor & Destructor Documentation

PianoFile::PianoFile ( )

Definition at line 40 of file pianofile.cpp.

PianoFile::~PianoFile ( )

Definition at line 44 of file pianofile.cpp.

Member Function Documentation

void PianoFile::createTextXMLElement ( tinyxml2::XMLElement *  parent,
const char *  label,
const char *  text 
) const
protected

Definition at line 172 of file pianofile.cpp.

std::string PianoFile::getText ( const tinyxml2::XMLElement *  element)
protected

Definition at line 164 of file pianofile.cpp.

bool PianoFile::read ( const std::string &  absolutePath,
Piano piano 
)

Definition at line 47 of file pianofile.cpp.

+ Here is the call graph for this function:

void PianoFile::read ( const tinyxml2::XMLElement *  e,
Piano piano 
)
protected

Definition at line 178 of file pianofile.cpp.

+ Here is the call graph for this function:

void PianoFile::read ( const tinyxml2::XMLElement *  e,
Keyboard keyboard 
)
protected

Definition at line 228 of file pianofile.cpp.

+ Here is the call graph for this function:

void PianoFile::readXmlFile ( const std::string &  absolutePath,
Piano piano 
)

Definition at line 83 of file pianofile.cpp.

+ Here is the call graph for this function:

bool PianoFile::write ( const std::string &  absolutePath,
const Piano piano,
piano::FileType  fileType 
) const

Definition at line 62 of file pianofile.cpp.

+ Here is the call graph for this function:

void PianoFile::write ( tinyxml2::XMLElement *  e,
const Piano piano 
) const
protected

Definition at line 210 of file pianofile.cpp.

+ Here is the call graph for this function:

void PianoFile::write ( tinyxml2::XMLElement *  e,
const Keyboard keyboard 
) const
protected

Definition at line 299 of file pianofile.cpp.

+ Here is the call graph for this function:

void PianoFile::writeCsvFile ( const std::string &  absolutePath,
const Piano piano 
) const

Definition at line 345 of file pianofile.cpp.

+ Here is the call graph for this function:

void PianoFile::writeXmlFile ( const std::string &  absolutePath,
const Piano piano 
) const

Definition at line 138 of file pianofile.cpp.

+ Here is the call graph for this function:

Member Data Documentation

const PianoFile::FileVersionType PianoFile::CURRENT_FILE_VERSION
static

Definition at line 34 of file pianofile.h.

const std::string PianoFile::FILE_TYPE_NAME
static

Definition at line 32 of file pianofile.h.

FileVersionType PianoFile::mFileVersion
private

file version as integer

Definition at line 63 of file pianofile.h.

const PianoFile::FileVersionType PianoFile::MIN_SUPPORTED_FILE_VERSION
static

Definition at line 35 of file pianofile.h.

const PianoFile::FileVersionType PianoFile::UNSET_FILE_VERSION
static

Definition at line 33 of file pianofile.h.


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