Files
IfcOpenShell/src/serializers/schema_dependent/XmlSerializer.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
2.4 KiB
C++
Raw Normal View History

/********************************************************************************
* *
* This file is part of IfcOpenShell. *
* *
* IfcOpenShell is free software: you can redistribute it and/or modify *
* it under the terms of the Lesser GNU General Public License as published by *
* the Free Software Foundation, either version 3.0 of the License, or *
* (at your option) any later version. *
* *
* IfcOpenShell is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Lesser GNU General Public License for more details. *
* *
* You should have received a copy of the Lesser GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
2018-03-16 16:04:48 +01:00
#ifndef XMLSERIALIZERIMPL_H
#define XMLSERIALIZERIMPL_H
2023-03-21 20:15:01 +01:00
#include "../../ifcgeom/abstract_mapping.h"
2018-03-16 16:04:48 +01:00
#include "../../ifcparse/macros.h"
#include "../../serializers/XmlSerializer.h"
2018-03-16 16:04:48 +01:00
#define INCLUDE_PARENT_PARENT_DIR(x) STRINGIFY(../../ifcparse/x.h)
#include INCLUDE_PARENT_PARENT_DIR(IfcSchema)
2023-03-21 20:15:01 +01:00
#undef INCLUDE_PARENT_PARENT_DIR
#define INCLUDE_PARENT_PARENT_DIR(x) STRINGIFY(../../ifcparse/x-definitions.h)
#include INCLUDE_PARENT_PARENT_DIR(IfcSchema)
2018-03-16 16:04:48 +01:00
2023-03-21 20:15:01 +01:00
class POSTFIX_SCHEMA(XmlSerializer) : public XmlSerializer {
2018-03-04 10:43:40 +01:00
private:
IfcParse::IfcFile* file;
2018-03-16 16:04:48 +01:00
2023-03-21 20:15:01 +01:00
// @todo
2023-11-15 10:32:20 +01:00
ifcopenshell::geometry::Settings settings_;
2023-03-21 20:15:01 +01:00
ifcopenshell::geometry::abstract_mapping* mapping_;
public:
2023-03-21 20:15:01 +01:00
POSTFIX_SCHEMA(XmlSerializer)(IfcParse::IfcFile* file, const std::string& xml_filename)
2018-04-14 20:06:25 +02:00
: XmlSerializer(0, "")
2023-03-21 20:15:01 +01:00
, mapping_(ifcopenshell::geometry::impl::mapping_implementations().construct(file, settings_))
2018-03-16 16:04:48 +01:00
{
this->file = file;
this->xml_filename = xml_filename;
}
2018-03-04 10:43:40 +01:00
void finalize();
2018-03-16 16:04:48 +01:00
void setFile(IfcParse::IfcFile*) {}
};
#endif