|
From: Frank V. C. <fr...@us...> - 2001-04-25 03:27:25
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv12882/src/libs/clfw
Modified Files:
Attribute.cpp Concept.cpp
Log Message:
Fully functional schema management, work continues on cleanup and example completion
Index: Attribute.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Attribute.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Attribute.cpp 2001/03/31 22:21:45 1.3
--- Attribute.cpp 2001/04/25 03:27:22 1.4
***************
*** 110,113 ****
--- 110,194 ----
}
+ FrameworkEntityPtr Attribute::getKey( void ) const
+ {
+ return theKey;
+ }
+ const FrameworkEntityPtr &Attribute::getKeyAsReference( void ) const
+ {
+ return theKey;
+ }
+ const FrameworkEntityPtr *Attribute::getKeyAsPointer( void ) const
+ {
+ return &theKey;
+ }
+ void *Attribute::getKeyAsVoidPtr( void ) const
+ {
+ return (void *)getKeyAsPointer();
+ }
+
+ void Attribute::setKey( const FrameworkEntityPtr &aType )
+ {
+ if( aType->getOid().isZero() == true )
+ {
+ UniversalIdentifier aNewId;
+ UniversalIdentifier::setNewUid( aNewId );
+ aType->setOid( aNewId );
+ }
+ else
+ {
+ ; // do nothing
+ }
+ theKey = aType;
+ }
+
+ void Attribute::setKeyFromPointer( FrameworkEntityPtr *aType )
+ {
+ this->setKey(*aType);
+ }
+ void Attribute::setKeyFromVPtr( VoidPtr aType )
+ {
+ this->setKey(*((FrameworkEntityPtr *)aType));
+ }
+
+ FrameworkEntityPtr Attribute::getValue( void ) const
+ {
+ return theValue;
+ }
+ const FrameworkEntityPtr &Attribute::getValueAsReference( void ) const
+ {
+ return theValue;
+ }
+ const FrameworkEntityPtr *Attribute::getValueAsPointer( void ) const
+ {
+ return &theValue;
+ }
+ void *Attribute::getValueAsVoidPtr( void ) const
+ {
+ return (void *)getValueAsPointer();
+ }
+
+ void Attribute::setValue( const FrameworkEntityPtr &aType )
+ {
+ if( aType->getOid().isZero() == true )
+ {
+ UniversalIdentifier aNewId;
+ UniversalIdentifier::setNewUid( aNewId );
+ aType->setOid( aNewId );
+ }
+ else
+ {
+ ; // do nothing
+ }
+ theValue = aType;
+ }
+ void Attribute::setValueFromPointer( FrameworkEntityPtr *aType )
+ {
+ this->setValue(*aType);
+ }
+ void Attribute::setValueFromVPtr( VoidPtr aType )
+ {
+ this->setValue(*((FrameworkEntityPtr *)aType));
+ }
+
//
// MetaType information block
Index: Concept.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Concept.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Concept.cpp 2001/04/08 10:50:43 1.6
--- Concept.cpp 2001/04/25 03:27:22 1.7
***************
*** 173,176 ****
--- 173,186 ----
else
{
+ if( aPtr->getOid().isZero() == true )
+ {
+ UniversalIdentifier aNewId;
+ UniversalIdentifier::setNewUid( aNewId );
+ aPtr->setOid( aNewId );
+ }
+ else
+ {
+ ; // do nothing
+ }
theProperties->put( aPtr );
}
|