NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
CReportNode Class Reference

Search Toolkit Book for CReportNode

#include "discrepancy_core.hpp"
(Private to src/misc/discrepancy.)

+ Inheritance diagram for CReportNode:
+ Collaboration diagram for CReportNode:

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< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CReportNode ()=default
 
 CReportNode (const string &name)
 
CReportNodeMerge (CReportNode &other)
 
CReportNodeoperator[] (const string &name)
 
CReportNodeSeverity (CReportItem::ESeverity s)
 
CReportNodeFatal ()
 
CReportNodeInfo ()
 
CReportNodeExt (bool b=true)
 
CReportNodeSumm (bool b=true)
 
CReportNodeNoRec (bool b=true)
 
CReportNodeIncr ()
 
bool Exist (const string &name) const
 
bool Exist (CReportObj &obj)
 
CReportNodeAdd (CReportObj &obj, bool unique=true)
 
CReportNodeAdd (TReportObjectList &objs, bool unique=true)
 
TReportObjectListGetObjects ()
 
TNodeMapGetMap ()
 
size_t GetCount () const
 
void SetCount (size_t n)
 
CRef< CReportItemExport (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...
 
CObjectoperator= (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...
 

Detailed Description

Definition at line 152 of file discrepancy_core.hpp.

Member Typedef Documentation

◆ TNodeMap

Definition at line 155 of file discrepancy_core.hpp.

Constructor & Destructor Documentation

◆ CReportNode() [1/2]

CReportNode::CReportNode ( )
default

Referenced by operator[]().

◆ CReportNode() [2/2]

CReportNode::CReportNode ( const string name)
inline

Definition at line 158 of file discrepancy_core.hpp.

Member Function Documentation

◆ Add() [1/4]

CReportNode& CReportNode::Add ( CReportObj obj,
bool  unique = true 
)
inline

Definition at line 175 of file discrepancy_core.hpp.

References Add(), m_Hash, and m_Objs.

Referenced by Add().

◆ Add() [2/4]

void CReportNode::Add ( TReportObjectList list,
TReportObjectSet hash,
CReportObj obj,
bool  unique = true 
)
static

◆ Add() [3/4]

void CReportNode::Add ( TReportObjectList list,
TReportObjectSet hash,
TReportObjectList objs,
bool  unique = true 
)
static

Definition at line 239 of file discrepancy_core.cpp.

References Add().

◆ Add() [4/4]

CReportNode& CReportNode::Add ( TReportObjectList objs,
bool  unique = true 
)
inline

Definition at line 177 of file discrepancy_core.hpp.

References Add(), m_Hash, and m_Objs.

Referenced by Add().

◆ clear()

void CReportNode::clear ( void  )
inline

◆ clearObjs()

void CReportNode::clearObjs ( )
inline

Definition at line 189 of file discrepancy_core.hpp.

References m_Objs.

◆ Copy()

void CReportNode::Copy ( CRef< CReportNode other)

Definition at line 274 of file discrepancy_core.cpp.

References m_Autofix, m_Ext, m_Hash, m_Map, m_NoRec, m_Objs, m_Severity, and m_Summ.

Referenced by Promote().

◆ empty()

bool CReportNode::empty ( void  ) const
inline

Definition at line 187 of file discrepancy_core.hpp.

References map_checker< Container >::empty(), m_Map, and m_Objs.

Referenced by CDiscrepancyCore::Empty().

◆ Exist() [1/3]

bool CReportNode::Exist ( const string name) const
inline

◆ Exist() [2/3]

bool CReportNode::Exist ( CReportObj obj)
inline

Definition at line 173 of file discrepancy_core.hpp.

References Exist(), and m_Hash.

Referenced by Exist().

◆ Exist() [3/3]

static bool CReportNode::Exist ( TReportObjectSet hash,
CReportObj obj 
)
inlinestatic

Definition at line 171 of file discrepancy_core.hpp.

Referenced by AddUserObjectFieldItems().

◆ Export()

CRef< CReportItem > CReportNode::Export ( CDiscrepancyCore test,
bool  unique = true 
) const

◆ Ext()

CReportNode& CReportNode::Ext ( bool  b = true)
inline

Definition at line 166 of file discrepancy_core.hpp.

References b, and m_Ext.

Referenced by FindSuspiciousNotePhrases(), and CDiscrepancyVisitorImpl< _Name >::Summarize().

◆ Fatal()

CReportNode& CReportNode::Fatal ( )
inline

◆ GetCount()

size_t CReportNode::GetCount ( void  ) const
inline

Definition at line 181 of file discrepancy_core.hpp.

References m_Count, and m_Objs.

◆ GetMap()

TNodeMap& CReportNode::GetMap ( void  )
inline

◆ GetObjects()

TReportObjectList& CReportNode::GetObjects ( void  )
inline

Definition at line 179 of file discrepancy_core.hpp.

References m_Objs.

Referenced by CopyNode(), and GetNumOfObjects().

◆ Incr()

CReportNode& CReportNode::Incr ( )
inline

Definition at line 169 of file discrepancy_core.hpp.

References m_Count.

Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize().

◆ Info()

CReportNode& CReportNode::Info ( void  )
inline

Definition at line 165 of file discrepancy_core.hpp.

References CReportItem::eSeverity_info, and m_Severity.

◆ Merge()

CReportNode & CReportNode::Merge ( CReportNode other)

◆ NoRec()

CReportNode& CReportNode::NoRec ( bool  b = true)
inline

Definition at line 168 of file discrepancy_core.hpp.

References b, and m_NoRec.

◆ operator[]()

CReportNode & CReportNode::operator[] ( const string name)

Definition at line 219 of file discrepancy_core.cpp.

References CReportNode(), m_Map, and Ref().

◆ Promote()

bool CReportNode::Promote ( )

◆ SetCount()

void CReportNode::SetCount ( size_t  n)
inline

Definition at line 182 of file discrepancy_core.hpp.

References m_Count, and n.

Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize().

◆ Severity()

CReportNode& CReportNode::Severity ( CReportItem::ESeverity  s)
inline

Definition at line 163 of file discrepancy_core.hpp.

References m_Severity.

Referenced by CDiscrepancyVisitorImpl< _Name >::Summarize().

◆ Summ()

CReportNode& CReportNode::Summ ( bool  b = true)
inline

Definition at line 167 of file discrepancy_core.hpp.

References b, and m_Summ.

Member Data Documentation

◆ m_Autofix

bool CReportNode::m_Autofix { false }
protected

Definition at line 196 of file discrepancy_core.hpp.

Referenced by Copy().

◆ m_Count

size_t CReportNode::m_Count { 0 }
protected

Definition at line 200 of file discrepancy_core.hpp.

Referenced by Export(), GetCount(), Incr(), Merge(), and SetCount().

◆ m_Ext

bool CReportNode::m_Ext { false }
protected

Definition at line 197 of file discrepancy_core.hpp.

Referenced by Copy(), Export(), and Ext().

◆ m_Hash

TReportObjectSet CReportNode::m_Hash
protected

Definition at line 194 of file discrepancy_core.hpp.

Referenced by Add(), clear(), Copy(), Exist(), Export(), and Merge().

◆ m_Map

TNodeMap CReportNode::m_Map
protected

Definition at line 192 of file discrepancy_core.hpp.

Referenced by clear(), Copy(), empty(), Exist(), Export(), GetMap(), Merge(), operator[](), and Promote().

◆ m_Name

string CReportNode::m_Name
protected

Definition at line 191 of file discrepancy_core.hpp.

Referenced by Export(), and Merge().

◆ m_NoRec

bool CReportNode::m_NoRec { false }
protected

Definition at line 199 of file discrepancy_core.hpp.

Referenced by Copy(), Export(), and NoRec().

◆ m_Objs

TReportObjectList CReportNode::m_Objs
protected

Definition at line 193 of file discrepancy_core.hpp.

Referenced by Add(), clear(), clearObjs(), Copy(), empty(), Export(), GetCount(), GetObjects(), and Merge().

◆ m_Severity

CReportItem::ESeverity CReportNode::m_Severity { CReportItem::eSeverity_warning }
protected

Definition at line 195 of file discrepancy_core.hpp.

Referenced by Copy(), Export(), Fatal(), Info(), and Severity().

◆ m_Summ

bool CReportNode::m_Summ { false }
protected

Definition at line 198 of file discrepancy_core.hpp.

Referenced by Copy(), Export(), and Summ().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:44 2024 by modify_doxy.py rev. 669887