Adds doxygen comments to SBF namespace.

Adds doxygen header to header files.
This commit is contained in:
2023-04-16 04:08:33 -07:00
parent 7c9c42b17c
commit 5501de76e2
16 changed files with 220 additions and 1 deletions

View File

@@ -1,8 +1,19 @@
#ifndef ARCHETYPES_H__ #ifndef ARCHETYPES_H__
#define ARCHETYPES_H__ #define ARCHETYPES_H__
/***************************************************************************************
* @file Archetypes.h
*
* @brief Defines constants and functions for working with archetypes.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Archetypes
* @{
*/
namespace SBF { namespace SBF {
const int kArchetypeArchitectId = 1; const int kArchetypeArchitectId = 1;
const std::string kArchetypeArchitectLabel = "Architect"; const std::string kArchetypeArchitectLabel = "Architect";
@@ -99,7 +110,14 @@ namespace SBF {
kArchetypeVisionaryLabel, kArchetypeVisionaryLabel,
}; };
/// @brief Gets the label for the given archetype id.
/// @param archetypeId The id of the archetype to get the label for.
/// @return The label for the requested archetype.
std::string GetArchetypeLabel(int archetypeId); std::string GetArchetypeLabel(int archetypeId);
/// @brief Fills the provided vector with all of the archetype labels. It clears the vector before filling.
/// @param archetypeLabels The vector to fill.
void FillArchetypeLabels(std::vector<std::string>& archetypeLabels); void FillArchetypeLabels(std::vector<std::string>& archetypeLabels);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined ARCHETYPES_H__ #endif // End !defined ARCHETYPES_H__

View File

@@ -1,8 +1,19 @@
#ifndef ATTRIBUTES_H__ #ifndef ATTRIBUTES_H__
#define ATTRIBUTES_H__ #define ATTRIBUTES_H__
/***************************************************************************************
* @file Attributes.h
*
* @brief Defines constants and functions for working with attribute groups and attriubtes.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Attributes
* @{
*/
namespace SBF { namespace SBF {
const int kPhysicalAttributeStrengthId = 1; const int kPhysicalAttributeStrengthId = 1;
const std::string kPhysicalAttributeStrengthLabel = "Strength"; const std::string kPhysicalAttributeStrengthLabel = "Strength";
@@ -87,8 +98,21 @@ namespace SBF {
kAttributeGroupMentalLabel, kAttributeGroupMentalLabel,
}; };
/// @brief Gets the label for the attribute group with the specified id.
/// @param attributeGroupId The id of the attribute group to return the label for.
/// @return The label of the specified attribute group.
std::string GetAttributeGroupLabel(int attributeGroupId); std::string GetAttributeGroupLabel(int attributeGroupId);
/// @brief Gets the label for the attribute with the specified group id an attribute id.
/// @param attributeGroupId The id of the attribute group to return the label for.
/// @param attributeId The id of the attribute withing the group to return the label for.
/// @return The label of the specified attribute.
std::string GetAttributeLabel(int attributeGroupId, int attributeId); std::string GetAttributeLabel(int attributeGroupId, int attributeId);
/// @brief
/// @param attributeGroupId
/// @param attributeId
/// @return
std::string GetAttributeLabelAbbreviation(int attributeGroupId, int attributeId); std::string GetAttributeLabelAbbreviation(int attributeGroupId, int attributeId);
std::string GetPhysicalAttributeLabel(int attributeId); std::string GetPhysicalAttributeLabel(int attributeId);
std::string GetPhysicalAttributeLabelAbbreviation(int attributeId); std::string GetPhysicalAttributeLabelAbbreviation(int attributeId);
@@ -103,4 +127,5 @@ namespace SBF {
void FillSocialAttributeLabels(std::vector<std::string>& socialAttributeLabels); void FillSocialAttributeLabels(std::vector<std::string>& socialAttributeLabels);
void FillMentalAttributeLabels(std::vector<std::string>& mentalAttributeLabels); void FillMentalAttributeLabels(std::vector<std::string>& mentalAttributeLabels);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined ATTRIBUTES_H__ #endif // End !defined ATTRIBUTES_H__

View File

@@ -1,8 +1,19 @@
#ifndef BACKGROUNDS_H__ #ifndef BACKGROUNDS_H__
#define BACKGROUNDS_H__ #define BACKGROUNDS_H__
/***************************************************************************************
* @file Backgrounds.h
*
* @brief Defines constants and funcions for working with backgrounds.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Backgrounds
* @{
*/
namespace SBF { namespace SBF {
const int kBackgroundPoints = 5; const int kBackgroundPoints = 5;
const int kBackgroundAlliesId = 1; const int kBackgroundAlliesId = 1;
@@ -42,4 +53,5 @@ namespace SBF {
std::string GetBackgroundLabel(int backgroundId); std::string GetBackgroundLabel(int backgroundId);
void FillBackgroundLabels(std::vector<std::string>& backgroundLabels); void FillBackgroundLabels(std::vector<std::string>& backgroundLabels);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined BACKGROUNDS_H__ #endif // End !defined BACKGROUNDS_H__

View File

@@ -1,5 +1,13 @@
#ifndef CHARACTER_H__ #ifndef CHARACTER_H__
#define CHARACTER_H__ #define CHARACTER_H__
/***************************************************************************************
* @file Character.h
*
* @brief Defines CharacterType.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include "Colors.h" #include "Colors.h"
#include "Ranks.h" #include "Ranks.h"
#include "Clans.h" #include "Clans.h"
@@ -13,6 +21,9 @@
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
/** \addtogroup Character
* @{
*/
namespace SBF { namespace SBF {
int GetDisciplinePoints(); int GetDisciplinePoints();
int GetVirtuePoints(); int GetVirtuePoints();
@@ -151,4 +162,5 @@ namespace SBF {
int background_status; int background_status;
}; // End class CharacterType }; // End class CharacterType
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // !defined CHARACTER_H__ #endif // !defined CHARACTER_H__

View File

@@ -1,8 +1,19 @@
#ifndef CLANS_H__ #ifndef CLANS_H__
#define CLANS_H__ #define CLANS_H__
/***************************************************************************************
* @file Clans.h
*
* @brief Defines constants and functions for working with clans.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Clans
* @{
*/
namespace SBF { namespace SBF {
const int kClanAnarch = 1; const int kClanAnarch = 1;
const std::string kClanAnarchLabel = "Anarch"; const std::string kClanAnarchLabel = "Anarch";
@@ -65,4 +76,5 @@ namespace SBF {
std::string GetClanLabel(int clanId); std::string GetClanLabel(int clanId);
void FillClanLabels(std::vector<std::string>& clans); void FillClanLabels(std::vector<std::string>& clans);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined CLANS_H__ #endif // End !defined CLANS_H__

View File

@@ -1,8 +1,19 @@
#ifndef COLORS_H__ #ifndef COLORS_H__
#define COLORS_H__ #define COLORS_H__
/***************************************************************************************
* @file Colors.h
*
* @brief Defines constants and functions for working with screen colors.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
/** \addtogroup Abilities
* @{
*/
namespace SBF { namespace SBF {
const uint8_t kColorDarkBlack = 0; const uint8_t kColorDarkBlack = 0;
const uint8_t kColorDarkBlue = 1; const uint8_t kColorDarkBlue = 1;
@@ -30,4 +41,5 @@ namespace SBF {
void FillColors(std::vector<uint8_t> colors); void FillColors(std::vector<uint8_t> colors);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined COLORS_H__ #endif // End !defined COLORS_H__

View File

@@ -1,9 +1,20 @@
#ifndef DERANGEMENTS_H__ #ifndef DERANGEMENTS_H__
#define DERANGEMENTS_H__ #define DERANGEMENTS_H__
#include "Colors.h" #include "Colors.h"
/***************************************************************************************
* @file Derangements.h
*
* @brief Defines constants and functions for working with derangements.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Derangements
* @{
*/
namespace SBF { namespace SBF {
struct DerangementType { struct DerangementType {
int id; int id;
@@ -173,4 +184,5 @@ namespace SBF {
const DerangementType& GetDerangement(int derangementId); const DerangementType& GetDerangement(int derangementId);
void FillDerangements(std::vector<DerangementType> derangements); void FillDerangements(std::vector<DerangementType> derangements);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined DERANGEMENTS_H__ #endif // End !defined DERANGEMENTS_H__

View File

@@ -1,8 +1,20 @@
#ifndef DISCIPLINES_H__ #ifndef DISCIPLINES_H__
#define DISCIPLINES_H__ #define DISCIPLINES_H__
/***************************************************************************************
* @file Disciplines.h
*
* @brief Defines constants and functions for working with disciplines.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Disciplines
* @{
*/
namespace SBF { namespace SBF {
const int kDisciplinePoints = 3; const int kDisciplinePoints = 3;
const int kDisciplineAnimalismId = 1; const int kDisciplineAnimalismId = 1;
@@ -84,4 +96,5 @@ namespace SBF {
const std::string GetDisciplineLabel(int disciplineId); const std::string GetDisciplineLabel(int disciplineId);
void FillDisciplineLabels(std::vector<std::string> disciplineLabels); void FillDisciplineLabels(std::vector<std::string> disciplineLabels);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined DISCIPLINES_H__ #endif // End !defined DISCIPLINES_H__

View File

@@ -1,8 +1,19 @@
#ifndef GENDERS_H__ #ifndef GENDERS_H__
#define GENDERS_H__ #define GENDERS_H__
/***************************************************************************************
* @file Genders.h
*
* @brief Defines constants and functions for working with genders.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Genders
* @{
*/
namespace SBF { namespace SBF {
const int kGenderMaleId = 1; const int kGenderMaleId = 1;
const std::string kGenderMaleLabel = "Male"; const std::string kGenderMaleLabel = "Male";
@@ -26,4 +37,5 @@ namespace SBF {
const std::string& GetGenderLabel(int genderId); const std::string& GetGenderLabel(int genderId);
void FillGenderLabels(std::vector<std::string> genderLabels); void FillGenderLabels(std::vector<std::string> genderLabels);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined GENDERS_H__ #endif // End !defined GENDERS_H__

View File

@@ -1,5 +1,14 @@
#ifndef MENUS_H__ #ifndef MENUS_H__
#define MENUS_H__ #define MENUS_H__
/***************************************************************************************
* @file Menus.h
*
* @brief Defines constants and functions for working with menus.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
namespace SBF { namespace SBF {
struct MenuStyle; struct MenuStyle;
struct MenuItem; struct MenuItem;
@@ -8,6 +17,9 @@ namespace SBF {
#include <string> #include <string>
#include <cstdint> #include <cstdint>
/** \addtogroup Menus
* @{
*/
namespace SBF { namespace SBF {
using std::string; using std::string;
@@ -47,5 +59,5 @@ namespace SBF {
void NewMenuItemWithColor(MenuItem& item, string label, int id, uint8_t color); void NewMenuItemWithColor(MenuItem& item, string label, int id, uint8_t color);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // !defined MENUS_H__ #endif // !defined MENUS_H__

View File

@@ -1,8 +1,19 @@
#ifndef RANKS_H__ #ifndef RANKS_H__
#define RANKS_H__ #define RANKS_H__
/***************************************************************************************
* @file Ranks.h
*
* @brief Defines constants and functions for working with ranks.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup
* @{
*/
namespace SBF { namespace SBF {
const int kRankPrimaryId = 1; const int kRankPrimaryId = 1;
const std::string kRankPrimaryLabel = "Primary"; const std::string kRankPrimaryLabel = "Primary";
@@ -24,4 +35,5 @@ namespace SBF {
const RankType& GetRank(int rankId); const RankType& GetRank(int rankId);
void FillRanks(std::vector<RankType> ranks); void FillRanks(std::vector<RankType> ranks);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // !defined RANKS_H__ #endif // !defined RANKS_H__

View File

@@ -1,7 +1,18 @@
#ifndef UTILS_H__ #ifndef UTILS_H__
#define UTILS_H__ #define UTILS_H__
/***************************************************************************************
* @file Utils.h
*
* @brief Defines various utility functions.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
/** \addtogroup Utils
* @{
*/
namespace SBF { namespace SBF {
using std::string; using std::string;
@@ -13,4 +24,5 @@ namespace SBF {
string string_dollar(size_t length, char ch); string string_dollar(size_t length, char ch);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined UTILS_H__ #endif // End !defined UTILS_H__

View File

@@ -1,8 +1,19 @@
#ifndef VIRTUES_H__ #ifndef VIRTUES_H__
#define VIRTUES_H__ #define VIRTUES_H__
/***************************************************************************************
* @file Virtues.h
*
* @brief Defines constants and functions for working with virtues.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <string> #include <string>
#include <vector> #include <vector>
/** \addtogroup Virtues
* @{
*/
namespace SBF { namespace SBF {
const int kVirtuePoints = 7; const int kVirtuePoints = 7;
const int kVirtueSelfControlId = 1; const int kVirtueSelfControlId = 1;
@@ -21,4 +32,5 @@ namespace SBF {
const std::string GetVirtueLabel(int virtueId); const std::string GetVirtueLabel(int virtueId);
void FillVirtueLabels(std::vector<std::string> virtueLabels); void FillVirtueLabels(std::vector<std::string> virtueLabels);
} // End namespace SBF } // End namespace SBF
/** @}*/
#endif // End !defined VIRTUES_H__ #endif // End !defined VIRTUES_H__

View File

@@ -0,0 +1,19 @@
#ifndef MAIN_H__
#define MAIN_H__
/***************************************************************************************
* @file main.h
*
* @brief Defines stuff for the main app.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
/** \addtogroup Unsorted
* @{
*/
namespace SBF {
}
/** @}*/
#endif

View File

@@ -1,8 +1,21 @@
#ifndef SBF_H__
#define SBF_H__
/***************************************************************************************
* @file sbf.h
*
* @brief Holds code copied from the BASIC version that hasn't been relocated yet.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include "Colors.h" #include "Colors.h"
#include "Menus.h" #include "Menus.h"
#include "Character.h" #include "Character.h"
#include <string> #include <string>
/** \addtogroup Unsorted
* @{
*/
namespace SBF { namespace SBF {
using std::string; using std::string;
@@ -809,3 +822,5 @@ End Sub
*/ */
} // End namespace SBF } // End namespace SBF
/** #}*/
#endif // End !defined SBF_H__

View File

@@ -1,5 +1,14 @@
#ifndef TEST_H__ #ifndef TEST_H__
#define TEST_H__ #define TEST_H__
/***************************************************************************************
* @file test.h
*
* @brief Defines structs and functions for implementing TinyTest.
* @copyright
* Copyright 2023 Tom Hicks
* Licensed under the MIT license see the LICENSE file for details.
***************************************************************************************/
#include <cstdint> #include <cstdint>
#include <tuple> #include <tuple>
#include <utility> #include <utility>