NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | List of all members
CComment_rule Class Reference

Represents ASN.1 type Comment-rule defined in file valid.asn

Search Toolkit Book for CComment_rule

#include <objects/valid/Comment_rule.hpp>

+ Inheritance diagram for CComment_rule:
+ Collaboration diagram for CComment_rule:

Public Types

typedef pair< CField_rule::TSeverity, stringTError
 
typedef vector< TErrorTErrorList
 
- Public Types inherited from CComment_rule_Base
enum class  E_memberIndex {
  e__allMandatory = 0 , e_prefix , e_updated , e_fields ,
  e_require_order , e_allow_unlisted , e_dependent_rules , e_forbidden_phrases
}
 
typedef string TPrefix
 
typedef bool TUpdated
 
typedef CField_set TFields
 
typedef bool TRequire_order
 
typedef bool TAllow_unlisted
 
typedef CDependent_field_set TDependent_rules
 
typedef CPhrase_list TForbidden_phrases
 
typedef Tparent::CMemberIndex< E_memberIndex, 8 > TmemberIndex
 
- 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

 CComment_rule (void)
 
 ~CComment_rule (void)
 
CConstRef< CField_ruleFindFieldRuleRef (const string &field_name) const
 
TErrorList IsValid (const CUser_object &user) const
 
void CheckFieldValue (CConstRef< CField_rule > field_rule, const string &value, TErrorList &errors) const
 
void CheckFieldValue (CConstRef< CField_rule > rule, const CUser_field &field, TErrorList &errors) const
 
bool ReorderFields (CUser_object &user) const
 
- Public Member Functions inherited from CComment_rule_Base
 CComment_rule_Base (void)
 
virtual ~CComment_rule_Base (void)
 
 DECLARE_INTERNAL_TYPE_INFO ()
 
bool IsSetPrefix (void) const
 Check if a value has been assigned to Prefix data member. More...
 
bool CanGetPrefix (void) const
 Check if it is safe to call GetPrefix method. More...
 
void ResetPrefix (void)
 Reset Prefix data member. More...
 
const TPrefixGetPrefix (void) const
 Get the Prefix member data. More...
 
void SetPrefix (const TPrefix &value)
 Assign a value to Prefix data member. More...
 
void SetPrefix (TPrefix &&value)
 
TPrefixSetPrefix (void)
 Assign a value to Prefix data member. More...
 
bool IsSetUpdated (void) const
 Check if a value has been assigned to Updated data member. More...
 
bool CanGetUpdated (void) const
 Check if it is safe to call GetUpdated method. More...
 
void ResetUpdated (void)
 Reset Updated data member. More...
 
void SetDefaultUpdated (void)
 Assign default value to Updated data member. More...
 
TUpdated GetUpdated (void) const
 Get the Updated member data. More...
 
void SetUpdated (TUpdated value)
 Assign a value to Updated data member. More...
 
TUpdatedSetUpdated (void)
 Assign a value to Updated data member. More...
 
bool IsSetFields (void) const
 Check if a value has been assigned to Fields data member. More...
 
bool CanGetFields (void) const
 Check if it is safe to call GetFields method. More...
 
void ResetFields (void)
 Reset Fields data member. More...
 
const TFieldsGetFields (void) const
 Get the Fields member data. More...
 
void SetFields (TFields &value)
 Assign a value to Fields data member. More...
 
TFieldsSetFields (void)
 Assign a value to Fields data member. More...
 
bool IsSetRequire_order (void) const
 Check if a value has been assigned to Require_order data member. More...
 
bool CanGetRequire_order (void) const
 Check if it is safe to call GetRequire_order method. More...
 
void ResetRequire_order (void)
 Reset Require_order data member. More...
 
void SetDefaultRequire_order (void)
 Assign default value to Require_order data member. More...
 
TRequire_order GetRequire_order (void) const
 Get the Require_order member data. More...
 
void SetRequire_order (TRequire_order value)
 Assign a value to Require_order data member. More...
 
