package CPPJini
-uses TCollection
+ uses
-is
+ MS,
+ WOKTools,
+ TCollection
+ is
- class DataMapOfAsciiStringInteger
- instantiates DataMap from TCollection(AsciiString from TCollection,
- Integer,
- AsciiString from TCollection);
+ private class ClientInfo;
+
+ private class SequenceOfClientInfo instantiates
+ Sequence from TCollection ( ClientInfo );
+
+
+ class DataMapOfAsciiStringInteger instantiates
+ DataMap from TCollection (
+ AsciiString from TCollection,
+ Integer from Standard,
+ AsciiString from TCollection
+ );
+
+ enumeration ExtractionType is
+
+ COMPLETE,
+ INCOMPLETE,
+ SEMICOMPLETE
+
+ end ExtractionType;
end CPPJini;
#include <MS_HSequenceOfClass.hxx>
#include <CPPJini_DataMapOfAsciiStringInteger.hxx>
#include <TColStd_Array1OfInteger.hxx>
+#include <CPPJini_ClientInfo.hxx>
+#include <CPPJini_SequenceOfClientInfo.hxx>
#define CPPJINI_BOOLEAN 1
#define CPPJINI_CHARACTER 2
Handle( TCollection_HAsciiString ) CPPJini_DotReplace ( char*, char = '_' );
-class CPPJini_ClientInfo {
-
- public:
-
- CPPJini_ClientInfo (
- const Handle( MS_MetaSchema )&,
- const Handle( TCollection_HAsciiString )&
- );
- ~CPPJini_ClientInfo () {};
-
- int HasComplete ( const Handle( TCollection_HAsciiString )& name ) const {
- return myMaps[ 0 ].Contains ( name );
- }
-
- int HasIncomplete ( const Handle( TCollection_HAsciiString )& name ) const {
- return myMaps[ 1 ].Contains ( name );
- }
-
- int HasSemicomplete ( const Handle( TCollection_HAsciiString )& name ) const {
- return myMaps[ 2 ].Contains ( name );
- }
-
- const Handle( TCollection_HAsciiString )& Name () const { return myName; }
-
- private:
-
- Handle( TCollection_HAsciiString ) myName;
- WOKTools_MapOfHAsciiString myMaps[ 3 ];
-};
-
-CPPJini_ClientInfo :: CPPJini_ClientInfo (
- const Handle( MS_MetaSchema )& ms,
- const Handle( TCollection_HAsciiString )& name
- ) {
-
- Handle( MS_Client ) clt = ms -> GetClient ( name );
-
- if ( clt.IsNull () )
-
- ErrorMsg << "CPPJini" << "Client " << name << " was not found" << endm;
-
- else {
-
- Handle( MS_HSequenceOfExternMet ) xtern = new MS_HSequenceOfExternMet ();
- Handle( MS_HSequenceOfMemberMet ) membr = new MS_HSequenceOfMemberMet ();
-
- clt -> ComputeTypes (
- xtern, membr, myMaps[ 0 ], myMaps[ 1 ], myMaps[ 2 ]
- );
-
- InfoMsg << "CPPJini" << "Using client: " << name << endm;
-
- } // end else
-
- myName = new TCollection_HAsciiString ( name );
-
-} // end CPPJini_ClientInfo :: CPPJini_ClientInfo
-
-static Standard_Integer s_Length;
-static CPPJini_ClientInfo** s_CltInfo;
+static CPPJini_SequenceOfClientInfo s_CltInfo;
+static WOKTools_MapOfHAsciiString s_CltMap;
static Standard_Boolean CPPJini_CheckClients (
const Handle( TCollection_HAsciiString )& className,
fDuplicate = Standard_False;
- for ( i = 0; i < s_Length; ++i ) {
+ for ( i = 1; i <= s_CltInfo.Length (); ++i ) {
switch ( idx ) {
case 0:
- fCond = s_CltInfo[ i ] -> HasComplete ( className );
+ fCond = s_CltInfo.Value ( i ) -> HasComplete ( className );
break;
case 1:
- fCond = s_CltInfo[ i ] -> HasIncomplete ( className );
+ fCond = s_CltInfo.Value ( i ) -> HasIncomplete ( className );
break;
default:
- fCond = s_CltInfo[ i ] -> HasSemicomplete ( className );
+ fCond = s_CltInfo.Value ( i ) -> HasSemicomplete ( className );
} // end switch
if ( !retVal ) {
- cltName = new TCollection_HAsciiString ( s_CltInfo[ i ] -> Name () );
- retVal = Standard_True;
+ cltName = new TCollection_HAsciiString ( s_CltInfo.Value ( i ) -> Name () );
+ retVal = Standard_True;
} else {
} // end if
} // end for
+
return retVal;
} // end CPPJini_CheckClients
} // end CPPJini_HasIncomplete
+Standard_Boolean CPPJini_Defined (
+ const Handle( TCollection_HAsciiString )& aTypeName,
+ Handle( TCollection_HAsciiString )& cltName
+ ) {
+
+ Standard_Boolean retVal = Standard_False;
+ CPPJini_ExtractionType type;
+ Standard_Integer i;
+
+ for ( i = 1; i <= s_CltInfo.Length (); ++i ) {
+
+ if ( s_CltInfo.Value ( i ) -> Defined ( aTypeName, type ) ) {
+
+ cltName = new TCollection_HAsciiString ( s_CltInfo.Value ( i ) -> Name () );
+ retVal = Standard_True;
+ break;
+
+ } // end if
+
+ } // end for
+
+ return retVal;
+
+} // end CPPJini_Defined
+
+Standard_Boolean CPPJini_Defined (
+ const Handle( MS_MetaSchema )& ms,
+ const Handle( TCollection_HAsciiString )& aTypeName,
+ Handle( TCollection_HAsciiString )& cltName,
+ Standard_Boolean& fDuplicate,
+ CPPJini_ExtractionType& aType
+ ) {
+
+ Standard_Boolean retVal = Standard_False;
+ CPPJini_ExtractionType type;
+ Standard_Integer i;
+
+ fDuplicate = Standard_False;
+
+ for ( i = 1; i <= s_CltInfo.Length (); ++i ) {
+
+ if ( s_CltInfo.Value ( i ) -> Defined ( aTypeName, type ) ) {
+
+ if ( !retVal ) {
+
+ cltName = new TCollection_HAsciiString ( s_CltInfo.Value ( i ) -> Name () );
+ aType = type;
+ retVal = Standard_True;
+
+ } else {
+
+ Standard_Integer j;
+ const Handle( TColStd_HSequenceOfHAsciiString ) use =
+ ms -> GetClient ( s_CltInfo.Value ( i ) -> Name () ) -> Uses ();
+
+ for ( j = 1; j <= use -> Length (); ++j )
+
+ if ( use -> Value ( j ) -> IsSameString ( cltName ) ) return retVal;
+
+ fDuplicate = Standard_True;
+ break;
+
+ } // end else
+
+ } // end if
+
+ } // end for
+
+ return retVal;
+
+} // end CPPJini_Defined
+
// Standard Extractor API : list the EDL files used by this program
//
Handle(TColStd_HSequenceOfHAsciiString) CPPJini_TemplatesUsed()
return result;
}
+static void _CPPJini_FillUses (
+ const Handle( MS_MetaSchema )& ms,
+ const Handle( TColStd_HSequenceOfHAsciiString )& use
+ ) {
+
+ Standard_Integer i;
+
+ for ( i = 1; i <= use -> Length (); ++i )
+
+ if ( !s_CltMap.Contains ( use -> Value ( i ) ) ) {
+
+ Handle( MS_Client ) clt = ms -> GetClient ( use -> Value ( i ) );
+
+ s_CltInfo.Prepend ( new CPPJini_ClientInfo ( ms, use -> Value ( i ) ) );
+ s_CltMap.Add ( use -> Value ( i ) );
+
+ _CPPJini_FillUses ( ms, clt -> Uses () );
+
+ } // end if
+
+} // end _CPPJini_FillUses
+
void CPPJini_Init(const Handle(MS_MetaSchema)& aMeta,
const Handle(TCollection_HAsciiString)& aName,
const Handle(MS_HSequenceOfExternMet)& SeqOfEM,
const Handle(TColStd_HSequenceOfHAsciiString)& use
) {
- Handle(MS_Client) client;
+ Handle( MS_Client ) client;
SeqOfMemberMet = SeqOfMM;
SeqOfExternMet = SeqOfEM;
Standard_NoSuchObject::Raise();
}
- Standard_Integer i;
- Standard_Integer useLen = use -> Length ();
-
- if ( s_Length ) {
-
- for ( i = 0; i < s_Length; ++i ) delete s_CltInfo[ i ];
-
- delete [] s_CltInfo;
-
- } // end if
-
- s_Length = useLen;
- s_CltInfo = new CPPJini_ClientInfo*[ s_Length ];
-
- for ( i = 0; i < s_Length; ++i )
+ s_CltInfo.Clear ();
+ s_CltMap.Clear ();
- s_CltInfo[ i ] = new CPPJini_ClientInfo ( aMeta, use -> Value ( i + 1 ) );
+ _CPPJini_FillUses ( aMeta, use );
}
}
}
- Handle(MS_HArray1OfParam) seqparam = aMethod->Params();
+ Standard_Boolean fEnum = Standard_False;
+ Handle(MS_HArray1OfParam) seqparam = aMethod->Params();
if(!seqparam.IsNull()) {
for (i = 1; i <= seqparam->Length(); i++) {
thetype = seqparam->Value(i)->Type();
+
+ if ( !fEnum && thetype -> IsKind ( STANDARD_TYPE( MS_Enum ) ) ) fEnum = Standard_True;
+
parname = seqparam->Value(i)->TypeName();
if (thetype->IsKind(STANDARD_TYPE(MS_Alias))) {
CPPJini_DispatchUsedType(aMeta,thetype,List,Incp,Standard_False);
}
}
+ if ( fEnum ) List -> Append ( new TCollection_HAsciiString ( "Standard_Integer" ) );
}
}
const Handle(TCollection_HAsciiString)& methodName,
const Standard_Integer MethodNumber)
{
-
Handle(MS_InstMet) im;
Handle(MS_ClassMet) cm;
Handle(MS_Construc) ct;
ArgsInCall->AssignCat("the_");
ArgsInCall->AssignCat(aSeqP->Value(i)->Name());
if (aSeqP->Value(i)->IsOut()) {
+
+ Handle( TCollection_HAsciiString ) cltName;
+ Handle( TCollection_HAsciiString ) iName = CPPJini_Defined (
+ aClass -> FullName (), cltName
+ ) ? cltName : CPPJini_InterfaceName;
+
api -> AddVariable (
"%FromInterface",
CPPJini_DotReplace (
- CPPJini_InterfaceName -> ToCString (), '/'
+ iName -> ToCString (), '/'
) -> ToCString ()
);
api->Apply("%MetOut","TransientSetValue");
}
case CPPJINI_ENUMERATION :
+ {
+ ArgsInCall->AssignCat("the_");
+ ArgsInCall->AssignCat(aSeqP->Value(i)->Name());
+ api -> AddVariable ( "%EnumName", curtype -> FullName () -> ToCString () );
+ api->Apply("%Method","IntegerGetEnumValue");
+ ArgsRetrieve->AssignCat(api->GetVariableValue("%Method"));
+ api->Apply("%MetOut","IntegerSetValue");
+ ArgsOut->AssignCat(api->GetVariableValue("%MetOut"));
+ break;
+ }
case CPPJINI_INTEGER :
{
ArgsInCall->AssignCat("the_");
api->AddVariable("%MethodCall",MethodCall->ToCString());
if (CPPJini_IsCasType(rtype->FullName())) {
+
api->AddVariable("%FromInterface","jcas");
}
else {
+
+ Handle( TCollection_HAsciiString ) cltName;
+ Handle( TCollection_HAsciiString ) iName = CPPJini_Defined (
+ aClass -> FullName (), cltName
+ ) ? cltName : CPPJini_InterfaceName;
api -> AddVariable (
"%FromInterface",
CPPJini_DotReplace (
- CPPJini_InterfaceName -> ToCString (), '/'
+ iName -> ToCString (), '/'
) -> ToCString ()
);
}
api->AddVariable("%FromInterface","jcas");
}
else {
+
+ Handle( TCollection_HAsciiString ) cltName;
+ Handle( TCollection_HAsciiString ) iName = CPPJini_Defined (
+ rtype -> FullName (), cltName
+ ) ? cltName : CPPJini_InterfaceName;
api -> AddVariable (
"%FromInterface",
CPPJini_DotReplace (
- CPPJini_InterfaceName -> ToCString (), '/'
+ iName -> ToCString (), '/'
) -> ToCString ()
);
}
const Handle(TColStd_HSequenceOfHAsciiString)& edlsfullpath,
const Handle(TCollection_HAsciiString)& outdir,
const Handle(TColStd_HSequenceOfHAsciiString)& outfile,
- const ExtractionType MustBeComplete,
+ const CPPJini_ExtractionType MustBeComplete,
const Standard_CString Mode)
{
const Standard_CString Mode)
{
if (aMeta->IsDefined(aTypeName) || aMeta->IsPackage(aTypeName)) {
- ExtractionType theMode = CPPJini_COMPLETE;
+ CPPJini_ExtractionType theMode = CPPJini_COMPLETE;
if (strcmp(Mode,"CPPJini_COMPLETE") == 0) {
theMode = CPPJini_COMPLETE;
}
Standard_Boolean fDuplicate;
+ CPPJini_ExtractionType type;
Handle( TCollection_HAsciiString ) cltName;
- if ( theMode == CPPJini_INCOMPLETE ) {
-
- if ( CPPJini_HasIncomplete ( aTypeName, cltName, fDuplicate ) ) {
-
- InfoMsg << "CPPJini" << "Skipping " << aTypeName
- << " (already defined in " << cltName << ")" << endm;
-
- if ( fDuplicate )
-
- WarningMsg << "CPPJini" << cltName << " defined in more than one client declared in 'usues' statement"
- << endm;
-
- return;
-
- } // end if
-
- } else if ( theMode == CPPJini_COMPLETE ) {
+ if ( CPPJini_Defined ( aMeta, aTypeName, cltName, fDuplicate, type ) ) {
- if ( CPPJini_HasComplete ( aTypeName, cltName, fDuplicate ) ) {
+ if ( theMode == CPPJini_COMPLETE && type == CPPJini_COMPLETE ||
+ theMode == CPPJini_INCOMPLETE ||
+ theMode == CPPJini_SEMICOMPLETE && type == CPPJini_COMPLETE
+ ) {
InfoMsg << "CPPJini" << "Skipping " << aTypeName
<< " (already defined in " << cltName << ")" << endm;
if ( fDuplicate )
- WarningMsg << "CPPJini" << cltName << " defined in more than one client declared in 'uses' statement"
+ WarningMsg << "CPPJini" << aTypeName << " defined in more than one client declared in 'uses' statement"
<< endm;
return;
#include <Standard_NoSuchObject.hxx>
+#include <CPPJini_ExtractionType.hxx>
+
extern "C" {
Handle(TColStd_HSequenceOfHAsciiString) Standard_EXPORT CPPJini_TemplatesUsed();
const Standard_CString Mode);
}
-enum ExtractionType {CPPJini_COMPLETE,CPPJini_INCOMPLETE,CPPJini_SEMICOMPLETE};
-
void CPPJini_TransientHandle(const Handle(EDL_API)&,
const Handle(TCollection_HAsciiString)&,
const Handle(TCollection_HAsciiString)&,
const Handle(EDL_API)&,
const Handle(MS_Class)&,
const Handle(TColStd_HSequenceOfHAsciiString)&,
- const ExtractionType,
+ const CPPJini_ExtractionType,
const Handle(MS_HSequenceOfMemberMet)&);
void CPPJini_MPVClass(const Handle(MS_MetaSchema)&,
const Handle(EDL_API)&,
const Handle(MS_Class)&,
const Handle(TColStd_HSequenceOfHAsciiString)&,
- const ExtractionType,
+ const CPPJini_ExtractionType,
const Handle(MS_HSequenceOfMemberMet)&);
void CPPJini_Alias(const Handle(MS_MetaSchema)&,
const Handle(EDL_API)&,
const Handle(MS_Package)&,
const Handle(TColStd_HSequenceOfHAsciiString)&,
- const ExtractionType,
+ const CPPJini_ExtractionType,
const Handle(MS_HSequenceOfExternMet)&);
void CPPJini_BuildMethod(const Handle(MS_MetaSchema)& aMeta,
extern Handle(TCollection_HAsciiString) CPPJini_ErrorArgument;
-enum ExtractionType {CPPJini_COMPLETE,CPPJini_INCOMPLETE,CPPJini_SEMICOMPLETE};
#endif
#include <TColStd_Array1OfInteger.hxx>
#include <WOKTools_Messages.hxx>
+#include <CPPJini_ExtractionType.hxx>
extern Standard_Boolean CPPJini_HasComplete (
const Handle( TCollection_HAsciiString )&,
Standard_Boolean&
);
+extern Standard_Boolean CPPJini_Defined (
+ const Handle( TCollection_HAsciiString )&,
+ Handle( TCollection_HAsciiString )&
+ );
+
+
Handle(TCollection_HAsciiString)& CPPJini_MPVRootName();
extern Handle( TCollection_HAsciiString ) CPPJini_DotReplace ( char*, char = '_' );
const Handle(EDL_API)& api,
const Handle(MS_Class)& aClass,
const Handle(TColStd_HSequenceOfHAsciiString)& outfile,
- const ExtractionType MustBeComplete,
+ const CPPJini_ExtractionType MustBeComplete,
const Handle(MS_HSequenceOfMemberMet)& theMetSeq)
{
Handle(MS_StdClass) theClass = Handle(MS_StdClass)::DownCast(aClass);
else {
Handle( TCollection_HAsciiString ) aClt;
- Standard_Boolean fDup;
Standard_Boolean fPush = Standard_False;
- if ( CPPJini_HasComplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasIncomplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasSemicomplete (
- List -> Value ( i ), aClt, fDup
- )
- ) {
+ if ( CPPJini_Defined ( List -> Value ( i ), aClt ) ) {
fPush = Standard_True;
api -> AddVariable ( "%Interface", aClt -> ToCString () );
}
else {
Handle( TCollection_HAsciiString ) aClt;
- Standard_Boolean fDup;
Standard_Boolean fPush = Standard_False;
- if ( CPPJini_HasComplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasIncomplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasSemicomplete (
- List -> Value ( i ), aClt, fDup
- )
- ) {
+ if ( CPPJini_Defined ( incp -> Value ( i ), aClt ) ) {
fPush = Standard_True;
api -> AddVariable ( "%Interface", aClt -> ToCString () );
// we create the inheritance
//
Handle( TCollection_HAsciiString ) aClt;
- Standard_Boolean fDup;
-
- if ( CPPJini_HasComplete (
- theClass -> FullName (), aClt, fDup
- ) ||
- CPPJini_HasIncomplete (
- theClass -> FullName (), aClt, fDup
- ) ||
- CPPJini_HasSemicomplete (
- theClass -> FullName (), aClt, fDup
- )
- ) {
+ Handle( TCollection_HAsciiString ) name = theClass -> GetInheritsNames () -> Length () ?
+ theClass -> GetInheritsNames () -> Value ( 1 ) :
+ theClass -> FullName ();
+
+ if ( CPPJini_Defined ( name, aClt ) ) {
aClt -> AssignCat ( "." );
- aClt -> AssignCat ( theClass -> FullName () );
+ aClt -> AssignCat ( name );
api -> AddVariable ( "%Inherits", aClt -> ToCString () );
} else {
#include <WOKTools_Messages.hxx>
#include <CPPJini_DataMapOfAsciiStringInteger.hxx>
#include <TColStd_Array1OfInteger.hxx>
+#include <CPPJini_ExtractionType.hxx>
void CPPJini_MethodUsedTypes(const Handle(MS_MetaSchema)& aMeta,
const Handle(MS_Method)& aMethod,
const Handle(EDL_API)& api,
const Handle(MS_Package)& aPackage,
const Handle(TColStd_HSequenceOfHAsciiString)& outfile,
- const ExtractionType mustBeComplete,
+ const CPPJini_ExtractionType mustBeComplete,
const Handle(MS_HSequenceOfExternMet)& theMetSeq)
{
if (!aPackage.IsNull()) {
$
$%Methods
$
-$native static void FinalizeValue(long anHID);
-$
-$public void finalize() {
-$ FinalizeValue(HID);
-$}
+$//native static void FinalizeValue(long anHID);
+$//
+$//public void finalize() {
+$// FinalizeValue(HID);
+$//}
$
$}
@end;
$Standard_Integer the_%ArgName = jcas_GetInteger(env,%ArgName);
@end;
+@template IntegerGetEnumValue(%ArgName,%EnumName) is
+$%EnumName the_%ArgName = ( %EnumName )jcas_GetInteger ( env, %ArgName );
+@end;
+
@template ExtCharacterGetValue(%ArgName) is
$Standard_ExtCharacter the_%ArgName = jcas_GetExtCharacter(env,%ArgName);
@end;
$if ( !%ArgName ) %ArgName = jcas_CreateObject (
$ env, "%FromInterface/%ClassName", %ArgName
$ );
-$jcas_SetHandle(env,%ArgName,thenew_%ArgName);
+$jcas_SetHandle(env,%ArgName,the_%ArgName);
@end;
@template CStringSetValue(%ArgName) is
@template FinalizeForValue(%Class,%MethodName) is
$
-$
+$#if 0
$JNIEXPORT void JNICALL %MethodName(JNIEnv *, jclass, jlong theid)
${
$if (theid) {
$ delete theobj;
$}
$}
-$
+$#endif
@end;
#include <WOKTools_Messages.hxx>
#include <CPPJini_DataMapOfAsciiStringInteger.hxx>
#include <TColStd_Array1OfInteger.hxx>
+#include <CPPJini_ExtractionType.hxx>
extern Standard_Boolean CPPJini_HasComplete (
const Handle( TCollection_HAsciiString )&,
Standard_Boolean&
);
+extern Standard_Boolean CPPJini_Defined (
+ const Handle( TCollection_HAsciiString )&,
+ Handle( TCollection_HAsciiString )&
+ );
+
void CPPJini_MethodUsedTypes(const Handle(MS_MetaSchema)& aMeta,
const Handle(MS_Method)& aMethod,
const Handle(TColStd_HSequenceOfHAsciiString)& List,
const Handle(TColStd_HSequenceOfHAsciiString)& outfile,
const Handle(TColStd_HSequenceOfHAsciiString)& inclist,
const Handle(TColStd_HSequenceOfHAsciiString)& supplement,
- const ExtractionType MustBeComplete)
+ const CPPJini_ExtractionType MustBeComplete)
{
Handle(TCollection_HAsciiString) publics = new TCollection_HAsciiString;
Standard_Integer i;
api->AddVariable("%Inherits",CPPJini_GetFullJavaType(CPPJini_TransientRootName())->ToCString());
}
else {
- api->AddVariable("%Inherits",CPPJini_GetFullJavaType(aClass->GetInheritsNames()->Value(1))->ToCString());
+
+ Handle( TCollection_HAsciiString ) aClt;
+ Handle( TCollection_HAsciiString ) name = aClass -> GetInheritsNames () -> Length () ?
+ aClass -> GetInheritsNames () -> Value ( 1 ) :
+ aClass -> FullName ();
+
+ if ( CPPJini_Defined ( name, aClt ) ) {
+
+ aClt -> AssignCat ( "." );
+ aClt -> AssignCat ( name );
+ api -> AddVariable ( "%Inherits", aClt -> ToCString () );
+
+ } else
+
+ api->AddVariable("%Inherits",CPPJini_GetFullJavaType(aClass->GetInheritsNames()->Value(1))->ToCString());
+
}
api->AddVariable("%Class",aClass->FullName()->ToCString());
const Handle(EDL_API)& api,
const Handle(MS_Class)& aClass,
const Handle(TColStd_HSequenceOfHAsciiString)& outfile,
- const ExtractionType MustBeComplete,
+ const CPPJini_ExtractionType MustBeComplete,
const Handle(MS_HSequenceOfMemberMet)& theMetSeq)
{
Handle(MS_StdClass) theClass = Handle(MS_StdClass)::DownCast(aClass);
}
else {
Handle( TCollection_HAsciiString ) aClt;
- Standard_Boolean fDup;
Standard_Boolean fPush = Standard_False;
- if ( CPPJini_HasComplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasIncomplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasSemicomplete (
- List -> Value ( i ), aClt, fDup
- )
- ) {
+ if ( CPPJini_Defined ( List -> Value ( i ), aClt ) ) {
fPush = Standard_True;
api -> AddVariable ( "%Interface", aClt -> ToCString () );
}
else {
Handle( TCollection_HAsciiString ) aClt;
- Standard_Boolean fDup;
Standard_Boolean fPush = Standard_False;
- if ( CPPJini_HasComplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasIncomplete (
- List -> Value ( i ), aClt, fDup
- ) ||
- CPPJini_HasSemicomplete (
- List -> Value ( i ), aClt, fDup
- )
- ) {
+ if ( CPPJini_Defined ( incp -> Value ( i ), aClt ) ) {
fPush = Standard_True;
api -> AddVariable ( "%Interface", aClt -> ToCString () );
// we create the inheritance
//
Handle( TCollection_HAsciiString ) aClt;
- Standard_Boolean fDup;
-
- if ( CPPJini_HasComplete (
- theClass -> GetInheritsNames ()-> Value ( 1 ), aClt, fDup
- ) ||
- CPPJini_HasIncomplete (
- theClass -> GetInheritsNames ()-> Value ( 1 ), aClt, fDup
- ) ||
- CPPJini_HasSemicomplete (
- theClass -> GetInheritsNames () -> Value ( 1 ), aClt, fDup
- )
- ) {
+ Handle( TCollection_HAsciiString ) name = theClass -> GetInheritsNames () -> Length () ?
+ theClass -> GetInheritsNames () -> Value ( 1 ) :
+ theClass -> FullName ();
+
+ if ( CPPJini_Defined ( name, aClt ) ) {
aClt -> AssignCat ( "." );
- aClt -> AssignCat ( theClass -> GetInheritsNames () -> Value ( 1 ) );
+ aClt -> AssignCat ( name );
api -> AddVariable ( "%Inherits", aClt -> ToCString () );
} else