ArcGIS Procedural Runtime  3.2.10650
Builder.h
1 /*
2  COPYRIGHT (c) 2012-2024 Esri R&D Center Zurich
3  TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
4  Unpublished material - all rights reserved under the
5  Copyright Laws of the United States and applicable international
6  laws, treaties, and conventions.
7 
8  For additional information, contact:
9  Environmental Systems Research Institute, Inc.
10  Attn: Contracts and Legal Services Department
11  380 New York Street
12  Redlands, California, 92373
13  USA
14 
15  email: contracts@esri.com
16 */
17 
18 #ifndef BUILDER_H_
19 #define BUILDER_H_
20 
21 #include <string>
22 #include <memory>
23 
24 #ifdef _MSC_VER
25 # pragma warning(push)
26 # pragma warning(disable : 4275)
27 #endif
28 
29 
30 namespace prtx {
31 
32 
37 template<typename C> class Builder {
38 public:
39  Builder() = default;
40  Builder(const Builder&) = delete;
41  Builder& operator=(const Builder&) = delete;
42 
49  virtual C* create(std::wstring* warnings = 0) const = 0;
50 
57  virtual C* createAndReset(std::wstring* warnings = 0) = 0;
58 };
59 
60 
65 template<typename C> class SharedPtrBuilder {
66 public:
67  SharedPtrBuilder() = default;
68  SharedPtrBuilder(const SharedPtrBuilder&) = delete;
69  SharedPtrBuilder& operator=(const SharedPtrBuilder&) = delete;
70 
77  virtual std::shared_ptr<C> createShared(std::wstring* warnings = 0) const = 0;
78 
86  virtual std::shared_ptr<C> createSharedAndReset(std::wstring* warnings = 0) = 0;
87 };
88 
89 
90 } // namespace prtx
91 
92 
93 #ifdef _MSC_VER
94 # pragma warning(pop)
95 #endif
96 
97 
98 #endif /* BUILDER_H_ */
virtual C * create(std::wstring *warnings=0) const =0
Definition: Builder.h:65
The Procedural Runtime eXtension namespace. The prtx namespace contains the tools to extend the Proce...
Definition: AnnotationBuilder.h:35
virtual std::shared_ptr< C > createShared(std::wstring *warnings=0) const =0
virtual C * createAndReset(std::wstring *warnings=0)=0
Definition: Builder.h:37
virtual std::shared_ptr< C > createSharedAndReset(std::wstring *warnings=0)=0