fix MSVC link error for NilSTEPentity
This commit is contained in:
parent
7316fe5070
commit
4207a46f07
5 changed files with 14 additions and 3 deletions
|
|
@ -31,6 +31,8 @@
|
|||
#include <math.h>
|
||||
#include "sc_memmgr.h"
|
||||
|
||||
#include "sdaiApplication_instance.h"
|
||||
|
||||
// to help ObjectCenter
|
||||
#ifndef HAVE_MEMMOVE
|
||||
extern "C"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include "instMgrHelper.h"
|
||||
#include "lazyRefs.h"
|
||||
|
||||
#include "sdaiApplication_instance.h"
|
||||
|
||||
lazyInstMgr::lazyInstMgr() {
|
||||
_headerRegistry = new Registry( HeaderSchemaInit );
|
||||
_instanceTypes = new instanceTypes_t( 255 ); //NOTE arbitrary max of 255 chars for a type name
|
||||
|
|
@ -137,7 +139,7 @@ SDAI_Application_instance * lazyInstMgr::loadInstance( instanceID id, bool reSee
|
|||
std::cerr << "Instance #" << id << " exists in multiple sections. This is not yet supported." << std::endl;
|
||||
break;
|
||||
}
|
||||
if( ( inst ) && ( inst != & NilSTEPentity ) ) {
|
||||
if( !isNilSTEPentity( inst ) ) {
|
||||
_instancesLoaded.insert( id, inst );
|
||||
_loadedInstanceCount++;
|
||||
lazyRefs lr( this, inst );
|
||||
|
|
|
|||
|
|
@ -302,8 +302,7 @@ SDAI_Application_instance * sectionReader::getRealInstance( const Registry * reg
|
|||
inst = reg->ObjCreate( tName, sName );
|
||||
break;
|
||||
}
|
||||
|
||||
if( inst != & NilSTEPentity ) {
|
||||
if( !isNilSTEPentity( inst ) ) {
|
||||
if( !comment.empty() ) {
|
||||
inst->AddP21Comment( comment );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,13 @@
|
|||
|
||||
SDAI_Application_instance NilSTEPentity;
|
||||
|
||||
bool isNilSTEPentity( const SDAI_Application_instance * ai ) {
|
||||
if( ai && ai == &NilSTEPentity ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**************************************************************//**
|
||||
** \file sdaiApplication_instance.cc Functions for manipulating entities
|
||||
**
|
||||
|
|
|
|||
|
|
@ -196,5 +196,6 @@ class SC_CORE_EXPORT SDAI_Application_instance : public SDAI_DAObject_SDAI {
|
|||
// current style of CORBA handles for Part 23 - NOTE - used for more than CORBA
|
||||
typedef SDAI_Application_instance * SDAI_Application_instance_ptr;
|
||||
typedef SDAI_Application_instance_ptr SDAI_Application_instance_var;
|
||||
SC_CORE_EXPORT bool isNilSTEPentity( const SDAI_Application_instance * ai );
|
||||
|
||||
#endif //STEPENTITY_H
|
||||
|
|
|
|||
Loading…
Reference in a new issue