User: obo     
Date: 2006/07/10 07:17:25

Modified:
   dba/connectivity/inc/connectivity/sdbcx/VCollection.hxx

Log:
 INTEGRATION: CWS qiq (1.22.104); FILE MERGED
 2006/06/27 13:52:40 fs 1.22.104.2: RESYNC: (1.22-1.23); FILE MERGED
 2006/06/16 11:32:28 fs 1.22.104.1: during #i51143#:
 
 refactored VCollection:
 - createEmptyObject now named createDescriptor
 - cloneObject removed
 - appendObject now returns the newly created object
   (previously done via a subsequent call to cloneObject)

File Changes:

Directory: /dba/connectivity/inc/connectivity/sdbcx/
====================================================

File [changed]: VCollection.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/sdbcx/VCollection.hxx?r1=1.23&r2=1.24
Delta lines:  +25 -5
--------------------
--- VCollection.hxx     20 Jun 2006 01:00:55 -0000      1.23
+++ VCollection.hxx     10 Jul 2006 14:17:23 -0000      1.24
@@ -160,12 +160,21 @@
 
                        // will be called when a new object should be generated 
by a call of createDataDescriptor
                        // the returned object is empty will be filled outside 
and added to the collection
-            virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > createEmptyObject();
+            virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > createDescriptor();
 
-                       // return an object which is the copy of the argument
-                       virtual ObjectType cloneObject(const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& 
_xDescriptor);
+            /** appends an object described by a descriptor, under a given name
+                @param _rForName
+                    is the name under which the object should be appended. 
Guaranteed to not be empty.
+                    This is passed for convenience only, since it's the result 
of a call of
+                    getNameForObject for the given descriptor
+                @param descriptor
+                    describes the object to append
+                @return
+                    the new object which is to be inserted into the 
collection. This might be the result
+                    of a call of <code>createObject( _rForName )</code>, or a 
clone of the descriptor.
+            */
+            virtual ObjectType appendObject( const ::rtl::OUString& _rForName, 
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet 
>& descriptor );
 
-                       virtual void appendObject( const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& 
descriptor );
                        // called when XDrop was called
                        virtual void dropObject(sal_Int32 _nPos,const 
::rtl::OUString _sElementName);
 
@@ -174,6 +183,17 @@
                 @return The name of the object.
             */
             virtual ::rtl::OUString getNameForObject(const ObjectType& 
_xObject);
+
+            /** clones the given descriptor
+
+                The method calls createDescriptor to create a new, empty 
descriptor, and then copies all properties from
+                _descriptor to the new object, which is returned.
+
+                This method might come handy in derived classes for 
implementing appendObject, when the object
+                is not actually appended to any backend (e.g. for the columns 
collection of a descriptor object itself,
+                where there is not yet a database backend to append the column 
to).
+            */
+            ObjectType cloneDescriptor( const ObjectType& _descriptor );
 
                        OCollection(::cppu::OWeakObject& _rParent,
                                                sal_Bool _bCase,




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to