TRequire_orderSetRequire_order (void)
 Assign a value to Require_order data member. More...
 
bool IsSetAllow_unlisted (void) const
 Check if a value has been assigned to Allow_unlisted data member. More...
 
bool CanGetAllow_unlisted (void) const
 Check if it is safe to call GetAllow_unlisted method. More...
 
void ResetAllow_unlisted (void)
 Reset Allow_unlisted data member. More...
 
void SetDefaultAllow_unlisted (void)
 Assign default value to Allow_unlisted data member. More...
 
TAllow_unlisted GetAllow_unlisted (void) const
 Get the Allow_unlisted member data. More...
 
void SetAllow_unlisted (TAllow_unlisted value)
 Assign a value to Allow_unlisted data member. More...
 
TAllow_unlistedSetAllow_unlisted (void)
 Assign a value to Allow_unlisted data member. More...
 
bool IsSetDependent_rules (void) const
 Check if a value has been assigned to Dependent_rules data member. More...
 
bool CanGetDependent_rules (void) const
 Check if it is safe to call GetDependent_rules method. More...
 
void ResetDependent_rules (void)
 Reset Dependent_rules data member. More...
 
const TDependent_rulesGetDependent_rules (void) const
 Get the Dependent_rules member data. More...
 
void SetDependent_rules (TDependent_rules &value)
 Assign a value to Dependent_rules data member. More...
 
TDependent_rulesSetDependent_rules (void)
 Assign a value to Dependent_rules data member. More...
 
bool IsSetForbidden_phrases (void) const
 Check if a value has been assigned to Forbidden_phrases data member. More...
 
bool CanGetForbidden_phrases (void) const
 Check if it is safe to call GetForbidden_phrases method. More...
 
void ResetForbidden_phrases (void)
 Reset Forbidden_phrases data member. More...
 
const TForbidden_phrasesGetForbidden_phrases (void) const
 Get the Forbidden_phrases member data. More...
 
void SetForbidden_phrases (TForbidden_phrases &value)
 Assign a value to Forbidden_phrases data member. More...
 
TForbidden_phrasesSetForbidden_phrases (void)
 Assign a value to Forbidden_phrases data member. More...
 
virtual void Reset (void)
 Reset the whole object. More...
 
- Public Member Functions inherited from CSerialObject
 CSerialObject (void)
 
virtual ~CSerialObject (void)
 
virtual const CTypeInfoGetThisTypeInfo (void) const =0
 
virtual void Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive)
 Set object to copy of another one. More...
 
virtual bool Equals (const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
 Check if both objects contain the same values. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
void ThrowUnassigned (TMemberIndex index) const
 
void ThrowUnassigned (TMemberIndex index, const char *file_name, int file_line) const
 
bool HasNamespaceName (void) const
 Check if object data type has namespace name. More...
 
const stringGetNamespaceName (void) const
 Get namespace name. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (void) const
 Get namespace prefix. More...
 
- 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...
 
- 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 void NormalizePrefix (string &prefix)
 
static bool IsStructuredComment (const CUser_object &user)
 
static string GetStructuredCommentPrefix (const CUser_object &user, bool normalize=true)
 
static string MakePrefixFromRoot (const string &root)
 
static string MakeSuffixFromRoot (const string &root)
 
static string KeywordForPrefix (const string &prefix)
 
static string PrefixForKeyword (const string &keyword)
 
static vector< stringGetKeywordList ()
 
static void CheckGeneralFieldValue (const string &value, TErrorList &errors)
 
static void CheckGeneralFieldName (const string &label, TErrorList &errors)
 
static void CheckGeneralField (const CUser_field &field, TErrorList &errors)
 
static TErrorList CheckGeneralStructuredComment (const CUser_object &user)
 
- Static Public Member Functions inherited from CSerialObject
static void SetVerifyDataThread (ESerialVerifyData verify)
 
static void SetVerifyDataGlobal (ESerialVerifyData verify)
 
static string UnassignedString (void)
 
static CStringUTF8 UnassignedStringUTF8 (void)
 
static char UnassignedByte (void)
 
- 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)
 

