Class MHO_Snapshot.
More...
#include <MHO_Snapshot.hh>
|
| MHO_Snapshot (MHO_Snapshot &&)=delete |
|
| MHO_Snapshot (MHO_Snapshot const &)=delete |
|
void | AcceptAllKeys () |
| Sets the internal flag to accept all keys. More...
|
|
void | AddKey (const char *key) |
| Inserts a key into the set of keys for MHO_Snapshot. More...
|
|
void | AddKey (const std::string &key) |
| Inserts a key into the set of keys for MHO_Snapshot. More...
|
|
template<typename XObjType > |
void | DumpObject (XObjType *obj, const char *key, const char *name) |
| Dumps an object of type XObjType to a file specified by key and name. More...
|
|
template<typename XObjType > |
void | DumpObject (XObjType *obj, std::string key, std::string name) |
| Dumps an object of type XObjType to a file specified by key and name. More...
|
|
template<typename XObjType > |
void | DumpObject (XObjType *obj, std::string key, std::string name, std::string file, int line) |
| Dumps an object to a file with given key, name, file and line number. More...
|
|
void | LimitToKeySet () |
| Sets internal flag to limit keys based on key set. More...
|
|
MHO_Snapshot & | operator= (MHO_Snapshot &&)=delete |
|
MHO_Snapshot & | operator= (MHO_Snapshot const &)=delete |
|
void | RemoveAllKeys () |
| Clears all keys in the MHO_Snapshot object. More...
|
|
void | RemoveKey (const char *key) |
| Removes a key-value pair from the MHO_Snapshot object if it exists. More...
|
|
void | RemoveKey (const std::string &key) |
| Removes a key-value pair from the MHO_Snapshot object's keys. More...
|
|
void | SetExecutableName (const char *exe_name) |
| Setter for executable name. More...
|
|
void | SetExecutableName (std::string exe_name) |
| Setter for executable name. More...
|
|
Class MHO_Snapshot.
MHO_Snapshot – a debugging tool to dump an object to a snapshot file. Uses the singleton pattern (dumps to only one file)
- Author
- J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
- Date
- Sun Apr 2 17:06:41 2023 -0400
◆ MHO_Snapshot() [1/2]
◆ MHO_Snapshot() [2/2]
◆ AcceptAllKeys()
void hops::MHO_Snapshot::AcceptAllKeys |
( |
| ) |
|
|
inline |
Sets the internal flag to accept all keys.
◆ AddKey() [1/2]
void hops::MHO_Snapshot::AddKey |
( |
const char * |
key | ) |
|
Inserts a key into the set of keys for MHO_Snapshot.
- Parameters
-
key | The key to be inserted. |
◆ AddKey() [2/2]
void hops::MHO_Snapshot::AddKey |
( |
const std::string & |
key | ) |
|
Inserts a key into the set of keys for MHO_Snapshot.
- Parameters
-
key | The key to be inserted. |
◆ DumpObject() [1/3]
template<typename XObjType >
void hops::MHO_Snapshot::DumpObject |
( |
XObjType * |
obj, |
|
|
const char * |
key, |
|
|
const char * |
name |
|
) |
| |
|
inline |
Dumps an object of type XObjType to a file specified by key and name.
- Parameters
-
obj | Pointer to object of type XObjType |
key | Key as a null-terminated string |
name | Name as a null-terminated string |
- Returns
- No return value (void)
◆ DumpObject() [2/3]
template<typename XObjType >
void hops::MHO_Snapshot::DumpObject |
( |
XObjType * |
obj, |
|
|
std::string |
key, |
|
|
std::string |
name |
|
) |
| |
|
inline |
Dumps an object of type XObjType to a file specified by key and name.
- Parameters
-
obj | Pointer to the object of type XObjType to be dumped |
key | Key used to construct the filename for dumping snapshots |
name | Name used to construct the filename for dumping snapshots |
- Returns
- void
◆ DumpObject() [3/3]
template<typename XObjType >
void hops::MHO_Snapshot::DumpObject |
( |
XObjType * |
obj, |
|
|
std::string |
key, |
|
|
std::string |
name, |
|
|
std::string |
file, |
|
|
int |
line |
|
) |
| |
|
inline |
Dumps an object to a file with given key, name, file and line number.
- Template Parameters
-
XObjType | Template parameter XObjType |
- Parameters
-
obj | Pointer to the object of type XObjType to be dumped |
key | Unique identifier for the object as a string |
name | Name or label associated with the object as a string |
file | File path where the object is being dumped (not used in this implementation) |
line | Line number where the dump occurs (not used in this implementation) |
◆ GetInstance()
provides public access to the only static instance
- Returns
- Reference to the singleton instance of MHO_Snapshot.
- Note
- This is a static function.
◆ LimitToKeySet()
void hops::MHO_Snapshot::LimitToKeySet |
( |
| ) |
|
|
inline |
Sets internal flag to limit keys based on key set.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ RemoveAllKeys()
void hops::MHO_Snapshot::RemoveAllKeys |
( |
| ) |
|
◆ RemoveKey() [1/2]
void hops::MHO_Snapshot::RemoveKey |
( |
const char * |
key | ) |
|
Removes a key-value pair from the MHO_Snapshot object if it exists.
- Parameters
-
key | Key to be removed from the snapshot |
◆ RemoveKey() [2/2]
void hops::MHO_Snapshot::RemoveKey |
( |
const std::string & |
key | ) |
|
Removes a key-value pair from the MHO_Snapshot object's keys.
- Parameters
-
key | Key to be removed; must exist in fKeys |
◆ SetExecutableName() [1/2]
void hops::MHO_Snapshot::SetExecutableName |
( |
const char * |
exe_name | ) |
|
|
inline |
Setter for executable name.
- Parameters
-
exe_name | New executable name to set |
◆ SetExecutableName() [2/2]
void hops::MHO_Snapshot::SetExecutableName |
( |
std::string |
exe_name | ) |
|
|
inline |
Setter for executable name.
- Parameters
-
exe_name | New executable name to set |
The documentation for this class was generated from the following files: