dccfrsmp.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmnet
00019  *
00020  *  Author:  Marco Eichelberg
00021  *
00022  *  Purpose: 
00023  *    class DcmRoleSelectionItem
00024  *    class DcmRoleSelectionMap
00025  *
00026  *  Last Update:      $Author: meichel $
00027  *  Update Date:      $Date: 2005/12/08 16:02:13 $
00028  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h,v $
00029  *  CVS/RCS Revision: $Revision: 1.3 $
00030  *  Status:           $State: Exp $
00031  *
00032  *  CVS/RCS Log at end of file
00033  *
00034  */
00035 
00036 #ifndef DCCFRSMP_H
00037 #define DCCFRSMP_H
00038 
00039 #include "dcmtk/config/osconfig.h"
00040 #include "dcmtk/ofstd/oflist.h"   /* for class OFList<> */
00041 #include "dcmtk/ofstd/ofcond.h"   /* for class OFCondition */
00042 #include "dcmtk/dcmnet/dcmsmap.h"  /* for class DcmSimpleMap<> */
00043 #include "dcmtk/dcmnet/dccfuidh.h" /* for class DcmUIDHandler */
00044 #include "dcmtk/dcmnet/assoc.h"    /* for T_ASC_SC_ROLE */
00045 
00046 class DcmPresentationContextMap;
00047 
00051 class DcmRoleSelectionItem
00052 {
00053 public:
00058   DcmRoleSelectionItem(
00059     T_ASC_SC_ROLE role,
00060     const DcmUIDHandler& abstractSyntax );
00061 
00063   DcmRoleSelectionItem(const DcmRoleSelectionItem& arg);
00064  
00066   ~DcmRoleSelectionItem();
00067 
00073   OFBool matches(const DcmUIDHandler& arg) const
00074   {
00075     return arg == uid_;
00076   }
00077 
00082   const DcmUIDHandler& getAbstractSyntax() const
00083   {
00084     return uid_;
00085   }
00086 
00089   T_ASC_SC_ROLE getRole() const
00090   {
00091     return role_;
00092   } 
00093 
00098   OFBool operator==(const DcmRoleSelectionItem& arg) const
00099   {
00100     return (role_ == arg.role_) && (uid_ == arg.uid_); 
00101   }
00102 
00103 private:
00104 
00106   DcmRoleSelectionItem& operator=(const DcmRoleSelectionItem& arg);
00107 
00109   T_ASC_SC_ROLE role_;
00110 
00112   DcmUIDHandler uid_;
00113 };
00114 
00115 
00119 typedef OFList<DcmRoleSelectionItem> DcmRoleSelectionList;
00120 
00124 class DcmRoleSelectionMap
00125 {
00126 public:
00128   DcmRoleSelectionMap();
00129 
00131   ~DcmRoleSelectionMap();
00132 
00141   OFCondition add(
00142     const char *key,
00143     const char *abstractSyntaxUID,
00144     T_ASC_SC_ROLE role);
00145 
00150   OFBool isKnownKey(const char *key) const;
00151 
00160   OFCondition checkConsistency(
00161     const char *key, 
00162     const DcmPresentationContextMap& pclist,
00163     const char *pckey) const;
00164 
00169   const DcmRoleSelectionList *getRoleSelectionList(const char *key) const;
00170 
00171 private:
00173   DcmRoleSelectionMap(const DcmRoleSelectionMap& arg);
00174 
00176   DcmRoleSelectionMap& operator=(const DcmRoleSelectionMap& arg);
00177 
00179   DcmSimpleMap<DcmRoleSelectionList *> map_;
00180 
00181 };
00182 
00183 #endif
00184 
00185 /*
00186  * CVS/RCS Log
00187  * $Log: dccfrsmp.h,v $
00188  * Revision 1.3  2005/12/08 16:02:13  meichel
00189  * Changed include path schema for all DCMTK header files
00190  *
00191  * Revision 1.2  2003/06/18 08:16:16  meichel
00192  * Added comparison operators to keep MSVC5 compiler happy
00193  *
00194  * Revision 1.1  2003/06/10 14:27:33  meichel
00195  * Initial release of class DcmAssociationConfiguration and support
00196  *   classes. This class maintains a list of association negotiation
00197  *   profiles that can be addressed by symbolic keys. The profiles may
00198  *   be read from a configuration file.
00199  *
00200  *
00201  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5