dcmnet/include/dcmtk/dcmnet/dccfrsmp.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module:  dcmnet
00015  *
00016  *  Author:  Marco Eichelberg
00017  *
00018  *  Purpose: 
00019  *    class DcmRoleSelectionItem
00020  *    class DcmRoleSelectionMap
00021  *
00022  *  Last Update:      $Author: joergr $
00023  *  Update Date:      $Date: 2010-10-14 13:17:22 $
00024  *  CVS/RCS Revision: $Revision: 1.4 $
00025  *  Status:           $State: Exp $
00026  *
00027  *  CVS/RCS Log at end of file
00028  *
00029  */
00030 
00031 #ifndef DCCFRSMP_H
00032 #define DCCFRSMP_H
00033 
00034 #include "dcmtk/config/osconfig.h"
00035 #include "dcmtk/ofstd/oflist.h"   /* for class OFList<> */
00036 #include "dcmtk/ofstd/ofcond.h"   /* for class OFCondition */
00037 #include "dcmtk/dcmnet/dcmsmap.h"  /* for class DcmSimpleMap<> */
00038 #include "dcmtk/dcmnet/dccfuidh.h" /* for class DcmUIDHandler */
00039 #include "dcmtk/dcmnet/assoc.h"    /* for T_ASC_SC_ROLE */
00040 
00041 class DcmPresentationContextMap;
00042 
00046 class DcmRoleSelectionItem
00047 {
00048 public:
00053   DcmRoleSelectionItem(
00054     T_ASC_SC_ROLE role,
00055     const DcmUIDHandler& abstractSyntax );
00056 
00058   DcmRoleSelectionItem(const DcmRoleSelectionItem& arg);
00059  
00061   ~DcmRoleSelectionItem();
00062 
00068   OFBool matches(const DcmUIDHandler& arg) const
00069   {
00070     return arg == uid_;
00071   }
00072 
00077   const DcmUIDHandler& getAbstractSyntax() const
00078   {
00079     return uid_;
00080   }
00081 
00084   T_ASC_SC_ROLE getRole() const
00085   {
00086     return role_;
00087   } 
00088 
00093   OFBool operator==(const DcmRoleSelectionItem& arg) const
00094   {
00095     return (role_ == arg.role_) && (uid_ == arg.uid_); 
00096   }
00097 
00098 private:
00099 
00101   DcmRoleSelectionItem& operator=(const DcmRoleSelectionItem& arg);
00102 
00104   T_ASC_SC_ROLE role_;
00105 
00107   DcmUIDHandler uid_;
00108 };
00109 
00110 
00114 typedef OFList<DcmRoleSelectionItem> DcmRoleSelectionList;
00115 
00119 class DcmRoleSelectionMap
00120 {
00121 public:
00123   DcmRoleSelectionMap();
00124 
00126   ~DcmRoleSelectionMap();
00127 
00136   OFCondition add(
00137     const char *key,
00138     const char *abstractSyntaxUID,
00139     T_ASC_SC_ROLE role);
00140 
00145   OFBool isKnownKey(const char *key) const;
00146 
00155   OFCondition checkConsistency(
00156     const char *key, 
00157     const DcmPresentationContextMap& pclist,
00158     const char *pckey) const;
00159 
00164   const DcmRoleSelectionList *getRoleSelectionList(const char *key) const;
00165 
00166 private:
00168   DcmRoleSelectionMap(const DcmRoleSelectionMap& arg);
00169 
00171   DcmRoleSelectionMap& operator=(const DcmRoleSelectionMap& arg);
00172 
00174   DcmSimpleMap<DcmRoleSelectionList *> map_;
00175 
00176 };
00177 
00178 #endif
00179 
00180 /*
00181  * CVS/RCS Log
00182  * $Log: dccfrsmp.h,v $
00183  * Revision 1.4  2010-10-14 13:17:22  joergr
00184  * Updated copyright header. Added reference to COPYRIGHT file.
00185  *
00186  * Revision 1.3  2005/12/08 16:02:13  meichel
00187  * Changed include path schema for all DCMTK header files
00188  *
00189  * Revision 1.2  2003/06/18 08:16:16  meichel
00190  * Added comparison operators to keep MSVC5 compiler happy
00191  *
00192  * Revision 1.1  2003/06/10 14:27:33  meichel
00193  * Initial release of class DcmAssociationConfiguration and support
00194  *   classes. This class maintains a list of association negotiation
00195  *   profiles that can be addressed by symbolic keys. The profiles may
00196  *   be read from a configuration file.
00197  *
00198  *
00199  */


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1