DCMTK  Version 3.6.1 20170228
OFFIS DICOM Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
IODRules Class Reference

Class representing rules for a set of DICOM attributes, e.g. for all attributes of a module, macro or the like. More...

Public Types

typedef OFMap< DcmTagKey,
IODRule * >::iterator 
iterator
 iterator type to iterate over rule set
 
typedef OFMap< DcmTagKey,
IODRule * >::const_iterator 
const_iterator
 const iterator type to iterate over rule set
 

Public Member Functions

 IODRules ()
 Constructor.
 
IODRulesclone ()
 Returns deep copy of this object. More...
 
iterator begin ()
 Return iterator to first rule. More...
 
iterator end ()
 Return iterator to last rule. More...
 
virtual OFBool addRule (IODRule *rule, const OFBool overwriteExisting=OFFalse)
 Adds rule to this rule set. More...
 
virtual OFBool deleteRule (const DcmTagKey key)
 Delete rule by given tag key. More...
 
const OFVector< IODRule * > getByModule (const OFString &moduleName)
 Get all rules that are marked belonging to a specific module. More...
 
IODRulegetByTag (const DcmTagKey &key) const
 Get a rule by its tag. More...
 
virtual void clear ()
 Clear all rules.
 
virtual void dump (STD_NAMESPACE ostream &out)
 Dump rules to stream, useful for debugging. More...
 
virtual ~IODRules ()
 Destructor.
 

Private Attributes

OFMap< DcmTagKey, IODRule * > m_Rules
 Map that holds all rules, accessible by their tag key.
 

Detailed Description

Class representing rules for a set of DICOM attributes, e.g. for all attributes of a module, macro or the like.

At the moment attributes within sequences are not yet supported.

Member Function Documentation

virtual OFBool IODRules::addRule ( IODRule rule,
const OFBool  overwriteExisting = OFFalse 
)
virtual

Adds rule to this rule set.

Parameters
ruleThe rule to add (ownership is transferred to this class)
overwriteExistingIf OFTrue (default), an existing rule for the same attribute (tag) is overwritten, otherwise the rule is not taken over (and ownership stays with caller)
Returns
OFTrue if rule could be added, error otherwise
iterator IODRules::begin ( )

Return iterator to first rule.

Returns
Iterator to the first rule
IODRules* IODRules::clone ( )

Returns deep copy of this object.

Returns
Deep copy of "this" object
virtual OFBool IODRules::deleteRule ( const DcmTagKey  key)
virtual

Delete rule by given tag key.

Parameters
keyTag of the attribute rule to be deleted
Returns
OFTrue if a rule could be found and deleted, OFFalse otherwise
virtual void IODRules::dump ( STD_NAMESPACE ostream &  out)
virtual

Dump rules to stream, useful for debugging.

Parameters
outThe stream to dump to
iterator IODRules::end ( )

Return iterator to last rule.

Returns
Iterator to the last rule
const OFVector<IODRule*> IODRules::getByModule ( const OFString moduleName)

Get all rules that are marked belonging to a specific module.

Parameters
moduleNameThe module name (e.g. "PatientModule")
Returns
Vector with pointers to all the rules belonging to given module
IODRule* IODRules::getByTag ( const DcmTagKey key) const

Get a rule by its tag.

Parameters
keyThe tag to find the rule for
Returns
The rule, if found, NULL otherwise

The documentation for this class was generated from the following file:


Generated on Tue Feb 28 2017 for DCMTK Version 3.6.1 20170228 by Doxygen 1.8.8