/usr/include/dcmtk/dcmsr/dsrtnant.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 | /*
*
* 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: DSRTreeNodeAnnotation
*
*/
#ifndef DSRTNANT_H
#define DSRTNANT_H
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "dcmtk/ofstd/ofstring.h"
#include "dcmtk/dcmsr/dsdefine.h"
#include "dcmtk/dcmsr/dsrtypes.h"
/** Base class for tree node annotations.
* Currently, this class supports textual annotations only.
*/
class DSRTreeNodeAnnotation
{
public:
/** (default) constructor
** @param text optional character string that should be set as the initial value
* of the annotation text
*/
DSRTreeNodeAnnotation(const OFString &text = OFString())
: Text(text)
{
}
/** destructor
*/
virtual ~DSRTreeNodeAnnotation()
{
}
/** conversion operator that returns the currently stored annotation text
*/
operator const OFString &() const
{
return Text;
}
/** comparison operator.
* Two annotations are equal, if the internally stored character strings (text)
* have the same value.
** @param annotation annotation which should be compared to the current one
** @return OFTrue if both annotations are equal, OFFalse otherwise
*/
OFBool operator==(const DSRTreeNodeAnnotation &annotation) const
{
return (Text == annotation.Text);
}
/** comparison operator.
* Two annotations are not equal, if the internally stored character strings
* (text) have different values.
** @param annotation annotation which should be compared to the current one
** @return OFTrue if both annotations are not equal, OFFalse otherwise
*/
OFBool operator!=(const DSRTreeNodeAnnotation &annotation) const
{
return (Text != annotation.Text);
}
/** clear the currently stored annotation text
*/
inline void clear()
{
Text.clear();
}
/** check whether the annotation is empty, i.e.\ whether the internally stored
* character string (text) has an empty value
** @return OFTrue if the annotation is empty, OFFalse otherwise
*/
inline OFBool isEmpty() const
{
return Text.empty();
}
/** get annotation text, i.e.\ the internally stored character string
** @return internally stored character string (text), might be empty
*/
inline const OFString &getText() const
{
return Text;
}
/** set annotation text, i.e.\ the internally stored character string
** @param text character string that should be set as the current value of the
* annotation text. Use an empty string ("") to delete the value.
*/
inline void setText(const OFString &text)
{
Text = text;
}
private:
/// internally stored character strings (text)
OFString Text;
};
#endif
|