Doxygen comments added

This commit is contained in:
johan
2013-08-31 14:36:54 +02:00
parent 1a2dd19a7b
commit 3187fc84a6
8 changed files with 195 additions and 28 deletions

View File

@@ -15,29 +15,53 @@
class ColorTransform
{
public:
/// @brief Default constructor
ColorTransform();
/// @brief Constructor
/// @param threshold
/// @param gamma
/// @param blacklevel
/// @param whitelevel
ColorTransform(double threshold, double gamma, double blacklevel, double whitelevel);
/// @brief Destructor
~ColorTransform();
/// @return The current threshold value
double getThreshold() const;
/// @param threshold New threshold value
void setThreshold(double threshold);
/// @return The current gamma value
double getGamma() const;
/// @param gamma New gamma value
void setGamma(double gamma);
/// @return The current blacklevel value
double getBlacklevel() const;
/// @param blacklevel New blacklevel value
void setBlacklevel(double blacklevel);
/// @return The current whitelevel value
double getWhitelevel() const;
/// @param whitelevel New whitelevel value
void setWhitelevel(double whitelevel);
/// get the transformed value for the given byte value
/// @brief Transform the given byte value
/// @param input The input color byte
/// @return The transformed byte value
uint8_t transform(uint8_t input) const
{
return _mapping[input];
}
private:
/// @brief (re)-initilize the color mapping
void initializeMapping();
private:

View File

@@ -3,19 +3,40 @@
// STL includes
#include <cstdint>
///
/// \brief Color transformation to adjust the saturation and value of a RGB color value
///
class HsvTransform
{
public:
/// Default constructor
HsvTransform();
/// @brief Constructor
/// @param saturationGain
/// @param valueGain
HsvTransform(double saturationGain, double valueGain);
/// Destructor
~HsvTransform();
/// @param saturationGain New saturationGain
void setSaturationGain(double saturationGain);
/// @return The current Saturation gain
double getSaturationGain() const;
/// @param valueGain New Value gain
void setValueGain(double valueGain);
/// @return The current value gain
double getValueGain() const;
/// @brief Apply the transform the the given RGB values.
/// @param red The red color component
/// @param green The green color component
/// @param blue The blue color component
/// @note The values are updated in place.
void transform(uint8_t & red, uint8_t & green, uint8_t & blue) const;
/// integer version of the conversion are faster, but a little less accurate

View File

@@ -7,30 +7,47 @@
// jsoncpp includes
#include <json/json.h>
/**
* JsonSchemaChecker is a very basic implementation of json schema.
* The json schema definition draft can be found at
* http://tools.ietf.org/html/draft-zyp-json-schema-03
*
* The following keywords are supported:
* - type
* - required
* - properties
* - items
* - enum
* - minimum
* - maximum
*/
/// JsonSchemaChecker is a very basic implementation of json schema.
/// The json schema definition draft can be found at
/// http://tools.ietf.org/html/draft-zyp-json-schema-03
///
/// The following keywords are supported:
/// - type
/// - required
/// - properties
/// - items
/// - enum
/// - minimum
/// - maximum
/// - addtionalProperties
/// - minItems
/// - maxItems
///
/// And the non-standard:
/// - dependencies
class JsonSchemaChecker
{
public:
JsonSchemaChecker();
virtual ~JsonSchemaChecker();
///
/// @param The schema to use
/// @return true upon succes
///
bool setSchema(const Json::Value & schema);
///
/// @brief Validate a JSON structure
/// @param The JSON value to check
/// @return true when the arguments is valid according to the schema
///
bool validate(const Json::Value & value);
///
/// @return A list of error messages
///
const std::list<std::string> & getMessages() const;
private: