NCBI C++ ToolKit
|
Search Toolkit Book for CReportNode
#include "discrepancy_core.hpp"
(Private to src/misc/discrepancy
.)
Public Types | |
typedef map< string, CRef< CReportNode > > | TNodeMap |
Public Types inherited from CObject | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Member Functions | |
CReportNode ()=default | |
CReportNode (const string &name) | |
CReportNode & | Merge (CReportNode &other) |
CReportNode & | operator[] (const string &name) |
CReportNode & | Severity (CReportItem::ESeverity s) |
CReportNode & | Fatal () |
CReportNode & | Info () |
CReportNode & | Ext (bool b=true) |
CReportNode & | Summ (bool b=true) |
CReportNode & | NoRec (bool b=true) |
CReportNode & | Incr () |
bool | Exist (const string &name) const |
bool | Exist (CReportObj &obj) |
CReportNode & | Add (CReportObj &obj, bool unique=true) |
CReportNode & | Add (TReportObjectList &objs, bool unique=true) |
TReportObjectList & | GetObjects () |
TNodeMap & | GetMap () |
size_t | GetCount () const |
void | SetCount (size_t n) |
CRef< CReportItem > | Export (CDiscrepancyCore &test, bool unique=true) const |
void | Copy (CRef< CReportNode > other) |
bool | Promote () |
bool | empty () const |
void | clear () |
void | clearObjs () |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
Public Member Functions inherited from CDebugDumpable | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Static Public Member Functions | |
static bool | Exist (TReportObjectSet &hash, CReportObj &obj) |
static void | Add (TReportObjectList &list, TReportObjectSet &hash, CReportObj &obj, bool unique=true) |
static void | Add (TReportObjectList &list, TReportObjectSet &hash, TReportObjectList &objs, bool unique=true) |
Static Public Member Functions inherited from CObject | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
Static Public Member Functions inherited from CDebugDumpable | |
static void | EnableDebugDump (bool on) |
Protected Attributes | |
string | m_Name |
TNodeMap | m_Map |
TReportObjectList | m_Objs |
TReportObjectSet | m_Hash |
CReportItem::ESeverity | m_Severity { CReportItem::eSeverity_warning } |
bool | m_Autofix { false } |
bool | m_Ext { false } |
bool | m_Summ { false } |
bool | m_NoRec { false } |
size_t | m_Count { 0 } |
Additional Inherited Members | |
Static Public Attributes inherited from CObject | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 152 of file discrepancy_core.hpp.
typedef map<string, CRef<CReportNode> > CReportNode::TNodeMap |
Definition at line 155 of file discrepancy_core.hpp.
|
default |
Referenced by operator[]().
Definition at line 158 of file discrepancy_core.hpp.
|
inline |
|
static |
Definition at line 228 of file discrepancy_core.cpp.
Referenced by Add(), AddObjectToReport(), AddObjToQualMap(), AddUserObjectFieldItems(), CDiscrepancyGroup::Collect(), CopyNode(), Export(), FindSuspiciousNotePhrases(), CDiscrepancyCore::GetObjects(), CDiscrepancyVisitorImpl< _Name >::Summarize(), and x_CollectGroup().
|
static |
Definition at line 239 of file discrepancy_core.cpp.
References Add().
|
inline |
|
inline |
Definition at line 188 of file discrepancy_core.hpp.
References map_checker< Container >::clear(), set< Key, Compare >::clear(), m_Hash, m_Map, and m_Objs.
Referenced by AddUserObjectFieldItems().
|
inline |
Definition at line 189 of file discrepancy_core.hpp.
References m_Objs.
void CReportNode::Copy | ( | CRef< CReportNode > | other | ) |
|
inline |
Definition at line 187 of file discrepancy_core.hpp.
References map_checker< Container >::empty(), m_Map, and m_Objs.
Referenced by CDiscrepancyCore::Empty().
Definition at line 172 of file discrepancy_core.hpp.
References map_checker< Container >::end(), map_checker< Container >::find(), and m_Map.
|
inline |
Definition at line 173 of file discrepancy_core.hpp.
References Exist(), and m_Hash.
Referenced by Exist().
|
inlinestatic |
Definition at line 171 of file discrepancy_core.hpp.
Referenced by AddUserObjectFieldItems().
CRef< CReportItem > CReportNode::Export | ( | CDiscrepancyCore & | test, |
bool | unique = true |
||
) | const |
Definition at line 298 of file discrepancy_core.cpp.
References Add(), CReportItem::CanAutofix(), count, NStr::Find(), CReportItem::GetDetails(), CReportItem::GetSeverity(), CReportItem::GetUnit(), NStr::Int8ToString(), CDiscrepancyObject::m_Case, m_Count, m_Ext, m_Hash, m_Map, m_Name, m_NoRec, m_Objs, m_Severity, m_Summ, msg(), n, NPOS, NStr::ReplaceInPlace(), CRef< C, Locker >::Reset(), str(), test, and NStr::TruncateSpacesInPlace().
Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize(), and CDiscrepancyCore::xSummarize().
|
inline |
Definition at line 166 of file discrepancy_core.hpp.
Referenced by FindSuspiciousNotePhrases(), and CDiscrepancyVisitorImpl< _Name >::Summarize().
|
inline |
Definition at line 164 of file discrepancy_core.hpp.
References CReportItem::eSeverity_error, and m_Severity.
Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize().
|
inline |
Definition at line 181 of file discrepancy_core.hpp.
|
inline |
Definition at line 180 of file discrepancy_core.hpp.
References m_Map.
Referenced by AnalyzeField(), AnalyzeFieldReport(), ConvertDuplicates(), CopyNode(), GetNumOfObjects(), and CDiscrepancyVisitorImpl< _Name >::Summarize().
|
inline |
Definition at line 179 of file discrepancy_core.hpp.
References m_Objs.
Referenced by CopyNode(), and GetNumOfObjects().
|
inline |
Definition at line 169 of file discrepancy_core.hpp.
References m_Count.
Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize().
|
inline |
Definition at line 165 of file discrepancy_core.hpp.
References CReportItem::eSeverity_info, and m_Severity.
CReportNode & CReportNode::Merge | ( | CReportNode & | other | ) |
Definition at line 246 of file discrepancy_core.cpp.
References _ASSERT, m_Count, m_Hash, m_Map, m_Name, m_Objs, map_checker< Container >::size(), and set< Key, Compare >::size().
Referenced by CDiscrepancyCore::Merge().
|
inline |
Definition at line 168 of file discrepancy_core.hpp.
CReportNode & CReportNode::operator[] | ( | const string & | name | ) |
Definition at line 219 of file discrepancy_core.cpp.
References CReportNode(), m_Map, and Ref().
bool CReportNode::Promote | ( | ) |
Definition at line 287 of file discrepancy_core.cpp.
References map_checker< Container >::begin(), Copy(), m_Map, and map_checker< Container >::size().
|
inline |
Definition at line 182 of file discrepancy_core.hpp.
Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize().
|
inline |
Definition at line 163 of file discrepancy_core.hpp.
References m_Severity.
Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize().
|
inline |
Definition at line 167 of file discrepancy_core.hpp.
Definition at line 196 of file discrepancy_core.hpp.
Referenced by Copy().
|
protected |
Definition at line 200 of file discrepancy_core.hpp.
Referenced by Export(), GetCount(), Incr(), Merge(), and SetCount().
Definition at line 197 of file discrepancy_core.hpp.
|
protected |
|
protected |
|
protected |
Definition at line 191 of file discrepancy_core.hpp.
Definition at line 199 of file discrepancy_core.hpp.
|
protected |
Definition at line 193 of file discrepancy_core.hpp.
Referenced by Add(), clear(), clearObjs(), Copy(), empty(), Export(), GetCount(), GetObjects(), and Merge().
|
protected |
Definition at line 195 of file discrepancy_core.hpp.
Referenced by Copy(), Export(), Fatal(), Info(), and Severity().
Definition at line 198 of file discrepancy_core.hpp.