Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

seObject.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (c) 2003 Accent Geographic. All rights reserved.
00003  *  See the license file for licensing information.
00004  *  Created 2003/05/30
00005  */
00006 

00008 

00010 
00011 // $Id: seObject.h,v 1.11 2004/06/02 18:19:00 wmacchi Exp $
00012 
00013 #ifndef _seObject_h
00014 #define _seObject_h
00015 
00021 #include "seCommon.h"
00022 
00023 namespace sedris {
00024 
00025 class IInterface;
00026 class IObject;
00027 
00028 class seTransmittal;
00029 class seIterator;
00030 
00045 class EXPORT_DLL seObject
00046 {
00047 public:
00048 
00050     seObject() : _impl(NULL), _ownr(NULL)
00051     {
00052     }
00053 
00057     seObject( const seObject &other ) : _impl(NULL), _ownr(NULL)
00058     {
00059         other.cloneTo(*this);
00060     }
00061 
00063     virtual ~seObject()
00064     {
00065         if (isValid())
00066             release();
00067     }
00068 
00075     virtual seObject& operator =( const seObject &other )
00076     {
00077         if (this != &other)
00078             other.cloneTo(*this);
00079         return *this;
00080     }
00081 
00083     virtual bool isValid() const
00084     {
00085         return (_impl != NULL);
00086     }
00087 
00102     virtual bool isA( SE_DRM_Class type ) const;
00103     
00107     virtual bool isModified() const;
00108 
00115     virtual bool isShared() const;
00116 
00130     virtual void print( unsigned short level=0, FILE *file=NULL );
00131 
00140     virtual SE_DRM_Class getDRMClass() const;
00141 
00144     virtual const char *getDRMClassName() const;
00145 
00160     virtual void getFields( const SE_Fields **flds ) const;
00161 
00178     virtual void setFields( const SE_Fields *flds );
00179 
00183     virtual bool hasComponentsOrAssociates() const;
00184 
00189     virtual bool hasComponents() const;
00190 
00194     virtual bool hasAssociates() const;
00195 
00201     virtual bool hasAggregates() const;
00202 
00207     virtual void getRelationCounts( unsigned int *comp_count,
00208                                     unsigned int *aggr_count = NULL,
00209                                     unsigned int *assoc_count = NULL ) const;
00210 
00235     virtual void getComponentIterator( seIterator &iter,
00236                                 SE_DRM_Class filter = SE_DRM_CLS_NULL ) const;
00237 
00243     virtual void getAssociateIterator( seIterator &iter,
00244                                 SE_DRM_Class filter = SE_DRM_CLS_NULL ) const;
00245 
00251     virtual void getAggregateIterator( seIterator &iter,
00252                                 SE_DRM_Class filter = SE_DRM_CLS_NULL ) const;
00253 
00272     virtual bool getComponent( SE_DRM_Class type, seObject &obj,
00273                             seObject &link_obj=seObjectNull ) const;
00274 
00311     virtual bool getComponent( seObject &obj,
00312                             seObject &link_obj=seObjectNull ) const
00313     {
00314         return getComponent(obj.getClassType(), obj, link_obj);
00315     }
00316 
00335     virtual bool getAssociate( SE_DRM_Class type, seObject &obj,
00336                             seObject &link_obj=seObjectNull ) const;
00337 
00354     virtual bool getAssociate( seObject &obj,
00355                             seObject &link_obj=seObjectNull ) const
00356     {
00357         return getAssociate(obj.getClassType(), obj, link_obj);
00358     }
00359 
00377     virtual bool getAggregate( SE_DRM_Class type, seObject &obj,
00378                             seObject &link_obj=seObjectNull ) const;
00379 
00395     virtual bool getAggregate( seObject &obj,
00396                             seObject &link_obj=seObjectNull ) const
00397     {
00398         return getAggregate(obj.getClassType(), obj, link_obj);
00399     }
00400 
00439     virtual void addComponent( seObject &obj,
00440                             seObject &link_obj=seObjectNull );
00441 
00474     virtual void addAssociate( seObject &obj,
00475                             seObject &link_obj=seObjectNull );
00476 
00493     virtual void removeComponent( seObject &obj,
00494                             seObject &link_obj=seObjectNull );
00495 
00512     virtual void removeAssociate( seObject &obj,
00513                             seObject &link_obj=seObjectNull );
00514 
00523     virtual const char *getID() const;
00524 
00531     virtual bool isPublished() const;
00532 
00550     virtual void publish( const char *label );
00551 
00572     virtual void unpublish( const char *label=NULL );
00573 
00579     virtual unsigned int getPublishedLabelCount() const;
00580 
00587     virtual const char *getPublishedLabel( unsigned int index=0 ) const;
00588 
00606     virtual void resolve();
00607 
00619     virtual bool isResolved() const;
00620 
00626     virtual const char *getUnresolvedTransmittalURN() const;
00627 
00633     virtual const char *getUnresolvedObjectLabel() const;
00634 
00657     virtual void setUserData( void *data );
00658 
00664     virtual void *getUserData() const;
00665 
00712     virtual void cloneTo( seObject &other ) const;
00713 
00717     virtual bool isSameAs( const seObject &other ) const;
00718 
00725     virtual void release();
00726 
00729     virtual bool isInTransmittal( const seTransmittal &xmtal ) const;
00730 
00733     virtual void getTransmittal( seTransmittal &xmtal ) const;
00734 
00743     virtual SE_DRM_Class getClassType() const
00744     {
00745         return SE_DRM_CLS_NULL;
00746     }
00747 
00749     static seObject seObjectNull;
00750 
00751 protected:
00752 
00757     virtual SE_Fields *getWritableFields();
00758 
00759 private:
00760 
00761     SE_HANDLE_DECL(Object, Interface)
00762 };
00763 
00764 
00765 } // namespace sedris
00766 
00767 #endif // _seObject_h

SEDRIS Transmittal Access C++ API 4.0.0 beta - 14 Jul 2004
Copyright © 2004 SEDRIS Docs by Doxygen 1.3.2