GDCM 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

gdcmULConnectionCallback.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002  *
    00003  *  Copyright Insight Software Consortium
    00004  *
    00005  *  Licensed under the Apache License, Version 2.0 (the "License");
    00006  *  you may not use this file except in compliance with the License.
    00007  *  You may obtain a copy of the License at
    00008  *
    00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
    00010  *
    00011  *  Unless required by applicable law or agreed to in writing, software
    00012  *  distributed under the License is distributed on an "AS IS" BASIS,
    00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  *  See the License for the specific language governing permissions and
    00015  *  limitations under the License.
    00016  *
    00017  *=========================================================================*/
    00018 #ifndef GDCMULCONNECTIONCALLBACK_H
    00019 #define GDCMULCONNECTIONCALLBACK_H
    00020
    00021 #include "gdcmTypes.h" //to be able to export the class
    00022
    00023 namespace gdcm
    00024 {
    00025   class DataSet;
    00026   namespace network
    00027   {
    00039     class GDCM_EXPORT ULConnectionCallback {
    00040       bool mHandledDataSet;
    00041     protected:
    00042       //inherited callbacks MUST call this function for the cmove loop to work properly
    00043       void DataSetHandled() { mHandledDataSet = true; }
    00044     public:
    00045       ULConnectionCallback() { mHandledDataSet = false; }
    00046       ~ULConnectionCallback() {}; //placeholder for inherited objects
    00047       virtual void HandleDataSet(const DataSet& inDataSet) = 0;
    00048
    00049       bool DataSetHandles() const { return mHandledDataSet; }
    00050       void ResetHandledDataSet() { mHandledDataSet = false; }
    00051     };
    00052   }
    00053 }
    00054 #endif //GDCMULCONNECTIONCALLBACK_H