File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ IfcEntityList::ptr IfcWritableEntity::getInverse(IfcSchema::Type::Enum type, int
7171}
7272
7373std::string IfcWritableEntity::datatype () const { return IfcSchema::Type::ToString (_type); }
74- Argument* IfcWritableEntity::getArgument (unsigned int i) { if ( i >= getArgumentCount () ) throw IfcParse::IfcException (" Argument not set" ); return args[i]; }unsigned int IfcWritableEntity::getArgumentCount () const {return args.size (); }
74+ Argument* IfcWritableEntity::getArgument (unsigned int i) { if ( i >= getArgumentCount () ) throw IfcParse::IfcException (" Argument not set" ); return args[i]; }
75+ unsigned int IfcWritableEntity::getArgumentCount () const {return args.size (); }
7576IfcSchema::Type::Enum IfcWritableEntity::type () const { return _type; }
7677bool IfcWritableEntity::is (IfcSchema::Type::Enum v) const { return _type == v; }
7778std::string IfcWritableEntity::toString (bool upper) const {
@@ -314,7 +315,12 @@ void StringBuilderVisitor::operator()(const std::vector<std::string>& i) { seria
314315IfcWriteArgument::operator int () const { return as<int >(); }
315316IfcWriteArgument::operator bool () const { return as<bool >(); }
316317IfcWriteArgument::operator double () const { return as<double >(); }
317- IfcWriteArgument::operator std::string () const { return as<std::string>(); }
318+ IfcWriteArgument::operator std::string () const {
319+ if (type () == IfcUtil::Argument_ENUMERATION) {
320+ return as<EnumerationReference>().enumeration_value ;
321+ }
322+ return as<std::string>();
323+ }
318324IfcWriteArgument::operator std::vector<double >() const { return as<std::vector<double > >(); }
319325IfcWriteArgument::operator std::vector<int >() const { return as<std::vector<int > >(); }
320326IfcWriteArgument::operator std::vector<std::string>() const { return as<std::vector<std::string > >(); }
You can’t perform that action at this time.
0 commit comments