@brief Static class that contains helper functions for el::ConfigurationType
| 643 | }; |
| 644 | /// @brief Static class that contains helper functions for el::ConfigurationType |
| 645 | class ConfigurationTypeHelper : base::StaticClass { |
| 646 | public: |
| 647 | /// @brief Represents minimum valid configuration type. Useful when iterating through enum. |
| 648 | static const base::type::EnumType kMinValid = static_cast<base::type::EnumType>(ConfigurationType::Enabled); |
| 649 | /// @brief Represents maximum valid configuration type. This is used internally and you should not need it. |
| 650 | static const base::type::EnumType kMaxValid = static_cast<base::type::EnumType>(ConfigurationType::MaxLogFileSize); |
| 651 | /// @brief Casts configuration type to int, useful for iterating through enum. |
| 652 | static base::type::EnumType castToInt(ConfigurationType configurationType) { |
| 653 | return static_cast<base::type::EnumType>(configurationType); |
| 654 | } |
| 655 | /// @brief Casts int(ushort) to configurationt type, useful for iterating through enum. |
| 656 | static ConfigurationType castFromInt(base::type::EnumType c) { |
| 657 | return static_cast<ConfigurationType>(c); |
| 658 | } |
| 659 | /// @brief Converts configuration type to associated const char* |
| 660 | /// @returns Upper case string based configuration type. |
| 661 | static const char* convertToString(ConfigurationType configurationType); |
| 662 | /// @brief Converts from configStr to ConfigurationType |
| 663 | /// @param configStr Upper case string based configuration type. |
| 664 | /// Lower case is also valid but providing upper case is recommended. |
| 665 | static ConfigurationType convertFromString(const char* configStr); |
| 666 | /// @brief Applies specified function to each configuration type starting from startIndex |
| 667 | /// @param startIndex initial value to start the iteration from. This is passed by pointer and is left-shifted |
| 668 | /// so this can be used inside function (fn) to represent current configuration type. |
| 669 | /// @param fn function to apply with each configuration type. |
| 670 | /// This bool represent whether or not to stop iterating through configurations. |
| 671 | static inline void forEachConfigType(base::type::EnumType* startIndex, const std::function<bool(void)>& fn); |
| 672 | }; |
| 673 | /// @brief Flags used while writing logs. This flags are set by user |
| 674 | enum class LoggingFlag : base::type::EnumType { |
| 675 | /// @brief Makes sure we have new line for each container log entry |
nothing calls this directly
no outgoing calls
no test coverage detected