|
From: Frank V. C. <fr...@us...> - 2001-02-24 04:16:19
|
Update of /cvsroot/corelinux/clfw/clfw
In directory usw-pr-cvs1:/tmp/cvs-serv5819
Modified Files:
FrameworkEntity.hpp MetaType.hpp
Log Message:
133852 UniversalIdentifier as instance object id
Index: FrameworkEntity.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/FrameworkEntity.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** FrameworkEntity.hpp 2000/10/04 04:33:15 1.3
--- FrameworkEntity.hpp 2001/02/24 04:17:25 1.4
***************
*** 38,43 ****
class FrameworkEntity
{
- DECLARE_METATYPEMEMBERS( FrameworkEntity );
public:
--- 38,139 ----
class FrameworkEntity
{
+ //
+ // The base entity has attributes and methods that are not needed by
+ // the derivations, so we expanded information for FrameworkEntity
+ //
+
+ public:
+
+ /**
+ get the type descriptor
+ \return a const pointer to the MetaType
+ */
+
+ static MetaTypePtr getTypeDescriptor( void );
+
+ /**
+ get the type
+ \return a const pointer to the MetaType
+ */
+
+ virtual MetaTypePtr getType( void ) const;
+
+ /**
+ create a new instance of className
+ \return a pointer to className
+ */
+
+ static FrameworkEntityPtr create( void );
+
+ /**
+ create a new instance of
+ className with OID
+ \return a pointer to className
+ */
+
+ static FrameworkEntityPtr create( UniversalIdentifierCref );
+
+ /**
+ destroy a point of className
+ \arg pointer to className
+ */
+
+ static void destroy( FrameworkEntityPtr aPointer );
+
+ /**
+ Get the object identifier for the instance
+ \return a UniversalIdentifier
+ */
+
+ UniversalIdentifierCref getOid( void ) const;
+
+ /**
+ Set the object identifier for
+ the instance
+ */
+
+ void setOid( UniversalIdentifierCref );
+
+ /**
+ Cast the pointer down to type
+ */
+
+ static FrameworkEntityPtr castDown( FrameworkEntityPtr );
+
+ /**
+ Cast the pointer down to type
+ */
+
+ static FrameworkEntityRef castDown( FrameworkEntityRef );
+
+ /**
+ redefine the operator new[]
+ \arg aSize
+ \return a VoidPtr
+ */
+
+ void * operator new(size_t aSize);
+
+ /**
+ redefine the operator delete[]
+ \arg aVoidPtr the pointer to delete
+ */
+
+ void operator delete(void * aVoidPtr);
+
+ private:
+
+ /**
+ the MetaType descriptor
+ */
+
+ static MetaType theTypeDesc;
+
+ /// The individuals identifier
+
+ UniversalIdentifier theOid;
+
+
public:
***************
*** 54,60 ****
--- 150,161 ----
FrameworkEntity( void );
+ /// Constructor with an instance key
+
+ FrameworkEntity( UniversalIdentifierCref );
+
/// Virtual destructor
virtual ~FrameworkEntity( void );
+
//@}
***************
*** 73,81 ****
Assignment operator
@param FrameworkEntity const reference
! @returnm FrameworkEntity reference to (*this)
*/
FrameworkEntityRef operator=( FrameworkEntityCref );
-
//@}
--- 174,181 ----
Assignment operator
@param FrameworkEntity const reference
! @return FrameworkEntity reference to (*this)
*/
FrameworkEntityRef operator=( FrameworkEntityCref );
//@}
***************
*** 83,87 ****
--- 183,191 ----
*/
//@{
+ //@}
+ /** @name Mutators
+ */
+ //@{
//@}
Index: MetaType.hpp
===================================================================
RCS file: /cvsroot/corelinux/clfw/clfw/MetaType.hpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** MetaType.hpp 2000/11/18 13:58:57 1.27
--- MetaType.hpp 2001/02/24 04:17:25 1.28
***************
*** 75,78 ****
--- 75,83 ----
static className##Ptr create( void ); \
/** \
+ create a new instance of className with OID \
+ \return a pointer to className \
+ */ \
+ static className##Ptr create( corelinux::UniversalIdentifierCref ); \
+ /** \
destroy a point of className \
\arg pointer to className \
***************
*** 142,146 ****
#define _DECLARE_INSTANCEDATA_STATICS(dataName) \
static MemberDescriptor the##dataName##Descriptor; \
! static void *get##dataName##AsVPtr( corelinux::FrameworkEntityPtr ); \
static void set##dataName##AsVPtr \
( \
--- 147,151 ----
#define _DECLARE_INSTANCEDATA_STATICS(dataName) \
static MemberDescriptor the##dataName##Descriptor; \
! static void *get##dataName##AsVPtr( corelinux::FrameworkEntityPtr ); \
static void set##dataName##AsVPtr \
( \
***************
*** 454,457 ****
--- 459,475 ----
} \
/** \
+ create a new pointer to className \
+ \return the allocated pointer \
+ */ \
+ className##Ptr className::create( corelinux::UniversalIdentifierCref aOid ) \
+ { \
+ className##Allocator##Ptr aAlPtr = \
+ dynamic_cast<className##Allocator##Ptr> \
+ (theTypeDesc.getAllocator()); \
+ className##Ptr aPtr = aAlPtr->createType(); \
+ aPtr->setOid( aOid ); \
+ return aPtr; \
+ } \
+ /** \
destroy a pointer to className \
\arg the pointer aPtr \
***************
*** 560,563 ****
--- 578,594 ----
*/ \
className##Ptr className::create( void ) \
+ { \
+ throw corelinux::AbstractEntityException \
+ ( \
+ className##AllocExc, \
+ LOCATION \
+ ); \
+ return (className##Ptr)NULLPTR; \
+ } \
+ /** \
+ create a new pointer to className \
+ \return the allocated pointer \
+ */ \
+ className##Ptr className::create( corelinux::UniversalIdentifierCref ) \
{ \
throw corelinux::AbstractEntityException \
|