ArcGIS Procedural Runtime  3.2.10650
Shape.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 PRTX_SHAPE_H_
19 #define PRTX_SHAPE_H_
20 
21 #include "prtx/prtx.h"
22 #include "prtx/Attributable.h"
23 #include "prtx/Material.h"
24 #include "prtx/CGAError.h"
25 #include "prtx/TrimPlane.h"
26 #include "prtx/generated/BuiltinShapeAttributes.h"
27 
28 #include <memory>
29 
30 #ifdef _MSC_VER
31 # pragma warning(push)
32 # pragma warning (disable : 4251) // 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
33 #endif
34 
35 
36 namespace prtx {
37 
38 class Geometry;
39 using GeometryPtr = std::shared_ptr<Geometry>;
40 
41 class Shape;
42 
43 typedef std::shared_ptr<Shape> ShapePtr;
44 typedef std::vector<ShapePtr> ShapePtrVector;
45 
46 
190 class PRTX_EXPORTS_API Shape : public Attributable, public BuiltinShapeAttributes {
191 public:
192  // --- prtx::Attributable
193 
194  // --- BuiltinShapeAttributes : all accessible through Attributable interface
195  // with cga-name
196 
197  // --- non-cga shape attributes => simple types accessible through SPIIAttributable interface,
198  // with "." prefix
199 
203  virtual uint32_t getID() const = 0;
207  virtual uint32_t getParentID() const = 0;
215  virtual GeometryPtr getGeometry() const = 0;
224  virtual MaterialPtr getMaterial() const = 0;
225 
229  virtual const CGAErrorPtrVector& getCGAErrors() const = 0;
233  virtual const std::wstring& getCGAPrint() const = 0;
234 
235  // reporting
236  typedef std::pair<StringPtr, bool> ReportBool;
237  typedef std::pair<StringPtr, double> ReportFloat;
238  typedef std::pair<StringPtr, StringPtr> ReportString;
239  typedef std::vector<ReportBool> ReportBoolVect;
240  typedef std::vector<ReportFloat> ReportFloatVect;
241  typedef std::vector<ReportString> ReportStringVect;
242 
246  virtual const ReportBoolVect& getCGAReportsBool() const = 0;
250  virtual const ReportFloatVect& getCGAReportsFloat() const = 0;
254  virtual const ReportStringVect& getCGAReportsString() const = 0;
255 
256 
264  virtual int64_t getShapeSymbol() const = 0;
272  virtual const TrimPlanePtrVector& getTrimPlanes() const = 0;
273 
274 
275 protected:
276  Shape() {}
277  virtual ~Shape() {}
278 };
279 
280 
281 } // namespace prtx
282 
283 #ifdef _MSC_VER
284 # pragma warning(pop)
285 #endif
286 
287 
288 #endif /* SPI_SHAPE_H_ */
std::vector< TrimPlanePtr > TrimPlanePtrVector
vector of shared TrimPlane pointers
Definition: TrimPlane.h:36
Definition: /Attributable.h:37
std::shared_ptr< Material > MaterialPtr
shared Material pointer
Definition: DataBackend.h:45
The Procedural Runtime eXtension namespace. The prtx namespace contains the tools to extend the Proce...
Definition: AnnotationBuilder.h:35
std::shared_ptr< Geometry > GeometryPtr
shared Geometry pointer
Definition: DebugUtils.h:37
std::vector< ShapePtr > ShapePtrVector
vector of shared pointers to Shape
Definition: Shape.h:44
std::shared_ptr< Shape > ShapePtr
shared pointer to a Shape
Definition: Shape.h:41
Definition: BuiltinShapeAttributes.h:41
Definition: Shape.h:190