gdcmUsage.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMUSAGE_H
#define GDCMUSAGE_H
#include "gdcmTypes.h"
#include <iostream>
namespace gdcm
{
class GDCM_EXPORT Usage
{
public:
typedef enum {
Mandatory, // (see A.1.3.1) , abbreviated M
Conditional, // (see A.1.3.2) , abbreviated C
UserOption, // (see A.1.3.3) , abbreviated U
Invalid
} UsageType;
Usage(UsageType type = Invalid) : UsageField(type) { }
operator UsageType () const { return UsageField; }
friend std::ostream &operator<<(std::ostream &os, const Usage &vr);
static const char *GetUsageString(UsageType type);
static UsageType GetUsageType(const char *type);
private:
UsageType UsageField;
};
//-----------------------------------------------------------------------------
inline std::ostream &operator<<(std::ostream &_os, const Usage &val)
{
_os << Usage::GetUsageString(val.UsageField);
return _os;
}
} // end namespace gdcm
#endif //GDCMUSAGE_H
gdcm::Usage
Usage.
Definition gdcmUsage.h:49
gdcm::Usage::GetUsageType
static UsageType GetUsageType(const char *type)
gdcm::Usage::UsageType
UsageType
Definition gdcmUsage.h:51
gdcm::Usage::Invalid
@ Invalid
Definition gdcmUsage.h:55
gdcm::Usage::Mandatory
@ Mandatory
Definition gdcmUsage.h:52
gdcm::Usage::UserOption
@ UserOption
Definition gdcmUsage.h:54
gdcm::Usage::Conditional
@ Conditional
Definition gdcmUsage.h:53
gdcm::Usage::GetUsageString
static const char * GetUsageString(UsageType type)
gdcm::Usage::Usage
Usage(UsageType type=Invalid)
Definition gdcmUsage.h:58
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21
gdcm::operator<<
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88