|
From: Frank V. C. <fr...@us...> - 2001-04-03 03:00:19
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv13149/clfw
Modified Files:
Array.hpp Collection.hpp Concept.hpp SetCollection.hpp
Log Message:
115287 Enhanced concept type ready for serious testing
Index: Array.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Array.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Array.hpp 2001/03/01 16:34:28 1.6
--- Array.hpp 2001/04/03 03:00:14 1.7
***************
*** 27,35 ****
#if !defined(__COLLECTION_HPP)
! #include <Collection.hpp>
#endif
! #if !defined(__UNSIGNEDINTEGER_HPP)
! #include <UnsignedInteger.hpp>
#endif
--- 27,35 ----
#if !defined(__COLLECTION_HPP)
! #include <clfw/Collection.hpp>
#endif
! #if !defined(__INTEGER_HPP)
! #include <clfw/Integer.hpp>
#endif
***************
*** 84,88 ****
/// Fetch the current size (# of entities) of the array
! virtual Count getSize( void ) const;
/// Determines
--- 84,88 ----
/// Fetch the current size (# of entities) of the array
! virtual Counter getSize( void ) const;
/// Determines
***************
*** 90,106 ****
virtual bool isEmpty( void ) const ;
! /// Fetch entity at index
! FrameworkEntityPtr operator[]( Index ) const
throw (BoundsException);
! /// Fetch entity at index
! FrameworkEntityPtr getElementAt( Index ) const
throw (BoundsException);
! /// Fetch entity class index
! MetaClassPtr getElementClassAt( Index ) const
throw (BoundsException);
--- 90,111 ----
virtual bool isEmpty( void ) const ;
! /// Fetch entity at ElementIndex
! FrameworkEntityPtr operator[]( ElementIndex ) const
throw (BoundsException);
! /// Fetch the index ( >= 0 else -1 )
! virtual ElementIndex indexOf( FrameworkEntityCptr ) const
! throw (NullPointerException);
!
! /// Fetch entity at ElementIndex
!
! virtual FrameworkEntityPtr getElementAt( ElementIndex ) const
throw (BoundsException);
! /// Fetch entity class ElementIndex
! MetaClassPtr getElementClassAt( ElementIndex ) const
throw (BoundsException);
***************
*** 160,164 ****
/// Add at point, shifting others back one
! virtual void putAt( Index, FrameworkEntityPtr )
throw (NullPointerException, BoundsException);
--- 165,169 ----
/// Add at point, shifting others back one
! virtual void putAt( ElementIndex, FrameworkEntityPtr )
throw (NullPointerException, BoundsException);
***************
*** 170,179 ****
/// Add all the elements from the inbound collection at a offset
! virtual void addAll( Index, CollectionCref )
throw (BoundsException,IncompatibleClassException);
! /// Remove at index
! FrameworkEntityPtr removeAt( Index )
throw (BoundsException);
--- 175,189 ----
/// Add all the elements from the inbound collection at a offset
! virtual void addAll( ElementIndex, CollectionCref )
throw (BoundsException,IncompatibleClassException);
+
+ /// Remove the specified entity from the array
! virtual FrameworkEntityPtr remove( FrameworkEntityPtr )
! throw (NullPointerException);
!
! /// Remove at ElementIndex
! FrameworkEntityPtr removeAt( ElementIndex )
throw (BoundsException);
***************
*** 196,200 ****
/// Semantic for bounding array
! DECLARE_INSTANCEDATA( UnsignedInteger, SizeRestriction );
protected:
--- 206,210 ----
/// Semantic for bounding array
! DECLARE_INSTANCEDATA( Integer, SizeRestriction );
protected:
***************
*** 208,211 ****
--- 218,225 ----
bool checkForMember( FrameworkEntityCptr ) const;
+ /// Get ElementIndex for specific member
+
+ ElementIndex getMemberIndex( FrameworkEntityCptr ) const;
+
/// Retrieve the array representation
***************
*** 214,242 ****
/// Adjusts occupancy up
! void increaseOccupancy( Count additions = 1 );
/// Adjusts occupancy down
! void decreaseOccupancy( Count removals = 1 );
/// Confirms ability to grow, or available room
! bool checkBoundsForAdd( Count increment = 1 );
/// Grows and copies elements
! void increaseArraySize( Count increment = 1 );
/// Shifts array for indexed inserts
! void shiftForInsert( Index position, Count increment=1 );
/// Shifts array for indexed removals
! void shiftForRemove( Index position, Count increment=1 );
/// Array copy into
! void copyOverFromArray( Index, FrameworkEntity **, CountCref );
--- 228,256 ----
/// Adjusts occupancy up
! void increaseOccupancy( Counter additions = 1 );
/// Adjusts occupancy down
! void decreaseOccupancy( Counter removals = 1 );
/// Confirms ability to grow, or available room
! bool checkBoundsForAdd( Counter increment = 1 );
/// Grows and copies elements
! void increaseArraySize( Counter increment = 1 );
/// Shifts array for indexed inserts
! void shiftForInsert( ElementIndex position, Count increment=1 );
/// Shifts array for indexed removals
! void shiftForRemove( ElementIndex position, Count increment=1 );
/// Array copy into
! void copyOverFromArray( ElementIndex, FrameworkEntity **, CountCref );
***************
*** 250,255 ****
private:
FrameworkEntity **theEntities;
! Count theCount;
! Count theRemaining;
};
--- 264,269 ----
private:
FrameworkEntity **theEntities;
! Counter theCount;
! Counter theRemaining;
};
Index: Collection.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Collection.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Collection.hpp 2001/03/01 03:20:16 1.3
--- Collection.hpp 2001/04/03 03:00:14 1.4
***************
*** 42,45 ****
--- 42,46 ----
DECLARE_CLASS( MetaClass );
DECLARE_CLASS( Collection );
+ DECLARE_TYPE( Long, ElementIndex );
/*!
***************
*** 102,122 ****
//
! virtual Count getSize( void ) const = 0;
virtual bool isEmpty( 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
--- 103,132 ----
//
! virtual Counter getSize( void ) const = 0;
virtual bool isEmpty( void ) const = 0;
+ virtual ElementIndex indexOf( FrameworkEntityCptr ) const
+ throw (NullPointerException) = 0;
+
+ virtual FrameworkEntityPtr getElementAt( ElementIndex ) const
+ throw (BoundsException) = 0;
+
virtual void addAll( CollectionCref )
! throw (BoundsException,IncompatibleClassException) = 0;
! virtual void addAll( ElementIndex, CollectionCref )
! throw (BoundsException,IncompatibleClassException) = 0;
virtual void put( FrameworkEntityPtr ) = 0;
+ virtual FrameworkEntityPtr remove( FrameworkEntityPtr )
+ throw (NullPointerException) = 0;
+
virtual bool containsElement( FrameworkEntityPtr ) const
! throw (NullPointerException) = 0;
virtual bool containsType( MetaClassPtr ) const
! throw (NullPointerException) = 0;
/** @name Accessors
Index: Concept.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/Concept.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Concept.hpp 2001/03/31 22:21:45 1.3
--- Concept.hpp 2001/04/03 03:00:14 1.4
***************
*** 83,100 ****
//
! virtual AttributePtr getAttributeFromKey( FrameworkEntityPtr );
! virtual SetCollectionPtr getPropertyKeys( void );
//
// Mutators
//
! virtual void addAttribute( AttributePtr );
! virtual void removeAttribute( AttributePtr );
! virtual void removeKey( FrameworkEntityPtr );
//
--- 83,111 ----
//
! /// Given a key, find the value associated with it
! virtual AttributePtr getAttributeFromKey( FrameworkEntityPtr )
! throw ();
+ /// Extract the keys from the concepts properties
+ virtual SetCollectionPtr getPropertyKeys( void ) throw ();
+
+
//
// Mutators
//
+
+ /// Add a new attribute, possibly replacing existing
+
+ virtual void addAttribute( AttributePtr ) throw ();
+
+ /// Remove an existing attribute
! virtual void removeAttribute( AttributePtr ) throw ();
! /// Remove an attribute given it's key
! virtual void removeKey( FrameworkEntityPtr ) throw ();
//
Index: SetCollection.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/SetCollection.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** SetCollection.hpp 2001/03/01 16:34:28 1.3
--- SetCollection.hpp 2001/04/03 03:00:14 1.4
***************
*** 27,31 ****
#if !defined(__ARRAY_HPP)
! #include <Array.hpp>
#endif
--- 27,31 ----
#if !defined(__ARRAY_HPP)
! #include <clfw/Array.hpp>
#endif
|