Merge pull request #2387 from assimp/stepfile_fixes

Stepfile: fix some minor review finding.
pull/2389/head
Kim Kulling 2019-03-27 20:18:36 +01:00 committed by GitHub
commit deceb4ebf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 25 deletions

View File

@ -52,8 +52,8 @@ use_ifc_template = False
input_step_template_h = 'StepReaderGen.h.template'
input_step_template_cpp = 'StepReaderGen.cpp.template'
input_ifc_template_h = 'IFCReaderGen.h.template'
input_ifc_template_cpp = 'IFCReaderGen.cpp.template'
input_ifc_template_h = 'IFCReaderGen.h.template'
input_ifc_template_cpp = 'IFCReaderGen.cpp.template'
cpp_keywords = "class"
@ -87,7 +87,7 @@ template_type = r"""
template_stub_decl = '\tDECL_CONV_STUB({type});\n'
template_schema = '\t\tSchemaEntry("{normalized_name}",&STEP::ObjectHelper<{type},{argcnt}>::Construct )\n'
template_schema_type = '\t\tSchemaEntry("{normalized_name}",NULL )\n'
template_schema_type = '\t\tSchemaEntry("{normalized_name}",nullptr )\n'
template_converter = r"""
// -----------------------------------------------------------------------------------------------------------
template <> size_t GenericFill<{type}>(const DB& db, const LIST& params, {type}* in)
@ -99,7 +99,7 @@ template_converter_prologue_a = '\tsize_t base = GenericFill(db,params,static_ca
template_converter_prologue_b = '\tsize_t base = 0;\n'
template_converter_check_argcnt = '\tif (params.GetSize() < {max_arg}) {{ throw STEP::TypeError("expected {max_arg} arguments to {name}"); }}'
template_converter_code_per_field = r""" do {{ // convert the '{fieldname}' argument
boost::shared_ptr<const DataType> arg = params[base++];{handle_unset}{convert}
std::shared_ptr<const DataType> arg = params[base++];{handle_unset}{convert}
}} while(0);
"""
template_allow_optional = r"""

View File

@ -2,7 +2,7 @@
Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------
Copyright (c) 2006-2018, ASSIMP Development Team
Copyright (c) 2006-2019, ASSIMP Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@ -66,7 +66,7 @@ namespace STEP {
// -----------------------------------------------------------------------------------------------------------
template <> size_t GenericFill<NotImplemented>(const STEP::DB& db, const LIST& params, NotImplemented* in)
{
return 0;
return 0u;
}

View File

@ -2,7 +2,7 @@
Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------
Copyright (c) 2006-2018, ASSIMP Development Team
Copyright (c) 2006-2019, ASSIMP Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@ -47,25 +47,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
namespace StepFile {
using namespace STEP;
using namespace STEP::EXPRESS;
struct NotImplemented : public ObjectHelper<NotImplemented,0> {
};
// ******************************************************************************
// StepFile Custom data types
// ******************************************************************************
using namespace STEP;
using namespace STEP::EXPRESS;
struct NotImplemented : public ObjectHelper<NotImplemented,0> {
};
// ******************************************************************************
// StepFile Custom data types
// ******************************************************************************
{types}
// ******************************************************************************
// StepFile Entities
// ******************************************************************************
// ******************************************************************************
// StepFile Entities
// ******************************************************************************
{predefs}
{entities}
@ -73,11 +71,12 @@ namespace StepFile {
void GetSchema(EXPRESS::ConversionSchema& out);
} //! StepFile
namespace STEP {
// ******************************************************************************
// Converter stubs
// ******************************************************************************
// ******************************************************************************
// Converter stubs
// ******************************************************************************
#define DECL_CONV_STUB(type) template <> size_t GenericFill<IFC::type>(const STEP::DB& db, const EXPRESS::LIST& params, IFC::type* in)