Skip to content

Commit a9a0144

Browse files
committed
feat: enhance metadata struct with detailed comments for clarity
1 parent 40d2ec9 commit a9a0144

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

  • include/cpp_core/interface

‎include/cpp_core/interface/meta.h‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ extern "C"
1414
*/
1515
struct Meta
1616
{
17-
int major = version::MAJOR;
18-
int minor = version::MINOR;
19-
int patch = version::PATCH;
20-
int commits_since_tag = version::GIT_COMMIT_COUNT;
21-
int is_dirty = version::GIT_IS_DIRTY ? 1 : 0;
17+
int major = version::MAJOR; ///< Semantic-version major component.
18+
int minor = version::MINOR; ///< Semantic-version minor component.
19+
int patch = version::PATCH; ///< Semantic-version patch component.
20+
int commits_since_tag = version::GIT_COMMIT_COUNT; ///< Commits since the closest Git tag.
21+
int is_dirty = version::GIT_IS_DIRTY ? 1 : 0; ///< 1 for uncommitted changes, otherwise 0.
2222

23-
const char *version_string = version::VERSION;
24-
const char *prerelease = version::PRERELEASE;
25-
const char *prerelease_type = version::PRERELEASE_TYPE;
26-
const char *prerelease_number = version::PRERELEASE_NUMBER;
23+
const char *version_string = version::VERSION; ///< Complete generated version string.
24+
const char *prerelease = version::PRERELEASE; ///< Prerelease identifier, or an empty string.
25+
const char *prerelease_type = version::PRERELEASE_TYPE; ///< Prerelease kind such as `alpha` or `rc`.
26+
const char *prerelease_number = version::PRERELEASE_NUMBER; ///< Prerelease number, or an empty string.
2727

28-
const char *git_tag = version::GIT_TAG;
29-
const char *git_describe_hash = version::GIT_DESCRIBE_HASH;
30-
const char *git_commit_hash_short = version::GIT_COMMIT_HASH_SHORT;
31-
const char *git_commit_hash_full = version::GIT_COMMIT_HASH_FULL;
32-
const char *git_commit_date = version::GIT_COMMIT_DATE;
33-
const char *git_branch = version::GIT_BRANCH;
34-
const char *git_dirty_suffix = version::GIT_DIRTY_SUFFIX;
28+
const char *git_tag = version::GIT_TAG; ///< Closest Git tag.
29+
const char *git_describe_hash = version::GIT_DESCRIBE_HASH; ///< Hash component reported by Git describe.
30+
const char *git_commit_hash_short = version::GIT_COMMIT_HASH_SHORT; ///< Abbreviated commit hash.
31+
const char *git_commit_hash_full = version::GIT_COMMIT_HASH_FULL; ///< Full commit hash.
32+
const char *git_commit_date = version::GIT_COMMIT_DATE; ///< Commit timestamp including timezone.
33+
const char *git_branch = version::GIT_BRANCH; ///< Branch name used for the build.
34+
const char *git_dirty_suffix = version::GIT_DIRTY_SUFFIX; ///< `-dirty` or an empty string.
3535
};
3636
} // namespace cpp_core
3737

0 commit comments

Comments
 (0)