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-03-20 01:33:15
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw In directory usw-pr-cvs1:/tmp/cvs-serv19515/src/libs/clfw Modified Files: Makefile.am Added Files: Sponsor.cpp Log Message: Updates for persist ***** Error reading new file: [Errno 2] No such file or directory: 'Sponsor.cpp' Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** Makefile.am 2001/03/18 15:33:50 1.20 --- Makefile.am 2001/03/20 01:35:32 1.21 *************** *** 22,26 **** FrameworkEntity.cpp \ Aggregate.cpp \ ! Sponser.cpp \ Boolean.cpp \ Number.cpp \ --- 22,26 ---- FrameworkEntity.cpp \ Aggregate.cpp \ ! Sponsor.cpp \ Boolean.cpp \ Number.cpp \ *************** *** 38,43 **** Ontology.cpp \ UnsignedShortInteger.cpp ! ! LIBS = --- 38,43 ---- Ontology.cpp \ UnsignedShortInteger.cpp ! ! LIBS = |
|
From: Frank V. C. <fr...@us...> - 2001-03-20 01:33:15
|
Update of /cvsroot/corelinux/clfw/clfw/Persist In directory usw-pr-cvs1:/tmp/cvs-serv19515/clfw/Persist Modified Files: Makefile.am Persist.hpp Added Files: StoreSponsor.hpp Removed Files: StoreSponser.hpp Log Message: Updates for persist ***** Error reading new file: [Errno 2] No such file or directory: 'StoreSponsor.hpp' Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Persist/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile.am 2001/03/18 15:33:50 1.1 --- Makefile.am 2001/03/20 01:35:32 1.2 *************** *** 14,18 **** includedir = @includedir@/Persist include_HEADERS = Persist.hpp \ ! StoreSponser.hpp # Common rcs information do not modify --- 14,18 ---- includedir = @includedir@/Persist include_HEADERS = Persist.hpp \ ! StoreSponsor.hpp # Common rcs information do not modify Index: Persist.hpp =================================================================== RCS file: /cvsroot/corelinux/clfw/clfw/Persist/Persist.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Persist.hpp 2001/03/18 15:33:50 1.1 --- Persist.hpp 2001/03/20 01:35:32 1.2 *************** *** 32,36 **** #endif // if !defined(__PERSIST_HPP) ! #define INCL_StoreSponser <clfw/Persist/StoreSponser.hpp> /* --- 32,36 ---- #endif // if !defined(__PERSIST_HPP) ! #define INCL_StoreSponsor <clfw/Persist/StoreSponsor.hpp> /* --- StoreSponser.hpp DELETED --- |
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:31:38
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv5357/src/libs/clfw
Modified Files:
Makefile.am
Log Message:
Updates for 115287-Persist Framework
Index: Makefile.am
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** Makefile.am 2001/03/01 03:20:16 1.19
--- Makefile.am 2001/03/18 15:33:50 1.20
***************
*** 22,25 ****
--- 22,26 ----
FrameworkEntity.cpp \
Aggregate.cpp \
+ Sponser.cpp \
Boolean.cpp \
Number.cpp \
***************
*** 43,47 ****
lib_LTLIBRARIES = libclfw++.la
libclfw___la_SOURCES = $(SRCS)
! libclfw___la_LIBADD = ${top_builddir}/src/libs/LibLoad/*.lo
libclfw___la_LDFLAGS = -version-info $(LIBCLFW_SO_VERSION)
--- 44,48 ----
lib_LTLIBRARIES = libclfw++.la
libclfw___la_SOURCES = $(SRCS)
! libclfw___la_LIBADD = ${top_builddir}/src/libs/LibLoad/*.lo ${top_builddir}/src/libs/Persist/*.lo
libclfw___la_LDFLAGS = -version-info $(LIBCLFW_SO_VERSION)
|
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:31:38
|
Update of /cvsroot/corelinux/clfw/src/libs/Persist In directory usw-pr-cvs1:/tmp/cvs-serv5357/src/libs/Persist Added Files: .cvsignore Makefile.am StoreSponser.cpp Log Message: Updates for 115287-Persist Framework --- NEW FILE --- .deps .libs *.lo *.la Makefile Makefile.in ***** Error reading new file: [Errno 2] No such file or directory: 'Makefile.am' ***** Error reading new file: [Errno 2] No such file or directory: 'StoreSponser.cpp' |
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:31:38
|
Update of /cvsroot/corelinux/clfw/src/libs In directory usw-pr-cvs1:/tmp/cvs-serv5357/src/libs Modified Files: Makefile.am Log Message: Updates for 115287-Persist Framework Index: Makefile.am =================================================================== RCS file: /cvsroot/corelinux/clfw/src/libs/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 2000/08/28 23:11:41 1.2 --- Makefile.am 2001/03/18 15:33:50 1.3 *************** *** 12,16 **** SUFFIXES = .cpp .hpp .c .h .f .F .o .moc ! SUBDIRS = LibLoad clfw # Common rcs information do not modify --- 12,16 ---- SUFFIXES = .cpp .hpp .c .h .f .F .o .moc ! SUBDIRS = LibLoad Persist clfw # Common rcs information do not modify |
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:31:37
|
Update of /cvsroot/corelinux/clfw In directory usw-pr-cvs1:/tmp/cvs-serv5357 Modified Files: ChangeLog configure.in Log Message: Updates for 115287-Persist Framework Index: ChangeLog =================================================================== RCS file: /cvsroot/corelinux/clfw/ChangeLog,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** ChangeLog 2001/03/01 16:34:28 1.16 --- ChangeLog 2001/03/18 15:33:49 1.17 *************** *** 1,2 **** --- 1,6 ---- + 2001-03-18 Frank V. Castellucci <fr...@ca...> + + * Feature 115287 - Begining of Persist Framework + 2001-03-01 Frank V. Castellucci <fr...@ca...> Index: configure.in =================================================================== RCS file: /cvsroot/corelinux/clfw/configure.in,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** configure.in 2000/12/23 12:29:13 1.22 --- configure.in 2001/03/18 15:33:49 1.23 *************** *** 111,117 **** --- 111,119 ---- clfw/Makefile \ clfw/LibLoad/Makefile \ + clfw/Persist/Makefile \ src/Makefile \ src/libs/Makefile \ src/libs/LibLoad/Makefile \ + src/libs/Persist/Makefile \ src/libs/clfw/Makefile \ src/testdrivers/Makefile \ |
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:31:37
|
Update of /cvsroot/corelinux/clfw/clfw/Persist In directory usw-pr-cvs1:/tmp/cvs-serv5357/clfw/Persist Added Files: .cvsignore Makefile.am Persist.hpp StoreSponser.hpp Log Message: Updates for 115287-Persist Framework --- NEW FILE --- Makefile Makefile.in ***** Error reading new file: [Errno 2] No such file or directory: 'Makefile.am' ***** Error reading new file: [Errno 2] No such file or directory: 'Persist.hpp' ***** Error reading new file: [Errno 2] No such file or directory: 'StoreSponser.hpp' |
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:31:37
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv5357/clfw
Modified Files:
ClfwCommon.hpp Makefile.am
Log Message:
Updates for 115287-Persist Framework
Index: ClfwCommon.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/ClfwCommon.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ClfwCommon.hpp 2000/10/21 14:09:17 1.4
--- ClfwCommon.hpp 2001/03/18 15:33:50 1.5
***************
*** 44,47 ****
--- 44,50 ----
#endif
+ #if defined(PERSIST_FRAMEWORK)
+ #include <Persist/Persist.hpp>
+ #endif
/*
Index: Makefile.am
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** Makefile.am 2001/02/27 13:51:10 1.21
--- Makefile.am 2001/03/18 15:33:50 1.22
***************
*** 11,42 ****
SUFFIXES = .cpp .hpp .c .h .f .F .o .moc
! SUBDIRS = LibLoad
! include_HEADERS = ClfwCommon.hpp \
! UniversalIdentifier.hpp \
ClassException.hpp \
! IncompatibleClassException.hpp \
! AbstractEntityException.hpp \
! DescriptorNotFound.hpp \
! AccessorNotFound.hpp \
MetaType.hpp \
! MetaTypeFixedIterator.hpp \
FrameworkEntity.hpp \
Aggregate.hpp \
! Boolean.hpp \
! Number.hpp \
UnsignedNumber.hpp \
SignedNumber.hpp \
RealNumber.hpp \
! Integer.hpp \
ShortInteger.hpp \
UnsignedInteger.hpp \
! UnsignedShortInteger.hpp \
Collection.hpp \
! Array.hpp \
SetCollection.hpp \
MetaSpace.hpp \
MetaClass.hpp \
Ontology.hpp \
Makefile.am
--- 11,43 ----
SUFFIXES = .cpp .hpp .c .h .f .F .o .moc
! SUBDIRS = LibLoad Persist
! include_HEADERS = ClfwCommon.hpp \
! UniversalIdentifier.hpp \
ClassException.hpp \
! IncompatibleClassException.hpp \
! AbstractEntityException.hpp \
! DescriptorNotFound.hpp \
! AccessorNotFound.hpp \
MetaType.hpp \
! MetaTypeFixedIterator.hpp \
FrameworkEntity.hpp \
Aggregate.hpp \
! Boolean.hpp \
! Number.hpp \
UnsignedNumber.hpp \
SignedNumber.hpp \
RealNumber.hpp \
! Integer.hpp \
ShortInteger.hpp \
UnsignedInteger.hpp \
! UnsignedShortInteger.hpp \
Collection.hpp \
! Array.hpp \
SetCollection.hpp \
MetaSpace.hpp \
MetaClass.hpp \
Ontology.hpp \
+ Sponser.hpp \
Makefile.am
|
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:29:25
|
Update of /cvsroot/corelinux/clfw/src/libs/Persist In directory usw-pr-cvs1:/tmp/cvs-serv5204/Persist Log Message: Directory /cvsroot/corelinux/clfw/src/libs/Persist added to the repository |
|
From: Frank V. C. <fr...@us...> - 2001-03-18 15:27:37
|
Update of /cvsroot/corelinux/clfw/clfw/Persist In directory usw-pr-cvs1:/tmp/cvs-serv4908/Persist Log Message: Directory /cvsroot/corelinux/clfw/clfw/Persist added to the repository |
|
From: Frank V. C. <fr...@us...> - 2001-03-18 04:12:49
|
Update of /cvsroot/corelinux/models In directory usw-pr-cvs1:/tmp/cvs-serv19270 Modified Files: 115287-Persist.mdr 115287-Persist.xml.zip Log Message: More use case collaborations Index: 115287-Persist.mdr =================================================================== RCS file: /cvsroot/corelinux/models/115287-Persist.mdr,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** 115287-Persist.mdr 2001/03/17 14:31:38 1.2 --- 115287-Persist.mdr 2001/03/18 04:14:59 1.3 *************** *** 50,54 **** ) (RTProjectGroupObject ! mID "ID00000000017e" mName "Code engineering sets" ) --- 50,54 ---- ) (RTProjectGroupObject ! mID "ID000000000368" mName "Code engineering sets" ) Index: 115287-Persist.xml.zip =================================================================== RCS file: /cvsroot/corelinux/models/115287-Persist.xml.zip,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 Binary files /tmp/cvsnMXbxc and /tmp/cvs4jrk8g differ |
|
From: Frank V. C. <fr...@us...> - 2001-03-17 14:29:30
|
Update of /cvsroot/corelinux/models In directory usw-pr-cvs1:/tmp/cvs-serv12839 Modified Files: 115287-Persist.mdr 115287-Persist.xml.zip Log Message: Recast of model Index: 115287-Persist.mdr =================================================================== RCS file: /cvsroot/corelinux/models/115287-Persist.mdr,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** 115287-Persist.mdr 2001/02/15 11:08:23 1.1 --- 115287-Persist.mdr 2001/03/17 14:31:38 1.2 *************** *** 10,14 **** CREATE_ATTRIBUTES TRUE WORKING_DIRECTORY "/spare/MagicDrawUML3.6i_Pro" ! DEFAULT_LANGUAGE "C++" (JavaLanguageOptions mGenEmptyDoc FALSE --- 10,14 ---- CREATE_ATTRIBUTES TRUE WORKING_DIRECTORY "/spare/MagicDrawUML3.6i_Pro" ! DEFAULT_LANGUAGE "Java" (JavaLanguageOptions mGenEmptyDoc FALSE *************** *** 50,54 **** ) (RTProjectGroupObject ! mID "ID00000000021b" mName "Code engineering sets" ) --- 50,54 ---- ) (RTProjectGroupObject ! mID "ID00000000017e" mName "Code engineering sets" ) Index: 115287-Persist.xml.zip =================================================================== RCS file: /cvsroot/corelinux/models/115287-Persist.xml.zip,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 Binary files /tmp/cvsUwRBYB and /tmp/cvs4KrZx3 differ |
|
From: Hans D. <dul...@us...> - 2001-03-17 04:28:08
|
Update of /cvsroot/corelinux/corelinux/corelinux
In directory usw-pr-cvs1:/tmp/cvs-serv8805
Modified Files:
Thread.hpp
Log Message:
Added CreatedCount and BlockedCount.
Index: Thread.hpp
===================================================================
RCS file: /cvsroot/corelinux/corelinux/corelinux/Thread.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Thread.hpp 2000/08/31 22:52:20 1.3
--- Thread.hpp 2001/03/17 04:30:16 1.4
***************
*** 140,143 ****
--- 140,150 ----
/**
+ Retrieve the number of created threads
+ @return Count number of active threads
+ */
+
+ static Count getCreatedThreadCount( void );
+
+ /**
Retrieve the number of threads that are starting or running
@return Count number of active threads
***************
*** 147,150 ****
--- 154,164 ----
/**
+ Retrieve the number of threads that are waiting ro tun
+ @return Count number of active threads
+ */
+
+ static Count getBlockedThreadCount( void );
+
+ /**
Retrieve the number of threads that are not starting or
running or waiting to run.
***************
*** 253,256 ****
--- 267,271 ----
static ThreadIdentifier theThreadManagerId;
+ static Count theThreadCount;
};
|
|
From: Hans D. <dul...@us...> - 2001-03-17 04:26:53
|
Update of /cvsroot/corelinux/corelinux/src/classlibs/corelinux
In directory usw-pr-cvs1:/tmp/cvs-serv8623
Modified Files:
Thread.cpp
Log Message:
Added CreatedCount and BlockedCount.
Index: Thread.cpp
===================================================================
RCS file: /cvsroot/corelinux/corelinux/src/classlibs/corelinux/Thread.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Thread.cpp 2000/11/02 12:32:01 1.16
--- Thread.cpp 2001/03/17 04:29:01 1.17
***************
*** 51,54 ****
--- 51,55 ----
ThreadMap Thread::theThreadMap;
+ Count Thread::theThreadCount (0);
// Default constructor
***************
*** 167,170 ****
--- 168,178 ----
}
+ // Get created thread count
+
+ Count Thread::getCreatedThreadCount( void )
+ {
+ return theThreadCount;
+ }
+
// Get active thread count
***************
*** 238,241 ****
--- 246,283 ----
}
+ // Get the blocked thread count
+
+ Count Thread::getBlockedThreadCount( void )
+ {
+ Guard myGuard( theThreadManager.instance()->access() );
+
+ //
+ // Setup the count and iterators outside the loop
+ //
+
+ Count aCount(0);
+ ThreadMapIterator begin( theThreadMap.begin() );
+ ThreadMapIterator end( theThreadMap.end() );
+
+ while( begin != end )
+ {
+ //
+ // Get the state and test for some state of inactiveness
+ //
+
+ if( (*begin).second->getState() == THREAD_WAITING_TO_START )
+ {
+ ++aCount;
+ }
+ else
+ {
+ ; // do nothing
+ }
+ ++begin;
+ }
+
+ return aCount;
+ }
+
// Test routine for collection
***************
*** 305,308 ****
--- 347,351 ----
{
theThreadMap[aThreadId] = aContextPtr;
+ theThreadCount++;
}
}
|
|
From: Frank V. C. <fr...@us...> - 2001-03-01 16:33:05
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv19117/src/libs/clfw
Modified Files:
Array.cpp MetaType.cpp SetCollection.cpp
Log Message:
233863 SetCollection
Index: Array.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Array.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Array.cpp 2001/03/01 03:20:16 1.5
--- Array.cpp 2001/03/01 16:34:28 1.6
***************
*** 187,190 ****
--- 187,191 ----
// Iterate through each, calling equal
//
+ GUARD;
return checkForMember( aPtr );
***************
*** 330,333 ****
--- 331,344 ----
}
+ /// Remove all entries
+
+ void Array::removeAll( void )
+ {
+ GUARD;
+ UnsignedInt bv( theSizeRestriction.getValue() );
+ this->resetState();
+ theSizeRestriction.setValue(bv);
+ }
+
//
// Assignment operator for Array Reference
***************
*** 467,471 ****
// Fast path
! if( aCollection.getType()->isTypeOf( this->getType() ) == true )
{
(*this) += (ArrayCref)aCollection;
--- 478,482 ----
// Fast path
! if( Array::getTypeDescriptor()->isTypeOf( aCollection.getType() ) == true )
{
(*this) += (ArrayCref)aCollection;
***************
*** 488,494 ****
{
! if( this->equals( &aCollection ) == false )
{
! if( aCollection.getType()->isTypeOf( this->getType() ) == true )
{
if( checkBoundsForAdd(aCollection.getSize()) == false )
--- 499,505 ----
{
! if( this != &aCollection )
{
! if( Array::getTypeDescriptor()->isTypeOf( aCollection.getType() ) == true )
{
if( checkBoundsForAdd(aCollection.getSize()) == false )
***************
*** 545,549 ****
bool Array::checkForMember( FrameworkEntityCptr aPtr ) const
{
- GUARD;
bool found( false );
--- 556,559 ----
Index: MetaType.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/MetaType.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** MetaType.cpp 2000/11/15 23:07:21 1.17
--- MetaType.cpp 2001/03/01 16:34:28 1.18
***************
*** 329,344 ****
bool MetaType::isTypeOf( MetaTypeCptr aTypePtr ) const throw ( Assertion )
{
! REQUIRE( aTypePtr != NULLPTR );
- bool aTypeOf( false );
-
- aTypeOf = this->isType( aTypePtr );
-
if( aTypeOf == false )
{
! MetaTypeFixedIterator<MetaTypePtr> aIterator(theParents);
while( aIterator.isValid() )
{
! if( aIterator.getElement()->isTypeOf( aTypePtr ) == true )
{
aTypeOf = true;
--- 329,340 ----
bool MetaType::isTypeOf( MetaTypeCptr aTypePtr ) const throw ( Assertion )
{
! bool aTypeOf( this->isType( aTypePtr ) );
if( aTypeOf == false )
{
! MetaTypeFixedIterator<MetaTypePtr> aIterator(aTypePtr->theParents);
while( aIterator.isValid() )
{
! if( this->isTypeOf( aIterator.getElement() ) == true )
{
aTypeOf = true;
Index: SetCollection.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/SetCollection.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SetCollection.cpp 2001/03/01 03:20:16 1.1
--- SetCollection.cpp 2001/03/01 16:34:28 1.2
***************
*** 40,53 ****
}
! SetCollection::SetCollection( SetCollectionCref )
:
! Array()
{
! ;
}
! SetCollection::SetCollection( ArrayCref )
:
! Array()
{
;
--- 40,53 ----
}
! SetCollection::SetCollection( SetCollectionCref aRef )
:
! Array( aRef )
{
! ; // do nothing
}
! SetCollection::SetCollection( ArrayCref aRef )
:
! Array( aRef )
{
;
***************
*** 67,71 ****
bool SetCollection::operator==( SetCollectionCref aCref ) const
{
! return compareMembers( aCref );
}
--- 67,72 ----
bool SetCollection::operator==( SetCollectionCref aCref ) const
{
! GUARD;
! return (compareMembers( aCref ) == 0 );
}
***************
*** 88,91 ****
--- 89,199 ----
}
+ // Assignment operators
+
+ SetCollectionRef SetCollection::operator=( ArrayCref aRef )
+ {
+ //
+ // Because the array may have dupes, we need to clean it up
+ // first
+ //
+
+ Array *aPtr( this->foldToArray(aRef) );
+ Array::operator=( *aPtr );
+ Array::destroy( aPtr );
+
+ return ( *this );
+ }
+
+ SetCollectionRef SetCollection::operator=( SetCollectionCref aRef )
+ {
+ Array::operator=( Array::castDown(aRef) );
+ return ( *this );
+ }
+
+ SetCollectionRef SetCollection::operator=( ArrayCptr aPtr )
+ throw (NullPointerException)
+ {
+ if( aPtr == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ return ( (*this)=*aPtr );
+ }
+
+ SetCollectionRef SetCollection::operator=( SetCollectionCptr aPtr )
+ throw (NullPointerException)
+ {
+ if( aPtr == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ return ( (*this)=*aPtr );
+ }
+
+ // Copy (append) operators
+
+ SetCollectionRef SetCollection::operator+=( ArrayCref aRef )
+ throw (BoundsException)
+ {
+ //
+ // Because the array may have dupes, we need to clean it up
+ // first
+ //
+
+
+ Array *aPtr( this->foldToArray(aRef) );
+ this->addAll( Collection::castDown(*aPtr) );
+ Array::destroy( aPtr );
+ return ( *this );
+ }
+
+ SetCollectionRef SetCollection::operator+=( SetCollectionCref aRef )
+ throw (BoundsException)
+ {
+ this->addAll( Collection::castDown(aRef) );
+ return ( *this );
+ }
+
+ SetCollectionRef SetCollection::operator+=( ArrayCptr aPtr )
+ throw (NullPointerException, BoundsException)
+ {
+ if( aPtr == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ (*this) += *aPtr;
+ return ( *this );
+ }
+
+ SetCollectionRef SetCollection::operator+=( SetCollectionCptr aPtr )
+ throw (NullPointerException, BoundsException)
+ {
+ if( aPtr == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+ else
+ {
+ ; // do nothing
+ }
+
+ this->addAll( Collection::castDown(*aPtr) );
+ return ( *this );
+ }
// Add to end (putBack)
***************
*** 128,144 ****
}
! // Add all the elements from the inbound collection
! void SetCollection::addAll( CollectionCref )
throw (BoundsException,IncompatibleClassException)
{
}
// Add all the elements from the inbound collection at a offset
! void SetCollection::addAll( Index, CollectionCref )
throw (BoundsException,IncompatibleClassException)
{
}
--- 236,289 ----
}
! // Add all the elements from the inbound collection acts
! // like a union set operation, that is it adds the elements
! // from the collection that don't exist in the set
! void SetCollection::addAll( CollectionCref aCollection )
throw (BoundsException,IncompatibleClassException)
{
+ if( Array::getTypeDescriptor()->isTypeOf( aCollection.getType() ) == true )
+ {
+ ArrayPtr aPtr = this->getMembers( aCollection, false );
+ if( aPtr->getSize() != 0 )
+ {
+ Array::operator+=( *aPtr );
+ Array::destroy( aPtr );
+ }
+ else
+ {
+ ; // nothing to do
+ }
+ }
+ else
+ {
+ throw IncompatibleClassException( LOCATION );
+ }
}
// Add all the elements from the inbound collection at a offset
!
! void SetCollection::addAll( Index offset, CollectionCref aCollection )
throw (BoundsException,IncompatibleClassException)
{
+ if( Array::getTypeDescriptor()->isTypeOf( aCollection.getType() ) == true )
+ {
+ ArrayPtr aPtr = this->getMembers( aCollection, false );
+ if( aPtr->getSize() != 0 )
+ {
+ Array::addAll( offset, *aPtr );
+ Array::destroy( aPtr );
+ }
+ else
+ {
+ ; // nothing to do
+ }
+ }
+ else
+ {
+ throw IncompatibleClassException( LOCATION );
+ }
}
***************
*** 146,166 ****
// Do the walk, iterators would be more useful
! bool SetCollection::compareMembers( SetCollectionCref aRef ) const
{
! bool matched( false );
! Count maxCount( aRef.getSize() );
try
{
! for( Count x = 0; (x < maxCount) && (matched == false); ++x )
{
! matched = Array::checkForMember( aRef.getElementAt( x ) );
}
}
catch( BoundsExceptionRef aRef )
{
! ; // breaks us out with matched == false
}
! return !(matched);
}
--- 291,375 ----
// Do the walk, iterators would be more useful
! Count SetCollection::compareMembers( CollectionCref aRef ) const
{
! Count notMatched( 0 );
! Count maxCount( aRef.getSize() );
! ArrayCref ar( Array::castDown(aRef) );
try
{
! for( Count x = 0; x < maxCount ; ++x )
{
! if( Array::checkForMember( ar.getElementAt( x ) ) == false )
! {
! ++notMatched;
! }
! else
! {
! ; // do nothing
! }
}
}
catch( BoundsExceptionRef aRef )
{
! notMatched = maxCount;
! }
! return notMatched;
! }
!
! // Do the walk, extracting non-like members
!
! ArrayPtr SetCollection::getMembers( CollectionCref aRef, bool comp ) const
! {
! ArrayPtr aPtr( Array::create() );
! ArrayCref ar( Array::castDown(aRef) );
! Count maxCount( ar.getSize() );
!
! try
! {
! for( Count x = 0; x < maxCount; ++x )
! {
! FrameworkEntityPtr aFEP( ar.getElementAt(x) );
!
! if( Array::checkForMember( aFEP ) == comp )
! {
! aPtr->put( aFEP );
! }
! else
! {
! ; // do nothing
! }
! }
!
! }
! catch( BoundsExceptionRef aRef )
! {
! aPtr->removeAll();
! }
!
! return aPtr;
! }
!
! // Remove dupes
!
! ArrayPtr SetCollection::foldToArray( ArrayCref ar ) const
! {
! ArrayPtr aPtr( Array::create() );
! Count maxCount( ar.getSize() );
!
! for( Count x = 0; x < maxCount; ++x )
! {
! FrameworkEntityPtr aFEP( ar.getElementAt(x) );
!
! if( aPtr->containsElement( aFEP ) == false )
! {
! aPtr->put( aFEP );
! }
! else
! {
! ; // do nothing
! }
}
! return aPtr;
}
|
|
From: Frank V. C. <fr...@us...> - 2001-03-01 16:33:05
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1
In directory usw-pr-cvs1:/tmp/cvs-serv19117/src/testdrivers/exf1
Modified Files:
examp1.cpp
Log Message:
233863 SetCollection
Index: examp1.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** examp1.cpp 2001/03/01 03:20:16 1.30
--- examp1.cpp 2001/03/01 16:34:28 1.31
***************
*** 337,376 ****
UnsignedInteger ui3( 3 );
UnsignedInteger ui4( 4 );
! UnsignedInteger ui5( 1 );
! Array anArray;
! SetCollection aSet;
! anArray += &ui1;
! anArray += &ui2;
! anArray += &ui3;
! anArray += &ui4;
! anArray += &ui1; // allows duplicates
! anArray += &ui5; // of value as well
!
! aSet += &ui1;
! aSet += &ui2;
! aSet += &ui3;
! aSet += &ui4;
! aSet += &ui1; // won't allow pointer dupes
! aSet += &ui5; // but does values
! Count maxCnt = anArray.getSize();
! cout << endl << "Array display" << endl;
for( Count x = 0; x < maxCnt; ++x )
{
! UnsignedInteger *anInt = UnsignedInteger::castDown( anArray.getElementAt( x ) );
! cout << "Element at [" << x << "] = " << anInt->getValue() << endl;
}
! cout << endl << "Set display" << endl;
! maxCnt = aSet.getSize();
for( Count x = 0; x < maxCnt; ++x )
{
! UnsignedInteger *anInt = UnsignedInteger::castDown( aSet.getElementAt( x ) );
! cout << "Element at [" << x << "] = " << anInt->getValue() << endl;
}
--- 337,403 ----
UnsignedInteger ui3( 3 );
UnsignedInteger ui4( 4 );
! UnsignedInteger ui5( 5 );
! UnsignedInteger ui6( 6 );
! UnsignedInteger ui7( 7 );
!
! SetCollection aSet1;
! SetCollection aSet2;
! Array aRay;
!
! aSet1 += &ui1;
! aSet1 += &ui2;
! aSet1 += &ui3;
!
! aSet2 += &ui4;
! aSet2 += &ui5;
! aSet2 += &ui6;
!
! aRay += &ui1;
! aRay += &ui5;
! aRay += &ui7;
! aRay += &ui7;
! cout << endl << "Sets display" << endl;
! Count maxCnt = aSet1.getSize();
! for( Count x = 0; x < maxCnt; ++x )
! {
! UnsignedInteger *anInt = UnsignedInteger::castDown( aSet1.getElementAt( x ) );
! cout << "Set1:Element at [" << x << "] = " << anInt->getValue() << endl;
! }
!
! maxCnt = aSet2.getSize();
! cout << endl ;
!
for( Count x = 0; x < maxCnt; ++x )
{
! UnsignedInteger *anInt = UnsignedInteger::castDown( aSet2.getElementAt( x ) );
! cout << "Set2:Element at [" << x << "] = " << anInt->getValue() << endl;
}
+
+ aSet1 += aSet2;
+
+ maxCnt = aSet1.getSize();
+
+ cout << endl ;
+
+ for( Count x = 0; x < maxCnt; ++x )
+ {
+ UnsignedInteger *anInt = UnsignedInteger::castDown( aSet1.getElementAt( x ) );
+ cout << "Set1:Element at [" << x << "] = " << anInt->getValue() << endl;
+ }
+
+ aSet1 += aRay;
! maxCnt = aSet1.getSize();
! cout << endl ;
for( Count x = 0; x < maxCnt; ++x )
{
! UnsignedInteger *anInt = UnsignedInteger::castDown( aSet1.getElementAt( x ) );
! cout << "Set1:Element at [" << x << "] = " << anInt->getValue() << endl;
}
|
|
From: Frank V. C. <fr...@us...> - 2001-03-01 16:33:05
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv19117/clfw
Modified Files:
Array.hpp SetCollection.hpp
Log Message:
233863 SetCollection
Index: Array.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Array.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Array.hpp 2001/03/01 03:20:16 1.5
--- Array.hpp 2001/03/01 16:34:28 1.6
***************
*** 44,48 ****
*/
! class Array : public Collection, Synchronized
{
DECLARE_METATYPEMEMBERS( Array );
--- 44,48 ----
*/
! class Array : public Collection, public Synchronized
{
DECLARE_METATYPEMEMBERS( Array );
***************
*** 185,188 ****
--- 185,192 ----
FrameworkEntityPtr removeAtEnd( void );
+
+ /// Remove all entities in array
+
+ void removeAll( void );
//
Index: SetCollection.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/SetCollection.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SetCollection.hpp 2001/03/01 03:20:16 1.2
--- SetCollection.hpp 2001/03/01 16:34:28 1.3
***************
*** 162,167 ****
// Implementation methods
//
! bool compareMembers( SetCollectionCref ) const;
private:
--- 162,176 ----
// Implementation methods
//
+ /// Returns the number of elements NOT found
+
+ Count compareMembers( CollectionCref ) const;
! /// Return members that match (true) or not (false)
!
! ArrayPtr getMembers( CollectionCref, bool ) const;
!
! /// Return a set as an array from input
!
! ArrayPtr foldToArray( ArrayCref ) const;
private:
|
|
From: Frank V. C. <fr...@us...> - 2001-03-01 16:33:05
|
Update of /cvsroot/corelinux/clfw In directory usw-pr-cvs1:/tmp/cvs-serv19117 Modified Files: ChangeLog Log Message: 233863 SetCollection Index: ChangeLog =================================================================== RCS file: /cvsroot/corelinux/clfw/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** ChangeLog 2001/03/01 03:20:16 1.15 --- ChangeLog 2001/03/01 16:34:28 1.16 *************** *** 1,2 **** --- 1,6 ---- + 2001-03-01 Frank V. Castellucci <fr...@ca...> + + * Feature 233863 - Sets basically done + 2001-02-28 Frank V. Castellucci <fr...@ca...> |
|
From: Frank V. C. <fr...@us...> - 2001-03-01 03:18:55
|
Update of /cvsroot/corelinux/clfw In directory usw-pr-cvs1:/tmp/cvs-serv10107 Modified Files: ChangeLog Log Message: 233863 SetCollection added, almost Index: ChangeLog =================================================================== RCS file: /cvsroot/corelinux/clfw/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** ChangeLog 2001/02/24 04:32:31 1.14 --- ChangeLog 2001/03/01 03:20:16 1.15 *************** *** 1,6 **** 2001-02-23 Frank V. Castellucci <fr...@ca...> ! * Feature 133852 - Add UniversalIdentifier as entity instance object identifier ! * Feature 133863 - Introduce Collection, starting with shell of Array 2000-11-18 Frank V. Castellucci <fr...@ca...> --- 1,10 ---- + 2001-02-28 Frank V. Castellucci <fr...@ca...> + + * Feature 233863 - Array completed, SetCollection surfaces + 2001-02-23 Frank V. Castellucci <fr...@ca...> ! * Feature 233852 - Add UniversalIdentifier as entity instance object identifier ! * Feature 233863 - Introduce Collection, starting with shell of Array 2000-11-18 Frank V. Castellucci <fr...@ca...> |
|
From: Frank V. C. <fr...@us...> - 2001-03-01 03:18:55
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv10107/src/libs/clfw
Modified Files:
Array.cpp Collection.cpp FrameworkEntity.cpp Makefile.am
UnsignedInteger.cpp
Added Files:
SetCollection.cpp
Log Message:
233863 SetCollection added, almost
***** Error reading new file: [Errno 2] No such file or directory: 'SetCollection.cpp'
Index: Array.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Array.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Array.cpp 2001/02/27 13:51:11 1.4
--- Array.cpp 2001/03/01 03:20:16 1.5
***************
*** 74,77 ****
--- 74,79 ----
//
+ CountCref aSize( anArrayRef.getSize() );
+
theSizeRestriction.setValue
(
***************
*** 79,83 ****
);
! this->increaseArraySize( anArrayRef.size() );
//
--- 81,85 ----
);
! this->increaseArraySize( aSize );
//
***************
*** 86,91 ****
//
! this->copyOverFromArray( 0, anArrayRef.getArray(), anArrayRef.size() );
! this->increaseOccupancy( anArrayRef.size() );
}
--- 88,93 ----
//
! this->copyOverFromArray( 0, anArrayRef.getArray(), aSize );
! this->increaseOccupancy( aSize );
}
***************
*** 115,119 ****
//
! Count Array::size( void ) const
{
return theCount;
--- 117,121 ----
//
! Count Array::getSize( void ) const
{
return theCount;
***************
*** 121,124 ****
--- 123,134 ----
//
+ // If empty, returns true
+ //
+
+ bool Array::isEmpty( void ) const
+ {
+ return (getSize() == 0);
+ }
+ //
// Get indexed entity methods
//
***************
*** 166,191 ****
throw (NullPointerException)
{
- bool found( false );
-
if( aPtr == NULLPTR )
{
throw NullPointerException( LOCATION );
}
//
// Iterate through each, calling equal
//
-
- else
- {
- GUARD;
! for( Count x = 0; ( x < theCount ) && ( found == false ); ++x )
! {
! found = theEntities[x]->equals( aPtr );
! }
! }
!
! return found;
}
--- 176,192 ----
throw (NullPointerException)
{
if( aPtr == NULLPTR )
{
throw NullPointerException( LOCATION );
}
+ else
+ {
+ }
//
// Iterate through each, calling equal
//
! return checkForMember( aPtr );
}
***************
*** 348,351 ****
--- 349,354 ----
//
+ CountCref aSize( anArray.getSize() );
+
theSizeRestriction.setValue
(
***************
*** 353,357 ****
);
! this->increaseArraySize( anArray.size() );
//
--- 356,360 ----
);
! this->increaseArraySize( aSize );
//
***************
*** 360,365 ****
//
! this->copyOverFromArray( 0, anArray.getArray(), anArray.size() );
! this->increaseOccupancy( anArray.size() );
}
--- 363,368 ----
//
! this->copyOverFromArray( 0, anArray.getArray(), aSize );
! this->increaseOccupancy( aSize );
}
***************
*** 405,409 ****
if( this != &anArray )
{
! if( checkBoundsForAdd(anArray.size()) == false )
{
throw BoundsException( LOCATION );
--- 408,412 ----
if( this != &anArray )
{
! if( checkBoundsForAdd(anArray.getSize()) == false )
{
throw BoundsException( LOCATION );
***************
*** 418,422 ****
//
! CountCref aSize( anArray.size() );
this->increaseArraySize( aSize );
--- 421,425 ----
//
! CountCref aSize( anArray.getSize() );
this->increaseArraySize( aSize );
***************
*** 426,430 ****
//
! this->copyOverFromArray( this->size(),anArray.getArray(), aSize );
this->increaseOccupancy( aSize );
}
--- 429,433 ----
//
! this->copyOverFromArray( this->getSize(),anArray.getArray(), aSize );
this->increaseOccupancy( aSize );
}
***************
*** 489,493 ****
if( aCollection.getType()->isTypeOf( this->getType() ) == true )
{
! if( checkBoundsForAdd(aCollection.size()) == false )
{
throw BoundsException( LOCATION );
--- 492,496 ----
if( aCollection.getType()->isTypeOf( this->getType() ) == true )
{
! if( checkBoundsForAdd(aCollection.getSize()) == false )
{
throw BoundsException( LOCATION );
***************
*** 502,506 ****
//
! CountCref aSize( aCollection.size() );
this->increaseArraySize( aSize );
--- 505,509 ----
//
! CountCref aSize( aCollection.getSize() );
this->increaseArraySize( aSize );
***************
*** 536,539 ****
--- 539,557 ----
{
return theEntities;
+ }
+
+ // Walk the walk looking for match
+
+ bool Array::checkForMember( FrameworkEntityCptr aPtr ) const
+ {
+ GUARD;
+ bool found( false );
+
+ for( Count x = 0; ( x < theCount ) && ( found == false ); ++x )
+ {
+ found = theEntities[x]->equals( aPtr );
+ }
+
+ return found;
}
Index: Collection.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Collection.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Collection.cpp 2001/02/24 04:32:31 1.1
--- Collection.cpp 2001/03/01 03:20:16 1.2
***************
*** 41,44 ****
--- 41,51 ----
}
+ Collection::Collection( CollectionCref )
+ :
+ FrameworkEntity( )
+ {
+
+ }
+
//
// Destructor
Index: FrameworkEntity.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/FrameworkEntity.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** FrameworkEntity.cpp 2001/02/27 13:51:11 1.10
--- FrameworkEntity.cpp 2001/03/01 03:20:16 1.11
***************
*** 101,105 ****
) const
{
! return equals( &aFrameworkEntity );
}
--- 101,105 ----
) const
{
! return ( this->getOid() == aFrameworkEntity.getOid() );
}
***************
*** 141,144 ****
--- 141,146 ----
theOid = aOid;
}
+
+
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** Makefile.am 2001/02/27 13:51:11 1.18
--- Makefile.am 2001/03/01 03:20:16 1.19
***************
*** 32,35 ****
--- 32,36 ----
Collection.cpp \
Array.cpp \
+ SetCollection.cpp \
MetaSpace.cpp \
MetaClass.cpp \
Index: UnsignedInteger.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/UnsignedInteger.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** UnsignedInteger.cpp 2000/11/11 17:45:54 1.5
--- UnsignedInteger.cpp 2001/03/01 03:20:16 1.6
***************
*** 128,132 ****
) const
{
! return ( this == &aUnsignedInteger );
}
--- 128,132 ----
) const
{
! return ( this->getValue() == aUnsignedInteger.getValue() );
}
|
|
From: Frank V. C. <fr...@us...> - 2001-03-01 03:18:55
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv10107/clfw
Modified Files:
Array.hpp Collection.hpp FrameworkEntity.hpp MetaType.hpp
SetCollection.hpp
Log Message:
233863 SetCollection added, almost
Index: Array.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Array.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Array.hpp 2001/02/27 13:51:10 1.4
--- Array.hpp 2001/03/01 03:20:16 1.5
***************
*** 84,89 ****
/// Fetch the current size (# of entities) of the array
! virtual Count size( void ) const;
/// Fetch entity at index
--- 84,93 ----
/// Fetch the current size (# of entities) of the array
! virtual Count getSize( void ) const;
+ /// Determines
+
+ virtual bool isEmpty( void ) const ;
+
/// Fetch entity at index
***************
*** 195,198 ****
--- 199,207 ----
// Implementation methods
//
+
+ /// Checks to see if entity in collection
+
+ bool checkForMember( FrameworkEntityCptr ) const;
+
/// Retrieve the array representation
Index: Collection.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Collection.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Collection.hpp 2001/02/27 13:51:10 1.2
--- Collection.hpp 2001/03/01 03:20:16 1.3
***************
*** 66,69 ****
--- 66,75 ----
Collection( void );
+ /**
+ Copy constructor
+ */
+
+ Collection( CollectionCref );
+
/// Virtual destructor
***************
*** 95,100 ****
// Minimal functionality forced (replaced with meta info)
//
! virtual Count size( void ) const = 0;
virtual void addAll( CollectionCref )
--- 101,108 ----
// Minimal functionality forced (replaced with meta info)
//
+
+ virtual Count getSize( void ) const = 0;
! virtual bool isEmpty( void ) const = 0;
virtual void addAll( CollectionCref )
Index: FrameworkEntity.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/FrameworkEntity.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** FrameworkEntity.hpp 2001/02/27 13:51:10 1.5
--- FrameworkEntity.hpp 2001/03/01 03:20:16 1.6
***************
*** 60,63 ****
--- 60,70 ----
virtual MetaTypePtr getType( void ) const;
+ /**
+ The equals method is defined for each FrameworkEntity
+ type using MetaClass. It compares the type, then
+ the address of the pointer, and if needed will call
+ out to the types operator==
+ */
+
virtual bool equals( FrameworkEntityCptr ) const;
***************
*** 102,111 ****
*/
static FrameworkEntityPtr castDown( FrameworkEntityPtr );
/**
! Cast the pointer down to type
*/
static FrameworkEntityRef castDown( FrameworkEntityRef );
--- 109,120 ----
*/
+ static FrameworkEntityCptr castDown( FrameworkEntityCptr );
static FrameworkEntityPtr castDown( FrameworkEntityPtr );
/**
! Cast the reference down to type
*/
+ static FrameworkEntityCref castDown( FrameworkEntityCref );
static FrameworkEntityRef castDown( FrameworkEntityRef );
***************
*** 126,139 ****
private:
!
! /**
! the MetaType descriptor
! */
! static MetaType theTypeDesc;
! /// The individuals identifier
! UniversalIdentifier theOid;
--- 135,148 ----
private:
!
! /**
! the MetaType descriptor
! */
! static MetaType theTypeDesc;
! /// The individuals identifier
! UniversalIdentifier theOid;
Index: MetaType.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** MetaType.hpp 2001/02/27 13:51:10 1.29
--- MetaType.hpp 2001/03/01 03:20:16 1.30
***************
*** 88,93 ****
*/ \
static void destroy( className##Ptr aPointer ); \
! static className##Ptr castDown( corelinux::FrameworkEntityPtr ); \
! static className##Ref castDown( corelinux::FrameworkEntityRef ); \
/** \
redefine the operator new[] \
--- 88,95 ----
*/ \
static void destroy( className##Ptr aPointer ); \
! static className##Cptr castDown( corelinux::FrameworkEntityCptr ) ; \
! static className##Ptr castDown( corelinux::FrameworkEntityPtr ); \
! static className##Ref castDown( corelinux::FrameworkEntityRef ); \
! static className##Cref castDown( corelinux::FrameworkEntityCref ); \
/** \
redefine the operator new[] \
***************
*** 494,497 ****
--- 496,507 ----
return dynamic_cast<className##Ptr>(aP); \
} \
+ className##Cptr className::castDown( corelinux::FrameworkEntityCptr aP ) \
+ { \
+ return dynamic_cast<className##Cptr>(aP); \
+ } \
+ className##Cref className::castDown( corelinux::FrameworkEntityCref aP ) \
+ { \
+ return dynamic_cast<className##Cref>(aP); \
+ } \
/** \
redefine the operator new for className \
***************
*** 534,541 ****
--- 544,563 ----
Cast to type \
*/ \
+ className##Ref className::castDown( corelinux::FrameworkEntityRef aP ) \
+ { \
+ return dynamic_cast<className##Ref>(aP); \
+ } \
className##Ptr className::castDown( corelinux::FrameworkEntityPtr aP ) \
{ \
return dynamic_cast<className##Ptr>(aP); \
} \
+ className##Cptr className::castDown( corelinux::FrameworkEntityCptr aP ) \
+ { \
+ return dynamic_cast<className##Cptr>(aP); \
+ } \
+ className##Cref className::castDown( corelinux::FrameworkEntityCref aP ) \
+ { \
+ return dynamic_cast<className##Cref>(aP); \
+ } \
/** \
redefine the operator new for className \
***************
*** 615,622 ****
); \
} \
className##Ptr className::castDown( corelinux::FrameworkEntityPtr aP ) \
{ \
! return dynamic_cast<className##Ptr>(aP); \
} \
/** \
redefine the operator new for className \
--- 637,656 ----
); \
} \
+ className##Ref className::castDown( corelinux::FrameworkEntityRef aP ) \
+ { \
+ return dynamic_cast<className##Ref>(aP); \
+ } \
className##Ptr className::castDown( corelinux::FrameworkEntityPtr aP ) \
{ \
! return dynamic_cast<className##Ptr>(aP); \
} \
+ className##Cptr className::castDown( corelinux::FrameworkEntityCptr aP ) \
+ { \
+ return dynamic_cast<className##Cptr>(aP); \
+ } \
+ className##Cref className::castDown( corelinux::FrameworkEntityCref aP ) \
+ { \
+ return dynamic_cast<className##Cref>(aP); \
+ } \
/** \
redefine the operator new for className \
***************
*** 707,712 ****
else \
{ \
! ; \
} \
} \
return isSame; \
--- 741,751 ----
else \
{ \
! isSame = (*this) == \
! *(className::castDown( aPtr )); \
} \
+ } \
+ else \
+ { \
+ ; \
} \
return isSame; \
Index: SetCollection.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/SetCollection.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SetCollection.hpp 2001/02/27 13:51:10 1.1
--- SetCollection.hpp 2001/03/01 03:20:16 1.2
***************
*** 90,94 ****
/// Entity put operator
! SetCollectionRef operator=( FrameworkEntityPtr )
throw (NullPointerException,BoundsException);
--- 90,94 ----
/// Entity put operator
! SetCollectionRef operator+=( FrameworkEntityPtr )
throw (NullPointerException,BoundsException);
***************
*** 142,145 ****
--- 142,155 ----
throw (NullPointerException, BoundsException);
+ /// Add all the elements from the inbound collection
+
+ virtual void addAll( CollectionCref )
+ throw (BoundsException,IncompatibleClassException);
+
+ /// Add all the elements from the inbound collection at a offset
+
+ virtual void addAll( Index, CollectionCref )
+ throw (BoundsException,IncompatibleClassException);
+
//
// Member Declarations
***************
*** 152,155 ****
--- 162,167 ----
// Implementation methods
//
+
+ bool compareMembers( SetCollectionCref ) const;
private:
|
|
From: Frank V. C. <fr...@us...> - 2001-03-01 03:18:55
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1
In directory usw-pr-cvs1:/tmp/cvs-serv10107/src/testdrivers/exf1
Modified Files:
examp1.cpp
Log Message:
233863 SetCollection added, almost
Index: examp1.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** examp1.cpp 2001/02/27 13:51:11 1.29
--- examp1.cpp 2001/03/01 03:20:16 1.30
***************
*** 63,66 ****
--- 63,70 ----
#endif
+ #if !defined(__SETCOLLECTION_HPP)
+ #include <clfw/SetCollection.hpp>
+ #endif
+
#if !defined(__ARRAY_HPP)
#include <clfw/Array.hpp>
***************
*** 329,332 ****
--- 333,377 ----
dumpTypeInformation( aType );
+ UnsignedInteger ui1( 1 );
+ UnsignedInteger ui2( 2 );
+ UnsignedInteger ui3( 3 );
+ UnsignedInteger ui4( 4 );
+ UnsignedInteger ui5( 1 );
+
+ Array anArray;
+ SetCollection aSet;
+
+ anArray += &ui1;
+ anArray += &ui2;
+ anArray += &ui3;
+ anArray += &ui4;
+ anArray += &ui1; // allows duplicates
+ anArray += &ui5; // of value as well
+
+ aSet += &ui1;
+ aSet += &ui2;
+ aSet += &ui3;
+ aSet += &ui4;
+ aSet += &ui1; // won't allow pointer dupes
+ aSet += &ui5; // but does values
+
+ Count maxCnt = anArray.getSize();
+
+ cout << endl << "Array display" << endl;
+ for( Count x = 0; x < maxCnt; ++x )
+ {
+ UnsignedInteger *anInt = UnsignedInteger::castDown( anArray.getElementAt( x ) );
+ cout << "Element at [" << x << "] = " << anInt->getValue() << endl;
+ }
+
+ cout << endl << "Set display" << endl;
+
+ maxCnt = aSet.getSize();
+
+ for( Count x = 0; x < maxCnt; ++x )
+ {
+ UnsignedInteger *anInt = UnsignedInteger::castDown( aSet.getElementAt( x ) );
+ cout << "Element at [" << x << "] = " << anInt->getValue() << endl;
+ }
//
|
|
From: Frank V. C. <fr...@us...> - 2001-02-27 13:49:55
|
Update of /cvsroot/corelinux/clfw/src/libs/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv4163/src/libs/clfw
Modified Files:
Array.cpp FrameworkEntity.cpp Makefile.am
Added Files:
IncompatibleClassException.cpp
Log Message:
233863 Collections
***** Error reading new file: [Errno 2] No such file or directory: 'IncompatibleClassException.cpp'
Index: Array.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Array.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Array.cpp 2001/02/25 15:19:52 1.3
--- Array.cpp 2001/02/27 13:51:11 1.4
***************
*** 31,34 ****
--- 31,38 ----
#endif
+ #if !defined(__METACLASS_HPP)
+ #include <MetaClass.hpp>
+ #endif
+
#include <cstring>
***************
*** 111,115 ****
//
! CountCref Array::size( void ) const
{
return theCount;
--- 115,119 ----
//
! Count Array::size( void ) const
{
return theCount;
***************
*** 157,165 ****
}
//
// Add an entity to the array
//
! ArrayRef Array::operator=( FrameworkEntityPtr anEntity )
throw (NullPointerException,BoundsException)
{
--- 161,227 ----
}
+ // Does the entity exist in the collection
+
+ bool Array::containsElement( FrameworkEntityPtr aPtr ) const
+ throw (NullPointerException)
+ {
+ bool found( false );
+
+ if( aPtr == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+
+ //
+ // Iterate through each, calling equal
+ //
+
+ else
+ {
+ GUARD;
+
+ for( Count x = 0; ( x < theCount ) && ( found == false ); ++x )
+ {
+ found = theEntities[x]->equals( aPtr );
+ }
+ }
+
+ return found;
+ }
+
+ // Does the type exist in the collection
+
+ bool Array::containsType( MetaClassPtr aPtr ) const
+ throw (NullPointerException)
+ {
+ bool found( false );
+ if( aPtr == NULLPTR )
+ {
+ throw NullPointerException( LOCATION );
+ }
+
+ //
+ // Iterate through each, calling equal
+ //
+
+ else
+ {
+ GUARD;
+
+ for( Count x = 0; ( x < theCount ) && ( found == false ); ++x )
+ {
+ found = *(MetaSpace::getClassForType(theEntities[x]->getType())) ==
+ *aPtr;
+ }
+ }
+
+ return found;
+ }
+
//
// Add an entity to the array
//
! ArrayRef Array::operator+=( FrameworkEntityPtr anEntity )
throw (NullPointerException,BoundsException)
{
***************
*** 189,193 ****
throw (NullPointerException,BoundsException)
{
! (*this)=anEntity;
}
--- 251,255 ----
throw (NullPointerException,BoundsException)
{
! (*this)+=anEntity;
}
***************
*** 195,199 ****
throw (NullPointerException,BoundsException)
{
! (*this)=anEntity;
}
--- 257,261 ----
throw (NullPointerException,BoundsException)
{
! (*this)+=anEntity;
}
***************
*** 376,380 ****
}
! /// Copy (append)
ArrayRef Array::operator+=( ArrayCptr anArrayPtr )
--- 438,442 ----
}
! // Copy (append)
ArrayRef Array::operator+=( ArrayCptr anArrayPtr )
***************
*** 392,395 ****
--- 454,533 ----
}
+
+ //
+ // Add all from one collection to this one
+ //
+
+ void Array::addAll( CollectionCref aCollection )
+ throw (BoundsException,IncompatibleClassException)
+ {
+ // Fast path
+
+ if( aCollection.getType()->isTypeOf( this->getType() ) == true )
+ {
+ (*this) += (ArrayCref)aCollection;
+ }
+
+ // Hmmm, can't work it reliably
+
+ else
+ {
+ throw IncompatibleClassException( LOCATION );
+ }
+ }
+
+ //
+ // Add all from a collection to this one at a specific point
+ //
+
+ void Array::addAll( Index offset, CollectionCref aCollection )
+ throw (BoundsException,IncompatibleClassException)
+ {
+
+ if( this->equals( &aCollection ) == false )
+ {
+ if( aCollection.getType()->isTypeOf( this->getType() ) == true )
+ {
+ if( checkBoundsForAdd(aCollection.size()) == false )
+ {
+ throw BoundsException( LOCATION );
+ }
+ else
+ {
+ GUARD;
+
+ //
+ // Using the information from the reference
+ // adjust and append
+ //
+
+ CountCref aSize( aCollection.size() );
+
+ this->increaseArraySize( aSize );
+ this->shiftForInsert( offset, aSize );
+
+ //
+ // Now insert the data from the reference
+ //
+
+ this->copyOverFromArray
+ (
+ offset,
+ ((ArrayCref)aCollection).getArray(),
+ aSize
+ );
+ this->increaseOccupancy( aSize );
+ }
+ }
+ else
+ {
+ throw IncompatibleClassException( LOCATION );
+ }
+ }
+ else
+ {
+ ; // do nothing
+ }
+ }
// Expose list
Index: FrameworkEntity.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/FrameworkEntity.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** FrameworkEntity.cpp 2001/02/24 04:18:49 1.9
--- FrameworkEntity.cpp 2001/02/27 13:51:11 1.10
***************
*** 101,105 ****
) const
{
! return ( this->getOid() == aFrameworkEntity.getOid() );
}
--- 101,105 ----
) const
{
! return equals( &aFrameworkEntity );
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/libs/clfw/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** Makefile.am 2001/02/24 04:32:31 1.17
--- Makefile.am 2001/02/27 13:51:11 1.18
***************
*** 14,17 ****
--- 14,18 ----
SRCS = clfw.cpp \
ClassException.cpp \
+ IncompatibleClassException.cpp \
UniversalIdentifier.cpp \
AbstractEntityException.cpp \
|
|
From: Frank V. C. <fr...@us...> - 2001-02-27 13:49:55
|
Update of /cvsroot/corelinux/clfw/src/testdrivers/exf1
In directory usw-pr-cvs1:/tmp/cvs-serv4163/src/testdrivers/exf1
Modified Files:
examp1.cpp
Log Message:
233863 Collections
Index: examp1.cpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/src/testdrivers/exf1/examp1.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** examp1.cpp 2001/02/25 15:19:52 1.28
--- examp1.cpp 2001/02/27 13:51:11 1.29
***************
*** 329,332 ****
--- 329,333 ----
dumpTypeInformation( aType );
+
//
// Dispatch the method
|
|
From: Frank V. C. <fr...@us...> - 2001-02-27 13:49:55
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv4163/clfw
Modified Files:
Array.hpp Collection.hpp FrameworkEntity.hpp Makefile.am
MetaType.hpp
Added Files:
IncompatibleClassException.hpp SetCollection.hpp
Log Message:
233863 Collections
***** Error reading new file: [Errno 2] No such file or directory: 'IncompatibleClassException.hpp'
***** Error reading new file: [Errno 2] No such file or directory: 'SetCollection.hpp'
Index: Array.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Array.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Array.hpp 2001/02/25 15:19:51 1.3
--- Array.hpp 2001/02/27 13:51:10 1.4
***************
*** 34,41 ****
#endif
- #if !defined(__BOUNDSEXCEPTION_HPP)
- #include <corelinux/BoundsException.hpp>
- #endif
-
namespace corelinux
{
--- 34,37 ----
***************
*** 88,92 ****
/// Fetch the current size (# of entities) of the array
! CountCref size( void ) const;
/// Fetch entity at index
--- 84,88 ----
/// Fetch the current size (# of entities) of the array
! virtual Count size( void ) const;
/// Fetch entity at index
***************
*** 105,110 ****
throw (BoundsException);
! //
// Mutators
//
--- 101,115 ----
throw (BoundsException);
+ /// Does the entity exist in the collection
! virtual bool containsElement( FrameworkEntityPtr ) const
! throw (NullPointerException);
!
! /// Does the type exist in the collection
!
! virtual bool containsType( MetaClassPtr ) const
! throw (NullPointerException);
!
!
// Mutators
//
***************
*** 112,123 ****
/// Entity put operator
! ArrayRef operator=( FrameworkEntityPtr )
throw (NullPointerException,BoundsException);
! /// Copy (replace)
ArrayRef operator=( ArrayCref );
! /// Copy (replace)
ArrayRef operator=( ArrayCptr )
--- 117,128 ----
/// Entity put operator
! ArrayRef operator+=( FrameworkEntityPtr )
throw (NullPointerException,BoundsException);
! /// Assignment (replace)
ArrayRef operator=( ArrayCref );
! /// Assignment (replace)
ArrayRef operator=( ArrayCptr )
***************
*** 153,156 ****
--- 158,171 ----
virtual void putAt( Index, FrameworkEntityPtr )
throw (NullPointerException, BoundsException);
+
+ /// Add all the elements from the inbound collection
+
+ virtual void addAll( CollectionCref )
+ throw (BoundsException,IncompatibleClassException);
+
+ /// Add all the elements from the inbound collection at a offset
+
+ virtual void addAll( Index, CollectionCref )
+ throw (BoundsException,IncompatibleClassException);
/// Remove at index
Index: Collection.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Collection.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Collection.hpp 2001/02/24 04:32:31 1.1
--- Collection.hpp 2001/02/27 13:51:10 1.2
***************
*** 30,35 ****
--- 30,44 ----
#endif
+ #if !defined(__BOUNDSEXCEPTION_HPP)
+ #include <corelinux/BoundsException.hpp>
+ #endif
+
+ #if !defined(__INCOMPATIBLECLASSEXCEPTION_HPP)
+ #include <IncompatibleClassException.hpp>
+ #endif
+
namespace corelinux
{
+ DECLARE_CLASS( MetaClass );
DECLARE_CLASS( Collection );
***************
*** 82,85 ****
--- 91,114 ----
//@}
+
+ //
+ // Minimal functionality forced (replaced with meta info)
+ //
+
+ virtual Count size( void ) const = 0;
+
+ virtual void addAll( CollectionCref )
+ throw (BoundsException,IncompatibleClassException) = 0;
+
+ virtual void addAll( Index, CollectionCref )
+ throw (BoundsException,IncompatibleClassException) = 0;
+
+ virtual void put( FrameworkEntityPtr ) = 0;
+
+ virtual bool containsElement( FrameworkEntityPtr ) const
+ throw (NullPointerException) = 0;
+
+ virtual bool containsType( MetaClassPtr ) const
+ throw (NullPointerException) = 0;
/** @name Accessors
Index: FrameworkEntity.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/FrameworkEntity.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** FrameworkEntity.hpp 2001/02/24 04:17:25 1.4
--- FrameworkEntity.hpp 2001/02/27 13:51:10 1.5
***************
*** 60,63 ****
--- 60,65 ----
virtual MetaTypePtr getType( void ) const;
+ virtual bool equals( FrameworkEntityCptr ) const;
+
/**
create a new instance of className
Index: Makefile.am
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** Makefile.am 2001/02/24 04:32:31 1.20
--- Makefile.am 2001/02/27 13:51:10 1.21
***************
*** 16,19 ****
--- 16,20 ----
UniversalIdentifier.hpp \
ClassException.hpp \
+ IncompatibleClassException.hpp \
AbstractEntityException.hpp \
DescriptorNotFound.hpp \
***************
*** 34,37 ****
--- 35,39 ----
Collection.hpp \
Array.hpp \
+ SetCollection.hpp \
MetaSpace.hpp \
MetaClass.hpp \
Index: MetaType.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** MetaType.hpp 2001/02/24 04:17:25 1.28
--- MetaType.hpp 2001/02/27 13:51:10 1.29
***************
*** 70,73 ****
--- 70,77 ----
virtual corelinux::MetaTypePtr getType( void ) const; \
/** \
+ equality checks \
+ */ \
+ virtual bool equals( corelinux::FrameworkEntityCptr ) const; \
+ /** \
create a new instance of className \
\return a pointer to className \
***************
*** 688,691 ****
--- 692,714 ----
{ \
return &theTypeDesc; \
+ } \
+ /** \
+ implements the equals upcalls \
+ */ \
+ bool className::equals( FrameworkEntityCptr aPtr ) const \
+ { \
+ bool isSame( false ); \
+ if( getTypeDescriptor() == aPtr->getType() ) \
+ { \
+ if( this == aPtr ) \
+ { \
+ isSame = true; \
+ } \
+ else \
+ { \
+ ; \
+ } \
+ } \
+ return isSame; \
} \
|