Objects of this class represent a Log Domain of ALox. This class is internally used by class Lox.
Definition at line 46 of file domain.inl.
Inner Type Index: | |
| struct | LoggerData |
| Internal class that holds data stored per Logger. More... | |
Public Static Method Index: | |
| static constexpr nchar | Separator () |
Public Field Index: | |
| integer | CntLogCalls =0 |
| bool | ConfigurationAlreadyRead =false |
| Flag which is set when verbosity configuration data was read. | |
| StdVectorMA< LoggerData > | Data |
| NString | FullPath |
| The full path of the domain (set in the constructor once) . | |
| NString | Name |
| The name of the domain. For root domains, this is nulled. | |
| Domain * | Parent |
The parent domain. For root domains, this is nullptr. | |
| ListPA< std::pair< PrefixLogable *, lang::Inclusion >, Recycling::None > | PrefixLogables |
| Prefix Logables associated with this domain. | |
| ListMA< Domain, Recycling::None > | SubDomains |
| A list of subdomains, sorted by name. | |
Public Method Index: | |
| Domain (Domain *parent, const NString &name) | |
| Domain (MonoAllocator &allocator, PoolAllocator &pool, const NString &name) | |
| int | AddLogger (detail::Logger *logger) |
| int | CountLoggers () |
| Domain * | Find (NSubstring domainPath, int maxCreate, bool *wasCreated) |
| int | GetCount (int loggerNo) |
| detail::Logger * | GetLogger (const NString &loggerName) |
| detail::Logger * | GetLogger (int no) |
| int | GetLoggerNo (const NString &loggerName) |
| int | GetLoggerNo (detail::Logger *logger) |
| Priority | GetPriority (int loggerNo) |
| Domain * | GetRoot () |
| Verbosity | GetVerbosity (int loggerNo) |
| bool | IsActive (int loggerNo, Verbosity verbosity) |
| void | RemoveLogger (int loggerNo) |
| Verbosity | SetVerbosity (int loggerNo, Verbosity verbosity, Priority priority) |
| void | ToString (NAString &target) |
Protected Method Index: | |
| void | addLoggerRecursive (detail::Logger *logger) |
| Domain * | findRecursive (NSubstring &domainPath, int maxCreate, bool *wasCreated) |
| void | removeLoggerRecursive (int loggerNo) |
| integer alib::lox::detail::Domain::CntLogCalls =0 |
A counter for the quantity of calls on this domain. Counting does not include:
Definition at line 100 of file domain.inl.
| bool alib::lox::detail::Domain::ConfigurationAlreadyRead =false |
Flag which is set when verbosity configuration data was read.
Definition at line 103 of file domain.inl.
| StdVectorMA<LoggerData> alib::lox::detail::Domain::Data |
Data stored per logger. The index is corresponding to the list of loggers in 'our' Lox.
Definition at line 88 of file domain.inl.
| NString alib::lox::detail::Domain::FullPath |
The full path of the domain (set in the constructor once) .
Definition at line 78 of file domain.inl.
| NString alib::lox::detail::Domain::Name |
The name of the domain. For root domains, this is nulled.
Definition at line 75 of file domain.inl.
| Domain* alib::lox::detail::Domain::Parent |
The parent domain. For root domains, this is nullptr.
Definition at line 81 of file domain.inl.
| ListPA< std::pair<PrefixLogable*, lang::Inclusion>, Recycling::None> alib::lox::detail::Domain::PrefixLogables |
Prefix Logables associated with this domain.
Definition at line 93 of file domain.inl.
A list of subdomains, sorted by name.
Definition at line 84 of file domain.inl.
| alib::lox::detail::Domain::Domain | ( | MonoAllocator & | allocator, |
| PoolAllocator & | pool, | ||
| const NString & | name ) |
Constructor used for the root domain.
| allocator | The monotonic allocator used allocation of permanent objects. |
| pool | The pool allocator used allocation of non-permanent objects. |
| name | The name of this root domains |
Definition at line 50 of file domain.cpp.
| alib::lox::detail::Domain::Domain | ( | Domain * | parent, |
| const NString & | name ) |
Constructor
| parent | The parent domain. For root domains, this is nullptr. |
| name | The name of the domain. |
Definition at line 66 of file domain.cpp.
|
inline |
Adds a new entry in field Data and recursively demands the same from its Subdomains. Checks if a logger with the same name exists.
| logger | The logger to add. |
Definition at line 140 of file domain.inl.
|
protected |
Internal, recursive helper of AddLogger.
| logger | The logger to add. |
Definition at line 216 of file domain.cpp.
|
inline |
Returns the number of loggers stored in this domain (the same for all domains within a tree).
Definition at line 171 of file domain.inl.
| Domain * alib::lox::detail::Domain::Find | ( | NSubstring | domainPath, |
| int | maxCreate, | ||
| bool * | wasCreated ) |
Searches a domain. If not found, the domain is (or path of domains are) created in the domain tree. If the path string starts with the character defined with Separator, then the search (and creation) is done starting from the root domain of this domain and not from this domain.
| domainPath | Path and domain to search. | |
| maxCreate | The maximum number of subdomains that are created if not found at the end of the path. | |
| [out] | wasCreated | Output parameter that is set true if domain was not found and hence created. If nullptr, it is ignored. |
Definition at line 93 of file domain.cpp.
|
protected |
Internal, recursive helper of Find.
| domainPath | Path to search. | |
| maxCreate | The maximum number of subdomains that are created if not found at the end of the path. | |
| [out] | wasCreated | Output parameter that is set true if domain was not found and hence created. If nullptr, it is ignored. |
Definition at line 120 of file domain.cpp.
|
inline |
Returns the number of log calls for this domain and logger.
| loggerNo | The number of the Logger whose Verbosity is requested. |
Definition at line 239 of file domain.inl.
|
inline |
Searches and returns the Logger given by name.
| loggerName | The logger to search. |
Definition at line 177 of file domain.inl.
|
inline |
Returns logger of given number.
| no | The number of the Logger to return. |
Definition at line 187 of file domain.inl.
|
inline |
Returns the number of the Logger specified by name.
| loggerName | The logger name to search. |
Definition at line 197 of file domain.inl.
|
inline |
Returns the number of the Logger.
| logger | The logger to search. |
Definition at line 207 of file domain.inl.
|
inline |
Returns the priority of the Verbosity setting for the given logger number.
| loggerNo | The number of the Logger whose Verbosity is requested. |
Definition at line 233 of file domain.inl.
|
inline |
Returns the root domain of this object.
Definition at line 128 of file domain.inl.
|
inline |
Returns the Log Domain's Verbosity for the given logger number.
| loggerNo | The number of the Logger whose Verbosity is requested. |
Definition at line 228 of file domain.inl.
|
inline |
Determines if the domain is active in respect to the given Verbosity.
| loggerNo | The number of the Logger whose Verbosity is to be evaluated against statement. |
| verbosity | The Verbosity to check. |
true if the domain is active. Definition at line 247 of file domain.inl.
|
inline |
Removes an new entry in field Data and recursively demands the same from its Subdomains.
| loggerNo | The number of the Logger to be removed. |
Definition at line 157 of file domain.inl.
|
protected |
Internal, recursive helper of RemoveLogger.
| loggerNo | The number of the Logger to be removed. |
Definition at line 222 of file domain.cpp.
|
inlinestaticconstexpr |
Definition at line 111 of file domain.inl.
| Verbosity alib::lox::detail::Domain::SetVerbosity | ( | int | loggerNo, |
| Verbosity | verbosity, | ||
| Priority | priority ) |
Sets the verbosity for a logger of this domain of all its subdomains to the specified value. If given priority is lower than those actually stored, nothing is set and recursion is stopped.
| loggerNo | The number of the Logger to set the Verbosity for. |
| verbosity | The verbosity value to set. |
| priority | The priority of the setting. |
Definition at line 204 of file domain.cpp.
| void alib::lox::detail::Domain::ToString | ( | NAString & | target | ) |
Creates a string representation of this object.
| target | The target string. |
Definition at line 228 of file domain.cpp.