DCMTK Version 3.7.0 OFFIS DICOM Toolkit

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.
IODRules * | clone ()
| 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...
IODRule * | getByTag (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.
| IODRules (const IODRules &other)
| Copy constructor, performs deep copy. More...
IODRules & | operator= (const IODRules &other)
| Assignment operator, performs deep copy. More...

## 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.

## Constructor & Destructor Documentation

## ◆ IODRules()

IODRules::IODRules | ( | const IODRules & | other | ) |

Copy constructor, performs deep copy.

Parameters

  other | The other rule set to copy from

## Member Function Documentation

## ◆ addRule()

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

Adds rule to this rule set.

Parameters

  rule | The rule to add (ownership is transferred to this class)
  overwriteExisting | If 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

## ◆ begin()

iterator IODRules::begin | ( |  | ) |

Return iterator to first rule.

Returns
  Iterator to the first rule

## ◆ clone()

IODRules* IODRules::clone | ( |  | ) |

Returns deep copy of this object.

Returns
  Deep copy of "this" object

## ◆ deleteRule()

virtual OFBool IODRules::deleteRule | ( | const DcmTagKey | key | ) |
| virtual

Delete rule by given tag key.

Parameters

  key | Tag of the attribute rule to be deleted

Returns
  OFTrue if a rule could be found and deleted, OFFalse otherwise

## ◆ dump()

virtual void IODRules::dump | ( | STD_NAMESPACE ostream & | out | ) |
| virtual

Dump rules to stream, useful for debugging.

Parameters

  out | The stream to dump to

## ◆ end()

iterator IODRules::end | ( |  | ) |

Return iterator to last rule.

Returns
  Iterator to the last rule

## ◆ getByModule()

const OFVector<IODRule*> IODRules::getByModule | ( | const OFString & | moduleName | ) |

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

Parameters

  moduleName | The module name (e.g. "PatientModule")

Returns
  Vector with pointers to all the rules belonging to given module

## ◆ getByTag()

IODRule* IODRules::getByTag | ( | const DcmTagKey & | key | ) | const

Get a rule by its tag.

Parameters

  key | The tag to find the rule for

Returns
  The rule, if found, NULL otherwise

## ◆ operator=()

IODRules& IODRules::operator= | ( | const IODRules & | other | ) |

Assignment operator, performs deep copy.

Parameters

  other | The other rule set to copy from

Returns
  Reference to this object

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

- dcmiod/include/dcmtk/dcmiod/iodrules.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1