dcmnet/include/dcmtk/dcmnet/dccfpcmp.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 DcmPresentationContextItem
00020  *    class DcmPresentationContextMap
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 DCCFPCMP_H
00032 #define DCCFPCMP_H
00033 
00034 #include "dcmtk/config/osconfig.h"
00035 #include "dcmtk/ofstd/oflist.h"   /* for class OFList<> */
00036 #include "dcmtk/ofstd/ofstring.h" /* for class OFString */
00037 #include "dcmtk/ofstd/ofcond.h"   /* for class OFCondition */
00038 #include "dcmtk/dcmnet/dcmsmap.h"  /* for class DcmSimpleMap<> */
00039 #include "dcmtk/dcmnet/dccfuidh.h" /* for class DcmUIDHandler */
00040 
00041 
00045 class DcmPresentationContextItem
00046 {
00047 public:
00052   DcmPresentationContextItem(
00053     const DcmUIDHandler& abstractSyntax,
00054     const OFString& xferSyntaxGroup );
00055 
00057   DcmPresentationContextItem(const DcmPresentationContextItem& arg);
00058  
00060   ~DcmPresentationContextItem();
00061 
00067   OFBool matches(const DcmUIDHandler& arg) const
00068   {
00069     return arg == uid_;
00070   }
00071 
00075   const char *getAbstractSyntax() const
00076   {
00077     return uid_.c_str();
00078   }
00079 
00084   const char *getTransferSyntaxKey() const
00085   {
00086     return xferSyntaxGroup_.c_str();
00087   }
00088 
00093   OFBool operator==(const DcmPresentationContextItem& arg) const
00094   {
00095     return (uid_ == arg.uid_) && (xferSyntaxGroup_ == arg.xferSyntaxGroup_); 
00096   }
00097 
00098 private:
00099 
00101   DcmPresentationContextItem& operator=(const DcmPresentationContextItem& arg);
00102 
00104   DcmUIDHandler uid_;
00105 
00107   OFString xferSyntaxGroup_;
00108 };
00109 
00110 
00114 typedef OFList<DcmPresentationContextItem> DcmPresentationContextList;
00115 
00116 
00120 class DcmPresentationContextMap
00121 {
00122 public:
00124   DcmPresentationContextMap();
00125 
00127   ~DcmPresentationContextMap();
00128 
00137   OFCondition add(
00138     const char *key,
00139     const char *abstractSyntaxUID,
00140     const char *transferSyntaxKey);
00141 
00146   OFBool isKnownKey(const char *key) const;
00147 
00154   OFBool isKnownAbstractSyntax(const char *key, const DcmUIDHandler& abstractSyntax) const;
00155 
00160   const DcmPresentationContextList *getPresentationContextList(const char *key) const;
00161 
00162 private:
00164   DcmPresentationContextMap(const DcmPresentationContextMap& arg);
00165 
00167   DcmPresentationContextMap& operator=(const DcmPresentationContextMap& arg);
00168 
00170   DcmSimpleMap<DcmPresentationContextList *> map_;
00171 
00172 };
00173 
00174 #endif
00175 
00176 /*
00177  * CVS/RCS Log
00178  * $Log: dccfpcmp.h,v $
00179  * Revision 1.4  2010-10-14 13:17:22  joergr
00180  * Updated copyright header. Added reference to COPYRIGHT file.
00181  *
00182  * Revision 1.3  2005/12/08 16:02:11  meichel
00183  * Changed include path schema for all DCMTK header files
00184  *
00185  * Revision 1.2  2003/06/18 08:16:16  meichel
00186  * Added comparison operators to keep MSVC5 compiler happy
00187  *
00188  * Revision 1.1  2003/06/10 14:27:33  meichel
00189  * Initial release of class DcmAssociationConfiguration and support
00190  *   classes. This class maintains a list of association negotiation
00191  *   profiles that can be addressed by symbolic keys. The profiles may
00192  *   be read from a configuration file.
00193  *
00194  *
00195  */


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