GDCM 2.2.1

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

- File List
- File Members

gdcmPDUFactory.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef GDCMPDUFACTORY_H
19 #define GDCMPDUFACTORY_H
20
21 #include "gdcmTypes.h"
22 #include "gdcmNetworkEvents.h"
23 #include "gdcmULConnection.h"
24 #include "gdcmPresentationDataValue.h"
25
26 namespace gdcm{
27 class BaseRootQuery;
28 class File;
29 namespace network{
30 class BasePDU;
31
37 class PDUFactory {
38 public:
39 static BasePDU* ConstructPDU(uint8_t itemtype);//eventually needs to be smartpointer'd
40 static EEventID DetermineEventByPDU(const BasePDU* inPDU);
41 static BasePDU* ConstructReleasePDU();
42 static BasePDU* ConstructAbortPDU();
43
44 //these are the composite PDU construction methods for the PDataPDUs.
45 //basically, builds a pdatapdu, and then puts the appropriate information in
46 //for the appropriate composite service (c-echo, c-find, c-store, c-get, c-move)
47 //the connection is necessary to construct the stream of PDVs that will
48 //be then placed into the vector of PDUs
49 static std::vector<BasePDU*> CreateCEchoPDU(const ULConnection& inConnection);
50 static std::vector<BasePDU*> CreateCStoreRQPDU(const ULConnection& inConnection, const File &file);
51 static std::vector<BasePDU*> CreateCStoreRSPPDU(const DataSet *inDataSet, const BasePDU* inPC);
52 static std::vector<BasePDU*> CreateCFindPDU(const ULConnection& inConnection, const BaseRootQuery* inRootQuery);
53 static std::vector<BasePDU*> CreateCMovePDU(const ULConnection& inConnection, const BaseRootQuery* inRootQuery);
54
55 //given data pdus, produce the presentation data values stored within.
56 //all operations have these as the payload of the data sending operation
57 //however, echo does not have a dataset in the pdv.
58 static std::vector<PresentationDataValue> GetPDVs(const std::vector<BasePDU*> & inDataPDUs);
59 };
60 }
61 }
62 #endif //GDCMPDUFACTORY_H