Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMUSAGE_H
00016 #define GDCMUSAGE_H
00017
00018 #include "gdcmTypes.h"
00019
00020 #include <iostream>
00021
00022 namespace gdcm
00023 {
00024
00049 class GDCM_EXPORT Usage
00050 {
00051 public:
00052 typedef enum {
00053 Mandatory,
00054 Conditional,
00055 UserOption,
00056 Invalid
00057 } UsageType;
00058
00059 Usage(UsageType type = Invalid) : UsageField(type) { }
00060
00061 operator UsageType () const { return UsageField; }
00062 friend std::ostream &operator<<(std::ostream &os, const Usage &vr);
00063
00064 static const char *GetUsageString(UsageType type);
00065 static UsageType GetUsageType(const char *type);
00066
00067 private:
00068 UsageType UsageField;
00069 };
00070
00071 inline std::ostream &operator<<(std::ostream &_os, const Usage &val)
00072 {
00073 _os << Usage::GetUsageString(val.UsageField);
00074 return _os;
00075 }
00076
00077 }
00078
00079 #endif //GDCMUSAGE_H