1 /* 2 * 3 * Copyright (C) 1993-2010, OFFIS e.V. 4 * All rights reserved. See COPYRIGHT file for details. 5 * 6 * This software and supporting documentation were developed by 7 * 8 * OFFIS e.V. 9 * R&D Division Health 10 * Escherweg 2 11 * D-26121 Oldenburg, Germany 12 * 13 * 14 * Module: dcmqrdb 15 * 16 * Author: Marco Eichelberg 17 * 18 * Purpose: class DcmQueryRetrieveDatabaseStatus 19 * 20 */ 21 22 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 23 #include "dcmtk/dcmqrdb/dcmqrdbs.h" 24 #include "dcmtk/dcmdata/dcdatset.h" /* for class DcmDataset */ 25 26 #define INCLUDE_CSTDDEF 27 #include "dcmtk/ofstd/ofstdinc.h" 28 29 DcmQueryRetrieveDatabaseStatus(Uint16 s)30DcmQueryRetrieveDatabaseStatus::DcmQueryRetrieveDatabaseStatus(Uint16 s) 31 : status_(s) 32 , statusDetail_(NULL) 33 { 34 } 35 DcmQueryRetrieveDatabaseStatus(const DcmQueryRetrieveDatabaseStatus & org)36DcmQueryRetrieveDatabaseStatus::DcmQueryRetrieveDatabaseStatus(const DcmQueryRetrieveDatabaseStatus& org) 37 : status_(org.status_) 38 , statusDetail_(NULL) 39 { 40 if (org.statusDetail_) statusDetail_ = OFstatic_cast(DcmDataset *, org.statusDetail_->clone()); 41 } 42 ~DcmQueryRetrieveDatabaseStatus()43DcmQueryRetrieveDatabaseStatus::~DcmQueryRetrieveDatabaseStatus() 44 { 45 delete statusDetail_; 46 } 47 operator =(const DcmQueryRetrieveDatabaseStatus & org)48DcmQueryRetrieveDatabaseStatus& DcmQueryRetrieveDatabaseStatus::operator=(const DcmQueryRetrieveDatabaseStatus& org) 49 { 50 if (this != &org) 51 { 52 status_ = org.status_; 53 if (org.statusDetail_ != statusDetail_) 54 { 55 delete statusDetail_; 56 if (org.statusDetail_) statusDetail_ = OFstatic_cast(DcmDataset *, org.statusDetail_->clone()); else statusDetail_ = NULL; 57 } 58 } 59 return *this; 60 } 61 deleteStatusDetail()62void DcmQueryRetrieveDatabaseStatus::deleteStatusDetail() 63 { 64 delete statusDetail_; 65 statusDetail_ = NULL; 66 } 67 extractStatusDetail()68DcmDataset *DcmQueryRetrieveDatabaseStatus::extractStatusDetail() 69 { 70 DcmDataset *result = statusDetail_; 71 statusDetail_ = NULL; 72 return result; 73 } 74