Skip to content

Commit

Permalink
doc: some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Sep 26, 2024
1 parent decc968 commit 06c7294
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 7 additions & 6 deletions src/iguana/services/ConcurrentParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace iguana {
// ==================================================================================

/// @brief abstract base class for concurrently mutable configuration parameters
/// @see `iguana::ConcurrentParamFactory` for instantiation
template <typename T>
class ConcurrentParam {

Expand All @@ -33,17 +34,17 @@ namespace iguana {
virtual void Save(T const& value, concurrent_key_t const key) = 0;

/// @param key the key
/// @returns if key `key` is used
/// @returns `true` if key `key` is used
virtual bool HasKey(concurrent_key_t const key) const = 0;

/// @brief whether or not hashing is needed to use this parameter
/// @returns true if hashing is needed
/// @returns `true` if hashing is needed
bool NeedsHashing() const { return m_needs_hashing; }

/// @returns the size of the internal data storage container
virtual std::size_t GetSize() const = 0;

/// @returns true if no value has been saved
/// @returns `true` if no value has been saved
bool IsEmpty() const { return m_empty; }

protected:
Expand All @@ -64,7 +65,7 @@ namespace iguana {
// ==================================================================================

/// @brief a parameter that is _not_ thread safe;
/// used when `GlobalConcurrencyModel == "single"`
/// used when `iguana::GlobalConcurrencyModel` is "single"
template <typename T>
class SingleThreadParam : public ConcurrentParam<T> {

Expand All @@ -88,8 +89,8 @@ namespace iguana {
// MemoizedParam
// ==================================================================================

/// @brief a `ConcurrentParam` that uses memoization for thread safety;
/// used when `GlobalConcurrencyModel == "memoize"`
/// @brief an `iguana::ConcurrentParam` that uses memoization for thread safety;
/// used when `iguana::GlobalConcurrencyModel` is "memoize"
template <typename T>
class MemoizedParam : public ConcurrentParam<T> {

Expand Down
7 changes: 5 additions & 2 deletions src/iguana/services/GlobalParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ namespace iguana {

/// @brief a globally accessible parameter
///
/// A global parameter:
/// - has a default value
/// A global parameter has the following properties
/// - a default value
/// - may be changed only _one time_
/// - may be read from _anywhere_
///
/// @par Available global parameters
/// - `iguana::GlobalConcurrencyModel`
template <typename T>
class GlobalParam : public Object {

Expand Down

0 comments on commit 06c7294

Please sign in to comment.