GDCM  2.4.5
gdcmUsage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: GDCM (Grassroots DICOM). A DICOM library
4 
5  Copyright (c) 2006-2011 Mathieu Malaterre
6  All rights reserved.
7  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 #ifndef GDCMUSAGE_H
15 #define GDCMUSAGE_H
16 
17 #include "gdcmTypes.h"
18 
19 #include <iostream>
20 
21 namespace gdcm
22 {
23 
49 {
50 public:
51  typedef enum {
52  Mandatory, // (see A.1.3.1) , abbreviated M
53  Conditional, // (see A.1.3.2) , abbreviated C
54  UserOption, // (see A.1.3.3) , abbreviated U
55  Invalid
56  } UsageType;
57 
58  Usage(UsageType type = Invalid) : UsageField(type) { }
59 
60  operator UsageType () const { return UsageField; }
61  friend std::ostream &operator<<(std::ostream &os, const Usage &vr);
62 
63  static const char *GetUsageString(UsageType type);
64  static UsageType GetUsageType(const char *type);
65 
66 private:
67  UsageType UsageField;
68 };
69 //-----------------------------------------------------------------------------
70 inline std::ostream &operator<<(std::ostream &_os, const Usage &val)
71 {
72  _os << Usage::GetUsageString(val.UsageField);
73  return _os;
74 }
75 
76 } // end namespace gdcm
77 
78 #endif //GDCMUSAGE_H
Definition: gdcmUsage.h:53
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
UsageType
Definition: gdcmUsage.h:51
Usage.
Definition: gdcmUsage.h:48
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition: gdcmDirectory.h:88
Definition: gdcmUsage.h:52
Definition: gdcmUsage.h:54
Definition: gdcmASN1.h:20
static const char * GetUsageString(UsageType type)
Usage(UsageType type=Invalid)
Definition: gdcmUsage.h:58

Generated on Fri Sep 25 2015 17:58:24 for GDCM by doxygen 1.8.9.1
SourceForge.net Logo