Unify IfcParse's dllimport/export macros with IfcGeom.

This commit is contained in:
Stinkfist0
2016-07-20 22:49:32 +03:00
parent 3a507ca061
commit 6d6e7c2982
24 changed files with 2544 additions and 2544 deletions
+1 -1
View File
@@ -449,7 +449,7 @@ endforeach()
set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES}) set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
add_library(IfcParse ${IFCPARSE_FILES}) add_library(IfcParse ${IFCPARSE_FILES})
set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIfcParse_EXPORTS) set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIFC_PARSE_EXPORTS)
IF(UNICODE_SUPPORT) IF(UNICODE_SUPPORT)
TARGET_LINK_LIBRARIES(IfcParse ${ICU_LIBRARIES} ${Boost_LIBRARIES}) TARGET_LINK_LIBRARIES(IfcParse ${ICU_LIBRARIES} ${Boost_LIBRARIES})
+22 -22
View File
@@ -26,7 +26,7 @@ header = """
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include "../ifcparse/IfcParse_Export.h" #include "../ifcparse/ifc_parse_api.h"
#include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcUtil.h"
#include "../ifcparse/IfcException.h" #include "../ifcparse/IfcException.h"
@@ -64,7 +64,7 @@ enum_header = """
#ifndef %(schema_name_upper)sENUM_H #ifndef %(schema_name_upper)sENUM_H
#define %(schema_name_upper)sENUM_H #define %(schema_name_upper)sENUM_H
#include "../ifcparse/IfcParse_Export.h" #include "../ifcparse/ifc_parse_api.h"
#include <boost/optional.hpp> #include <boost/optional.hpp>
@@ -76,10 +76,10 @@ namespace Type {
typedef enum { typedef enum {
%(types)s, UNDEFINED %(types)s, UNDEFINED
} Enum; } Enum;
IfcParse_EXPORT boost::optional<Enum> Parent(Enum v); IFC_PARSE_API boost::optional<Enum> Parent(Enum v);
IfcParse_EXPORT Enum FromString(const std::string& s); IFC_PARSE_API Enum FromString(const std::string& s);
IfcParse_EXPORT std::string ToString(Enum v); IFC_PARSE_API std::string ToString(Enum v);
IfcParse_EXPORT bool IsSimple(Enum v); IFC_PARSE_API bool IsSimple(Enum v);
} }
} }
@@ -93,24 +93,24 @@ lb_header = """
#define IfcSchema %(schema_name)s #define IfcSchema %(schema_name)s
#include "../ifcparse/IfcParse_Export.h" #include "../ifcparse/ifc_parse_api.h"
#include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcUtil.h"
#include "../ifcparse/IfcEntityDescriptor.h" #include "../ifcparse/IfcEntityDescriptor.h"
#include "../ifcparse/IfcWritableEntity.h" #include "../ifcparse/IfcWritableEntity.h"
namespace %(schema_name)s { namespace %(schema_name)s {
namespace Type { namespace Type {
IfcParse_EXPORT int GetAttributeCount(Enum t); IFC_PARSE_API int GetAttributeCount(Enum t);
IfcParse_EXPORT int GetAttributeIndex(Enum t, const std::string& a); IFC_PARSE_API int GetAttributeIndex(Enum t, const std::string& a);
IfcParse_EXPORT IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a); IFC_PARSE_API IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a);
IfcParse_EXPORT Enum GetAttributeEntity(Enum t, unsigned char a); IFC_PARSE_API Enum GetAttributeEntity(Enum t, unsigned char a);
IfcParse_EXPORT const std::string& GetAttributeName(Enum t, unsigned char a); IFC_PARSE_API const std::string& GetAttributeName(Enum t, unsigned char a);
IfcParse_EXPORT bool GetAttributeOptional(Enum t, unsigned char a); IFC_PARSE_API bool GetAttributeOptional(Enum t, unsigned char a);
IfcParse_EXPORT bool GetAttributeDerived(Enum t, unsigned char a); IFC_PARSE_API bool GetAttributeDerived(Enum t, unsigned char a);
IfcParse_EXPORT std::pair<const char*, int> GetEnumerationIndex(Enum t, const std::string& a); IFC_PARSE_API std::pair<const char*, int> GetEnumerationIndex(Enum t, const std::string& a);
IfcParse_EXPORT std::pair<Enum, unsigned> GetInverseAttribute(Enum t, const std::string& a); IFC_PARSE_API std::pair<Enum, unsigned> GetInverseAttribute(Enum t, const std::string& a);
IfcParse_EXPORT std::set<std::string> GetInverseAttributeNames(Enum t); IFC_PARSE_API std::set<std::string> GetInverseAttributeNames(Enum t);
IfcParse_EXPORT void PopulateDerivedFields(IfcWrite::IfcWritableEntity* e); IFC_PARSE_API void PopulateDerivedFields(IfcWrite::IfcWritableEntity* e);
}} }}
#endif #endif
@@ -357,7 +357,7 @@ derived_field_statement = ' {std::set<int> idxs; %(statements)sderived_map[Ty
derived_field_statement_attrs = 'idxs.insert(%d); ' derived_field_statement_attrs = 'idxs.insert(%d); '
simpletype = """%(documentation)s simpletype = """%(documentation)s
class IfcParse_EXPORT %(name)s : public %(superclass)s { class IFC_PARSE_API %(name)s : public %(superclass)s {
public: public:
virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const; virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const;
virtual Argument* getArgument(unsigned int i) const; virtual Argument* getArgument(unsigned int i) const;
@@ -390,13 +390,13 @@ typedef IfcUtil::IfcBaseClass %(name)s;
enumeration = """namespace %(name)s { enumeration = """namespace %(name)s {
%(documentation)s %(documentation)s
typedef enum {%(values)s} %(name)s; typedef enum {%(values)s} %(name)s;
IfcParse_EXPORT const char* ToString(%(name)s v); IFC_PARSE_API const char* ToString(%(name)s v);
IfcParse_EXPORT %(name)s FromString(const std::string& s); IFC_PARSE_API %(name)s FromString(const std::string& s);
} }
""" """
entity = """%(documentation)s entity = """%(documentation)s
class IfcParse_EXPORT %(name)s %(superclass)s{ class IFC_PARSE_API %(name)s %(superclass)s{
public: public:
%(attributes)s virtual unsigned int getArgumentCount() const { return %(argument_count)d; } %(attributes)s virtual unsigned int getArgumentCount() const { return %(argument_count)d; }
virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const {%(argument_type_function_body)s} virtual IfcUtil::ArgumentType getArgumentType(unsigned int i) const {%(argument_type_function_body)s}
+12 -12
View File
@@ -31,24 +31,24 @@
#define IfcSchema Ifc2x3 #define IfcSchema Ifc2x3
#include "../ifcparse/IfcParse_Export.h" #include "../ifcparse/ifc_parse_api.h"
#include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcUtil.h"
#include "../ifcparse/IfcEntityDescriptor.h" #include "../ifcparse/IfcEntityDescriptor.h"
#include "../ifcparse/IfcWritableEntity.h" #include "../ifcparse/IfcWritableEntity.h"
namespace Ifc2x3 { namespace Ifc2x3 {
namespace Type { namespace Type {
IfcParse_EXPORT int GetAttributeCount(Enum t); IFC_PARSE_API int GetAttributeCount(Enum t);
IfcParse_EXPORT int GetAttributeIndex(Enum t, const std::string& a); IFC_PARSE_API int GetAttributeIndex(Enum t, const std::string& a);
IfcParse_EXPORT IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a); IFC_PARSE_API IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a);
IfcParse_EXPORT Enum GetAttributeEntity(Enum t, unsigned char a); IFC_PARSE_API Enum GetAttributeEntity(Enum t, unsigned char a);
IfcParse_EXPORT const std::string& GetAttributeName(Enum t, unsigned char a); IFC_PARSE_API const std::string& GetAttributeName(Enum t, unsigned char a);
IfcParse_EXPORT bool GetAttributeOptional(Enum t, unsigned char a); IFC_PARSE_API bool GetAttributeOptional(Enum t, unsigned char a);
IfcParse_EXPORT bool GetAttributeDerived(Enum t, unsigned char a); IFC_PARSE_API bool GetAttributeDerived(Enum t, unsigned char a);
IfcParse_EXPORT std::pair<const char*, int> GetEnumerationIndex(Enum t, const std::string& a); IFC_PARSE_API std::pair<const char*, int> GetEnumerationIndex(Enum t, const std::string& a);
IfcParse_EXPORT std::pair<Enum, unsigned> GetInverseAttribute(Enum t, const std::string& a); IFC_PARSE_API std::pair<Enum, unsigned> GetInverseAttribute(Enum t, const std::string& a);
IfcParse_EXPORT std::set<std::string> GetInverseAttributeNames(Enum t); IFC_PARSE_API std::set<std::string> GetInverseAttributeNames(Enum t);
IfcParse_EXPORT void PopulateDerivedFields(IfcWrite::IfcWritableEntity* e); IFC_PARSE_API void PopulateDerivedFields(IfcWrite::IfcWritableEntity* e);
}} }}
#endif #endif
+1099 -1099
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+12 -12
View File
@@ -31,24 +31,24 @@
#define IfcSchema Ifc4 #define IfcSchema Ifc4
#include "../ifcparse/IfcParse_Export.h" #include "../ifcparse/ifc_parse_api.h"
#include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcUtil.h"
#include "../ifcparse/IfcEntityDescriptor.h" #include "../ifcparse/IfcEntityDescriptor.h"
#include "../ifcparse/IfcWritableEntity.h" #include "../ifcparse/IfcWritableEntity.h"
namespace Ifc4 { namespace Ifc4 {
namespace Type { namespace Type {
IfcParse_EXPORT int GetAttributeCount(Enum t); IFC_PARSE_API int GetAttributeCount(Enum t);
IfcParse_EXPORT int GetAttributeIndex(Enum t, const std::string& a); IFC_PARSE_API int GetAttributeIndex(Enum t, const std::string& a);
IfcParse_EXPORT IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a); IFC_PARSE_API IfcUtil::ArgumentType GetAttributeType(Enum t, unsigned char a);
IfcParse_EXPORT Enum GetAttributeEntity(Enum t, unsigned char a); IFC_PARSE_API Enum GetAttributeEntity(Enum t, unsigned char a);
IfcParse_EXPORT const std::string& GetAttributeName(Enum t, unsigned char a); IFC_PARSE_API const std::string& GetAttributeName(Enum t, unsigned char a);
IfcParse_EXPORT bool GetAttributeOptional(Enum t, unsigned char a); IFC_PARSE_API bool GetAttributeOptional(Enum t, unsigned char a);
IfcParse_EXPORT bool GetAttributeDerived(Enum t, unsigned char a); IFC_PARSE_API bool GetAttributeDerived(Enum t, unsigned char a);
IfcParse_EXPORT std::pair<const char*, int> GetEnumerationIndex(Enum t, const std::string& a); IFC_PARSE_API std::pair<const char*, int> GetEnumerationIndex(Enum t, const std::string& a);
IfcParse_EXPORT std::pair<Enum, unsigned> GetInverseAttribute(Enum t, const std::string& a); IFC_PARSE_API std::pair<Enum, unsigned> GetInverseAttribute(Enum t, const std::string& a);
IfcParse_EXPORT std::set<std::string> GetInverseAttributeNames(Enum t); IFC_PARSE_API std::set<std::string> GetInverseAttributeNames(Enum t);
IfcParse_EXPORT void PopulateDerivedFields(IfcWrite::IfcWritableEntity* e); IFC_PARSE_API void PopulateDerivedFields(IfcWrite::IfcWritableEntity* e);
}} }}
#endif #endif
+1312 -1312
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -40,7 +40,7 @@ typedef unsigned int UChar32;
namespace IfcParse { namespace IfcParse {
class IfcParse_EXPORT IfcCharacterDecoder { class IFC_PARSE_API IfcCharacterDecoder {
private: private:
IfcParse::IfcSpfStream* file; IfcParse::IfcSpfStream* file;
#ifdef HAVE_ICU #ifdef HAVE_ICU
@@ -75,7 +75,7 @@ namespace IfcParse {
namespace IfcWrite { namespace IfcWrite {
class IfcParse_EXPORT IfcCharacterEncoder { class IFC_PARSE_API IfcCharacterEncoder {
private: private:
std::string str; std::string str;
#ifdef HAVE_ICU #ifdef HAVE_ICU
+2 -2
View File
@@ -39,7 +39,7 @@
namespace IfcUtil { namespace IfcUtil {
class IfcParse_EXPORT IfcEnumerationDescriptor { class IFC_PARSE_API IfcEnumerationDescriptor {
private: private:
IfcSchema::Type::Enum type; IfcSchema::Type::Enum type;
std::vector<std::string> values; std::vector<std::string> values;
@@ -62,7 +62,7 @@ namespace IfcUtil {
} }
}; };
class IfcParse_EXPORT IfcEntityDescriptor { class IFC_PARSE_API IfcEntityDescriptor {
public: public:
class IfcArgumentDescriptor class IfcArgumentDescriptor
{ {
+3 -3
View File
@@ -20,7 +20,7 @@
#ifndef IFCEXCEPTION_H #ifndef IFCEXCEPTION_H
#define IFCEXCEPTION_H #define IFCEXCEPTION_H
#include "IfcParse_Export.h" #include "ifc_parse_api.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
@@ -35,7 +35,7 @@
#endif #endif
namespace IfcParse { namespace IfcParse {
class IfcParse_EXPORT IfcException : public std::exception { class IFC_PARSE_API IfcException : public std::exception {
private: private:
std::string message; std::string message;
public: public:
@@ -47,7 +47,7 @@ namespace IfcParse {
} }
}; };
class IfcParse_EXPORT IfcAttributeOutOfRangeException : public IfcException { class IFC_PARSE_API IfcAttributeOutOfRangeException : public IfcException {
public: public:
IfcAttributeOutOfRangeException(const std::string& e) IfcAttributeOutOfRangeException(const std::string& e)
: IfcException(e) {} : IfcException(e) {}
+2 -2
View File
@@ -23,7 +23,7 @@
#include <map> #include <map>
#include <set> #include <set>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#include "../ifcparse/IfcParse.h" #include "../ifcparse/IfcParse.h"
#include "../ifcparse/IfcSpfHeader.h" #include "../ifcparse/IfcSpfHeader.h"
@@ -32,7 +32,7 @@ namespace IfcParse {
/// This class provides several static convenience functions and variables /// This class provides several static convenience functions and variables
/// and provide access to the entities in an IFC file /// and provide access to the entities in an IFC file
class IfcParse_EXPORT IfcFile { class IFC_PARSE_API IfcFile {
public: public:
typedef std::map<IfcSchema::Type::Enum, IfcEntityList::ptr> entities_by_type_t; typedef std::map<IfcSchema::Type::Enum, IfcEntityList::ptr> entities_by_type_t;
typedef std::map<unsigned int, IfcUtil::IfcBaseClass*> entity_by_id_t; typedef std::map<unsigned int, IfcUtil::IfcBaseClass*> entity_by_id_t;
+2 -2
View File
@@ -23,12 +23,12 @@
#include <string> #include <string>
#include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid.hpp>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
namespace IfcParse { namespace IfcParse {
/// A helper class for the creation of IFC GlobalIds. /// A helper class for the creation of IFC GlobalIds.
class IfcParse_EXPORT IfcGlobalId { class IFC_PARSE_API IfcGlobalId {
private: private:
std::string string_data, formatted_string; std::string string_data, formatted_string;
boost::uuids::uuid uuid_data; boost::uuids::uuid uuid_data;
+2 -2
View File
@@ -30,7 +30,7 @@
#include <map> #include <map>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#ifdef USE_IFC4 #ifdef USE_IFC4
#include "../ifcparse/Ifc4.h" #include "../ifcparse/Ifc4.h"
@@ -42,7 +42,7 @@
#include "../ifcparse/IfcWrite.h" #include "../ifcparse/IfcWrite.h"
#include "../ifcparse/IfcGlobalId.h" #include "../ifcparse/IfcGlobalId.h"
class IfcParse_EXPORT IfcHierarchyHelper : public IfcParse::IfcFile { class IFC_PARSE_API IfcHierarchyHelper : public IfcParse::IfcFile {
public: public:
template <class T> template <class T>
T* addTriplet(double x, double y, double z) { T* addTriplet(double x, double y, double z) {
+2 -2
View File
@@ -22,7 +22,7 @@
#include <string> #include <string>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcUtil.h"
#include "../ifcparse/IfcWrite.h" #include "../ifcparse/IfcWrite.h"
@@ -34,7 +34,7 @@ namespace IfcParse {
// that in the IfcFile class the distinction what entity type to be created is // that in the IfcFile class the distinction what entity type to be created is
// no longer necessary and weird diagonal casts when creating geometry from // no longer necessary and weird diagonal casts when creating geometry from
// IfcLateBoundEntities are eliminated. // IfcLateBoundEntities are eliminated.
class IfcParse_EXPORT IfcLateBoundEntity : public IfcUtil::IfcBaseEntity { class IFC_PARSE_API IfcLateBoundEntity : public IfcUtil::IfcBaseEntity {
private: private:
IfcWrite::IfcWritableEntity* writable_entity(); IfcWrite::IfcWritableEntity* writable_entity();
void invalid_argument(unsigned int i, const std::string& t); void invalid_argument(unsigned int i, const std::string& t);
+2 -2
View File
@@ -34,9 +34,9 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include "IfcParse_Export.h" #include "ifc_parse_api.h"
class IfcParse_EXPORT Logger { class IFC_PARSE_API Logger {
public: public:
typedef enum { LOG_NOTICE, LOG_WARNING, LOG_ERROR } Severity; typedef enum { LOG_NOTICE, LOG_WARNING, LOG_ERROR } Severity;
private: private:
+9 -9
View File
@@ -40,7 +40,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/dynamic_bitset.hpp> #include <boost/dynamic_bitset.hpp>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#include "../ifcparse/IfcCharacterDecoder.h" #include "../ifcparse/IfcCharacterDecoder.h"
#include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcUtil.h"
@@ -91,7 +91,7 @@ namespace IfcParse {
/// Provides functions to convert Tokens to binary data /// Provides functions to convert Tokens to binary data
/// Tokens are merely offsets to where they can be read in the file /// Tokens are merely offsets to where they can be read in the file
class IfcParse_EXPORT TokenFunc { class IFC_PARSE_API TokenFunc {
private: private:
static bool startsWith(const Token& t, char c); static bool startsWith(const Token& t, char c);
public: public:
@@ -144,7 +144,7 @@ namespace IfcParse {
Token NoneTokenPtr(); Token NoneTokenPtr();
/// A stream of tokens to be read from a IfcSpfStream. /// A stream of tokens to be read from a IfcSpfStream.
class IfcParse_EXPORT IfcSpfLexer { class IFC_PARSE_API IfcSpfLexer {
private: private:
IfcCharacterDecoder* decoder; IfcCharacterDecoder* decoder;
//storage for temporary string without allocation //storage for temporary string without allocation
@@ -164,7 +164,7 @@ namespace IfcParse {
/// Argument of type list, e.g. /// Argument of type list, e.g.
/// #1=IfcDirection((1.,0.,0.)); /// #1=IfcDirection((1.,0.,0.));
/// ========== /// ==========
class IfcParse_EXPORT ArgumentList: public Argument { class IFC_PARSE_API ArgumentList: public Argument {
private: private:
std::vector<Argument*> list; std::vector<Argument*> list;
void push(Argument* l); void push(Argument* l);
@@ -197,7 +197,7 @@ namespace IfcParse {
/// Argument being null, e.g. '$' /// Argument being null, e.g. '$'
/// == === /// == ===
class IfcParse_EXPORT NullArgument : public Argument { class IFC_PARSE_API NullArgument : public Argument {
public: public:
NullArgument() {} NullArgument() {}
IfcUtil::ArgumentType type() const { return IfcUtil::Argument_NULL; } IfcUtil::ArgumentType type() const { return IfcUtil::Argument_NULL; }
@@ -210,7 +210,7 @@ namespace IfcParse {
/// Argument of type scalar or string, e.g. /// Argument of type scalar or string, e.g.
/// #1=IfcVector(#2,1.0); /// #1=IfcVector(#2,1.0);
/// == === /// == ===
class IfcParse_EXPORT TokenArgument : public Argument { class IFC_PARSE_API TokenArgument : public Argument {
private: private:
public: public:
@@ -236,7 +236,7 @@ namespace IfcParse {
/// Argument of an IFC simple type /// Argument of an IFC simple type
/// #1=IfcTrimmedCurve(#2,(IFCPARAMETERVALUE(0.)),(IFCPARAMETERVALUE(1.)),.T.,.PARAMETER.); /// #1=IfcTrimmedCurve(#2,(IFCPARAMETERVALUE(0.)),(IFCPARAMETERVALUE(1.)),.T.,.PARAMETER.);
/// ===================== ===================== /// ===================== =====================
class IfcParse_EXPORT EntityArgument : public Argument { class IFC_PARSE_API EntityArgument : public Argument {
private: private:
IfcUtil::IfcBaseClass* entity; IfcUtil::IfcBaseClass* entity;
public: public:
@@ -257,7 +257,7 @@ namespace IfcParse {
/// Entity defined in an IFC file, e.g. /// Entity defined in an IFC file, e.g.
/// #1=IfcDirection((1.,0.,0.)); /// #1=IfcDirection((1.,0.,0.));
/// ============================ /// ============================
class IfcParse_EXPORT Entity : public IfcAbstractEntity { class IFC_PARSE_API Entity : public IfcAbstractEntity {
private: private:
mutable ArgumentList* args; mutable ArgumentList* args;
mutable IfcSchema::Type::Enum _type; mutable IfcSchema::Type::Enum _type;
@@ -283,6 +283,6 @@ namespace IfcParse {
} }
IfcParse_EXPORT std::ostream& operator<< (std::ostream& os, const IfcParse::IfcFile& f); IFC_PARSE_API std::ostream& operator<< (std::ostream& os, const IfcParse::IfcFile& f);
#endif #endif
+3 -3
View File
@@ -21,11 +21,11 @@
#define IFCSIPREFIX #define IFCSIPREFIX
#include "../ifcparse/IfcParse.h" #include "../ifcparse/IfcParse.h"
#include "IfcParse_Export.h" #include "ifc_parse_api.h"
namespace IfcParse { namespace IfcParse {
IfcParse_EXPORT double IfcSIPrefixToValue(IfcSchema::IfcSIPrefix::IfcSIPrefix); IFC_PARSE_API double IfcSIPrefixToValue(IfcSchema::IfcSIPrefix::IfcSIPrefix);
IfcParse_EXPORT double get_SI_equivalent(IfcSchema::IfcNamedUnit*); IFC_PARSE_API double get_SI_equivalent(IfcSchema::IfcNamedUnit*);
} }
#endif #endif
+6 -6
View File
@@ -20,14 +20,14 @@
#ifndef IFCSPFHEADER_H #ifndef IFCSPFHEADER_H
#define IFCSPFHEADER_H #define IFCSPFHEADER_H
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#include "../ifcparse/IfcSpfStream.h" #include "../ifcparse/IfcSpfStream.h"
#include "../ifcparse/IfcWrite.h" #include "../ifcparse/IfcWrite.h"
namespace IfcParse { namespace IfcParse {
class IfcParse_EXPORT HeaderEntity : public IfcAbstractEntity { class IFC_PARSE_API HeaderEntity : public IfcAbstractEntity {
private: private:
ArgumentList* _list; ArgumentList* _list;
const char * const _datatype; const char * const _datatype;
@@ -105,7 +105,7 @@ public:
} }
}; };
class IfcParse_EXPORT FileDescription : public HeaderEntity { class IFC_PARSE_API FileDescription : public HeaderEntity {
public: public:
explicit FileDescription(IfcSpfLexer* = 0); explicit FileDescription(IfcSpfLexer* = 0);
@@ -116,7 +116,7 @@ public:
void implementation_level(const std::string& value) { setArgument(1, value); } void implementation_level(const std::string& value) { setArgument(1, value); }
}; };
class IfcParse_EXPORT FileName : public HeaderEntity { class IFC_PARSE_API FileName : public HeaderEntity {
public: public:
explicit FileName(IfcSpfLexer* = 0); explicit FileName(IfcSpfLexer* = 0);
@@ -137,7 +137,7 @@ public:
void authorization(const std::string& value) { setArgument(6, value); } void authorization(const std::string& value) { setArgument(6, value); }
}; };
class IfcParse_EXPORT FileSchema : public HeaderEntity { class IFC_PARSE_API FileSchema : public HeaderEntity {
public: public:
explicit FileSchema(IfcSpfLexer* = 0); explicit FileSchema(IfcSpfLexer* = 0);
@@ -146,7 +146,7 @@ public:
void schema_identifiers(const std::vector<std::string>& value) { setArgument(0, value); } void schema_identifiers(const std::vector<std::string>& value) { setArgument(0, value); }
}; };
class IfcParse_EXPORT IfcSpfHeader { class IFC_PARSE_API IfcSpfHeader {
private: private:
IfcSpfLexer* _lexer; IfcSpfLexer* _lexer;
FileDescription* _file_description; FileDescription* _file_description;
+2 -2
View File
@@ -30,7 +30,7 @@
#include <fstream> #include <fstream>
#include <string> #include <string>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
// As of IfcOpenShell version 0.3.0 the paging functionality, which // As of IfcOpenShell version 0.3.0 the paging functionality, which
// loads a file on disk into multiple chunks, has been disabled. // loads a file on disk into multiple chunks, has been disabled.
@@ -48,7 +48,7 @@ namespace IfcParse {
/// which only one is simultaneously kept in memory, for files /// which only one is simultaneously kept in memory, for files
/// that define their entities not in a sequential nature, this is /// that define their entities not in a sequential nature, this is
/// detrimental for the performance of the parser. /// detrimental for the performance of the parser.
class IfcParse_EXPORT IfcSpfStream { class IFC_PARSE_API IfcSpfStream {
private: private:
FILE* stream; FILE* stream;
char* buffer; char* buffer;
+27 -27
View File
@@ -26,7 +26,7 @@
#include <sstream> #include <sstream>
#include <algorithm> #include <algorithm>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#ifdef USE_IFC4 #ifdef USE_IFC4
#include "../ifcparse/Ifc4enum.h" #include "../ifcparse/Ifc4enum.h"
@@ -74,9 +74,9 @@ namespace IfcUtil {
Argument_UNKNOWN Argument_UNKNOWN
}; };
IfcParse_EXPORT const char* ArgumentTypeToString(ArgumentType argument_type); IFC_PARSE_API const char* ArgumentTypeToString(ArgumentType argument_type);
class IfcParse_EXPORT IfcBaseClass { class IFC_PARSE_API IfcBaseClass {
public: public:
IfcAbstractEntity* entity; IfcAbstractEntity* entity;
virtual bool is(IfcSchema::Type::Enum v) const = 0; virtual bool is(IfcSchema::Type::Enum v) const = 0;
@@ -103,11 +103,11 @@ namespace IfcUtil {
} }
}; };
class IfcParse_EXPORT IfcBaseEntity : public IfcBaseClass { class IFC_PARSE_API IfcBaseEntity : public IfcBaseClass {
}; };
// TODO: Investigate whether these should be template classes instead // TODO: Investigate whether these should be template classes instead
class IfcParse_EXPORT IfcBaseType : public IfcBaseEntity { class IFC_PARSE_API IfcBaseType : public IfcBaseEntity {
public: public:
unsigned int getArgumentCount() const; unsigned int getArgumentCount() const;
Argument* getArgument(unsigned int i) const; Argument* getArgument(unsigned int i) const;
@@ -115,17 +115,17 @@ namespace IfcUtil {
IfcSchema::Type::Enum getArgumentEntity(unsigned int /*i*/) const { return IfcSchema::Type::UNDEFINED; } IfcSchema::Type::Enum getArgumentEntity(unsigned int /*i*/) const { return IfcSchema::Type::UNDEFINED; }
}; };
IfcParse_EXPORT bool valid_binary_string(const std::string& s); IFC_PARSE_API bool valid_binary_string(const std::string& s);
/// Replaces spaces and potentially other problem causing characters with underscores. /// Replaces spaces and potentially other problem causing characters with underscores.
IfcParse_EXPORT void sanitate_material_name(std::string &str); IFC_PARSE_API void sanitate_material_name(std::string &str);
IfcParse_EXPORT void escape_xml(std::string &str); IFC_PARSE_API void escape_xml(std::string &str);
IfcParse_EXPORT void unescape_xml(std::string &str); IFC_PARSE_API void unescape_xml(std::string &str);
} }
template <class T> template <class T>
class IfcTemplatedEntityList; class IfcTemplatedEntityList;
class IfcParse_EXPORT IfcEntityList { class IFC_PARSE_API IfcEntityList {
std::vector<IfcUtil::IfcBaseClass*> ls; std::vector<IfcUtil::IfcBaseClass*> ls;
public: public:
typedef boost::shared_ptr<IfcEntityList> ptr; typedef boost::shared_ptr<IfcEntityList> ptr;
@@ -183,7 +183,7 @@ public:
template <class T> template <class T>
class IfcTemplatedEntityListList; class IfcTemplatedEntityListList;
class IfcParse_EXPORT IfcEntityListList { class IFC_PARSE_API IfcEntityListList {
std::vector< std::vector<IfcUtil::IfcBaseClass*> > ls; std::vector< std::vector<IfcUtil::IfcBaseClass*> > ls;
public: public:
typedef boost::shared_ptr< IfcEntityListList > ptr; typedef boost::shared_ptr< IfcEntityListList > ptr;
@@ -281,24 +281,24 @@ namespace IfcParse {
class IfcFile; class IfcFile;
} }
class IfcParse_EXPORT Argument { class IFC_PARSE_API Argument {
public: public:
virtual operator int() const; virtual operator int() const;
virtual operator bool() const; virtual operator bool() const;
virtual operator double() const; virtual operator double() const;
virtual operator std::string() const; virtual operator std::string() const;
virtual operator boost::dynamic_bitset<>() const; virtual operator boost::dynamic_bitset<>() const;
virtual operator IfcUtil::IfcBaseClass*() const; virtual operator IfcUtil::IfcBaseClass*() const;
virtual operator std::vector<int>() const; virtual operator std::vector<int>() const;
virtual operator std::vector<double>() const; virtual operator std::vector<double>() const;
virtual operator std::vector<std::string>() const; virtual operator std::vector<std::string>() const;
virtual operator std::vector<boost::dynamic_bitset<> >() const; virtual operator std::vector<boost::dynamic_bitset<> >() const;
virtual operator IfcEntityList::ptr() const; virtual operator IfcEntityList::ptr() const;
virtual operator std::vector< std::vector<int> >() const; virtual operator std::vector< std::vector<int> >() const;
virtual operator std::vector< std::vector<double> >() const; virtual operator std::vector< std::vector<double> >() const;
virtual operator IfcEntityListList::ptr() const; virtual operator IfcEntityListList::ptr() const;
virtual bool isNull() const = 0; virtual bool isNull() const = 0;
virtual unsigned int size() const = 0; virtual unsigned int size() const = 0;
@@ -310,7 +310,7 @@ public:
virtual ~Argument() {}; virtual ~Argument() {};
}; };
class IfcParse_EXPORT IfcAbstractEntity { class IFC_PARSE_API IfcAbstractEntity {
public: public:
IfcParse::IfcFile* file; IfcParse::IfcFile* file;
virtual IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index) = 0; virtual IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index) = 0;
+2 -2
View File
@@ -35,12 +35,12 @@
#include <boost/dynamic_bitset.hpp> #include <boost/dynamic_bitset.hpp>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#include "IfcUtil.h" #include "IfcUtil.h"
namespace IfcWrite { namespace IfcWrite {
class IfcParse_EXPORT IfcWritableEntity : public IfcAbstractEntity { class IFC_PARSE_API IfcWritableEntity : public IfcAbstractEntity {
private: private:
std::map<int,bool> writemask; std::map<int,bool> writemask;
std::map<int,Argument*> args; std::map<int,Argument*> args;
+3 -3
View File
@@ -32,7 +32,7 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/dynamic_bitset.hpp> #include <boost/dynamic_bitset.hpp>
#include "../ifcparse/IfcParse_Export.h" #include "ifc_parse_api.h"
#include "../ifcparse/IfcUtil.h" #include "../ifcparse/IfcUtil.h"
#include "../ifcparse/IfcParse.h" #include "../ifcparse/IfcParse.h"
@@ -44,7 +44,7 @@ namespace IfcWrite {
/// IfcParse namespace is that this class has a Boost.Variant member /// IfcParse namespace is that this class has a Boost.Variant member
/// for storing its value, whereas the IfcParse classes only contain /// for storing its value, whereas the IfcParse classes only contain
/// lazy references to byte offsets in the IFC-SPF file. /// lazy references to byte offsets in the IFC-SPF file.
class IfcParse_EXPORT IfcWriteArgument : public Argument { class IFC_PARSE_API IfcWriteArgument : public Argument {
public: public:
class EnumerationReference { class EnumerationReference {
public: public:
@@ -146,7 +146,7 @@ namespace IfcWrite {
// Accumulates all schema instances created from constructors // Accumulates all schema instances created from constructors
// This way they can be added in a single batch to the IfcFile // This way they can be added in a single batch to the IfcFile
class IfcParse_EXPORT EntityBuffer { class IFC_PARSE_API EntityBuffer {
private: private:
IfcEntityList::ptr buffer; IfcEntityList::ptr buffer;
static EntityBuffer* i; static EntityBuffer* i;
@@ -17,21 +17,21 @@
* * * *
********************************************************************************/ ********************************************************************************/
#ifndef IfcParse_EXPORT_H #ifndef IFC_PARSE_API_H
#define IfcParse_EXPORT_H #define IFC_PARSE_API_H
#ifdef BUILD_SHARED_LIBS #ifdef BUILD_SHARED_LIBS
#ifdef _WIN32 #ifdef _WIN32
#ifdef IfcParse_EXPORTS #ifdef IFC_PARSE_EXPORTS
#define IfcParse_EXPORT __declspec(dllexport) #define IFC_PARSE_API __declspec(dllexport)
#else #else
#define IfcParse_EXPORT __declspec(dllimport) #define IFC_PARSE_API __declspec(dllimport)
#endif #endif
#else // simply assume *nix + GCC-like compiler #else // simply assume *nix + GCC-like compiler
#define IfcParse_EXPORT __attribute__((visibility("default"))) #define IFC_PARSE_API __attribute__((visibility("default")))
#endif #endif
#else #else
#define IfcParse_EXPORT #define IFC_PARSE_API
#endif #endif
#endif #endif