Private Types

typedef CComment_rule_Base Tparent
 

Private Member Functions

 CComment_rule (const CComment_rule &value)
 
CComment_ruleoperator= (const CComment_rule &value)
 

Additional Inherited Members

- Static Public Attributes inherited from CSerialObject
static const char * ms_UnassignedStr = "<*unassigned*>"
 
static const char ms_UnassignedByte = char(0xcd)
 
- 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 55 of file Comment_rule.hpp.

Member Typedef Documentation

◆ TError

Definition at line 75 of file Comment_rule.hpp.

◆ TErrorList

Definition at line 76 of file Comment_rule.hpp.

◆ Tparent

Definition at line 57 of file Comment_rule.hpp.

Constructor & Destructor Documentation

◆ CComment_rule() [1/2]

CComment_rule::CComment_rule ( void  )
inline

Definition at line 97 of file Comment_rule.hpp.

◆ ~CComment_rule()

CComment_rule::~CComment_rule ( void  )

Definition at line 59 of file Comment_rule.cpp.

◆ CComment_rule() [2/2]

CComment_rule::CComment_rule ( const CComment_rule value)
private

Member Function Documentation

◆ CheckFieldValue() [1/2]

void CComment_rule::CheckFieldValue ( CConstRef< CField_rule field_rule,
const string value,
TErrorList errors 
) const

◆ CheckFieldValue() [2/2]

void CComment_rule::CheckFieldValue ( CConstRef< CField_rule rule,
const CUser_field field,
TErrorList errors 
) const

◆ CheckGeneralField()

void CComment_rule::CheckGeneralField ( const CUser_field field,
TErrorList errors 
)
static

◆ CheckGeneralFieldName()

void CComment_rule::CheckGeneralFieldName ( const string label,
TErrorList errors 
)
static

◆ CheckGeneralFieldValue()

void CComment_rule::CheckGeneralFieldValue ( const string value,
TErrorList errors 
)
static

Definition at line 216 of file Comment_rule.cpp.

References eSeverity_level_reject, NStr::Find(), and rapidjson::value.

Referenced by CheckFieldValue(), and CheckGeneralField().

◆ CheckGeneralStructuredComment()

CComment_rule::TErrorList CComment_rule::CheckGeneralStructuredComment ( const CUser_object user)
static

◆ FindFieldRuleRef()

CConstRef< CField_rule > CComment_rule::FindFieldRuleRef ( const string field_name) const

Definition at line 191 of file Comment_rule.cpp.

References NStr::Equal(), Get(), CComment_rule_Base::GetFields(), and ITERATE.

Referenced by IsAppropriateRule(), and IsValid().

◆ GetKeywordList()

vector< string > CComment_rule::GetKeywordList ( )
static

◆ GetStructuredCommentPrefix()

string CComment_rule::GetStructuredCommentPrefix ( const CUser_object user,
bool  normalize = true 
)
static

◆ IsStructuredComment()

bool CComment_rule::IsStructuredComment ( const CUser_object user)
static

◆ IsValid()

CComment_rule::TErrorList CComment_rule::IsValid ( const CUser_object user) const

◆ KeywordForPrefix()

string CComment_rule::KeywordForPrefix ( const string prefix)
static

◆ MakePrefixFromRoot()

string CComment_rule::MakePrefixFromRoot ( const string root)
static

◆ MakeSuffixFromRoot()

string CComment_rule::MakeSuffixFromRoot ( const string root)
static

◆ NormalizePrefix()

void CComment_rule::NormalizePrefix ( string prefix)
static

◆ operator=()

CComment_rule& CComment_rule::operator= ( const CComment_rule value)
private

◆ PrefixForKeyword()

string CComment_rule::PrefixForKeyword ( const string keyword)
static

◆ ReorderFields()

bool CComment_rule::ReorderFields ( CUser_object user) const

The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:09:46 2024 by modify_doxy.py rev. 669887