CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxBIMProperty.h
Go to the documentation of this file.
1//
2// (C) Copyright 2020-2023 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "FxBIM.h"
20
21class CFxBIMPropertyImpl;
22class CFxBIMProperty;
23typedef std::shared_ptr< CFxBIMProperty > CFxBIMPropertyPtr;
24
25#include <RxVariant.h>
26#include <DbObjectId.h>
27
28#include <vector>
29
30enum class PropertyType : OdInt8
31{
33
34 eLength = 1,
35 eArea = 2,
36 eVolume = 3,
37
38 eCount = 6,
39 eWeight = 7,
40 eTime = 8,
41};
42
44{
45 friend class CFxBIMPropertyImpl;
46public:
47 virtual ~CFxBIMProperty();
48
50 const OdString& group,
51 const OdString& label,
52 const OdVariant& value,
53 const PropertyType type = PropertyType::eDimensionless );
54
55public:
56 static OdString ToString( const OdVariant& value );
57
58 OdString Group() const;
59 OdString Label() const;
62
64 void SetDescription( const OdString& description );
65
66protected:
68
69protected:
70 std::shared_ptr< CFxBIMPropertyImpl > m_pImpl;
71};
72
74{
75public:
76 virtual ~CFxBIMPropertiesContainter() = default;
77 virtual OdDbObjectId OwnerId() const = 0;
78 virtual std::vector< CFxBIMPropertyPtr >& Properties() = 0;
79 virtual std::map< OdString, CFxBIMPropertyPtr >& DerivedProperties() = 0;
80
81 virtual OdVariant Property( const OdString& group, const OdString& label ) const = 0;
82 virtual CFxBIMPropertyPtr GetProperty( const OdString& group, const OdString& label ) const = 0;
83
84protected:
86};
#define FXBIM_API
Definition: FxBIM.h:20
#define FXBIM_COMMON_CODE_API
Definition: FxBIM.h:21
PropertyType
Definition: FxBIMProperty.h:31
std::shared_ptr< CFxBIMProperty > CFxBIMPropertyPtr
Definition: FxBIMProperty.h:23
signed char OdInt8
virtual OdDbObjectId OwnerId() const =0
virtual CFxBIMPropertyPtr GetProperty(const OdString &group, const OdString &label) const =0
virtual std::map< OdString, CFxBIMPropertyPtr > & DerivedProperties()=0
virtual std::vector< CFxBIMPropertyPtr > & Properties()=0
virtual ~CFxBIMPropertiesContainter()=default
CFxBIMPropertiesContainter()=default
virtual OdVariant Property(const OdString &group, const OdString &label) const =0
OdString Description() const
static CFxBIMPropertyPtr Create(OdDbDatabase *pDb, const OdString &group, const OdString &label, const OdVariant &value, const PropertyType type=PropertyType::eDimensionless)
const PropertyType & PropertyTypeValue() const
OdString Label() const
void SetDescription(const OdString &description)
OdVariant Value() const
OdString Group() const
static OdString ToString(const OdVariant &value)
std::shared_ptr< CFxBIMPropertyImpl > m_pImpl
Definition: FxBIMProperty.h:70
virtual ~CFxBIMProperty()
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLsizei const GLfloat * value
Definition: gles2_ext.h:302