Skip to content

Commit

Permalink
Adds briefs to GradeHueco
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrosz committed Jul 20, 2024
1 parent c98aefa commit ace4571
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ TYPEDEF_HIDES_STRUCT = YES
EXTRACT_PRIVATE = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
INPUT = grade_hueco.h
INPUT = grade_hueco.h \
grade_font.h
57 changes: 57 additions & 0 deletions grade_font.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,83 @@
#ifndef _CLIMBLIB_GRADE_FONT_H_
#define _CLIMBLIB_GRADE_FONT_H_

/**
* @file grade_font.h
*
* @brief Header that defines structures and methods for the Fontainebleau
* grading system.
*/

#include <stddef.h>

/**
* @brief Divisions that granulate difficulty within a grade
*/
typedef enum {
/**
* @brief The "A" division
*/
GRADE_FONT_DIVISION_A,

/**
* @brief The "B" division
*/
GRADE_FONT_DIVISION_B,

/**
* @brief The "C" division
*/
GRADE_FONT_DIVISION_C,
} GradeFontainebleauDivision;

/**
* @brief Modifier that indicates increased difficulty within a grade
*/
typedef enum {
/**
* @brief No modifier present
*/
GRADE_FONT_MODIFIER_NONE,

/**
* @brief The "+" modifier
*/
GRADE_FONT_MODIFIER_PLUS,
} GradeFontainebleauModifier;

/**
* @brief A Fontainebleau grade.
*/
typedef struct {
/**
* @brief The value of the grade.
*/
unsigned int grade;

/**
* @brief The division of the grade.
*/
GradeFontainebleauDivision division;

/**
* @brief The modifier of the grade.
*/
GradeFontainebleauModifier modifier;
} GradeFontainebleau;

/**
* @brief Compares two @ref GradeFontainebleau instances.
*/
int GradeFontainebleau_cmp(const GradeFontainebleau, const GradeFontainebleau);

/**
* @brief Produces a string representing the Fontainebleau grade.
*/
int GradeFontainebleau_str(const GradeFontainebleau, char *, size_t);

/**
* @brief Populates a @ref GradeFontainebleau from a representative string.
*/
int GradeFontainebleau_fromstr(const char *, GradeFontainebleau *);

#endif

0 comments on commit ace4571

Please sign in to comment.