Classes | |
struct | KitchenSink |
struct | MessageLoggerSpigot |
struct | MessageLoggerScribe |
class | MessageLoggerQ |
struct | MessageSender |
Functions | |
MessageLogger Design Glossary KitchenSink Initializes certain static lifetime entities which need to be around before any subtantive code in | main () is done.Instantiated at the begining of main() |
goes out of scope only when it makes | it (tells it to) go away.Concpetually a destructible singleton |
MessageLoggerQ * | messageLoggerQ () |
void | messageLoggerScribe () |
MessageSender | LogWarning (const char *id) |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of | operator<< ().It passes a and b on to its internal ErrorObj in the obvious manner.h) At the end of the statement issuing the message |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is | sent (<<) to that error logger.Thus the message is formated and comes out in all the destinations--in this case just cerr--attached to the logger.n) At the end of the LOG case |
Variables | |
a pre services activity issues a LogError("id") f LogWarning is a free | function |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the | heap |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This | ErrorObj |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via | new |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender | instead |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is the auto_ptr goes out of | scope |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on | command |
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on the buffer is replaced into the pool Since dontDie remains | true |
Definition at line 14 of file MessageLoggerDesign.txt.
MessageSender LogWarning | ( | const char * | id | ) |
Definition at line 172 of file MessageLoggerDesign.txt.
MessageLogger Design Glossary KitchenSink Initializes certain static lifetime entities which need to be around before any subtantive code in main | ( | ) |
MessageLoggerQ* messageLoggerQ | ( | ) |
Definition at line 63 of file MessageLoggerDesign.txt.
void messageLoggerScribe | ( | ) |
Definition at line 88 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of operator<< | ( | ) |
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is sent | ( | << | ) |
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on command |
Definition at line 246 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This ErrorObj |
Definition at line 209 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free function |
Definition at line 177 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the heap |
Definition at line 209 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender instead |
Definition at line 209 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via new |
Definition at line 209 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is the auto_ptr goes out of scope |
Definition at line 246 of file MessageLoggerDesign.txt.
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on the buffer is replaced into the pool Since dontDie remains true |
Definition at line 246 of file MessageLoggerDesign.txt.