Loading...
Searching...
No Matches
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.
iterator | begin ()
| Return iterator to first rule.
iterator | end ()
| Return iterator to last rule.
virtual OFBool | addRule (IODRule *rule, const OFBool overwriteExisting=OFFalse)
| Adds rule to this rule set.
virtual OFBool | deleteRule (const DcmTagKey key)
| Delete rule by given tag key.
const OFVector< IODRule * > | getByModule (const OFString &moduleName)
| Get all rules that are marked belonging to a specific module.
IODRule * | getByTag (const DcmTagKey &key) const
| Get a rule by its tag.
virtual void | clear ()
| Clear all rules.
virtual void | dump (STD_NAMESPACE ostream &out)
| Dump rules to stream, useful for debugging.
virtual | ~IODRules ()
| Destructor.
| IODRules (const IODRules &other)
| Copy constructor, performs deep copy.
IODRules & | operator= (const IODRules &other)
| Assignment operator, performs deep copy.

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

References IODRules().

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

References IODRules().

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

References IODRules().

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

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

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0