Static Public Member Functions | Static Private Member Functions
alvar::FileFormatUtils Class Reference

Utility functions for file reading / writing. More...

#include <FileFormatUtils.h>

List of all members.

Static Public Member Functions

static CvMat * allocateXMLMatrix (const TiXmlElement *xml_matrix)
 Allocates CvMat of a correct type and size.
static TiXmlElement * createXMLMatrix (const char *element_name, const CvMat *matrix)
 Allocates new XML element and populates it with a CvMat data.
static bool parseXMLMatrix (const TiXmlElement *xml_matrix, CvMat *matrix)
 Reads contents of alvar:matrix into CvMat.

Static Private Member Functions

static bool decodeXMLMatrix (const TiXmlElement *xml_matrix, int &type, int &rows, int &cols)
 Reads matrix type, rows and cols from XML element.

Detailed Description

Utility functions for file reading / writing.

Definition at line 42 of file FileFormatUtils.h.


Member Function Documentation

CvMat * alvar::FileFormatUtils::allocateXMLMatrix ( const TiXmlElement *  xml_matrix) [static]

Allocates CvMat of a correct type and size.

Parameters:
xml_matrixalvar:matrix element.
Returns:
CvMat that has the correct size for parseXMLMatrix.

Definition at line 43 of file FileFormatUtils.cpp.

TiXmlElement * alvar::FileFormatUtils::createXMLMatrix ( const char *  element_name,
const CvMat *  matrix 
) [static]

Allocates new XML element and populates it with a CvMat data.

The returned element needs to be deallocated by the caller.

Parameters:
element_nameName of the allocated tiXmlElement.
matrixData that is written into the returned XML element.
Returns:
Newly allocated TiXmlElement.

Definition at line 75 of file FileFormatUtils.cpp.

bool alvar::FileFormatUtils::decodeXMLMatrix ( const TiXmlElement *  xml_matrix,
int &  type,
int &  rows,
int &  cols 
) [static, private]

Reads matrix type, rows and cols from XML element.

Returns:
true if XML element appears to be valid; otherwise false.

Definition at line 31 of file FileFormatUtils.cpp.

bool alvar::FileFormatUtils::parseXMLMatrix ( const TiXmlElement *  xml_matrix,
CvMat *  matrix 
) [static]

Reads contents of alvar:matrix into CvMat.

Parsing fails if the matrix is not the same type or does not have the same number of rows and columns as the XML element.

Parameters:
xml_matrixalvar:matrix element. If NULL no parsing is done and false is returned.
matrixCvMat that has the correct size, populated with data in the xml_matrix.
Returns:
true if matrix was successfully parsed; otherwise false.

Definition at line 52 of file FileFormatUtils.cpp.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Sun Oct 5 2014 22:16:27