You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(124) |
Nov
(120) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(6) |
Feb
(34) |
Mar
(49) |
Apr
(81) |
May
(25) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(37) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Frank V. C. <fr...@us...> - 2001-04-25 03:27:25
|
Update of /cvsroot/corelinux/clfw/clfw/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv12882/clfw/Persist
Modified Files:
SchemaAbstractStore.hpp SchemaCatStore.hpp SchemaCatalog.hpp
SchemaStore.hpp StoreCatalog.hpp
Log Message:
Fully functional schema management, work continues on cleanup and example completion
Index: SchemaAbstractStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaAbstractStore.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** SchemaAbstractStore.hpp 2001/04/22 14:30:51 1.4
--- SchemaAbstractStore.hpp 2001/04/25 03:27:22 1.5
***************
*** 98,101 ****
--- 98,103 ----
bool hasKey( CharPtr );
+ void removeDesc( CharPtr );
+
void updateDesc
(
Index: SchemaCatStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaCatStore.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SchemaCatStore.hpp 2001/04/21 21:39:01 1.2
--- SchemaCatStore.hpp 2001/04/25 03:27:22 1.3
***************
*** 35,39 ****
{
Dword schemaCatVersion;
! Dword countOfSchemas;
} ;
--- 35,39 ----
{
Dword schemaCatVersion;
! Dword unused;
} ;
Index: SchemaCatalog.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaCatalog.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** SchemaCatalog.hpp 2001/04/21 21:39:01 1.8
--- SchemaCatalog.hpp 2001/04/25 03:27:22 1.9
***************
*** 91,102 ****
// Mutators
//
- /// Save the instance as is
- void saveSchema( SchemaPtr );
-
- /// Close the instance
-
- void closeSchema( SchemaPtr );
-
//
// Base overrides
--- 91,95 ----
***************
*** 154,157 ****
--- 147,151 ----
*/
+
virtual Iterator<FrameworkEntityPtr> *createCatalogIterator( void ) ;
***************
*** 159,162 ****
--- 153,165 ----
virtual void destroyIterator( Iterator<FrameworkEntityPtr> * ) ;
+
+ /// Save the entries (Schemas) in the collection
+
+ virtual void saveEntries( CollectionPtr ) ;
+
+ /// Close the entries (Schemas) in the collection
+
+ virtual void closeEntries( CollectionPtr ) ;
+
Index: SchemaStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaStore.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** SchemaStore.hpp 2001/04/21 21:39:01 1.4
--- SchemaStore.hpp 2001/04/25 03:27:22 1.5
***************
*** 38,41 ****
--- 38,43 ----
DECLARE_CLASS( Schema );
+ DECLARE_CLASS( Concept );
+ DECLARE_CLASS( Attribute );
DECLARE_CLASS( SchemaStore );
***************
*** 188,192 ****
--- 190,217 ----
protected:
+
+ virtual void writeProperties( void );
+ virtual void writeConceptProperties( CollectionPtr );
+ virtual void writeAttribute( FrameworkEntityPtr );
+ virtual void writeEntity( FrameworkEntityPtr );
+
virtual SchemaPtr createSchema( void );
+ virtual void readProperties( SchemaPtr, CounterCref );
+
+ virtual AttributePtr readConcept
+ (
+ ConceptPtr,
+ CollectionPtr,
+ CounterCref
+ );
+
+ virtual void readAttribute( AttributePtr );
+
+ virtual FrameworkEntityPtr readEntity
+ (
+ UniversalIdentifierCref,
+ UniversalIdentifierCref
+ );
+
private:
Index: StoreCatalog.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/StoreCatalog.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** StoreCatalog.hpp 2001/04/08 10:50:43 1.1
--- StoreCatalog.hpp 2001/04/25 03:27:22 1.2
***************
*** 77,80 ****
--- 77,89 ----
+ //
+ // Mutators
+ //
+
+ /// Saves the entry indicated by the argument
+
+ virtual void saveEntries( CollectionPtr ) = 0;
+
+ virtual void closeEntries( CollectionPtr ) = 0;
protected:
|
|
From: Frank V. C. <fr...@us...> - 2001-04-25 03:27:25
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1
In directory usw-pr-cvs1:/tmp/cvs-serv12882/src/testdrivers/exf1
Modified Files:
examp1.cpp
Log Message:
Fully functional schema management, work continues on cleanup and example completion
Index: examp1.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** examp1.cpp 2001/04/03 03:00:14 1.34
--- examp1.cpp 2001/04/25 03:27:22 1.35
***************
*** 336,340 ****
dumpTypeInformation( aType );
!
//
--- 336,340 ----
dumpTypeInformation( aType );
! dumpMetaTypeInformation( FrameworkString::getTypeDescriptor() );
//
|
|
From: Frank V. C. <fr...@us...> - 2001-04-25 03:27:25
|
Update of /cvsroot/corelinux/clfw/src/libs/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv12882/src/libs/Persist
Modified Files:
SchemaAbstractStore.cpp SchemaCatStore.cpp SchemaCatalog.cpp
SchemaStore.cpp
Log Message:
Fully functional schema management, work continues on cleanup and example completion
Index: SchemaAbstractStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaAbstractStore.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** SchemaAbstractStore.cpp 2001/04/22 14:30:51 1.4
--- SchemaAbstractStore.cpp 2001/04/25 03:27:22 1.5
***************
*** 137,140 ****
--- 137,150 ----
//
+ // Remove a block
+ //
+
+ void SchemaAbstractStore::removeDesc( CharPtr aKey )
+ {
+ REQUIRE( theHandle != NULLPTR );
+ datum key ={aKey, strlen(aKey)+1};
+ gdbm_delete((GDBM_FILE)theHandle,key);
+ }
+ //
// Update the toc record
//
Index: SchemaCatStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatStore.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** SchemaCatStore.cpp 2001/04/22 14:30:51 1.6
--- SchemaCatStore.cpp 2001/04/25 03:27:22 1.7
***************
*** 339,344 ****
//
! void SchemaCatStore::remove( CollectionPtr )
{
}
--- 339,363 ----
//
! void SchemaCatStore::remove( CollectionPtr aCollection )
{
+ REQUIRE( aCollection != NULLPTR );
+ SchemaStore *aPtr( NULLPTR );
+ Counter maxCnt( aCollection->getSize() );
+ Char aBuffer[37];
+ SchemaDataDescriptor aSd;
+
+ for( Counter x = 0; x < maxCnt; ++x )
+ {
+ aPtr = SchemaStore::castDown( aCollection->getElementAt(x) );
+ aPtr->getSchemaUid().getAsString( aBuffer );
+ if( SchemaAbstractStore::hasKey( aBuffer ) == true )
+ {
+ SchemaAbstractStore::removeDesc( aBuffer );
+ }
+ else
+ {
+ ; // do nothing
+ }
+ }
}
Index: SchemaCatalog.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatalog.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** SchemaCatalog.cpp 2001/04/22 14:30:51 1.10
--- SchemaCatalog.cpp 2001/04/25 03:27:22 1.11
***************
*** 57,60 ****
--- 57,64 ----
#endif
+ #if !defined(__DESCRIPTORNOTFOUND_HPP)
+ #include <clfw/DescriptorNotFound.hpp>
+ #endif
+
extern "C"
{
***************
*** 339,343 ****
AttributePtr aAttr( Attribute::create() );
FrameworkStringPtr aKey( FrameworkString::create() );
! aKey->setValue( aName->getValue() );
aAttr->setKey( aKey );
aAttr->setValue( aStore );
--- 343,347 ----
AttributePtr aAttr( Attribute::create() );
FrameworkStringPtr aKey( FrameworkString::create() );
! *aKey = aName->getValue();
aAttr->setKey( aKey );
aAttr->setValue( aStore );
***************
*** 367,370 ****
--- 371,455 ----
REQUIRE( aCollection != NULLPTR );
+ //
+ // Check for instance based on name or uuid
+ //
+
+ FrameworkStringPtr aName
+ (
+ Store::resolveValueAssignment(aCollection,&Store::getNameKey())
+ );
+
+ if( aName != NULLPTR )
+ {
+ Attribute srchAttr;
+ ElementIndex index;
+
+ srchAttr.setKey(aName);
+
+ if( ( index = theSchemas.indexOf( &srchAttr ) ) >= 0 )
+ {
+ AttributePtr anEntry
+ (
+ Attribute::castDown( theSchemas.getElementAt( index ) )
+ );
+
+ SchemaStorePtr aSchStore
+ (
+ SchemaStore::castDown( anEntry->getValue() )
+ );
+
+ //
+ // Delete the store
+ //
+
+ aSchStore->close();
+
+ FrameworkString aBase( aSchStore->getLocation() );
+ aBase += "/";
+ aBase += aSchStore->getName();
+ Int results(0);
+
+ //
+ // If we can unlink the file, we remove the in memory
+ // reference as well as the entry from the CatalogStore
+ //
+
+ if( (results = Environment::removeCommonAccess( aBase.getValue() ) ) == 0 )
+ {
+ Array anArray;
+
+ anArray.put( aSchStore );
+
+ theSchemas.remove( anEntry );
+ theCatalog->remove( &anArray );
+
+ FrameworkString::destroy
+ (
+ FrameworkString::castDown( anEntry->getKey() )
+ );
+
+ SchemaStore::destroy( aSchStore );
+ Attribute::destroy( anEntry );
+ }
+ else
+ {
+ cerr << "Return from remove = " << results << endl;
+ }
+
+ //
+ // Remove catalog entry
+ //
+
+ }
+ else
+ {
+ ; // return null, not found
+ }
+ }
+ else
+ {
+
+ }
+
}
***************
*** 422,431 ****
//
! // Save the schema
//
! void SchemaCatalog::saveSchema( SchemaPtr )
{
}
--- 507,568 ----
//
! // Save the schemas identified in the collection
! // Assumes that the object in the collection is a schema
! // pointer
//
! void SchemaCatalog::saveEntries( CollectionPtr aCollection )
{
+ REQUIRE( aCollection != NULLPTR );
+
+ SchemaPtr aPtr( NULLPTR );
+ SchemaStorePtr aSchemaStore( NULLPTR );
+
+ for( Counter entries=0; entries < aCollection->getSize(); ++entries )
+ {
+ aPtr = Schema::castDown( aCollection->getElementAt(entries) );
+ //
+ // Resolve the store that handles
+ // this schema
+ //
+
+ Counter maxCnt( theSchemas.getSize() );
+
+ for( Counter x = 0; x < maxCnt; ++x )
+ {
+ AttributePtr anAttribute
+ (
+ Attribute::castDown
+ (
+ theSchemas.getElementAt(x)
+ )
+ );
+
+ aSchemaStore = SchemaStore::castDown( anAttribute->getValue() );
+ if( aSchemaStore->getSchemaUid() == aPtr->getOid() )
+ {
+ x = maxCnt;
+ }
+ else
+ {
+ aSchemaStore = NULLPTR;
+ }
+ }
+
+ //
+ // Close the schema but retain the store
+ //
+
+ if( aSchemaStore != NULLPTR )
+ {
+ aSchemaStore->write(NULLPTR);
+ }
+ else
+ {
+ throw DescriptorNotFound( LOCATION );
+
+ }
+ }
}
***************
*** 434,440 ****
//
! void SchemaCatalog::closeSchema( SchemaPtr )
{
}
--- 571,626 ----
//
! void SchemaCatalog::closeEntries( CollectionPtr aCollection )
{
+ REQUIRE( aCollection != NULLPTR );
+
+ SchemaPtr aPtr( NULLPTR );
+ SchemaStorePtr aSchemaStore( NULLPTR );
+ for( Counter entries=0; entries < aCollection->getSize(); ++entries )
+ {
+ aPtr = Schema::castDown( aCollection->getElementAt(entries) );
+ //
+ // Resolve the store that handles
+ // this schema
+ //
+
+ Counter maxCnt( theSchemas.getSize() );
+
+ for( Counter x = 0; x < maxCnt; ++x )
+ {
+ AttributePtr anAttribute
+ (
+ Attribute::castDown
+ (
+ theSchemas.getElementAt(x)
+ )
+ );
+
+ aSchemaStore = SchemaStore::castDown( anAttribute->getValue() );
+ if( aSchemaStore->getSchemaUid() == aPtr->getOid() )
+ {
+ x = maxCnt;
+ }
+ else
+ {
+ aSchemaStore = NULLPTR;
+ }
+ }
+
+ //
+ // Close the schema but retain the store
+ //
+
+ if( aSchemaStore != NULLPTR )
+ {
+ aSchemaStore->close();
+ }
+ else
+ {
+ throw DescriptorNotFound( LOCATION );
+
+ }
+ }
}
Index: SchemaStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaStore.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** SchemaStore.cpp 2001/04/22 14:30:51 1.5
--- SchemaStore.cpp 2001/04/25 03:27:22 1.6
***************
*** 19,22 ****
--- 19,67 ----
*/
+ /*
+ The management of information layout has the following model:
+
+ Schema(Uid)-> Collection(Uid),
+ CollectionClass(Uid),
+ Size(Dword)
+
+ Collection(Uid)-> Concept(Uid)[0],
+ ConceptClass(Uid)[0],
+ ConceptCollection(Uid)[0],
+ ConceptCollectionClass(Uid)[0],
+ ConceptCollectionSize(Dword)[0],
+ ...
+ Concept(Uid)[Size-1]
+ ConceptClass(Uid)[Size-1],
+ ConceptCollection(Uid)[Size-1],
+ ConceptCollectionClass(Uid)[Size-1],
+ ConceptCollectionSize(Dword)[Size-1]
+
+ ConceptCollection(Uid)-> Attribute(Uid)[0],
+ AttributeClass(Uid)[0],
+ Attribute(Uid)[ConceptCollectionSize-1]
+ AttributeClass(Uid)[ConceptCollectionSize-1]
+
+ AttributeClass(Uid)[0]-> Key(Uid),
+ KeyClass(Uid),
+ Value(Uid),
+ ValueClass(Uid)
+
+ Key(Uid)-> FrameworkEntity(Uid) | zeroOid,
+ CountOfValues(Dword),
+ SizeOf(Dword)[0],
+ Data(variable)[0],
+ ...
+ SizeOf(Dword)[CountOfValues-1],
+ Data(variable)[CountOfValues-1]
+
+ Value(Uid)->FrameworkEntity(Uid) | zeroOid,
+ CountOfValues(Dword),
+ SizeOf(Dword)[0],
+ Data(variable)[0],
+ ...
+ SizeOf(Dword)[CountOfValues-1],
+ Data(variable)[CountOfValues-1],
+ */
#define PERSIST_FRAMEWORK
***************
*** 66,70 ****
--- 111,131 ----
DECLARE_TYPE( struct __SchemaStoreDesc, SchemaDesc );
+ typedef struct __ConceptDesc
+ {
+ UniqueId conceptOid;
+ UniqueId conceptClass;
+ UniqueId conceptColOid;
+ UniqueId conceptColClass;
+ Dword conceptColSize;
+ } ConceptDesc, *ConceptDescPtr;
+
+ typedef struct __AttrDesc
+ {
+ UniqueId attrOid;
+ UniqueId attrClass;
+ } AttrDesc,*AttrDescPtr;
+
const FrameworkString schemaMode("Write");
+ const FrameworkString conceptNameKey("Name");
//
***************
*** 104,107 ****
--- 165,191 ----
SchemaStore::~SchemaStore( void )
{
+ if( theSchema != NULLPTR )
+ {
+ CollectionPtr aCol(theSchema->getProperties());
+ MetaClassPtr aClass
+ ( Ontology::getClassFor
+ (
+ aCol->getType()->getIdentifier()
+ )
+ );
+ aClass->dispatch(aCol, "Destruct" , NULLPTR, NULLPTR );
+ aClass = Ontology::getClassFor
+ (
+ theSchema->getType()->getIdentifier()
+ );
+ aClass->dispatch(theSchema, "Destruct" , NULLPTR, NULLPTR );
+ theSchema = NULLPTR;
+ theCreatedFlag = false;
+ }
+ else
+ {
+ ; // do nothing
+ }
+
SchemaAbstractStore::closeStore();
}
***************
*** 436,439 ****
--- 520,547 ----
{
SchemaAbstractStore::closeStore();
+ if( theSchema != NULLPTR )
+ {
+ CollectionPtr aCol(theSchema->getProperties());
+ MetaClassPtr aClass
+ ( Ontology::getClassFor
+ (
+ aCol->getType()->getIdentifier()
+ )
+ );
+ aClass->dispatch(aCol, "Destruct" , NULLPTR, NULLPTR );
+
+ aClass = Ontology::getClassFor
+ (
+ theSchema->getType()->getIdentifier()
+ );
+ aClass->dispatch(theSchema, "Destruct" , NULLPTR, NULLPTR );
+
+ theSchema = NULLPTR;
+ theCreatedFlag = false;
+ }
+ else
+ {
+ ; // do not worry
+ }
}
***************
*** 551,554 ****
--- 659,817 ----
this->updateDesc( key, ad );
+ //
+ // Now the work for writing out what the collection tells us
+ //
+
+ this->writeProperties();
+
+ }
+
+ //
+ // The work goes here. We know we have the base record which puts
+ // the collection out, now we must serialize out the information
+ //
+
+ void SchemaStore::writeProperties( void )
+ {
+ CollectionPtr aCol( theSchema->getProperties() );
+ Char key[37];
+
+ Counter aSize( aCol->getSize() );
+ SchemaDataDescriptor aCollDesc;
+ Int totalSize( sizeof(ConceptDesc) * aSize );
+ ConceptDesc *aCncPtr( NULLPTR );
+
+ aCncPtr = (ConceptDescPtr) ::new Char[ totalSize ] ;
+
+ aCollDesc.setDescriptor( totalSize,CharPtr(aCncPtr) );
+
+ for( Counter x = 0; x < aSize; ++x )
+ {
+ // First put out the attribute information
+
+ AttributePtr aAttr( Attribute::castDown( aCol->getElementAt(x) ));
+ if( aAttr->getValue()->getType()->isTypeOf( Concept::getTypeDescriptor() ) )
+ {
+ ConceptPtr aConcept( Concept::castDown( aAttr->getValue() ));
+ CollectionPtr aCollection( aConcept->getProperties() );
+
+ aCncPtr->conceptOid =
+ aConcept->getOid().getUniqueId();
+ aCncPtr->conceptClass =
+ aConcept->getType()->getIdentifier().getUniqueId();
+ aCncPtr->conceptColOid =
+ aCollection->getOid().getUniqueId();
+ aCncPtr->conceptColClass =
+ aCollection->getType()->getIdentifier().getUniqueId();
+ aCncPtr->conceptColSize = aCollection->getSize();
+
+ ++aCncPtr;
+ this->writeConceptProperties( aCollection );
+ }
+ else
+ {
+ throw DescriptorNotFound( LOCATION );
+ }
+ }
+ aCol->getOid().getAsString( key );
+ this->updateDesc( key, aCollDesc );
+ }
+
+ void SchemaStore::writeConceptProperties( CollectionPtr aPtr )
+ {
+ Char key[37];
+ Counter aSize( aPtr->getSize() );
+ SchemaDataDescriptor aCollDesc;
+ Int totalSize( sizeof(AttrDesc) * aSize );
+ AttrDesc *aAttrPtr( NULLPTR );
+
+ aAttrPtr = (AttrDescPtr) ::new Char[ totalSize ] ;
+
+ aCollDesc.setDescriptor( totalSize,CharPtr(aAttrPtr) );
+
+ //
+ // For every element in the property, we have two ids
+ // which are put out:
+ // Attribute uid
+ // Attribute classid
+ //
+
+ for( Counter x = 0; x < aSize; ++x )
+ {
+ FrameworkEntityPtr aEnt( aPtr->getElementAt(x) );
+ aAttrPtr->attrOid = aEnt->getOid().getUniqueId();
+ aAttrPtr->attrClass = aEnt->getType()->getIdentifier().getUniqueId();
+ ++aAttrPtr;
+ this->writeAttribute( aEnt );
+ }
+
+ aPtr->getOid().getAsString( key );
+ this->updateDesc( key, aCollDesc );
+ }
+
+ void SchemaStore::writeAttribute( FrameworkEntityPtr aPtr )
+ {
+ AttributePtr anAtt( Attribute::castDown( aPtr ) );
+ Char key[37];
+ SchemaDataDescriptor aAttDesc;
+ UniqueIdPtr aUidPtr( ::new UniqueId[4] );
+ FrameworkEntityPtr aEntityPtr( NULLPTR );
+
+ aAttDesc.setDescriptor( sizeof(UniqueId)*4,CharPtr(aUidPtr) );
+
+ // Get the key information
+
+ aEntityPtr = anAtt->getKey();
+ *aUidPtr = aEntityPtr->getOid().getUniqueId();
+ aUidPtr++;
+ *aUidPtr = aEntityPtr->getType()->getIdentifier().getUniqueId();
+ aUidPtr++;
+
+ this->writeEntity( aEntityPtr );
+
+ // Get the value information
+
+ aEntityPtr = anAtt->getValue();
+ *aUidPtr = aEntityPtr->getOid().getUniqueId();
+ aUidPtr++;
+ *aUidPtr = aEntityPtr->getType()->getIdentifier().getUniqueId();
+
+ this->writeEntity( aEntityPtr );
+
+ anAtt->getOid().getAsString( key );
+ this->updateDesc( key, aAttDesc );
+
+ }
+
+ //
+ // Right now we only support name value pairs, so this has
+ // to be FrameworkStrings
+ //
+
+ void SchemaStore::writeEntity( FrameworkEntityPtr aPtr )
+ {
+ FrameworkStringPtr aStr( FrameworkString::castDown( aPtr ) );
+ Char key[37];
+ SchemaDataDescriptor aEntDesc;
+ Int totalSize(sizeof(UniqueId));
+ Dword sLen( std::strlen( aStr->getValue() ) + 1 );
+
+ totalSize += sizeof(Dword)*2;
+ totalSize += sLen;
+ CharPtr aBuffer( ::new Char[totalSize] );
+
+ aEntDesc.setDescriptor( totalSize,aBuffer );
+
+ *(UniqueIdPtr(aBuffer)) = UniversalIdentifier::getZeroUid().getUniqueId();
+ aBuffer += sizeof( UniqueId );
+ *(DwordPtr(aBuffer)) = 1;
+ aBuffer += sizeof( Dword );
+ *(DwordPtr(aBuffer)) = sLen;
+ aBuffer += sizeof( Dword );
+ std::strcpy( aBuffer, aStr->getValue() );
+
+ aStr->getOid().getAsString( key );
+ this->updateDesc( key, aEntDesc );
+
}
***************
*** 567,570 ****
--- 830,834 ----
FrameworkEntityPtr aPtr( NULLPTR );
SchemaPtr aScm( NULLPTR );
+ Counter aSize(0);
MetaClassPtr aClass( Ontology::getClassFor( theSchemaClassId ) );
***************
*** 633,637 ****
UniversalIdentifier aColClass;
SchemaDataDescriptorPtr aD;
- Counter aSize(0);
aD = SchemaDataDescriptor::castDown( aResult->getElementAt(0) );
--- 897,900 ----
***************
*** 667,670 ****
--- 930,948 ----
aCollection->setOid( aCID );
aScm->setProperties( Collection::castDown( aCollection ) );
+
+ //
+ // The schema is now ready to read in the rest of the
+ // goods, if it has any
+ //
+
+ if( aSize != 0 )
+ {
+ this->readProperties( aScm, aSize );
+ }
+ else
+ {
+ ; // do nothing
+ }
+
}
***************
*** 672,675 ****
--- 950,1312 ----
}
+ void SchemaStore::readProperties( SchemaPtr aScm, CounterCref aSize )
+ {
+ Char key[37];
+ Array anArray;
+ FrameworkString aKey;
+
+ aScm->getProperties()->getOid().getAsString(key);
+
+ aKey = key;
+ anArray.put(&aKey);
+ CollectionPtr aResult( this->read(&anArray) );
+
+ if( aResult->getSize() == 1 )
+ {
+ SchemaDataDescriptorPtr aD =
+ SchemaDataDescriptor::castDown( aResult->getElementAt(0) );
+
+ //
+ // The size of the buffer represents the structures of
+ // concept descriptors saved with the model
+ //
+
+ if( ( aD->getBufferSize() / (Int)sizeof(ConceptDesc) ) == aSize )
+ {
+ ConceptDesc *aCncPtr( NULLPTR );
+
+ aCncPtr = ConceptDescPtr(aD->getBuffer());
+ for( Counter x = 0; x < aSize; ++x , ++aCncPtr )
+ {
+ FrameworkEntityPtr aConcept( NULLPTR );
+ FrameworkEntityPtr aCollection( NULLPTR );
+
+ //
+ // Construct the concept
+ //
+
+ MetaClassPtr aClass
+ (
+ Ontology::getClassFor( aCncPtr->conceptClass )
+ );
+
+ aClass->dispatch
+ (
+ "Construct" ,
+ (void **)NULLPTR,
+ (void *)&aConcept
+ );
+
+ //
+ // Construct the concept collection
+ //
+
+ aClass =
+ (
+ Ontology::getClassFor( aCncPtr->conceptColClass )
+ );
+
+ aClass->dispatch
+ (
+ "Construct" ,
+ (void **)NULLPTR,
+ (void *)&aCollection
+ );
+
+ if( aConcept != NULLPTR && aCollection != NULLPTR )
+ {
+ aConcept->setOid( aCncPtr->conceptOid );
+ aCollection->setOid( aCncPtr->conceptColOid );
+
+ //
+ // Build the concept and store in
+ // the schema
+ //
+
+ try
+ {
+ aScm->addAttribute
+ (
+ this->readConcept
+ (
+ Concept::castDown( aConcept ),
+ Collection::castDown( aCollection ),
+ Counter(aCncPtr->conceptColSize)
+ )
+ );
+ }
+ catch( NullPointerExceptionRef aNPEx )
+ {
+ this->returnReadCollection( aResult );
+ throw aNPEx;
+ }
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+ this->returnReadCollection( aResult );
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+
+
+ AttributePtr SchemaStore::readConcept
+ (
+ ConceptPtr aConcept,
+ CollectionPtr aCollection,
+ CounterCref aSize
+ )
+ {
+ AttributePtr aCncAtt( NULLPTR );
+ Char key[37];
+ Array anArray;
+ FrameworkString aKey;
+
+ aConcept->setProperties( aCollection );
+ aCollection->getOid().getAsString(key);
+
+ aKey = key;
+ anArray.put(&aKey);
+ CollectionPtr aResult( this->read(&anArray) );
+
+ if( aResult->getSize() == 1 )
+ {
+ SchemaDataDescriptorPtr aD =
+ SchemaDataDescriptor::castDown( aResult->getElementAt(0) );
+
+ //
+ // The size of the buffer represents the structures of
+ // attribute descriptors saved with the model
+ //
+
+ if( ( aD->getBufferSize() / (Int)sizeof(AttrDesc) ) == aSize )
+ {
+ AttrDesc *aAttrPtr( NULLPTR );
+
+ aAttrPtr = AttrDescPtr(aD->getBuffer());
+
+ for( Counter x = 0; x < aSize; ++x , ++aAttrPtr )
+ {
+ FrameworkEntityPtr aAtt( NULLPTR );
+
+ //
+ // Construct the concept
+ //
+
+ MetaClassPtr aClass
+ (
+ Ontology::getClassFor( aAttrPtr->attrClass )
+ );
+
+ aClass->dispatch
+ (
+ "Construct" ,
+ (void **)NULLPTR,
+ (void *)&aAtt
+ );
+
+ if( aAtt != NULLPTR )
+ {
+ aAtt->setOid( aAttrPtr->attrOid );
+ this->readAttribute( Attribute::castDown( aAtt ) );
+ aCollection->put(aAtt);
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+ this->returnReadCollection( aResult );
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+
+ /*
+ Counter maxCnt( aCollection->getSize() );
+ for( Counter x = 0; x < maxCnt; ++x )
+ {
+ AttributePtr aPtr( Attribute::castDown( aCollection->getElementAt(x) ));
+ FrameworkStringPtr aS( FrameworkString::castDown(aPtr->getKey()) );
+ cout << "Read [" << aS->getValue() << "] = ";
+ aS = FrameworkString::castDown(aPtr->getValue());
+ cout << aS->getValue() << endl;
+ }
+ */
+ FrameworkStringPtr cncKey
+ (
+ Store::resolveValueAssignment
+ (
+ aCollection,
+ FrameworkStringPtr(&Store::getNameKey())
+ )
+ );
+
+ if( cncKey != NULLPTR )
+ {
+ aCncAtt = Attribute::create();
+ aCncAtt->setKey( cncKey );
+ aCncAtt->setValue( aConcept );
+ }
+ else
+ {
+ throw NullPointerException( LOCATION );
+ }
+
+ return aCncAtt;
+ }
+
+ void SchemaStore::readAttribute( AttributePtr aAtt )
+ {
+ Char key[37];
+ Array anArray;
+ FrameworkString aKey;
+
+ aAtt->getOid().getAsString(key);
+
+ aKey = key;
+ anArray.put(&aKey);
+ CollectionPtr aResult( this->read(&anArray) );
+
+ if( aResult->getSize() == 1 )
+ {
+ SchemaDataDescriptorPtr aD =
+ SchemaDataDescriptor::castDown( aResult->getElementAt(0) );
+
+ //
+ // The size of the buffer represents the structures of
+ // attribute descriptors saved with the model
+ //
+
+ if( aD->getBufferSize() == (Int)((sizeof(AttrDesc))*2) )
+ {
+ AttrDescPtr aEdesc( AttrDescPtr(aD->getBuffer()) );
+
+ try
+ {
+ aAtt->setKey
+ (
+ this->readEntity
+ (
+ aEdesc->attrOid,
+ aEdesc->attrClass
+ )
+ );
+
+ ++aEdesc;
+
+ aAtt->setValue
+ (
+ this->readEntity
+ (
+ aEdesc->attrOid,
+ aEdesc->attrClass
+ )
+ );
+
+ this->returnReadCollection( aResult );
+ }
+ catch( NullPointerExceptionRef aNPExcp )
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+
+ }
+
+ FrameworkEntityPtr SchemaStore::readEntity
+ (
+ UniversalIdentifierCref aOid,
+ UniversalIdentifierCref aClassOid
+ )
+ {
+ FrameworkEntityPtr aEntity( NULLPTR );
+
+ // Process the object
+
+ MetaClassPtr aClass
+ (
+ Ontology::getClassFor( aClassOid )
+ );
+
+ aClass->dispatch
+ (
+ "Construct" ,
+ (void **)NULLPTR,
+ (void *)&aEntity
+ );
+
+ if( aEntity != NULLPTR )
+ {
+ aEntity->setOid( aOid );
+
+ Char key[37];
+ Array anArray;
+ FrameworkString aKey;
+
+ aOid.getAsString(key);
+
+ aKey = key;
+ anArray.put(&aKey);
+ CollectionPtr aResult( this->read(&anArray) );
+ if( aResult->getSize() == 1 )
+ {
+ SchemaDataDescriptorPtr aD =
+ SchemaDataDescriptor::castDown( aResult->getElementAt(0) );
+
+ CharPtr aBuf( aD->getBuffer() );
+ aBuf += sizeof( UniqueId );
+ aBuf += sizeof( Dword );
+ aBuf += sizeof( Dword );
+ *( FrameworkString::castDown( aEntity )) = aBuf;
+ this->returnReadCollection( aResult );
+ }
+ else
+ {
+ this->returnReadCollection( aResult );
+ throw NullPointerException( LOCATION );
+ }
+ }
+ else
+ {
+ throw NullPointerException( LOCATION );
+ }
+
+ return aEntity;
+ }
//
|
|
From: Frank V. C. <fr...@us...> - 2001-04-25 03:27:25
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf2
In directory usw-pr-cvs1:/tmp/cvs-serv12882/src/testdrivers/exf2
Modified Files:
examp2.cpp
Log Message:
Fully functional schema management, work continues on cleanup and example completion
Index: examp2.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf2/examp2.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** examp2.cpp 2001/04/22 14:30:51 1.8
--- examp2.cpp 2001/04/25 03:27:22 1.9
***************
*** 23,27 ****
This may be the begining of the schema management stuff, who knows?
! Maybe that guy over there...no?...over there?
Anyway, for this example we make a number of assertions:
--- 23,27 ----
This may be the begining of the schema management stuff, who knows?
! Maybe that guy over there does...no?...over there?
Anyway, for this example we make a number of assertions:
***************
*** 76,85 ****
#endif
#if !defined(__STORECATALOG_HPP)
#include INCL_StoreCatalog
#endif
! #if !defined(__STORESPONSOR_HPP)
! #include INCL_StoreSponsor
#endif
--- 76,89 ----
#endif
+ #if !defined(__STORESPONSOR_HPP)
+ #include INCL_StoreSponsor
+ #endif
+
#if !defined(__STORECATALOG_HPP)
#include INCL_StoreCatalog
#endif
! #if !defined(__STORE_HPP)
! #include INCL_Store
#endif
***************
*** 87,98 ****
//
// Main entry prototype
//
int main( void );
! SchemaPtr createSchemaAndPopulate( StoreCatalogPtr ) throw ();
! void initializeConcept( ConceptPtr, CharCptr, CharCptr ) throw ();
! void assignCollection( ConceptPtr, CharCptr ) throw ();
//
--- 91,130 ----
//
+ // Data Declarations
+ //
+
+
+ //
// Main entry prototype
//
int main( void );
+
+ //
+ // Menu management
+ //
+
+ Int showMenuGetCommand( void );
+ void commandLoop( StoreCatalogPtr ) throw();
+
+ //
+ // Functions for catalog
+ //
+
+ void displayCatalog( StoreCatalogPtr );
+ void createSchema( StoreCatalogPtr ) throw ();
+ void saveOpen( StoreCatalogPtr ) throw ();
+ void closeOpen( StoreCatalogPtr ) throw ();
+ void deleteSchema( StoreCatalogPtr ) throw ();
+
+ //
+ // Functions for schemas
+ //
+
+ void editSchema( StoreCatalogPtr ) throw ();
! void createConcepts( SchemaPtr ) throw ();
! void initializeConcept( ConceptPtr, CharCptr, CharCptr ) throw ();
! void assignCollection( ConceptPtr, CharCptr ) throw ();
//
***************
*** 103,106 ****
--- 135,139 ----
AttributePtr buildStringAttribute( CharCptr, CharCptr );
AttributePtr buildStringAttribute( CharCptr, UniversalIdentifierCref );
+ AttributePtr buildStringAttribute( CharCptr, FrameworkEntityPtr );
//
***************
*** 133,153 ****
StoreCatalogPtr aCatalog = aSponsor->getCatalog();
-
- // list existing schemas
-
- Iterator<FrameworkEntityPtr> *aItr( aCatalog->createCatalogIterator() );
! while( aItr->isValid() )
! {
! FrameworkStringPtr aName( FrameworkString::castDown(aItr->getElement()));
! cout << "Have entry for " << aName->getValue() << endl;
! aItr->setNext();
! }
!
! aCatalog->destroyIterator( aItr );
!
! // load a schema -or-
! SchemaPtr aSchema( createSchemaAndPopulate(aCatalog) );
}
--- 166,175 ----
StoreCatalogPtr aCatalog = aSponsor->getCatalog();
! //
! // Enter command loop
! //
! commandLoop( aCatalog );
}
***************
*** 172,188 ****
}
//
// Create the empty vessel then populate
// with concepts
//
! SchemaPtr createSchemaAndPopulate( StoreCatalog *aCatalog ) throw ()
{
SetCollection args;
! args.put( buildStringAttribute("Name","SchemaTest") );
! args.put( buildStringAttribute("Collection","SetCollection") );
aCatalog->createEntry(&args);
--- 194,332 ----
}
+ Int showMenuGetCommand( void )
+ {
+ Int results(-1);
+
+ cout << endl;
+ cout << "Schema management command options" << endl;
+ cout << endl << endl;
+ cout << "\t1 - List Catalog " << endl;
+ cout << "\t2 - Create Schema " << endl;
+ cout << "\t3 - Edit Schema " << endl;
+ cout << "\t4 - Close Schemas " << endl;
+ cout << "\t5 - Delete Schema " << endl;
+ cout << "\t9 - Quit " << endl;
+ cout << endl;
+ cout << "Enter command option : ";
+ cin >> results;
+ cout << endl;
+
+ return results;
+ }
+
+ SetCollection liveSchemas;
+
+ void commandLoop( StoreCatalogPtr aSCPtr ) throw ()
+ {
+ Int results(0);
+ while( results != -1 )
+ {
+ results = showMenuGetCommand();
+ if( results > 9 || results < 0 )
+ {
+ cout << "Invalid command option, exiting" << endl;
+ results = -1;
+ }
+ else
+ {
+ switch( results )
+ {
+ case 1:
+ displayCatalog( aSCPtr );
+ break;
+
+ case 2:
+ createSchema( aSCPtr );
+ break;
+
+ case 3:
+ editSchema( aSCPtr );
+ break;
+
+ case 4:
+ saveOpen( aSCPtr );
+ closeOpen( aSCPtr );
+ break;
+
+ case 5:
+ deleteSchema( aSCPtr );
+ break;
+
+ case 9:
+ results = -1;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ }
+
+ }
+
+ void displayCatalog( StoreCatalogPtr aSCPtr )
+ {
+ // list existing schemas
+
+ Iterator<FrameworkEntityPtr> *aItr( aSCPtr->createCatalogIterator() );
+
+ cout << endl <<
+ "********************" << endl <<
+ "Catalog dump display" << endl <<
+ "********************" << endl << endl;
+
+ Counter entCount(0);
+
+ while( aItr->isValid() )
+ {
+ FrameworkStringPtr aName( FrameworkString::castDown(aItr->getElement()));
+ cout << "Entry [" << entCount << "] = " << aName->getValue() << endl;
+ aItr->setNext();
+ ++entCount;
+ }
+
+ aSCPtr->destroyIterator( aItr );
+ cout << endl << "********************" << endl ;
+
+ }
+
//
// Create the empty vessel then populate
// with concepts
//
+
+ char inputBuffer[256];
! void createSchema( StoreCatalog *aCatalog ) throw ()
{
SetCollection args;
+
+ cout << endl << endl <<
+ "Schema creation requires at least two attributes " <<
+ "which are fundementally name value pairs. The attributes are: " <<
+ "Name - no spaces, have fun. " << endl <<
+ "Collection - no spaces..choices are Array and SetCollection " << endl <<
+ endl;
+
+ cout << "Input the Name for the schema ";
+ cin >> inputBuffer;
+
+ FrameworkStringPtr aName( FrameworkString::create() );
+ *aName = inputBuffer;
+
+ cout << "Enter the collection type (Array or SetCollection) ";
+ cin >> inputBuffer;
+
+ FrameworkStringPtr aCollection( FrameworkString::create() );
+ *aCollection = inputBuffer;
! cout << endl << "Creating " << aName->getValue() <<
! " with collection " << aCollection->getValue() << endl;
+ args.put( buildStringAttribute("Name",aName) );
+ args.put( buildStringAttribute("Collection",aCollection) );
+
aCatalog->createEntry(&args);
***************
*** 194,198 ****
AttributePtr aPtr = Attribute::castDown( args.getElementAt(0) );
FrameworkString::destroy( (FrameworkStringPtr)aPtr->getKey() );
- FrameworkString::destroy( (FrameworkStringPtr)aPtr->getValue() );
Attribute::destroy( aPtr );
--- 338,341 ----
***************
*** 200,208 ****
FrameworkString::destroy( (FrameworkStringPtr)aPtr->getKey() );
FrameworkString::destroy( (FrameworkStringPtr)aPtr->getValue() );
- Attribute::destroy( aPtr );
! return aSchema;
}
//
// Constructs a new concept, gives it a name, and
--- 343,495 ----
FrameworkString::destroy( (FrameworkStringPtr)aPtr->getKey() );
FrameworkString::destroy( (FrameworkStringPtr)aPtr->getValue() );
! aPtr->setKey( aName );
! aPtr->setValue( aSchema );
! liveSchemas.put( aPtr );
}
+ void saveOpen( StoreCatalogPtr aSCPtr ) throw ()
+ {
+ Array args;
+
+ //
+ // Loop for gather
+ //
+
+ for( Counter x = 0; x < liveSchemas.getSize(); ++x )
+ {
+ AttributePtr aAtt( Attribute::castDown( liveSchemas.getElementAt(x) ) );
+ args.put( aAtt->getValue() );
+ }
+
+ //
+ // Save
+ //
+ if( args.getSize() > 0 )
+ {
+ aSCPtr->saveEntries( &args );
+ }
+ else
+ {
+ ; // do nothing
+ }
+ }
+
+ void closeOpen( StoreCatalogPtr aSCPtr ) throw ()
+ {
+ Array args;
+ Array indexes;
+
+ //
+ // Loop for gather
+ //
+
+ for( Counter x = 0; x < liveSchemas.getSize(); ++x )
+ {
+ AttributePtr aAtt( Attribute::castDown( liveSchemas.getElementAt(x) ) );
+ args.put( aAtt->getValue() );
+ indexes.put( aAtt );
+ }
+
+ //
+ // Close and remove from live list
+ //
+
+ if( args.getSize() > 0 )
+ {
+ aSCPtr->closeEntries( &args );
+ for( Counter r = 0; r < args.getSize(); ++r )
+ {
+ FrameworkEntityPtr aPtr( indexes.getElementAt(r) );
+ liveSchemas.remove( aPtr );
+ AttributePtr aAtt( Attribute::castDown(aPtr) );
+ FrameworkString::destroy( FrameworkString::castDown(aAtt->getKey()) );
+ Attribute::destroy( aAtt );
+ }
+
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ }
+
+ void deleteSchema( StoreCatalogPtr aSCPtr ) throw ()
+ {
+ displayCatalog( aSCPtr );
+ cout << endl << endl <<
+ "Schema delete requires at least one attribute " <<
+ "which is fundementally a name value pair. The attribute is: " <<
+ "Name - no spaces, from list displayed. " << endl << endl;
+
+ cout << "Input the schema name to be deleted ";
+ cin >> inputBuffer;
+
+ FrameworkString aName;
+ aName = inputBuffer;
+
+ Attribute anAtt;
+ anAtt.setKey( FrameworkStringPtr(&Store::getNameKey()) );
+ anAtt.setValue( &aName );
+
+ Array args;
+ args.put( &anAtt );
+
+ aSCPtr->deleteEntry( &args );
+
+ anAtt.setKey( anAtt.getValue() );
+
+ ElementIndex hit( liveSchemas.indexOf( &anAtt ) );
+
+ if( hit >= 0 )
+ {
+ AttributePtr aAPtr(Attribute::castDown( liveSchemas.getElementAt(hit) ) );
+ FrameworkString::destroy( FrameworkString::castDown(aAPtr->getKey()) );
+ Attribute::destroy( aAPtr );
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ }
+
+ void editSchema( StoreCatalogPtr aSCPtr ) throw ()
+ {
+ //
+ // First get the schema to use in editing
+ //
+
+ //
+ // Then present the options in regards to concepts
+ //
+
+ }
+
+ void createConcepts( SchemaPtr aSchmPtr ) throw ()
+ {
+ ConceptPtr aConcept =
+ Concept::castDown(getInstanceOf("Concept"));
+
+ initializeConcept( aConcept, "AppString","SetCollection" );
+
+ //
+ // Now add what class this concept represents
+ //
+
+ AttributePtr aClass
+ (
+ buildStringAttribute
+ (
+ "Class",
+ FrameworkString::getTypeDescriptor()->getIdentifier()
+ )
+ );
+
+ aConcept->addAttribute( aClass );
+ aSchmPtr->addAttribute( buildStringAttribute("AppString",aConcept) );
+ }
+
//
// Constructs a new concept, gives it a name, and
***************
*** 284,288 ****
)
{
! AttributePtr aAtr( new Attribute );
aAtr->setKey( new FrameworkString(aKey) );
aAtr->setValue( new FrameworkString(aValue) );
--- 571,575 ----
)
{
! AttributePtr aAtr( Attribute::create() );
aAtr->setKey( new FrameworkString(aKey) );
aAtr->setValue( new FrameworkString(aValue) );
***************
*** 302,305 ****
--- 589,601 ----
return buildStringAttribute(aKey,buffer);
}
+
+ AttributePtr buildStringAttribute( CharCptr aKey, FrameworkEntityPtr aValue )
+ {
+ AttributePtr aAtr( Attribute::create() );
+ aAtr->setKey( new FrameworkString(aKey) );
+ aAtr->setValue( aValue );
+ return aAtr;
+ }
+
//
|
|
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 );
}
|
|
From: Frank V. C. <fr...@us...> - 2001-04-25 03:27:25
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv12882/clfw
Modified Files:
Attribute.hpp Catalog.hpp
Log Message:
Fully functional schema management, work continues on cleanup and example completion
Index: Attribute.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Attribute.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Attribute.hpp 2001/03/31 22:21:45 1.3
--- Attribute.hpp 2001/04/25 03:27:22 1.4
***************
*** 80,96 ****
/// Expose the name data member
! DECLARE_INSTANCEDATA( FrameworkEntityPtr, Key );
! /// Expose the value data member
- DECLARE_INSTANCEDATA( FrameworkEntityPtr, Value );
-
-
-
-
protected:
private:
};
--- 80,113 ----
/// Expose the name data member
! _DECLARE_INSTANCEDATA_STATICS(Key);
! _DECLARE_INSTANCEDATA_STATICS(Value);
! FrameworkEntityPtr getKey( void ) const;
! const FrameworkEntityPtr &getKeyAsReference( void ) const;
! const FrameworkEntityPtr *getKeyAsPointer( void ) const;
! void *getKeyAsVoidPtr( void ) const;
!
! FrameworkEntityPtr getValue( void ) const;
! const FrameworkEntityPtr &getValueAsReference( void ) const;
! const FrameworkEntityPtr *getValueAsPointer( void ) const;
! void *getValueAsVoidPtr( void ) const;
! //
! // Mutators
! //
! void setKey( const FrameworkEntityPtr & );
! void setKeyFromPointer( FrameworkEntityPtr * );
! void setKeyFromVPtr( VoidPtr );
!
! void setValue( const FrameworkEntityPtr & );
! void setValueFromPointer( FrameworkEntityPtr * );
! void setValueFromVPtr( VoidPtr );
protected:
private:
+
+ FrameworkEntityPtr theKey;
+ FrameworkEntityPtr theValue;
};
Index: Catalog.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Catalog.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Catalog.hpp 2001/04/21 21:39:01 1.3
--- Catalog.hpp 2001/04/25 03:27:22 1.4
***************
*** 82,86 ****
/**
! Interface to retrieve and entry based on attributes
provided in the collection
@param corelinux::Collection a collection of
--- 82,86 ----
/**
! Interface to retrieve an entry based on attributes
provided in the collection
@param corelinux::Collection a collection of
|
|
From: Frank V. C. <fr...@us...> - 2001-04-22 14:30:55
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv13712/clfw
Modified Files:
UniversalIdentifier.hpp
Log Message:
Refined schema store operations and objects
Index: UniversalIdentifier.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/UniversalIdentifier.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** UniversalIdentifier.hpp 2001/02/24 04:32:31 1.5
--- UniversalIdentifier.hpp 2001/04/22 14:30:51 1.6
***************
*** 121,124 ****
--- 121,131 ----
void getAsString( CharPtr ) const;
+ /**
+ Retrieves the instance structure
+ @returns UniqueId const reference
+ */
+
+ UniqueIdCref getUniqueId( void ) const;
+
/// Fetch theZeroUid
|
|
From: Frank V. C. <fr...@us...> - 2001-04-22 14:30:54
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv13712/src/libs/clfw
Modified Files:
UniversalIdentifier.cpp
Log Message:
Refined schema store operations and objects
Index: UniversalIdentifier.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/UniversalIdentifier.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** UniversalIdentifier.cpp 2001/02/24 04:32:31 1.4
--- UniversalIdentifier.cpp 2001/04/22 14:30:51 1.5
***************
*** 211,214 ****
--- 211,221 ----
}
+ // Fetch the id itself
+
+ UniqueIdCref UniversalIdentifier::getUniqueId( void ) const
+ {
+ return theID;
+ }
+
// Fetch theZeroUid
|
|
From: Frank V. C. <fr...@us...> - 2001-04-22 14:30:54
|
Update of /cvsroot/corelinux/clfw/src/libs/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv13712/src/libs/Persist
Modified Files:
Makefile.am SchemaAbstractStore.cpp SchemaCatStore.cpp
SchemaCatalog.cpp SchemaStore.cpp
Added Files:
SchemaDataDescriptor.cpp
Log Message:
Refined schema store operations and objects
***** Error reading new file: [Errno 2] No such file or directory: 'SchemaDataDescriptor.cpp'
Index: Makefile.am
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Makefile.am 2001/04/17 09:59:43 1.6
--- Makefile.am 2001/04/22 14:30:51 1.7
***************
*** 14,25 ****
noinst_LTLIBRARIES = libclfwp.la
! libclfwp_la_SOURCES = \
! StoreSponsor.cpp \
! StoreCatalog.cpp \
! Store.cpp \
! SchemaSponsor.cpp \
! SchemaCatalog.cpp \
! SchemaAbstractStore.cpp \
! SchemaCatStore.cpp \
SchemaStore.cpp
--- 14,26 ----
noinst_LTLIBRARIES = libclfwp.la
! libclfwp_la_SOURCES = \
! StoreSponsor.cpp \
! StoreCatalog.cpp \
! Store.cpp \
! SchemaDataDescriptor.cpp \
! SchemaSponsor.cpp \
! SchemaCatalog.cpp \
! SchemaAbstractStore.cpp \
! SchemaCatStore.cpp \
SchemaStore.cpp
Index: SchemaAbstractStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaAbstractStore.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** SchemaAbstractStore.cpp 2001/04/21 21:39:01 1.3
--- SchemaAbstractStore.cpp 2001/04/22 14:30:51 1.4
***************
*** 148,162 ****
REQUIRE( theHandle != NULLPTR );
datum key = {aKey, strlen(aKey)+1};
! datum keyd = {aDesc.data,aDesc.dataSize};
gdbm_store((GDBM_FILE)theHandle,key,keyd,GDBM_REPLACE);
}
//
// Fetch a record
//
! SchemaDataDescriptor SchemaAbstractStore::fetchDesc( CharPtr aKey )
{
REQUIRE( theHandle != NULLPTR );
--- 148,180 ----
REQUIRE( theHandle != NULLPTR );
datum key = {aKey, strlen(aKey)+1};
! datum keyd = {aDesc.getBuffer(), aDesc.getBufferSize()};
gdbm_store((GDBM_FILE)theHandle,key,keyd,GDBM_REPLACE);
}
+ void SchemaAbstractStore::updateDesc
+ (
+ CharPtr aKey,
+ Int aSize,
+ CharPtr aBuffer
+ )
+ {
+ REQUIRE( theHandle != NULLPTR );
+ datum key = {aKey, strlen(aKey)+1};
+ datum keyd = {aBuffer,aSize};
+
+ gdbm_store((GDBM_FILE)theHandle,key,keyd,GDBM_REPLACE);
+ }
+
//
// Fetch a record
//
! void SchemaAbstractStore::fetchDesc
! (
! CharPtr aKey,
! SchemaDataDescriptorRef ad
! )
{
REQUIRE( theHandle != NULLPTR );
***************
*** 164,169 ****
datum res = gdbm_fetch((GDBM_FILE)theHandle,key);
! SchemaDataDescriptor ad = { res.dptr,res.dsize };
! return ad;
}
--- 182,186 ----
datum res = gdbm_fetch((GDBM_FILE)theHandle,key);
! ad.setDescriptor( res.dsize, res.dptr );
}
***************
*** 172,199 ****
//
! SchemaDataDescriptor SchemaAbstractStore::fetchDesc
(
! SchemaDataDescriptorCref aKey
)
{
REQUIRE( theHandle != NULLPTR );
! datum key = { aKey.data, aKey.dataSize };
datum res = gdbm_fetch((GDBM_FILE)theHandle,key);
!
! SchemaDataDescriptor ad = { res.dptr,res.dsize };
! return ad;
}
! SchemaDataDescriptor SchemaAbstractStore::fetchFirstKey( void )
{
REQUIRE( theHandle != NULLPTR );
datum key = gdbm_firstkey( (GDBM_FILE)theHandle );
! SchemaDataDescriptor ad = {key.dptr, key.dsize};
! return ad;
}
! SchemaDataDescriptor SchemaAbstractStore::fetchNextKey
(
! SchemaDataDescriptorCref aKey
)
{
--- 189,216 ----
//
! void SchemaAbstractStore::fetchDesc
(
! SchemaDataDescriptorCref aKey,
! SchemaDataDescriptorRef ad
!
)
{
REQUIRE( theHandle != NULLPTR );
! datum key = { aKey.getBuffer(), aKey.getBufferSize() };
datum res = gdbm_fetch((GDBM_FILE)theHandle,key);
! ad.setDescriptor( res.dsize, res.dptr );
}
! void SchemaAbstractStore::fetchFirstKey( SchemaDataDescriptorRef ad )
{
REQUIRE( theHandle != NULLPTR );
datum key = gdbm_firstkey( (GDBM_FILE)theHandle );
! ad.setDescriptor( key.dsize, key.dptr );
}
! void SchemaAbstractStore::fetchNextKey
(
! SchemaDataDescriptorCref aKey,
! SchemaDataDescriptorRef ad
)
{
***************
*** 202,209 ****
(
(GDBM_FILE)theHandle,
! (datum){aKey.data, aKey.dataSize}
);
! SchemaDataDescriptor ad = {nextKey.dptr, nextKey.dsize};
! return ad;
}
--- 219,225 ----
(
(GDBM_FILE)theHandle,
! (datum){aKey.getBuffer(), aKey.getBufferSize()}
);
! ad.setDescriptor( nextKey.dsize, nextKey.dptr );
}
Index: SchemaCatStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatStore.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** SchemaCatStore.cpp 2001/04/21 21:39:01 1.5
--- SchemaCatStore.cpp 2001/04/22 14:30:51 1.6
***************
*** 168,176 ****
if( this->hasKey( gPrimaryKey ) == true )
{
! aSd = SchemaAbstractStore::fetchDesc( gPrimaryKey );
! if( aSd.data != NULLPTR )
{
! theDescriptor = *(CatalogDescriptorPtr(aSd.data));
! std::free( aSd.data );
}
else
--- 168,175 ----
if( this->hasKey( gPrimaryKey ) == true )
{
! SchemaAbstractStore::fetchDesc( gPrimaryKey, aSd );
! if( aSd.getBuffer() != NULLPTR )
{
! theDescriptor = *(CatalogDescriptorPtr(aSd.getBuffer()));
}
else
***************
*** 187,193 ****
else
{
! aSd.data = CharPtr(&gDefFirst);
! aSd.dataSize = sizeof( CatalogDescriptor );
! SchemaAbstractStore::updateDesc( gPrimaryKey,aSd );
}
}
--- 186,195 ----
else
{
! SchemaAbstractStore::updateDesc
! (
! gPrimaryKey,
! sizeof( CatalogDescriptor ),
! CharPtr(&gDefFirst)
! );
}
}
***************
*** 230,238 ****
if( aPtr == NULLPTR || aPtr->isEmpty() == true )
{
! SchemaDataDescriptor aKey = SchemaAbstractStore::fetchFirstKey();
! while( aKey.data != NULLPTR )
{
UniversalIdentifier aTst;
! aTst = aKey.data;
// if we have a true schema key
--- 232,241 ----
if( aPtr == NULLPTR || aPtr->isEmpty() == true )
{
! SchemaDataDescriptor aKey;
! SchemaAbstractStore::fetchFirstKey(aKey);
! while( aKey.getBuffer() != NULLPTR )
{
UniversalIdentifier aTst;
! aTst = aKey.getBuffer();
// if we have a true schema key
***************
*** 240,247 ****
if( aTst != gPrimaryUid )
{
! SchemaDataDescriptor aDesc =
! SchemaAbstractStore::fetchDesc( aKey );
! if( aDesc.data != NULLPTR )
{
AttributePtr aAtt( Attribute::create() );
--- 243,250 ----
if( aTst != gPrimaryUid )
{
! SchemaDataDescriptor aDesc;
! SchemaAbstractStore::fetchDesc( aKey, aDesc );
! if( aDesc.getBuffer() != NULLPTR )
{
AttributePtr aAtt( Attribute::create() );
***************
*** 253,257 ****
aCollection->put( aAtt );
- free( aDesc.data );
}
else
--- 256,259 ----
***************
*** 268,273 ****
}
! SchemaDataDescriptor nextKey = SchemaAbstractStore::fetchNextKey(aKey);
! free(aKey.data);
aKey = nextKey;
}
--- 270,275 ----
}
! SchemaDataDescriptor nextKey;
! SchemaAbstractStore::fetchNextKey(aKey,nextKey);
aKey = nextKey;
}
***************
*** 328,332 ****
aPtr->getSchemaUid().getAsString( aBuffer );
SchemaAbstractStore::updateDesc( aBuffer, aSd );
- free(aSd.data);
}
--- 330,333 ----
Index: SchemaCatalog.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatalog.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** SchemaCatalog.cpp 2001/04/21 21:39:01 1.9
--- SchemaCatalog.cpp 2001/04/22 14:30:51 1.10
***************
*** 79,82 ****
--- 79,177 ----
//
+ // Local iterator
+ //
+
+ class SchemaCatItr : public Iterator<FrameworkEntityPtr>
+ {
+ public:
+
+ SchemaCatItr( SetCollectionPtr aSet )
+ :
+ Iterator<FrameworkEntityPtr>(),
+ theSet( aSet ),
+ theCurrent( 0 ),
+ theEnd( theSet->getSize() )
+ {
+ ; // do nothing
+ }
+
+ virtual ~SchemaCatItr( void )
+ {
+ theSet = NULLPTR;
+ theCurrent = theEnd = 0;
+ }
+
+ virtual bool isValid( void ) const
+ {
+ return ( theCurrent < theEnd && theCurrent >= 0 );
+ }
+
+ virtual FrameworkEntityPtr getElement( void ) const
+ throw(IteratorBoundsException)
+ {
+ AttributePtr anAttr( NULLPTR );
+
+ if( this->isValid() == true )
+ {
+ anAttr = Attribute::castDown( theSet->getElementAt( theCurrent ) );
+ }
+ else
+ {
+ throw IteratorBoundsException( LOCATION );
+ }
+
+ return anAttr->getKey();
+ }
+
+ virtual void setFirst( void )
+ {
+ theCurrent = 0;
+ }
+
+ virtual void setNext( void ) throw (IteratorBoundsException)
+ {
+ if( theCurrent+1 > theEnd )
+ {
+ throw IteratorBoundsException( LOCATION );
+ }
+ else
+ {
+ ++theCurrent;
+ }
+ }
+
+ virtual void setPrevious( void ) throw (IteratorBoundsException)
+ {
+ if( theCurrent-1 < 0 )
+ {
+ throw IteratorBoundsException( LOCATION );
+ }
+ else
+ {
+ --theCurrent;
+ }
+ }
+
+ virtual void setLast( void ) throw (IteratorBoundsException)
+ {
+ if( theEnd == 0 )
+ {
+ throw IteratorBoundsException( LOCATION );
+ }
+ else
+ {
+ theCurrent = theEnd - 1;
+ }
+ }
+
+ private:
+
+ SetCollectionPtr theSet;
+ Counter theCurrent;
+ Counter theEnd;
+
+ };
+
+ //
// Constructor
//
***************
*** 344,358 ****
}
Iterator<FrameworkEntityPtr> *SchemaCatalog::createCatalogIterator( void )
{
! Iterator<FrameworkEntityPtr> *aItr( NULLPTR );
return aItr;
}
! /// Destroy the iterator over the catalog entries
! void SchemaCatalog::destroyIterator( Iterator<FrameworkEntityPtr> * )
{
!
}
--- 439,459 ----
}
+ //
+ // The iterator over the catalog
+ //
+
Iterator<FrameworkEntityPtr> *SchemaCatalog::createCatalogIterator( void )
{
! Iterator<FrameworkEntityPtr> *aItr( new SchemaCatItr(&theSchemas) );
return aItr;
}
! //
! // Destroy the catalog iterator
! //
! void SchemaCatalog::destroyIterator( Iterator<FrameworkEntityPtr> *aPtr )
{
! delete aPtr;
}
Index: SchemaStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaStore.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** SchemaStore.cpp 2001/04/21 21:39:01 1.4
--- SchemaStore.cpp 2001/04/22 14:30:51 1.5
***************
*** 181,186 ****
theSchemaClassId.getAsString( aBase );
! ad.dataSize = totalSize;
! ad.data = CharPtr(aPtr);
return ad;
--- 181,185 ----
theSchemaClassId.getAsString( aBase );
! ad.setDescriptor( totalSize, CharPtr(aPtr) );
return ad;
***************
*** 276,282 ****
//
if( theCreatedFlag == true )
{
! theSchema = this->createSchema();
}
else
--- 275,283 ----
//
+ theSchema = this->createSchema();
+
if( theCreatedFlag == true )
{
! this->write( NULLPTR );
}
else
***************
*** 330,334 ****
void SchemaStore::initialize( SchemaDataDescriptorCref aData )
{
! SchemaDescPtr aDesc( SchemaDescPtr(aData.data) );
Dword maxCnt( aDesc->propcount );
CharPtr aKey( NULLPTR );
--- 331,335 ----
void SchemaStore::initialize( SchemaDataDescriptorCref aData )
{
! SchemaDescPtr aDesc( SchemaDescPtr(aData.getBuffer()) );
Dword maxCnt( aDesc->propcount );
CharPtr aKey( NULLPTR );
***************
*** 442,451 ****
{
//
! // Do they want everything read?
//
if( aPtr == NULLPTR || aPtr->isEmpty() == true )
{
!
}
else
--- 443,453 ----
{
//
! // Do they want just the first part read?
//
+ ArrayPtr anArray( Array::create() );
if( aPtr == NULLPTR || aPtr->isEmpty() == true )
{
! NEVER_GET_HERE;
}
else
***************
*** 454,472 ****
// Perform selected read
//
}
! return aPtr;
}
! void SchemaStore::returnReadCollection( CollectionPtr )
{
}
// Write one or more objects to a store
void SchemaStore::write( CollectionPtr )
{
}
--- 456,554 ----
// Perform selected read
//
+ Counter maxCnt( aPtr->getSize() );
+ for( Counter x = 0; x < maxCnt; ++x )
+ {
+ FrameworkStringPtr aKey
+ (
+ FrameworkString::castDown( aPtr->getElementAt(x) )
+ );
+
+ SchemaDataDescriptorPtr aD(SchemaDataDescriptor::create());
+ this->fetchDesc( aKey->getValue(), *aD );
+ if( aD->getBufferSize() == 0 )
+ {
+ SchemaDataDescriptor::destroy( aD );
+ }
+ else
+ {
+ anArray->put( aD );
+ }
+ }
}
! return anArray;
}
! // Here we just destroy the collection
!
! void SchemaStore::returnReadCollection( CollectionPtr aPtr )
{
+ REQUIRE( aPtr != NULLPTR );
+ Counter maxCnt( aPtr->getSize() );
+ ArrayPtr anArray( Array::castDown( aPtr ) );
+ for( Counter x = 0; x < maxCnt; ++x )
+ {
+ SchemaDataDescriptorPtr aD
+ (
+ SchemaDataDescriptor::castDown( anArray->getElementAt(x) )
+ );
+ SchemaDataDescriptor::destroy( aD );
+ }
+
+ Array::destroy( anArray );
+
}
+ //
// Write one or more objects to a store
+ // Because we have one schema per Schema Store
+ // and that the only user of SchemaStore is
+ // schema catalog, we can ignore the collection
void SchemaStore::write( CollectionPtr )
{
+ //
+ // While we know about theProperties attribute
+ // of Schema, we really should check for other
+ // aspects that have been defined in the instance
+ //
+
+ //
+ // Our collection identifier (Oid) is a key, so we get it
+ // out along with it's type identifier
+ //
+
+ SchemaDataDescriptor ad;
+ CharPtr aPtr( NULLPTR );
+ CollectionPtr aCol( theSchema->getProperties() );
+ Counter aSize( aCol->getSize() );
+ Char key[37];
+
+ Int dSize(sizeof( Dword ) + (sizeof(UniqueId) * 2));
+ ad.setDescriptor(dSize,::new char[dSize]);
+
+
+ // Prepare key
+
+ theSchema->getOid().getAsString( key );
+
+ // And the record
+
+ aPtr = ad.getBuffer();
+
+ *(UniqueIdPtr(aPtr)) = aCol->getOid().getUniqueId();
+ aPtr += sizeof(UniqueId);
+
+ *(UniqueIdPtr(aPtr)) = aCol->getType()->getIdentifier().getUniqueId();
+ aPtr += sizeof(UniqueId);
+
+ *(CounterPtr(aPtr)) = aSize;
+
+ // write this puppy
+
+ this->updateDesc( key, ad );
+
}
***************
*** 514,538 ****
FrameworkEntityPtr aCollection( NULLPTR );
! aClass = Ontology::getClassFor( theCollection.getValue() );
! aClass->dispatch( "Construct" , (void **)NULLPTR,(void *)&aCollection );
!
! if( aCollection == NULLPTR )
{
! throw NullPointerException( theCollection.getValue(), LOCATION );
}
else
{
! aScm->setProperties( Collection::castDown( aCollection ) );
! if( theCreatedFlag == true )
{
! UniversalIdentifier aCID;
! UniversalIdentifier::setNewUid( aCID );
! aCollection->setOid( aCID );
}
else
{
! ; // do nothing, will get read in
}
}
--- 596,670 ----
FrameworkEntityPtr aCollection( NULLPTR );
+ UniversalIdentifier aCID;
! //
! // If we are in for the first time, we construct the
! // collection from the provided (or default) collection
! // type information
! //
!
! if( theCreatedFlag == true )
{
! aClass = Ontology::getClassFor( theCollection.getValue() );
! aClass->dispatch( "Construct" , (void **)NULLPTR,(void *)&aCollection );
!
! UniversalIdentifier::setNewUid( aCID );
}
+
+ //
+ // Otherwise, we read the record from the top
+ // to instantiate the collection
+ //
+
else
{
! Char key[37];
! Array anArray;
! FrameworkString aKey;
!
! theSchemaUid.getAsString(key);
!
! aKey = key;
! anArray.put(&aKey);
! CollectionPtr aResult( this->read(&anArray) );
!
! if( aResult->getSize() == 1 )
{
! UniversalIdentifier aColClass;
! SchemaDataDescriptorPtr aD;
! Counter aSize(0);
!
! aD = SchemaDataDescriptor::castDown( aResult->getElementAt(0) );
!
! CharPtr aColPtr( aD->getBuffer() );
!
! aCID = UniqueIdPtr(aColPtr);
! aColPtr += sizeof(UniqueId);
!
! aColClass = UniqueIdPtr(aColPtr);
! aColPtr += sizeof(UniqueId);
!
! aSize = *(CounterPtr(aColPtr));
!
! aClass = Ontology::getClassFor( aColClass );
! aClass->dispatch( "Construct" , (void **)NULLPTR,(void *)&aCollection );
! this->returnReadCollection( aResult );
}
else
{
! this->returnReadCollection( aResult );
! throw NullPointerException( LOCATION );
}
+
+ }
+
+ if( aCollection == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+ else
+ {
+ aCollection->setOid( aCID );
+ aScm->setProperties( Collection::castDown( aCollection ) );
}
|
|
From: Frank V. C. <fr...@us...> - 2001-04-22 14:30:54
|
Update of /cvsroot/corelinux/clfw/clfw/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv13712/clfw/Persist
Modified Files:
Makefile.am Persist.hpp SchemaAbstractStore.hpp
Added Files:
SchemaDataDescriptor.hpp
Log Message:
Refined schema store operations and objects
***** Error reading new file: [Errno 2] No such file or directory: 'SchemaDataDescriptor.hpp'
Index: Makefile.am
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Makefile.am 2001/04/17 09:59:43 1.6
--- Makefile.am 2001/04/22 14:30:51 1.7
***************
*** 14,24 ****
includedir = @includedir@/Persist
include_HEADERS = Persist.hpp \
! StoreSponsor.hpp \
! StoreCatalog.hpp \
! Store.hpp \
! SchemaSponsor.hpp \
! SchemaCatalog.hpp \
! SchemaAbstractStore.hpp \
! SchemaCatStore.hpp \
SchemaStore.hpp
--- 14,25 ----
includedir = @includedir@/Persist
include_HEADERS = Persist.hpp \
! StoreSponsor.hpp \
! StoreCatalog.hpp \
! Store.hpp \
! SchemaDataDescriptor.hpp \
! SchemaSponsor.hpp \
! SchemaCatalog.hpp \
! SchemaAbstractStore.hpp \
! SchemaCatStore.hpp \
SchemaStore.hpp
Index: Persist.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/Persist.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Persist.hpp 2001/04/15 16:36:08 1.5
--- Persist.hpp 2001/04/22 14:30:51 1.6
***************
*** 40,48 ****
//
! #define INCL_SchemaSponsor <clfw/Persist/SchemaSponsor.hpp>
! #define INCL_SchemaCatalog <clfw/Persist/SchemaCatalog.hpp>
! #define INCL_SchemaAbstractStore <clfw/Persist/SchemaAbstractStore.hpp>
! #define INCL_SchemaCatStore <clfw/Persist/SchemaCatStore.hpp>
! #define INCL_SchemaStore <clfw/Persist/SchemaStore.hpp>
/*
--- 40,49 ----
//
! #define INCL_SchemaDataDescriptor <clfw/Persist/SchemaDataDescriptor.hpp>
! #define INCL_SchemaSponsor <clfw/Persist/SchemaSponsor.hpp>
! #define INCL_SchemaCatalog <clfw/Persist/SchemaCatalog.hpp>
! #define INCL_SchemaAbstractStore <clfw/Persist/SchemaAbstractStore.hpp>
! #define INCL_SchemaCatStore <clfw/Persist/SchemaCatStore.hpp>
! #define INCL_SchemaStore <clfw/Persist/SchemaStore.hpp>
/*
Index: SchemaAbstractStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaAbstractStore.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** SchemaAbstractStore.hpp 2001/04/21 21:39:01 1.3
--- SchemaAbstractStore.hpp 2001/04/22 14:30:51 1.4
***************
*** 30,42 ****
#endif
namespace corelinux
{
- struct __SchemaDD
- {
- char *data;
- Dword dataSize;
- } ;
-
- DECLARE_TYPE( struct __SchemaDD, SchemaDataDescriptor );
DECLARE_CLASS( SchemaAbstractStore );
--- 30,39 ----
#endif
+ #if !defined(__SCHEMADATADESCRIPTOR_HPP)
+ #include <clfw/Persist/SchemaDataDescriptor.hpp>
+ #endif
+
namespace corelinux
{
DECLARE_CLASS( SchemaAbstractStore );
***************
*** 95,108 ****
protected:
! void closeStore( void );
! bool exists( CharPtr );
! Handle openRead( CharPtr );
! Handle openWrite( CharPtr );
! bool hasKey( CharPtr );
! void updateDesc( CharPtr, SchemaDataDescriptorCref );
! SchemaDataDescriptor fetchDesc( CharPtr );
! SchemaDataDescriptor fetchDesc( SchemaDataDescriptorCref );
! SchemaDataDescriptor fetchFirstKey( void );
! SchemaDataDescriptor fetchNextKey( SchemaDataDescriptorCref );
protected:
--- 92,133 ----
protected:
! void closeStore( void );
! bool exists( CharPtr );
! Handle openRead( CharPtr );
! Handle openWrite( CharPtr );
! bool hasKey( CharPtr );
!
! void updateDesc
! (
! CharPtr,
! SchemaDataDescriptorCref
! );
!
! void updateDesc
! (
! CharPtr,
! Int,
! CharPtr
! );
!
! void fetchDesc
! (
! CharPtr,
! SchemaDataDescriptorRef
! );
!
! void fetchDesc
! (
! SchemaDataDescriptorCref,
! SchemaDataDescriptorRef
! );
!
! void fetchFirstKey( SchemaDataDescriptorRef );
!
! void fetchNextKey
! (
! SchemaDataDescriptorCref ,
! SchemaDataDescriptorRef
! );
protected:
|
|
From: Frank V. C. <fr...@us...> - 2001-04-22 14:30:54
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf2
In directory usw-pr-cvs1:/tmp/cvs-serv13712/src/testdrivers/exf2
Modified Files:
examp2.cpp
Log Message:
Refined schema store operations and objects
Index: examp2.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf2/examp2.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** examp2.cpp 2001/04/21 21:39:01 1.7
--- examp2.cpp 2001/04/22 14:30:51 1.8
***************
*** 23,27 ****
This may be the begining of the schema management stuff, who knows?
! Maybe that guy over there...no...over there
Anyway, for this example we make a number of assertions:
--- 23,27 ----
This may be the begining of the schema management stuff, who knows?
! Maybe that guy over there...no?...over there?
Anyway, for this example we make a number of assertions:
***************
*** 136,142 ****
// list existing schemas
// load a schema -or-
! //SchemaPtr aSchema( createSchemaAndPopulate(aCatalog) );
}
--- 136,153 ----
// list existing schemas
+ Iterator<FrameworkEntityPtr> *aItr( aCatalog->createCatalogIterator() );
+
+ while( aItr->isValid() )
+ {
+ FrameworkStringPtr aName( FrameworkString::castDown(aItr->getElement()));
+ cout << "Have entry for " << aName->getValue() << endl;
+ aItr->setNext();
+ }
+
+ aCatalog->destroyIterator( aItr );
+
// load a schema -or-
! SchemaPtr aSchema( createSchemaAndPopulate(aCatalog) );
}
|
|
From: Frank V. C. <fr...@us...> - 2001-04-21 21:39:06
|
Update of /cvsroot/corelinux/clfw/src/libs/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv16775/src/libs/Persist
Modified Files:
SchemaAbstractStore.cpp SchemaCatStore.cpp SchemaCatalog.cpp
SchemaStore.cpp
Log Message:
Creates actual schema db now, although no content. Cleaning, testing, and embellishing
Index: SchemaAbstractStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaAbstractStore.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SchemaAbstractStore.cpp 2001/04/19 03:44:42 1.2
--- SchemaAbstractStore.cpp 2001/04/21 21:39:01 1.3
***************
*** 91,94 ****
--- 91,109 ----
}
+ bool SchemaAbstractStore::exists( CharPtr aName )
+ {
+ GDBM_FILE aTst = gdbm_open(aName,0,GDBM_READER,0666,NULLPTR);
+ if( aTst != 0 )
+ {
+ gdbm_close( aTst );
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ return aTst;
+ }
+
Handle SchemaAbstractStore::openRead( CharPtr aName )
{
Index: SchemaCatStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatStore.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** SchemaCatStore.cpp 2001/04/20 11:16:31 1.4
--- SchemaCatStore.cpp 2001/04/21 21:39:01 1.5
***************
*** 58,63 ****
static CatalogDescriptor gDefFirst = {1,0};
-
-
//
// Constructor
--- 58,61 ----
***************
*** 89,92 ****
--- 87,95 ----
{
SchemaAbstractStore::closeStore();
+
+ //
+ // Iterate through the in memory catalog,
+ // and remove all the instances
+ //
}
***************
*** 129,132 ****
--- 132,139 ----
Store::resolveValueAssignment( aPtr, &Store::getModeKey() );
+ //
+ // Some fundemental things are needed eh?
+ //
+
if( aBase != NULLPTR && aName != NULLPTR )
{
***************
*** 242,246 ****
aVal->initialize( aDesc );
! aAtt->setKey( new FrameworkString( aKey.data ) );
aAtt->setValue( aVal );
--- 249,253 ----
aVal->initialize( aDesc );
! aAtt->setKey( new FrameworkString( aVal->getName() ) );
aAtt->setValue( aVal );
***************
*** 281,284 ****
--- 288,292 ----
// value = SchemaStore
//
+
void SchemaCatStore::returnReadCollection( CollectionPtr aPtr )
{
***************
*** 322,325 ****
--- 330,343 ----
free(aSd.data);
}
+
+ }
+
+ //
+ // Get rid of an entry, which in turn does a full
+ // delete on the schema it may refer to
+ //
+
+ void SchemaCatStore::remove( CollectionPtr )
+ {
}
Index: SchemaCatalog.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatalog.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** SchemaCatalog.cpp 2001/04/20 11:16:31 1.8
--- SchemaCatalog.cpp 2001/04/21 21:39:01 1.9
***************
*** 153,157 ****
Counter SchemaCatalog::getCount( void ) const
{
! return 0;
}
--- 153,157 ----
Counter SchemaCatalog::getCount( void ) const
{
! return theSchemas.getSize();
}
***************
*** 226,230 ****
//
! SchemaStore *aStore = SchemaStore::create();
aStore->setName( *aName );
--- 226,230 ----
//
! SchemaStorePtr aStore = SchemaStore::create();
aStore->setName( *aName );
***************
*** 299,308 ****
if( aName != NULLPTR )
{
! Attribute srchAttr;
srchAttr.setKey(aName);
! if( theSchemas.containsElement( &srchAttr ) == true )
{
!
}
else
--- 299,314 ----
if( aName != NULLPTR )
{
! Attribute srchAttr;
! ElementIndex index;
!
srchAttr.setKey(aName);
! if( ( index = theSchemas.indexOf( &srchAttr ) ) >= 0 )
{
! AttributePtr anEntry
! (
! Attribute::castDown( theSchemas.getElementAt( index ) )
! );
! aSchm = SchemaStore::castDown( anEntry->getValue() )->getSchema();
}
else
***************
*** 338,341 ****
--- 344,359 ----
}
+ Iterator<FrameworkEntityPtr> *SchemaCatalog::createCatalogIterator( void )
+ {
+ Iterator<FrameworkEntityPtr> *aItr( NULLPTR );
+ return aItr;
+ }
+
+ /// Destroy the iterator over the catalog entries
+
+ void SchemaCatalog::destroyIterator( Iterator<FrameworkEntityPtr> * )
+ {
+
+ }
//
Index: SchemaStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaStore.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** SchemaStore.cpp 2001/04/20 11:16:31 1.3
--- SchemaStore.cpp 2001/04/21 21:39:01 1.4
***************
*** 25,34 ****
#endif
#if !defined(__SCHEMA_HPP)
#include <clfw/Schema.hpp>
#endif
! #if !defined(__SCHEMASTORE_HPP)
! #include INCL_SchemaStore
#endif
--- 25,38 ----
#endif
+ #if !defined(__ONTOLOGY_HPP)
+ #include <clfw/Ontology.hpp>
+ #endif
+
#if !defined(__SCHEMA_HPP)
#include <clfw/Schema.hpp>
#endif
! #if !defined(__ATTRIBUTE_HPP)
! #include <clfw/Attribute.hpp>
#endif
***************
*** 45,48 ****
--- 49,57 ----
#endif
+ #if !defined(__SCHEMASTORE_HPP)
+ #include INCL_SchemaStore
+ #endif
+
+
namespace corelinux
{
***************
*** 57,60 ****
--- 66,71 ----
DECLARE_TYPE( struct __SchemaStoreDesc, SchemaDesc );
+ const FrameworkString schemaMode("Write");
+
//
// Constructor
***************
*** 64,68 ****
:
SchemaAbstractStore(),
! theSchema( NULLPTR )
{
--- 75,80 ----
:
SchemaAbstractStore(),
! theSchema( NULLPTR ),
! theCreatedFlag( false )
{
***************
*** 76,84 ****
:
SchemaAbstractStore( aType ),
! theSchema( NULLPTR )
{
theName = aType.getName();
theLocation = aType.getLocation();
! theSchema = aType.getSchema();
}
--- 88,99 ----
:
SchemaAbstractStore( aType ),
! theSchema( NULLPTR ),
! theCreatedFlag( false )
{
theName = aType.getName();
theLocation = aType.getLocation();
! theCollection = aType.getCollectionType();
! theSchemaClassId = aType.getSchemaClassId();
! theSchemaUid = aType.getSchemaUid();
}
***************
*** 172,175 ****
--- 187,194 ----
}
+ //
+ // Accessors for attributes
+ //
+
FrameworkStringCref SchemaStore::getName( void ) const
{
***************
*** 196,206 ****
return theSchemaUid;
}
! SchemaPtr SchemaStore::getSchema( void ) const
{
return theSchema;
}
//
// Routine to take our information out. In the future this may
// change to a collection stuffing
--- 215,327 ----
return theSchemaUid;
}
+
+ //
+ // Accessor for underlying schema.
+ //
! SchemaPtr SchemaStore::getSchema( void )
{
+ //
+ // If we don't have it in memory
+ //
+
+ if( theSchema == NULLPTR )
+ {
+ //
+ // If we don't have a store for it
+ //
+
+ Array anArray;
+ Attribute aName;
+ Attribute aLocation;
+ Attribute aMode;
+
+ aName.setKey( FrameworkEntityPtr(&Store::getNameKey()) );
+ aName.setValue( &theName );
+
+ aLocation.setKey( FrameworkEntityPtr(&Store::getLocationKey()) );
+ aLocation.setValue( &theLocation );
+
+ aMode.setKey( FrameworkEntityPtr(&Store::getModeKey()) );
+ aMode.setValue( FrameworkEntityPtr(&schemaMode) );
+
+ anArray.put( &aName );
+ anArray.put( &aLocation );
+ anArray.put( &aMode );
+
+ FrameworkString aDbm(theLocation);
+ aDbm += "/";
+ aDbm += theName;
+
+ //
+ // We will want to initialize something in this
+ // first if just being created
+ //
+
+ if( this->exists( aDbm.getValue() ) == false )
+ {
+ theCreatedFlag = true;
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ this->open( &anArray );
+
+ anArray.removeAll();
+
+ //
+ // Now we initialize the actual Schema instance
+ //
+
+ if( theCreatedFlag == true )
+ {
+ theSchema = this->createSchema();
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ }
+ else
+ {
+ ; // do nothing and return it
+ }
+
return theSchema;
}
//
+ // Mutators for attributes
+ //
+
+ void SchemaStore::setName( FrameworkStringCref aRef )
+ {
+ theName = aRef;
+ }
+
+ void SchemaStore::setLocation( FrameworkStringCref aRef )
+ {
+ theLocation = aRef;
+ }
+
+ void SchemaStore::setCollectionType( FrameworkStringCref aRef )
+ {
+ theCollection = aRef;
+ }
+
+ void SchemaStore::setSchemaClassId( UniversalIdentifierCref aRef )
+ {
+ theSchemaClassId = aRef;
+ }
+
+ void SchemaStore::setSchemaUid( UniversalIdentifierCref aRef )
+ {
+ theSchemaUid = aRef;
+ }
+
+ //
// Routine to take our information out. In the future this may
// change to a collection stuffing
***************
*** 248,286 ****
}
- // Sets the name
-
- void SchemaStore::setName( FrameworkStringCref aRef )
- {
- theName = aRef;
- }
-
- // Set the location for schema
-
- void SchemaStore::setLocation( FrameworkStringCref aRef )
- {
- theLocation = aRef;
- }
-
- // Set the location for schema
-
- void SchemaStore::setCollectionType( FrameworkStringCref aRef )
- {
- theCollection = aRef;
- }
-
- // Set the class id to use in factory
-
- void SchemaStore::setSchemaClassId( UniversalIdentifierCref aRef )
- {
- theSchemaClassId = aRef;
- }
-
- // Set the uid for the schema during create
-
- void SchemaStore::setSchemaUid( UniversalIdentifierCref aRef )
- {
- theSchemaUid = aRef;
- }
-
//
// Open the gdbm storage for the catalog
--- 369,372 ----
***************
*** 321,340 ****
result = SchemaAbstractStore::openWrite( aDbm.getValue() );
}
-
- //
- // If we open, we need to resolve the existing descriptor
- // or create one if there aren't any found. The exception
- // for the creating would be to check to see if there
- // are actual entites whereas we need a rebuild
- // capability
- //
! if( result != NULLPTR )
{
! SchemaDataDescriptor aSd;
}
else
{
! throw NullPointerException( aDbm.getValue(), LOCATION );
}
}
--- 407,418 ----
result = SchemaAbstractStore::openWrite( aDbm.getValue() );
}
! if( result == NULLPTR )
{
! throw NullPointerException( aDbm.getValue(), LOCATION );
}
else
{
! ; // do nothing
}
}
***************
*** 386,390 ****
}
! //Write one or more objects to a store
void SchemaStore::write( CollectionPtr )
--- 464,468 ----
}
! // Write one or more objects to a store
void SchemaStore::write( CollectionPtr )
***************
*** 392,395 ****
--- 470,543 ----
}
+
+ //
+ // Get rid of an entry, which in turn does a full
+ // delete on the schema it may refer to
+ //
+
+ void SchemaStore::remove( CollectionPtr )
+ {
+
+ }
+
+ SchemaPtr SchemaStore::createSchema( void )
+ {
+ FrameworkEntityPtr aPtr( NULLPTR );
+ SchemaPtr aScm( NULLPTR );
+
+ MetaClassPtr aClass( Ontology::getClassFor( theSchemaClassId ) );
+ aClass->dispatch( "Construct" , (void **)NULLPTR,(void *)&aPtr );
+
+ //
+ // Using the schema class type, instantiate
+ // an instance
+ //
+
+ if( aPtr == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+ else
+ {
+ aScm = Schema::castDown( aPtr );
+ }
+
+ //
+ // Assign the know uuid
+ //
+
+ aScm->setOid( theSchemaUid );
+
+ //
+ // Instantiate the collection type
+ //
+
+ FrameworkEntityPtr aCollection( NULLPTR );
+
+ aClass = Ontology::getClassFor( theCollection.getValue() );
+ aClass->dispatch( "Construct" , (void **)NULLPTR,(void *)&aCollection );
+
+ if( aCollection == NULLPTR )
+ {
+ throw NullPointerException( theCollection.getValue(), LOCATION );
+ }
+ else
+ {
+ aScm->setProperties( Collection::castDown( aCollection ) );
+ if( theCreatedFlag == true )
+ {
+ UniversalIdentifier aCID;
+ UniversalIdentifier::setNewUid( aCID );
+ aCollection->setOid( aCID );
+ }
+ else
+ {
+ ; // do nothing, will get read in
+ }
+ }
+
+ return aScm;
+ }
+
//
|
|
From: Frank V. C. <fr...@us...> - 2001-04-21 21:39:05
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf2
In directory usw-pr-cvs1:/tmp/cvs-serv16775/src/testdrivers/exf2
Modified Files:
examp2.cpp
Log Message:
Creates actual schema db now, although no content. Cleaning, testing, and embellishing
Index: examp2.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf2/examp2.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** examp2.cpp 2001/04/19 03:44:42 1.6
--- examp2.cpp 2001/04/21 21:39:01 1.7
***************
*** 135,144 ****
// list existing schemas
// load a schema -or-
! SchemaPtr aSchema( createSchemaAndPopulate(aCatalog) );
! Schema::destroy(aSchema);
- // save a schema
}
catch( AssertionRef aAssert )
--- 135,143 ----
// list existing schemas
+
// load a schema -or-
! //SchemaPtr aSchema( createSchemaAndPopulate(aCatalog) );
}
catch( AssertionRef aAssert )
***************
*** 174,177 ****
--- 173,177 ----
args.put( buildStringAttribute("Name","SchemaTest") );
args.put( buildStringAttribute("Collection","SetCollection") );
+
aCatalog->createEntry(&args);
|
|
From: Frank V. C. <fr...@us...> - 2001-04-21 21:39:05
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv16775/src/libs/clfw
Modified Files:
MetaClass.cpp Ontology.cpp
Log Message:
Creates actual schema db now, although no content. Cleaning, testing, and embellishing
Index: MetaClass.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaClass.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** MetaClass.cpp 2000/11/18 20:38:46 1.6
--- MetaClass.cpp 2001/04/21 21:39:01 1.7
***************
*** 204,207 ****
--- 204,214 ----
}
+ // Fetch the id
+
+ UniversalIdentifierCref MetaClass::getIdentifier( void ) const
+ {
+ return theType->getIdentifier();
+ }
+
// Fetch the type name
Index: Ontology.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Ontology.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Ontology.cpp 2001/04/11 01:39:25 1.7
--- Ontology.cpp 2001/04/21 21:39:01 1.8
***************
*** 147,150 ****
--- 147,154 ----
}
+ //
+ // Resolve class by name
+ //
+
MetaClassPtr Ontology::getClassFor
(
***************
*** 199,202 ****
--- 203,263 ----
return aPtr;
}
+ //
+ // Resolve class by id
+ //
+
+ MetaClassPtr Ontology::getClassFor
+ (
+ UniversalIdentifierCref aClassId,
+ CharCptr anOntology
+ )
+ throw ( NullPointerException, DescriptorNotFound )
+ {
+ MetaClassPtr aPtr( NULLPTR );
+
+ if( aClassId.isZero() == true )
+ {
+ throw NullPointerException( LOCATION );
+ }
+ else
+ {
+ OntologyPtr aOPtr =
+ MetaSpace::getOntology
+ (
+ ( anOntology == NULLPTR ? "corelinux" : anOntology )
+ );
+ if( aOPtr != NULLPTR )
+ {
+ Iterator<MetaClassCptr> *aIterator( aOPtr->createIterator() );
+
+ while( aIterator->isValid() == true && aPtr == NULLPTR )
+ {
+ MetaClassPtr aClass = (MetaClassPtr) aIterator->getElement();
+ if( aClass->getIdentifier() == aClassId )
+ {
+ aPtr = aClass;
+ }
+ else
+ {
+ ; // do nothing
+ }
+ aIterator->setNext();
+ }
+ aOPtr->destroyIterator( aIterator );
+
+ if( aPtr == NULLPTR )
+ {
+ throw DescriptorNotFound( LOCATION );
+ }
+ }
+ else
+ {
+ throw DescriptorNotFound("Ontology not found", LOCATION );
+ }
+ }
+
+ return aPtr;
+ }
+
//
// Add a new type to the ontology
|
|
From: Frank V. C. <fr...@us...> - 2001-04-21 21:39:05
|
Update of /cvsroot/corelinux/clfw/clfw/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv16775/clfw/Persist
Modified Files:
SchemaAbstractStore.hpp SchemaCatStore.hpp SchemaCatalog.hpp
SchemaStore.hpp Store.hpp
Log Message:
Creates actual schema db now, although no content. Cleaning, testing, and embellishing
Index: SchemaAbstractStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaAbstractStore.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SchemaAbstractStore.hpp 2001/04/19 03:44:41 1.2
--- SchemaAbstractStore.hpp 2001/04/21 21:39:01 1.3
***************
*** 96,99 ****
--- 96,100 ----
void closeStore( void );
+ bool exists( CharPtr );
Handle openRead( CharPtr );
Handle openWrite( CharPtr );
Index: SchemaCatStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaCatStore.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SchemaCatStore.hpp 2001/04/15 16:36:08 1.1
--- SchemaCatStore.hpp 2001/04/21 21:39:01 1.2
***************
*** 117,120 ****
--- 117,126 ----
virtual CollectionPtr read( CollectionPtr ) ;
+ /**
+ Returns a collection created by virtue of calling
+ a read operation
+ @param Collection pointer from Store::read
+ */
+
virtual void returnReadCollection( CollectionPtr );
***************
*** 125,128 ****
--- 131,141 ----
virtual void write( CollectionPtr ) ;
+
+ /**
+ Remove one or more object from a store
+ @param Collection pointer to identifications and objects
+ */
+
+ virtual void remove( CollectionPtr );
protected:
Index: SchemaCatalog.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaCatalog.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** SchemaCatalog.hpp 2001/04/20 11:16:31 1.7
--- SchemaCatalog.hpp 2001/04/21 21:39:01 1.8
***************
*** 146,149 ****
--- 146,163 ----
virtual void deleteEntry( CollectionPtr );
+ /**
+ Create an iterator over the catalog entries as defined by
+ the catalog type, for this case it is an iterator which
+ returns a FrameworkStringPtr, which is the name of the
+ Schema which the entry represents
+ @returns Iterator pointer to FrameworkString pointers
+ */
+
+ virtual Iterator<FrameworkEntityPtr> *createCatalogIterator( void ) ;
+
+ /// Destroy the iterator over the catalog entries
+
+ virtual void destroyIterator( Iterator<FrameworkEntityPtr> * ) ;
+
protected:
Index: SchemaStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaStore.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** SchemaStore.hpp 2001/04/20 11:16:31 1.3
--- SchemaStore.hpp 2001/04/21 21:39:01 1.4
***************
*** 46,50 ****
class SchemaStore : public SchemaAbstractStore
{
-
DECLARE_METATYPEMEMBERS( SchemaStore );
--- 46,49 ----
***************
*** 108,112 ****
/// Retrieves the schema
! SchemaPtr getSchema( void ) const;
//
--- 107,111 ----
/// Retrieves the schema
! SchemaPtr getSchema( void ) ;
//
***************
*** 165,168 ****
--- 164,173 ----
virtual CollectionPtr read( CollectionPtr ) ;
+ /**
+ Returns a collection created by virtue of calling
+ a read operation
+ @param Collection pointer from Store::read
+ */
+
virtual void returnReadCollection( CollectionPtr );
***************
*** 174,182 ****
--- 179,197 ----
virtual void write( CollectionPtr ) ;
+ /**
+ Remove one or more object from a store
+ @param Collection pointer to identifications and objects
+ */
+
+ virtual void remove( CollectionPtr );
+
protected:
+ virtual SchemaPtr createSchema( void );
+
private:
SchemaPtr theSchema;
+ bool theCreatedFlag;
FrameworkString theName;
FrameworkString theLocation;
***************
*** 184,189 ****
UniversalIdentifier theSchemaClassId;
UniversalIdentifier theSchemaUid;
-
-
};
}
--- 199,202 ----
Index: Store.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/Store.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Store.hpp 2001/04/20 11:16:31 1.3
--- Store.hpp 2001/04/21 21:39:01 1.4
***************
*** 145,149 ****
virtual void returnReadCollection( CollectionPtr ) = 0;
-
/**
Write one or more objects to a store
--- 145,148 ----
***************
*** 152,155 ****
--- 151,162 ----
virtual void write( CollectionPtr ) = 0;
+
+ /**
+ Remove one or more object from a store
+ @param Collection pointer to identifications and objects
+ */
+
+ virtual void remove( CollectionPtr ) = 0;
+
protected:
|
|
From: Frank V. C. <fr...@us...> - 2001-04-21 21:39:05
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv16775/clfw
Modified Files:
Catalog.hpp MetaClass.hpp Ontology.hpp
Log Message:
Creates actual schema db now, although no content. Cleaning, testing, and embellishing
Index: Catalog.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Catalog.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Catalog.hpp 2001/04/08 12:59:06 1.2
--- Catalog.hpp 2001/04/21 21:39:01 1.3
***************
*** 90,93 ****
--- 90,97 ----
virtual FrameworkEntityPtr getEntry( CollectionPtr ) const = 0;
+ //
+ // Mutators
+ //
+
/**
Interface to create a new entry in the catalog.
***************
*** 109,112 ****
--- 113,132 ----
virtual void deleteEntry( CollectionPtr ) = 0;
+
+ //
+ // Iterator operations
+ //
+
+ /**
+ Create an iterator over the catalog entries as defined by
+ the catalog type
+ @returns Iterator pointer to FrameworkEntity pointers
+ */
+
+ virtual Iterator<FrameworkEntityPtr> *createCatalogIterator( void ) = 0;
+
+ /// Destroy the iterator over the catalog entries
+
+ virtual void destroyIterator( Iterator<FrameworkEntityPtr> * ) = 0;
protected:
Index: MetaClass.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/MetaClass.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetaClass.hpp 2000/11/17 13:07:08 1.5
--- MetaClass.hpp 2001/04/21 21:39:01 1.6
***************
*** 71,74 ****
--- 71,78 ----
bool operator==( MetaClassCref ) const;
+ /// Get the class identifier
+
+ UniversalIdentifierCref getIdentifier( void ) const;
+
/// Return the object type for this meta class
Index: Ontology.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Ontology.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Ontology.hpp 2001/04/11 01:39:25 1.7
--- Ontology.hpp 2001/04/21 21:39:01 1.8
***************
*** 100,106 ****
*/
! static MetaClassPtr getClassFor( CharCptr, CharCptr ontology=NULLPTR )
throw ( NullPointerException, DescriptorNotFound );
//
// Mutators
--- 100,126 ----
*/
! static MetaClassPtr getClassFor
! (
! CharCptr,
! CharCptr ontology=NULLPTR
! )
throw ( NullPointerException, DescriptorNotFound );
+ /**
+ Get the metaclass as defined by the class id and ontology name
+ @param UniversalIdentifier to class type
+ @param Char pointer to ontology name (i.e. "MySpace")
+ defaults to "corelinux" in implementation
+ @returns MetaClass pointer to resolved class
+ @exception NullPointerException and/or
+ DescriptorNotFoundException if not resolvable
+ */
+
+ static MetaClassPtr getClassFor
+ (
+ UniversalIdentifierCref,
+ CharCptr ontology = NULLPTR
+ )
+ throw ( NullPointerException, DescriptorNotFound );
//
// Mutators
|
|
From: Hans D. <dul...@us...> - 2001-04-21 13:29:25
|
Update of /cvsroot/corelinux/corelinux/src/testdrivers/ex23 In directory usw-pr-cvs1:/tmp/cvs-serv14832 Added Files: .cvsignore Log Message: Initial checkin --- NEW FILE --- .deps .libs Makefile Makefile.in ex15 |
|
From: Hans D. <dul...@us...> - 2001-04-21 13:28:34
|
Update of /cvsroot/corelinux/corelinux/src/testdrivers/ex23
In directory usw-pr-cvs1:/tmp/cvs-serv14573
Added Files:
Makefile.am examp23.cpp
Log Message:
Initial checkin.
--- NEW FILE ---
# -*- Mode: makefile -*-
# SUMMARY:
# USAGE: make <make-target>
# AUTHOR: Christophe Prud'homme
# ORG: Christophe Prud'homme
# E-MAIL: Chr...@an...
# ORIG-DATE: 10-Apr-00 at 08:34:22
# LAST-MOD: 23-Apr-00 at 16:18:55 by Christophe Prud'homme
# DESCRIPTION:
# DESCRIP-END.
SUFFIXES = .cpp .hpp .c .h .f .F .o .moc
bin_PROGRAMS = ex23
ex23_SOURCES = examp23.cpp
ex23_LDADD = ${top_builddir}/src/classlibs/corelinux/libcl++.la
***** Error reading new file: [Errno 2] No such file or directory: 'examp23.cpp'
|
|
From: Hans D. <dul...@us...> - 2001-04-21 13:20:08
|
Update of /cvsroot/corelinux/corelinux/src/testdrivers/ex23 In directory usw-pr-cvs1:/tmp/cvs-serv13367/ex23 Log Message: Directory /cvsroot/corelinux/corelinux/src/testdrivers/ex23 added to the repository |
|
From: Frank V. C. <fr...@us...> - 2001-04-20 11:16:35
|
Update of /cvsroot/corelinux/clfw/src/libs/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv13432/src/libs/Persist
Modified Files:
SchemaCatStore.cpp SchemaCatalog.cpp SchemaStore.cpp Store.cpp
Log Message:
Working catalog (writes schema entry)
Index: SchemaCatStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatStore.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** SchemaCatStore.cpp 2001/04/19 03:44:42 1.3
--- SchemaCatStore.cpp 2001/04/20 11:16:31 1.4
***************
*** 302,309 ****
}
! //Write one or more objects to a store
! void SchemaCatStore::write( CollectionPtr )
{
}
--- 302,325 ----
}
! // Write one or more objects to a store, we know
! // they are SchemaStore instances in the collection so
! // we serialize them out with the key reference
! void SchemaCatStore::write( CollectionPtr aCollection )
{
+ REQUIRE( aCollection != NULLPTR );
+ SchemaStore *aPtr( NULLPTR );
+ Counter maxCnt( aCollection->getSize() );
+ Char aBuffer[37];
+ SchemaDataDescriptor aSd;
+
+ for( Counter x = 0; x < maxCnt; ++x )
+ {
+ aPtr = SchemaStore::castDown( aCollection->getElementAt(x) );
+ aSd = aPtr->serialize();
+ aPtr->getSchemaUid().getAsString( aBuffer );
+ SchemaAbstractStore::updateDesc( aBuffer, aSd );
+ free(aSd.data);
+ }
}
Index: SchemaCatalog.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatalog.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** SchemaCatalog.cpp 2001/04/19 03:44:42 1.7
--- SchemaCatalog.cpp 2001/04/20 11:16:31 1.8
***************
*** 33,36 ****
--- 33,40 ----
#endif
+ #if !defined(__SCHEMASTORE_HPP)
+ #include INCL_SchemaStore
+ #endif
+
#if !defined(__SCHEMACATSTORE_HPP)
#include INCL_SchemaCatStore
***************
*** 160,165 ****
REQUIRE( aCollection != NULLPTR );
! CollectionPtr aSchemaCol( NULLPTR );
! FrameworkString aUid;
//
--- 164,169 ----
REQUIRE( aCollection != NULLPTR );
! FrameworkStringPtr aSchemaCol( NULLPTR );
! FrameworkString aUid;
//
***************
*** 200,204 ****
// Create and assign name and collection
! SchemaPtr aSchema = this->createSchema( aUid, *aName, aSchemaCol );
// Make the catalog entry and persist
--- 204,208 ----
// Create and assign name and collection
! // SchemaPtr aSchema = this->createSchema( aUid, *aName, aSchemaCol );
// Make the catalog entry and persist
***************
*** 219,247 ****
//
! // What we do here to make the entry is:
! // Collection where:
! // UuidAssignment -> uuid
! // EntryInfo -> array
! // Name -> name
! // Location -> location
//
! Array outer;
! Array inner;
! Attribute uid;
! uid.setKey( FrameworkEntityPtr(&Store::getUniqueIdKey()) );
! uid.setValue( FrameworkEntityPtr(&aUid) );
! outer.put( &uid );
! Attribute colInfo;
! colInfo.setKey( FrameworkEntityPtr(&Store::getCollectionKey()) );
! colInfo.setValue( &inner );
! outer.put( &colInfo );
! // Serialize the first part to the location
! this->saveSchema( aSchema );
}
else
--- 223,260 ----
//
! // Setup the in memory reference
//
! SchemaStore *aStore = SchemaStore::create();
! aStore->setName( *aName );
! aStore->setLocation( *aLocation );
! aStore->setCollectionType( *aSchemaCol );
! aStore->setSchemaUid( UniversalIdentifier( aUid.getValue() ) );
! aStore->setSchemaClassId
! (
! Schema::getTypeDescriptor()->getIdentifier()
! );
!
! //
! // Setup the catalog collection entry
! //
! AttributePtr aAttr( Attribute::create() );
! FrameworkStringPtr aKey( FrameworkString::create() );
! aKey->setValue( aName->getValue() );
! aAttr->setKey( aKey );
! aAttr->setValue( aStore );
! theSchemas.put( aAttr );
!
! //
! // Write the entry to the physical world
! //
! Array anArray;
! anArray.put( aStore );
! theCatalog->write( &anArray );
}
else
***************
*** 393,403 ****
//
! CollectionPtr SchemaCatalog::resolveCollectionAssignment
(
CollectionPtr aCollection
)
{
! MetaClassPtr aClass( NULLPTR );
! FrameworkEntityPtr aPtr( NULLPTR );
FrameworkStringPtr aResult
--- 406,415 ----
//
! FrameworkStringPtr SchemaCatalog::resolveCollectionAssignment
(
CollectionPtr aCollection
)
{
! FrameworkStringPtr aPtr( NULLPTR );
FrameworkStringPtr aResult
***************
*** 416,441 ****
if( aResult != NULLPTR )
{
! aClass = Ontology::getClassFor( aResult->getValue() );
}
else
{
! aClass = Ontology::getClassFor( defCollection.getValue() );
}
! //
! // Instantiate it
! //
!
! aClass->dispatch( "Construct" , (void **)NULLPTR,(void *)&aPtr );
! if( aPtr == NULLPTR )
! {
! throw NullPointerException( LOCATION );
! }
! else
! {
! ; // do nothing
! }
!
! return Collection::castDown( aPtr );
}
--- 428,439 ----
if( aResult != NULLPTR )
{
! aPtr = aResult;
}
else
{
! aPtr = (FrameworkStringPtr)&defCollection;
}
! return aPtr ;
}
Index: SchemaStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaStore.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SchemaStore.cpp 2001/04/19 03:44:42 1.2
--- SchemaStore.cpp 2001/04/20 11:16:31 1.3
***************
*** 47,50 ****
--- 47,59 ----
namespace corelinux
{
+ struct __SchemaStoreDesc
+ {
+ Dword version; // class version
+ Dword propcount; // property count
+ char buffer[1]; // repeating for propcount
+ // Key0Value0
+ };
+
+ DECLARE_TYPE( struct __SchemaStoreDesc, SchemaDesc );
//
***************
*** 101,107 ****
--- 110,172 ----
}
+ //
+ // Serialize the object state to a buffer
+ //
+
SchemaDataDescriptor SchemaStore::serialize( void ) const
{
SchemaDataDescriptor ad;
+ Dword totalSize(0);
+ SchemaDescPtr aPtr( NULLPTR );
+ CharPtr aBase( NULLPTR );
+ CharCptr aNam( Store::getNameKey().getValue() );
+ CharCptr aLoc( Store::getLocationKey().getValue() );
+ CharCptr aCol( Store::getCollectionKey().getValue() );
+ CharCptr aUid( Store::getUniqueIdKey().getValue() );
+ CharCptr aCid( Store::getClassIdKey().getValue() );
+
+ totalSize = std::strlen( aNam ) + 2;
+ totalSize += std::strlen( aLoc ) + 2;
+ totalSize += std::strlen( aCol ) + 2;
+ totalSize += (std::strlen( aUid )*2) + 4;
+ totalSize += sizeof( SchemaDesc );
+ totalSize += std::strlen( theName.getValue() );
+ totalSize += std::strlen( theLocation.getValue() );
+ totalSize += std::strlen( theCollection.getValue() );
+ totalSize += 72;
+
+ aPtr = SchemaDescPtr(new char[totalSize]);
+
+ aPtr->propcount = 5;
+
+ aBase = aPtr->buffer;
+
+ std::strcpy( aBase, aNam );
+ aBase += std::strlen( aBase )+1;
+ std::strcpy( aBase, theName.getValue() );
+ aBase += std::strlen( aBase )+1;
+
+ std::strcpy( aBase, aLoc );
+ aBase += std::strlen( aBase )+1;
+ std::strcpy( aBase, theLocation.getValue() );
+ aBase += std::strlen( aBase )+1;
+
+ std::strcpy( aBase, aCol );
+ aBase += std::strlen( aBase )+1;
+ std::strcpy( aBase, theCollection.getValue() );
+ aBase += std::strlen( aBase )+1;
+
+ std::strcpy( aBase, aUid );
+ aBase += std::strlen( aBase )+1;
+ theSchemaUid.getAsString( aBase );
+ aBase += std::strlen( aBase )+1;
+
+ std::strcpy( aBase, aCid );
+ aBase += std::strlen( aBase )+1;
+ theSchemaClassId.getAsString( aBase );
+
+ ad.dataSize = totalSize;
+ ad.data = CharPtr(aPtr);
+
return ad;
}
***************
*** 117,120 ****
--- 182,200 ----
}
+ FrameworkStringCref SchemaStore::getCollectionType( void ) const
+ {
+ return theCollection;
+ }
+
+ UniversalIdentifierCref SchemaStore::getSchemaClassId( void ) const
+ {
+ return theSchemaClassId;
+ }
+
+ UniversalIdentifierCref SchemaStore::getSchemaUid( void ) const
+ {
+ return theSchemaUid;
+ }
+
SchemaPtr SchemaStore::getSchema( void ) const
{
***************
*** 123,133 ****
//
! // Routine to take our information out to a
! // format for storing
//
! void SchemaStore::initialize( SchemaDataDescriptorCref )
{
}
--- 203,284 ----
//
! // Routine to take our information out. In the future this may
! // change to a collection stuffing
//
+
+ void SchemaStore::initialize( SchemaDataDescriptorCref aData )
+ {
+ SchemaDescPtr aDesc( SchemaDescPtr(aData.data) );
+ Dword maxCnt( aDesc->propcount );
+ CharPtr aKey( NULLPTR );
+ CharPtr aValue( NULLPTR );
+ CharPtr aBase( aDesc->buffer );
+
+ for( Dword x = 0; x < maxCnt; ++x )
+ {
+ aKey = aBase;
+ aValue = aBase + (std::strlen( aKey )+1);
! if( Store::getNameKey() == aKey )
! {
! theName = aValue;
! }
! else if( Store::getLocationKey() == aKey )
! {
! theLocation = aValue;
! }
! else if( Store::getCollectionKey() == aKey )
! {
! theCollection = aValue;
! }
! else if( Store::getClassIdKey() == aKey )
! {
! theSchemaClassId = aValue;
! }
! else if( Store::getUniqueIdKey() == aKey )
! {
! theSchemaUid = aValue;
! }
! else
! {
! ; // want store exception of some kind
! }
! aBase = aValue + (std::strlen( aValue )+1);
! }
! }
!
! // Sets the name
!
! void SchemaStore::setName( FrameworkStringCref aRef )
! {
! theName = aRef;
! }
!
! // Set the location for schema
!
! void SchemaStore::setLocation( FrameworkStringCref aRef )
! {
! theLocation = aRef;
! }
!
! // Set the location for schema
!
! void SchemaStore::setCollectionType( FrameworkStringCref aRef )
{
+ theCollection = aRef;
+ }
+ // Set the class id to use in factory
+
+ void SchemaStore::setSchemaClassId( UniversalIdentifierCref aRef )
+ {
+ theSchemaClassId = aRef;
+ }
+
+ // Set the uid for the schema during create
+
+ void SchemaStore::setSchemaUid( UniversalIdentifierCref aRef )
+ {
+ theSchemaUid = aRef;
}
Index: Store.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/Store.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Store.cpp 2001/04/15 16:36:08 1.2
--- Store.cpp 2001/04/20 11:16:31 1.3
***************
*** 52,55 ****
--- 52,57 ----
FrameworkString Store::theUniqueIdKey("GUID");
+ FrameworkString Store::theClassIdKey("Class");
+
FrameworkString Store::theCollectionKey("Collection");
***************
*** 150,153 ****
--- 152,160 ----
{
return theUniqueIdKey;
+ }
+
+ FrameworkStringCref Store::getClassIdKey( void )
+ {
+ return theClassIdKey;
}
|
|
From: Frank V. C. <fr...@us...> - 2001-04-20 11:16:34
|
Update of /cvsroot/corelinux/clfw/clfw/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv13432/clfw/Persist
Modified Files:
SchemaCatalog.hpp SchemaStore.hpp Store.hpp
Log Message:
Working catalog (writes schema entry)
Index: SchemaCatalog.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaCatalog.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** SchemaCatalog.hpp 2001/04/15 16:36:08 1.6
--- SchemaCatalog.hpp 2001/04/20 11:16:31 1.7
***************
*** 186,190 ****
*/
! CollectionPtr resolveCollectionAssignment
(
CollectionPtr
--- 186,190 ----
*/
! FrameworkStringPtr resolveCollectionAssignment
(
CollectionPtr
Index: SchemaStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaStore.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SchemaStore.hpp 2001/04/19 03:44:42 1.2
--- SchemaStore.hpp 2001/04/20 11:16:31 1.3
***************
*** 82,94 ****
--- 82,139 ----
//
+ /// Serializes description
+
SchemaDataDescriptor serialize( void ) const;
+
+ /// Retrieves the schema name
+
FrameworkStringCref getName( void ) const;
+
+ /// Retrieves the schema location
+
FrameworkStringCref getLocation( void ) const;
+
+ /// Retrieve the collection used for schema
+
+ FrameworkStringCref getCollectionType( void ) const;
+
+ /// Retrieve the class used to instantiate the schema
+
+ UniversalIdentifierCref getSchemaClassId( void ) const;
+
+ /// Retrieve the schema unique identifier
+
+ UniversalIdentifierCref getSchemaUid( void ) const;
+
+ /// Retrieves the schema
+
SchemaPtr getSchema( void ) const;
+
//
// Mutators
//
+ /// Initialize from DB
void initialize( SchemaDataDescriptorCref );
+
+ /// Sets the name
+
+ void setName( FrameworkStringCref );
+
+ /// Set the location for schema
+
+ void setLocation( FrameworkStringCref );
+
+ /// Sets the collection type name
+
+ void setCollectionType( FrameworkStringCref );
+
+ /// Set the class id to use in factory
+
+ void setSchemaClassId( UniversalIdentifierCref );
+
+ /// Set the uid for the schema during create
+
+ void setSchemaUid( UniversalIdentifierCref );
//
// Forced interface
***************
*** 133,139 ****
private:
! FrameworkString theName;
! FrameworkString theLocation;
! SchemaPtr theSchema;
--- 178,187 ----
private:
! SchemaPtr theSchema;
! FrameworkString theName;
! FrameworkString theLocation;
! FrameworkString theCollection;
! UniversalIdentifier theSchemaClassId;
! UniversalIdentifier theSchemaUid;
Index: Store.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/Store.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Store.hpp 2001/04/15 16:36:08 1.2
--- Store.hpp 2001/04/20 11:16:31 1.3
***************
*** 97,100 ****
--- 97,101 ----
static FrameworkStringCref getLocationKey( void );
static FrameworkStringCref getUniqueIdKey( void );
+ static FrameworkStringCref getClassIdKey( void );
static FrameworkStringCref getCollectionKey( void );
***************
*** 160,163 ****
--- 161,165 ----
static FrameworkString theLocationKey;
static FrameworkString theUniqueIdKey;
+ static FrameworkString theClassIdKey;
static FrameworkString theCollectionKey;
|
|
From: Frank V. C. <fr...@us...> - 2001-04-19 03:44:44
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf2
In directory usw-pr-cvs1:/tmp/cvs-serv31108/src/testdrivers/exf2
Modified Files:
examp2.cpp
Log Message:
Final step before schemas go persist
Index: examp2.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf2/examp2.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** examp2.cpp 2001/04/12 11:56:53 1.5
--- examp2.cpp 2001/04/19 03:44:42 1.6
***************
*** 176,180 ****
aCatalog->createEntry(&args);
! SchemaPtr aSchema(NULLPTR);
return aSchema;
}
--- 176,194 ----
aCatalog->createEntry(&args);
! SchemaPtr aSchema(Schema::castDown(aCatalog->getEntry(&args)));
!
! //
! // We need to clean up the arguments
! //
! AttributePtr aPtr = Attribute::castDown( args.getElementAt(0) );
! FrameworkString::destroy( (FrameworkStringPtr)aPtr->getKey() );
! FrameworkString::destroy( (FrameworkStringPtr)aPtr->getValue() );
! Attribute::destroy( aPtr );
!
! aPtr = Attribute::castDown( args.getElementAt(1) );
! FrameworkString::destroy( (FrameworkStringPtr)aPtr->getKey() );
! FrameworkString::destroy( (FrameworkStringPtr)aPtr->getValue() );
! Attribute::destroy( aPtr );
!
return aSchema;
}
|
|
From: Frank V. C. <fr...@us...> - 2001-04-19 03:44:44
|
Update of /cvsroot/corelinux/clfw/src/libs/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv31108/src/libs/Persist
Modified Files:
SchemaAbstractStore.cpp SchemaCatStore.cpp SchemaCatalog.cpp
SchemaStore.cpp
Log Message:
Final step before schemas go persist
Index: SchemaAbstractStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaAbstractStore.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SchemaAbstractStore.cpp 2001/04/15 16:36:08 1.1
--- SchemaAbstractStore.cpp 2001/04/19 03:44:42 1.2
***************
*** 58,62 ****
//
! bool SchemaAbstractStore::operator==( SchemaAbstractStoreCref aSchemaStore ) const
{
return ( this == &aSchemaStore );
--- 58,65 ----
//
! bool SchemaAbstractStore::operator==
! (
! SchemaAbstractStoreCref aSchemaStore
! ) const
{
return ( this == &aSchemaStore );
***************
*** 67,71 ****
//
! SchemaAbstractStoreRef SchemaAbstractStore::operator=( SchemaAbstractStoreCref )
{
return ( *this );
--- 70,77 ----
//
! SchemaAbstractStoreRef SchemaAbstractStore::operator=
! (
! SchemaAbstractStoreCref
! )
{
return ( *this );
***************
*** 88,95 ****
{
REQUIRE( aName != NULLPTR );
! return (Handle) gdbm_open
(
aName,0, GDBM_READER,0666,NULLPTR
! );
}
--- 94,101 ----
{
REQUIRE( aName != NULLPTR );
! return (Handle) (theHandle = gdbm_open
(
aName,0, GDBM_READER,0666,NULLPTR
! ));
}
***************
*** 97,104 ****
{
REQUIRE( aName != NULLPTR );
! return (Handle) gdbm_open
(
aName,0, GDBM_WRCREAT,0666,NULLPTR
! );
}
--- 103,110 ----
{
REQUIRE( aName != NULLPTR );
! return (Handle) ( theHandle = gdbm_open
(
aName,0, GDBM_WRCREAT,0666,NULLPTR
! ));
}
***************
*** 110,114 ****
bool SchemaAbstractStore::hasKey( CharPtr aKey )
{
! datum key ={aKey, strlen(aKey)};
return gdbm_exists( (GDBM_FILE)theHandle, key );
}
--- 116,121 ----
bool SchemaAbstractStore::hasKey( CharPtr aKey )
{
! REQUIRE( theHandle != NULLPTR );
! datum key ={aKey, strlen(aKey)+1};
return gdbm_exists( (GDBM_FILE)theHandle, key );
}
***************
*** 118,124 ****
//
! void SchemaAbstractStore::updateDesc( CharPtr aKey, SchemaDataDescriptorCref aDesc )
{
! datum key = {aKey, strlen(aKey)};
datum keyd = {aDesc.data,aDesc.dataSize};
--- 125,136 ----
//
! void SchemaAbstractStore::updateDesc
! (
! CharPtr aKey,
! SchemaDataDescriptorCref aDesc
! )
{
! REQUIRE( theHandle != NULLPTR );
! datum key = {aKey, strlen(aKey)+1};
datum keyd = {aDesc.data,aDesc.dataSize};
***************
*** 128,137 ****
//
! // Fetch the toc record
//
SchemaDataDescriptor SchemaAbstractStore::fetchDesc( CharPtr aKey )
{
! datum key = { aKey, strlen(aKey) };
datum res = gdbm_fetch((GDBM_FILE)theHandle,key);
--- 140,167 ----
//
! // Fetch a record
//
SchemaDataDescriptor SchemaAbstractStore::fetchDesc( CharPtr aKey )
+ {
+ REQUIRE( theHandle != NULLPTR );
+ datum key = { aKey, strlen(aKey)+1 };
+ datum res = gdbm_fetch((GDBM_FILE)theHandle,key);
+
+ SchemaDataDescriptor ad = { res.dptr,res.dsize };
+ return ad;
+ }
+
+ //
+ // Fetch a record based on key
+ //
+
+ SchemaDataDescriptor SchemaAbstractStore::fetchDesc
+ (
+ SchemaDataDescriptorCref aKey
+ )
{
! REQUIRE( theHandle != NULLPTR );
! datum key = { aKey.data, aKey.dataSize };
datum res = gdbm_fetch((GDBM_FILE)theHandle,key);
***************
*** 140,143 ****
--- 170,196 ----
}
+ SchemaDataDescriptor SchemaAbstractStore::fetchFirstKey( void )
+ {
+ REQUIRE( theHandle != NULLPTR );
+ datum key = gdbm_firstkey( (GDBM_FILE)theHandle );
+ SchemaDataDescriptor ad = {key.dptr, key.dsize};
+ return ad;
+ }
+
+ SchemaDataDescriptor SchemaAbstractStore::fetchNextKey
+ (
+ SchemaDataDescriptorCref aKey
+ )
+ {
+ REQUIRE( theHandle != NULLPTR );
+ datum nextKey = gdbm_nextkey
+ (
+ (GDBM_FILE)theHandle,
+ (datum){aKey.data, aKey.dataSize}
+ );
+ SchemaDataDescriptor ad = {nextKey.dptr, nextKey.dsize};
+ return ad;
+ }
+
//
// MetaType information block
Index: SchemaCatStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatStore.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SchemaCatStore.cpp 2001/04/17 09:59:43 1.2
--- SchemaCatStore.cpp 2001/04/19 03:44:42 1.3
***************
*** 29,36 ****
--- 29,44 ----
#endif
+ #if !defined(__SCHEMASTORE_HPP)
+ #include INCL_SchemaStore
+ #endif
+
#if !defined(__FRAMEWORKSTRING_HPP)
#include <clfw/FrameworkString.hpp>
#endif
+ #if !defined(__ATTRIBUTE_HPP)
+ #include <clfw/Attribute.hpp>
+ #endif
+
#if !defined(__DESCRIPTORNOTFOUND_HPP)
#include <clfw/DescriptorNotFound.hpp>
***************
*** 45,49 ****
// Key for actual catalog information
! static CharPtr gPrimaryKey = "62c4c5f4-319d-11d5-88a9-00500489272c";
static CatalogDescriptor gDefFirst = {1,0};
--- 53,58 ----
// Key for actual catalog information
! static CharPtr gPrimaryKey = "62c4c5f4-319d-11d5-88a9-00500489272c";
! static UniversalIdentifier gPrimaryUid( gPrimaryKey );
static CatalogDescriptor gDefFirst = {1,0};
***************
*** 206,209 ****
--- 215,220 ----
CollectionPtr SchemaCatStore::read( CollectionPtr aPtr )
{
+ CollectionPtr aCollection = Array::create();
+
//
// Do they want everything read?
***************
*** 212,216 ****
--- 223,268 ----
if( aPtr == NULLPTR || aPtr->isEmpty() == true )
{
+ SchemaDataDescriptor aKey = SchemaAbstractStore::fetchFirstKey();
+ while( aKey.data != NULLPTR )
+ {
+ UniversalIdentifier aTst;
+ aTst = aKey.data;
+
+ // if we have a true schema key
+
+ if( aTst != gPrimaryUid )
+ {
+ SchemaDataDescriptor aDesc =
+ SchemaAbstractStore::fetchDesc( aKey );
+
+ if( aDesc.data != NULLPTR )
+ {
+ AttributePtr aAtt( Attribute::create() );
+ SchemaStorePtr aVal( SchemaStore::create() );
+ aVal->initialize( aDesc );
+
+ aAtt->setKey( new FrameworkString( aKey.data ) );
+ aAtt->setValue( aVal );
+
+ aCollection->put( aAtt );
+ free( aDesc.data );
+ }
+ else
+ {
+ throw NullPointerException( LOCATION );
+ }
+ }
+
+ // Otherwise ignore
+ else
+ {
+ ; // do nothing
+ }
+
+ SchemaDataDescriptor nextKey = SchemaAbstractStore::fetchNextKey(aKey);
+ free(aKey.data);
+ aKey = nextKey;
+ }
}
else
***************
*** 221,229 ****
}
! return aPtr;
}
! void SchemaCatStore::returnReadCollection( CollectionPtr )
{
}
--- 273,302 ----
}
! return aCollection;
}
! //
! // Return the cursor, which is only a collection of attributes where
! // key = String (uuid)
! // value = SchemaStore
! //
! void SchemaCatStore::returnReadCollection( CollectionPtr aPtr )
{
+ if( aPtr != NULLPTR )
+ {
+ Counter maxCnt = aPtr->getSize();
+ for( ElementIndex x = 0; x < maxCnt; ++x )
+ {
+ AttributePtr aAtt( Attribute::castDown(aPtr->getElementAt(x)) );
+ FrameworkString::destroy( FrameworkString::castDown( aAtt->getKey() ));
+ SchemaStore::destroy( SchemaStore::castDown( aAtt->getValue() ));
+ Attribute::destroy(aAtt);
+ }
+ Array::destroy( Array::castDown(aPtr) );
+ }
+ else
+ {
+ ; // do nothing
+ }
}
Index: SchemaCatalog.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaCatalog.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** SchemaCatalog.cpp 2001/04/15 16:36:08 1.6
--- SchemaCatalog.cpp 2001/04/19 03:44:42 1.7
***************
*** 562,569 ****
if( aResult != NULLPTR )
{
Counter maxLoop( aResult->getSize() );
for( Counter x = 0; x < maxLoop; ++x )
{
!
}
theCatalog->returnReadCollection( aResult );
--- 562,571 ----
if( aResult != NULLPTR )
{
+ theSchemas.addAll( *aResult );
+
Counter maxLoop( aResult->getSize() );
for( Counter x = 0; x < maxLoop; ++x )
{
! aResult->remove( theSchemas.getElementAt(x) );
}
theCatalog->returnReadCollection( aResult );
Index: SchemaStore.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/Persist/SchemaStore.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SchemaStore.cpp 2001/04/17 09:59:43 1.1
--- SchemaStore.cpp 2001/04/19 03:44:42 1.2
***************
*** 25,28 ****
--- 25,32 ----
#endif
+ #if !defined(__SCHEMA_HPP)
+ #include <clfw/Schema.hpp>
+ #endif
+
#if !defined(__SCHEMASTORE_HPP)
#include INCL_SchemaStore
***************
*** 50,54 ****
SchemaStore::SchemaStore( void )
:
! SchemaAbstractStore()
{
--- 54,59 ----
SchemaStore::SchemaStore( void )
:
! SchemaAbstractStore(),
! theSchema( NULLPTR )
{
***************
*** 61,67 ****
SchemaStore::SchemaStore( SchemaStoreCref aType )
:
! SchemaAbstractStore( aType )
{
! ; // do nothing
}
--- 66,75 ----
SchemaStore::SchemaStore( SchemaStoreCref aType )
:
! SchemaAbstractStore( aType ),
! theSchema( NULLPTR )
{
! theName = aType.getName();
! theLocation = aType.getLocation();
! theSchema = aType.getSchema();
}
***************
*** 91,94 ****
--- 99,133 ----
{
return ( *this );
+ }
+
+ SchemaDataDescriptor SchemaStore::serialize( void ) const
+ {
+ SchemaDataDescriptor ad;
+ return ad;
+ }
+
+ FrameworkStringCref SchemaStore::getName( void ) const
+ {
+ return theName;
+ }
+
+ FrameworkStringCref SchemaStore::getLocation( void ) const
+ {
+ return theLocation;
+ }
+
+ SchemaPtr SchemaStore::getSchema( void ) const
+ {
+ return theSchema;
+ }
+
+ //
+ // Routine to take our information out to a
+ // format for storing
+ //
+
+ void SchemaStore::initialize( SchemaDataDescriptorCref )
+ {
+
}
|
|
From: Frank V. C. <fr...@us...> - 2001-04-19 03:44:44
|
Update of /cvsroot/corelinux/clfw/clfw/Persist
In directory usw-pr-cvs1:/tmp/cvs-serv31108/clfw/Persist
Modified Files:
SchemaAbstractStore.hpp SchemaStore.hpp
Log Message:
Final step before schemas go persist
Index: SchemaAbstractStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaAbstractStore.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SchemaAbstractStore.hpp 2001/04/15 16:36:08 1.1
--- SchemaAbstractStore.hpp 2001/04/19 03:44:41 1.2
***************
*** 101,104 ****
--- 101,107 ----
void updateDesc( CharPtr, SchemaDataDescriptorCref );
SchemaDataDescriptor fetchDesc( CharPtr );
+ SchemaDataDescriptor fetchDesc( SchemaDataDescriptorCref );
+ SchemaDataDescriptor fetchFirstKey( void );
+ SchemaDataDescriptor fetchNextKey( SchemaDataDescriptorCref );
protected:
Index: SchemaStore.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Persist/SchemaStore.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SchemaStore.hpp 2001/04/17 09:59:43 1.1
--- SchemaStore.hpp 2001/04/19 03:44:42 1.2
***************
*** 26,29 ****
--- 26,33 ----
#endif
+ #if !defined(__FRAMEWORKSTRING_HPP)
+ #include <clfw/FrameworkString.hpp>
+ #endif
+
#if !defined(__SCHEMAABSTRACTSTORE_HPP)
#include <clfw/Persist/SchemaAbstractStore.hpp>
***************
*** 33,36 ****
--- 37,41 ----
{
+ DECLARE_CLASS( Schema );
DECLARE_CLASS( SchemaStore );
***************
*** 77,84 ****
--- 82,94 ----
//
+ SchemaDataDescriptor serialize( void ) const;
+ FrameworkStringCref getName( void ) const;
+ FrameworkStringCref getLocation( void ) const;
+ SchemaPtr getSchema( void ) const;
//
// Mutators
//
+ void initialize( SchemaDataDescriptorCref );
//
// Forced interface
***************
*** 121,128 ****
protected:
-
private:
! private:
--- 131,139 ----
protected:
private:
! FrameworkString theName;
! FrameworkString theLocation;
! SchemaPtr theSchema;
|
|
From: Frank V. C. <fr...@us...> - 2001-04-17 09:59:46
|
Update of /cvsroot/corelinux/clfw/clfw/Persist In directory usw-pr-cvs1:/tmp/cvs-serv12842/clfw/Persist Modified Files: Makefile.am Added Files: SchemaStore.hpp Log Message: Updated Schema management ***** Error reading new file: [Errno 2] No such file or directory: 'SchemaStore.hpp' Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Persist/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Makefile.am 2001/04/15 16:36:08 1.5 --- Makefile.am 2001/04/17 09:59:43 1.6 *************** *** 20,24 **** SchemaCatalog.hpp \ SchemaAbstractStore.hpp \ ! SchemaCatStore.hpp --- 20,25 ---- SchemaCatalog.hpp \ SchemaAbstractStore.hpp \ ! SchemaCatStore.hpp \ ! SchemaStore.hpp |