CFx SDK Documentation
2026 SP0
Loading...
Searching...
No Matches
SDK
CFx
bim_ifc
BCFCommon
BcfCommon.h
Go to the documentation of this file.
1
2
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3
// All rights reserved.
4
//
5
// This software and its documentation and related materials are owned by
6
// the Alliance. The software may only be incorporated into application
7
// programs owned by members of the Alliance, subject to a signed
8
// Membership Agreement and Supplemental Software License Agreement with the
9
// Alliance. The structure and organization of this software are the valuable
10
// trade secrets of the Alliance and its suppliers. The software is also
11
// protected by copyright law and international treaty provisions. Application
12
// programs incorporating this software must include the following statement
13
// with their copyright notices:
14
//
15
// This application incorporates Open Design Alliance software pursuant to a license
16
// agreement with Open Design Alliance.
17
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18
// All rights reserved.
19
//
20
// By use of this software, its documentation or related materials, you
21
// acknowledge and accept the above terms.
23
24
#ifndef _BCF_COMMON_H
25
#define _BCF_COMMON_H
26
27
#include "
OdPlatformSettings.h
"
28
#include "
IfcBuildOptions.h
"
29
30
#include "
RxObject.h
"
31
#include "
SmartPtr.h
"
32
33
#include "
BcfUnset.h
"
34
38
namespace
OdBcf
{
39
40
#define MAX_ENTITY_COLLECTION_SIZE 1024
41
#define FILE_BUFFER_SIZE 1024
42
43
#define EXTENSIONS_FILE_NAME "extensions.xml"
44
#define VERSION_FILE_NAME "bcf.version"
45
#define DOCUMENT_FILE_NAME "documents.xml"
46
#define PROJECT_FILE_NAME "project.bcfp"
47
#define MARKUP_FILE_NAME "markup.bcf"
48
#define DEFAULT_VIEWPOINT_FILE_NAME "viewpoint.bcfv"
49
#define VIEWPOINT_FILE_EXTENSION "bcfv"
50
#define DEFAULT_SNAPSHOT_FILE_NAME "snapshot.png"
51
#define SNAPSHOT_FILE_EXTENSION "png"
52
#define DOCUMENT_FOLDER_NAME "Documents"
53
54
#define DECLARE_SET(MethodName, VariableType, VariableName) \
55
\
56
void set##MethodName(const VariableType &VariableName##Value);
57
58
#define DEFINE_SET(ClassName, MethodName, VariableType, VariableName) \
59
\
60
void ClassName::set##MethodName(const VariableType &VariableName##Value) \
61
{ \
62
VariableName = VariableName##Value; \
63
}
64
65
#define DECLARE_GET(MethodName, VariableType, VariableName) \
66
\
67
VariableType& get##MethodName();
68
69
#define DEFINE_GET(ClassName, MethodName, VariableType, VariableName) \
70
\
71
VariableType& ClassName::get##MethodName() \
72
{ \
73
return VariableName; \
74
}
75
76
#define DECLARE_CONST_ACCESSORS(MethodName, VariableType, VariableName) \
77
\
78
const VariableType& get##MethodName() const; \
79
\
80
bool is##MethodName##Unset() const;
81
82
#define DEFINE_CONST_ACCESSORS(ClassName, MethodName, VariableType, VariableName) \
83
\
84
const VariableType& ClassName::get##MethodName() const \
85
{ \
86
return VariableName; \
87
} \
88
\
89
bool ClassName::is##MethodName##Unset() const \
90
{ \
91
return OdBcf::Utils::isUnset(VariableName); \
92
}
93
94
#define DECLARE_ACCESSORS(MethodName, VariableType, VariableName) \
95
\
96
DECLARE_SET( MethodName, VariableType, VariableName) \
97
DECLARE_GET( MethodName, VariableType, VariableName) \
98
DECLARE_CONST_ACCESSORS(MethodName, VariableType, VariableName)
99
100
#define DEFINE_ACCESSORS(ClassName, MethodName, VariableType, VariableName) \
101
\
102
DEFINE_SET( ClassName, MethodName, VariableType, VariableName) \
103
DEFINE_GET( ClassName, MethodName, VariableType, VariableName) \
104
DEFINE_CONST_ACCESSORS(ClassName, MethodName, VariableType, VariableName)
105
106
#define INIT_RESULT(VariableName) \
107
\
108
OdResult VariableName##Local; \
109
if (VariableName == NULL) \
110
{ \
111
VariableName = &VariableName##Local; \
112
} \
113
*VariableName = eOk;
114
115
}
//namespace OdBcf
116
117
#endif
// _BCF_COMMON_H
BcfUnset.h
IfcBuildOptions.h
OdPlatformSettings.h
RxObject.h
SmartPtr.h
OdBcf
Definition
Bcf_2_1Archive.h:36
Generated on Tue Apr 15 2025 11:28:11