|
From: Frank V. C. <fr...@us...> - 2001-04-11 01:39:28
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf2
In directory usw-pr-cvs1:/tmp/cvs-serv11136/src/testdrivers/exf2
Modified Files:
examp2.cpp
Log Message:
Getting ready for gdbm in the schema catalog implementation
Index: examp2.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf2/examp2.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** examp2.cpp 2001/04/10 21:17:50 1.3
--- examp2.cpp 2001/04/11 01:39:25 1.4
***************
*** 100,104 ****
//
! FrameworkEntityPtr getInstanceOf( CharCptr );
AttributePtr buildStringAttribute( CharCptr, CharCptr );
AttributePtr buildStringAttribute( CharCptr, UniversalIdentifierCref );
--- 100,104 ----
//
! FrameworkEntityPtr getInstanceOf( CharCptr, CharCptr domain=NULLPTR );
AttributePtr buildStringAttribute( CharCptr, CharCptr );
AttributePtr buildStringAttribute( CharCptr, UniversalIdentifierCref );
***************
*** 230,266 ****
//
! FrameworkEntityPtr getInstanceOf( CharCptr aClassTarget )
{
FrameworkEntityPtr aPtr( NULLPTR );
! Ontology *aOntology( MetaSpace::getOntology("corelinux") );
!
! if( aOntology != NULLPTR )
{
! Iterator<MetaClassCptr> *aIterator( aOntology->createIterator() );
!
! while( aIterator->isValid() == true && aPtr == NULLPTR )
! {
! MetaClassPtr aClass = (MetaClassPtr) aIterator->getElement();
! if( std::strcmp(aClassTarget,aClass->getInstanceTypeName()) == 0 )
! {
! aClass->dispatch("Construct" , (void **)NULLPTR,(void *)&aPtr);
! if( aPtr == NULLPTR )
! {
! throw NullPointerException( LOCATION );
! }
! else
! {
! ; // do nothing
! }
! }
! else
! {
! ; // do nothing
! }
! aIterator->setNext();
! }
!
! aOntology->destroyIterator( aIterator );
}
--- 230,246 ----
//
! FrameworkEntityPtr getInstanceOf( CharCptr aClassTarget, CharCptr domain )
{
FrameworkEntityPtr aPtr( NULLPTR );
! MetaClassPtr aClass( Ontology::getClassFor( aClassTarget, domain ) );
! aClass->dispatch( "Construct" , (void **)NULLPTR,(void *)&aPtr );
! if( aPtr == NULLPTR )
{
! throw NullPointerException( LOCATION );
! }
! else
! {
! ; // do nothing
}
|