|
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() );
}
|