Commit 70dd2fa3 authored by Laurent Belcour's avatar Laurent Belcour

Filling doxygen for the base classes. Adding a group definition for the {core,...

Filling doxygen for the base classes. Adding a group definition for the {core, plugins, functions} groups
parent 76a933f6
......@@ -4,12 +4,12 @@
This package provide C++ code to analyze BRDF, fit measured data to analytical
formulation, etc. It is decomposed in three components:
<ul>
<li><em>core</em>: a set of classes providing interfaces to BRDFs, data type
<li><em>\ref core</em>: a set of classes providing interfaces to BRDFs, data type
and fitting algorithms. All the code using this library should rely on this
part.</li>
<li><em>plugins</em>: a set of Qt plugins providing fitting algorithms
<li><em>\ref plugins</em>: a set of Qt plugins providing fitting algorithms
for rational BRDFs, non-linear BRDFs, etc.</li>
<li><em>softs</em>: a set of tools to fit data, convert data, export fitting to
<li><em>\ref softs</em>: a set of tools to fit data, convert data, export fitting to
plots, etc.</li>
</ul>
......@@ -17,11 +17,18 @@ This library rely on Qt's lower level
<a href="http://qt-project.org/doc/qt-4.8/plugins-howto.html">plugins mechanism</a>.
Three types of plugins are availables:
<ul>
<li><em>data</em> plugins allow to load BRDF measurements files.</li>
<li><em>function</em> plugins provide BRDF representations.</li>
<li><em>fitter</em> plugins provide fitting algorithms.</li>
<li><em>\ref data</em> plugins allow to load BRDF measurements files.</li>
<li><em>\ref function</em> plugins provide BRDF representations.</li>
<li><em>\ref fitter</em> plugins provide fitting algorithms.</li>
</ul>
The plugin_manager class will load all the Qt plugins and will provide access to
the requested elements. See the documentation of this class.
\todo Write how-to-compile documentation
\todo Write how-to-extend documentation (for plugin generation)
\defgroup core
\defgroup plugins
\defgroup softs
*/
......@@ -7,6 +7,13 @@
#include "common.h"
/*! \brief A useful class for storing the high-level arguments of a program
* or a function.
*
* The set of parameters are parsed from the command line using the
* constructor. They are stored as std::string in a std::map.
* \todo add functionalities to provide new parameters values.
*/
class arguments
{
public: // functions
......@@ -47,7 +54,7 @@ class arguments
} ;
~arguments() { } ;
// Access elements
//! \brief is the elements in the command line ?
bool is_defined(const std::string& key) const
{
if(_map.count(key) > 0)
......@@ -59,6 +66,7 @@ class arguments
return false ;
}
} ;
//! \brief access the element stored value
std::string operator[](const std::string& key) const
{
if(_map.count(key) > 0)
......@@ -71,6 +79,11 @@ class arguments
return std::string() ;
}
} ;
//! \brief acces to the float value associated with the parameter
//! \a key.
//!
//! The \a default_value argument will be returned if the \a key
//! has no associated value.
float get_float(const std::string& key, float default_value = 0.0f) const
{
if(_map.count(key) > 0)
......@@ -78,6 +91,11 @@ class arguments
else
return default_value ;
}
//! \brief acces to the integer value associated with the parameter
//! \a key.
//!
//! The \a default_value argument will be returned if the \a key
//! has no associated value.
int get_int(const std::string& key, int default_value = 0) const
{
if(_map.count(key) > 0)
......@@ -85,6 +103,11 @@ class arguments
else
return default_value ;
}
//! \brief acces to a vector of float of size \a size associated with
//! the parameter \a key.
//!
//! The \a default_value argument will be returned if the \a key
//! has no associated value.
vec get_vec(const std::string& key, int size, float default_value = 0.0f) const
{
vec res(size);
......
......@@ -7,7 +7,9 @@
#include "common.h"
#include "args.h"
/*!
* \ingroup core
*/
class data
{
public: // methods
......
......@@ -7,8 +7,8 @@
#include <QtPlugin>
/*
* Fitting interface for generic fitting algorithms
/*! \brief Fitting interface for generic fitting algorithms
* \ingroup core
*
*/
class fitter
......
......@@ -11,6 +11,7 @@
class data ;
/*! \brief A representation of an analytical function.
* \ingroup core
*
* function are functors with a domain of definition specified by a vector
* interval \f$[\vec{min} .. \vec{max}]\f$ where \f$\vec{min}\f$ and
......@@ -18,6 +19,8 @@ class data ;
*
* Any function used by the fitting algorithm should overload publicly this
* interface.
*
* \todo how-to write a plugin here ?
*/
class function
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment