mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix additional warnings identified in #139
This commit is contained in:
@@ -26,11 +26,12 @@ static const char * const HEADER = "HEADER";
|
||||
static const char * const FILE_DESCRIPTION = "FILE_DESCRIPTION";
|
||||
static const char * const FILE_NAME = "FILE_NAME";
|
||||
static const char * const FILE_SCHEMA = "FILE_SCHEMA";
|
||||
static const char * const FILE_POPULATION = "FILE_POPULATION";
|
||||
static const char * const SECTION_LANGUAGE = "SECTION_LANGUAGE";
|
||||
static const char * const SECTION_CONTEXT = "SECTION_CONTEXT";
|
||||
static const char * const ENDSEC = "ENDSEC";
|
||||
static const char * const DATA = "DATA";
|
||||
// The following header entities are not normally encountered in IFC files and are not parsed.
|
||||
// static const char * const FILE_POPULATION = "FILE_POPULATION";
|
||||
// static const char * const SECTION_LANGUAGE = "SECTION_LANGUAGE";
|
||||
// static const char * const SECTION_CONTEXT = "SECTION_CONTEXT";
|
||||
|
||||
using namespace IfcParse;
|
||||
|
||||
@@ -61,6 +62,16 @@ void IfcSpfHeader::read() {
|
||||
readTerminal(ISO_10303_21, TRAILING_SEMICOLON);
|
||||
readTerminal(HEADER, TRAILING_SEMICOLON);
|
||||
|
||||
// | The header section of every exchange structure shall contain one
|
||||
// | instance of each of the following entities: file_description, file_name,
|
||||
// | and file_schema, and they shall appear in that order. Instances of
|
||||
// | file_population, section_language and section_context may appear after
|
||||
// | file_schema. If instances of user-defined header section entities are
|
||||
// | present, they shall appear after the header section entity instances
|
||||
// | defined in this section.
|
||||
//
|
||||
// ISO 10303-21 Second edition 2002-01-15 p. 16
|
||||
|
||||
readTerminal(FILE_DESCRIPTION, TRAILING_PAREN);
|
||||
delete _file_description;
|
||||
_file_description = new FileDescription(_lexer);
|
||||
@@ -96,7 +107,6 @@ void IfcSpfHeader::write(std::ostream& os) const {
|
||||
os << DATA << ";" << "\n";
|
||||
}
|
||||
|
||||
|
||||
const FileDescription& IfcSpfHeader::file_description() const {
|
||||
if (_file_description) {
|
||||
return *_file_description;
|
||||
|
||||
Reference in New Issue
Block a user