This file is indexed.

/usr/include/dcmtk/dcmsr/dsrstpl.h is in libdcmtk-dev 3.6.1~20150924-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
 *
 *  Copyright (C) 2015, J. Riesmeier, Oldenburg, Germany
 *  All rights reserved.  See COPYRIGHT file for details.
 *
 *  This software and supporting documentation are maintained by
 *
 *    OFFIS e.V.
 *    R&D Division Health
 *    Escherweg 2
 *    D-26121 Oldenburg, Germany
 *
 *
 *  Module: dcmsr
 *
 *  Author: Joerg Riesmeier
 *
 *  Purpose:
 *    classes: DSRSubTemplate
 *
 */


#ifndef DSRSTPL_H
#define DSRSTPL_H

#include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */

#include "dcmtk/dcmsr/dsrdoctr.h"
#include "dcmtk/dcmsr/dsrctpl.h"


/*---------------------*
 *  class declaration  *
 *---------------------*/

/** Class managing an SR document tree that is based on an arbitrary SR template.
 *  This class provides a more template-specific API than the general subtree class and
 *  should be used for non-root templates only.
 ** @note The main focus of this class currently lies in the creation of SR documents that
 *        are based on an SR non-root template.  Support for reading SR documents into the
 *        underlying structures might be added in the future.
 */
class DCMTK_DCMSR_EXPORT DSRSubTemplate
  : protected DSRDocumentSubTree,
    public DSRTemplateCommon
{

  public:

    /** constructor
     ** @param  templateIdentifier  identifier of the template
     *  @param  mappingResource     mapping resource that defines the template
     *  @param  mappingResourceUID  uniquely identifies the mapping resource (optional)
     */
    DSRSubTemplate(const OFString &templateIdentifier,
                   const OFString &mappingResource,
                   const OFString &mappingResourceUID = "");

    /** copy constructor.
     *  Also see notes on DSRDocumentSubTree's copy constructor.
     ** @param  subTemplate  template to be copied
     */
    DSRSubTemplate(const DSRSubTemplate &subTemplate);

    /** destructor
     */
    virtual ~DSRSubTemplate();

    /** clone this template.
     *  Internally, the copy constructor is used, so the corresponding comments apply.
     ** @return copy of this template
     */
    virtual DSRSubTemplate *clone() const;

    /** clone the internally stored subtree of this template.
     *  Internally, the copy constructor of DSRDocumentSubTree is used, so the corresponding
     *  comments apply.  In addition, the template identification is set for the root node
     *  of the cloned subtree (if applicable).
     ** @return copy of the internally stored subtree
     */
    virtual DSRDocumentSubTree *cloneTree() const;

    /** clear internal member variables.
     *  Also see notes on the clear() method of the base classes.
     */
    virtual void clear();

    /** check whether the current internal state is valid
     ** @return OFTrue if valid, OFFalse otherwise
     */
    virtual OFBool isValid() const;

    /** check whether this template is a root template, i.e.\ describes a complete SR
     *  document tree starting from the root node
     ** @return always returns OFFalse since this class handles non-root templates only
     */
    OFBool isRootTemplate() const
    {
        return OFFalse;
    }

    /** get read-only access to internally stored subtree.
     *  This method is not "const" because the template identification is set/updated
     *  automatically for the root node of the subtree (if applicable).
     ** @return get constant reference to internally stored subtree
     */
    virtual const DSRDocumentSubTree &getTree();

    /** insert tree from given template to internally stored subtree.
     *  If possible, this method adds a copy of the given tree to the current content item.
     *  However, in case this template is non-extensible, an error code will be returned.
     ** @param  subTemplate     template that contains the tree that should be inserted
     *  @param  addMode         flag specifying at which position to add the new subtree
     *                          (e.g. after or below the current node)
     *  @param  defaultRelType  default relationship type between the top-level nodes of
     *                          the given subtree and the current node.  This relationship
     *                          type is used if the one of a top-level node is "unknown".
     ** @return status, EC_Normal if successful, an error code otherwise
     */
    virtual OFCondition insertTemplate(const DSRSubTemplate &subTemplate,
                                       const E_AddMode addMode = AM_belowCurrent,
                                       const E_RelationshipType defaultRelType = RT_unknown);


  // --- introduce some methods from base class to public API

    using DSRDocumentSubTree::print;
    using DSRDocumentSubTree::countNodes;
    using DSRDocumentSubTree::gotoNamedNode;
    using DSRDocumentSubTree::gotoNextNamedNode;
    using DSRDocumentSubTree::gotoAnnotatedNode;
    using DSRDocumentSubTree::gotoNextAnnotatedNode;
    using DSRDocumentSubTree::getCurrentContentItem;


  protected:

    /** update the tree for subsequent output, e.g.\ for being printed or added to an SR
     *  document.  This function is called automatically by the affected output methods.
     */
    virtual void updateTreeForOutput();


  private:

 // --- declaration of default constructor and assignment operator

    DSRSubTemplate();
    DSRSubTemplate &operator=(const DSRSubTemplate &);
};


#endif