Ignore:
Timestamp:
Feb 4, 2007, 1:22:24 PM (19 years ago)
Author:
cinc
Message:

Added doxygen documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/desktop/idl/wpobject.idl

    r209 r224  
    6969
    7070  /* Memory allocation */
     71  /**
     72     Allocate a block of \e cbBytes length. The storage area
     73     is tracked in the objects inuse list.
     74
     75     \par How to override
     76     This method is usually not overriden.
     77
     78     \param cbBytes Number of bytes to allocate.
     79     \param prc Pointer to a gulong which will hold an error code if the method fails.
     80     \return A pointer to the block of memory
     81
     82     \sa wpFreeMem()
     83   */
    7184  gpointer wpAllocMem(in gulong cbBytes,
    7285                      in pgulong prc);
     86  /**
     87     Free a block of memory. The method removes the memory block from the objects inuse
     88     list. Because NOM uses a garbage collector the memory isn't freed instantly but
     89     will be collected later.
     90
     91     \par How to override
     92     This method is usually not overriden.
     93
     94     \param pByte Block of memory to be freed.
     95     \return TRUE if successful.
     96
     97     \sa wpAllocMem()
     98   */
    7399  boolean  wpFreeMem(in gpointer pByte);
     100
     101  /**
     102     Method to be overriden by objects when they need to do some setup.
     103
     104     \remark Desktop classes should override this method instead of nomInit().
     105
     106     \par How to override
     107     This method should be overriden by classes which need initialization. The parent
     108     must be called first.
     109
     110     \sa wpUnInitData()
     111   */
    74112  void     wpInitData();
     113
     114  /**
     115     Method to be overriden by objects when they need to do some unititialization work.
     116
     117     \remark Desktop classes should override this method instead of nomUnInit().
     118
     119     \par How to override
     120     This method should be overriden by classes which need uninitialization. The parent must
     121     be called last.
     122
     123     \sa wpInitData()
     124   */
    75125  void     wpUnInitData();
     126
     127  /**
     128     This method always opens a new view of an object. The concurrent view setting is not
     129     taken into account. wpViewObject() should be called most of the time.
     130
     131     \par How to override
     132     Desktop objects override this method when they have a private view.
     133
     134     \param nomFolder The folder view (window) containing the object. Note that an object may
     135     live in different folder windows at the same time.
     136     \param ulView The view to be opened.
     137     \param nameSpaceId See menu handling for more information.
     138     \param pParam Reserved and must be set to NULL.
     139     \return A pointer to the view.
     140
     141     \sa wpViewObject()
     142  */
    76143  gpointer wpOpen(in PWPFolderWindow nomFolder, in gulong ulView, in nomId nameSpaceId, in gpointer pParam);
     144
     145  /**
     146     Increase the use counter of the object.
     147
     148     \remark The increment operation on the internal counter is an atomic operation but be aware
     149     that the method call itself is not.
     150
     151     \par How to override
     152     This method is usually not overriden.
     153
     154     \sa wpObjectIsLocked(), wpUnlockObject()
     155   */
    77156  void     wpLockObject();
     157
     158  /**
     159     Decrease the use counter of the object.
     160
     161     \remark When the use counter of an object reaches 0 the object will be destroyed.
     162     The decrement operation on the internal counter is an atomic operation but be aware
     163     that the method call itself is not.
     164
     165     \par How to override
     166     This method is usually not overriden.
     167
     168     \sa wpObjectIsLocked(), wpLockObject()
     169   */
    78170  boolean  wpUnlockObject();
     171
     172  /**
     173     Query if the object is in use.
     174
     175     \remark This method reflects the state of the object at the time of the call. Note that
     176     in a multithreaded environment other threads may alter the use counter at any time.
     177
     178     \par How to override
     179     This method is usually not overriden.
     180
     181     \return TRUE if the objects use counter is greater than 0. This means the object is still in use.
     182
     183     \sa wpLockObject(), wpUnlockObject()
     184   */
    79185  boolean  wpObjectIsLocked();
    80186  gpointer wpQueryIcon();
     187
     188  /**
     189
     190   */
    81191  unsigned long  wpRequestObjectMutexSem(in unsigned long ulReserved);
    82192  unsigned long  wpReleaseObjectMutexSem();
     
    98208  unsigned long wpAddObjectGeneralPage(in PWPNoteBook wpNoteBook);
    99209
     210  /**
     211     This method either resurfaces an existing view or creates a new view according to the
     212     objects concurrent view setting.
     213
     214     If concurrent view is set to \e No the objects inuse list is searched for an existing
     215     view of the kind being requested. If found the view is brought to the front. If concurrent
     216     view setting is \e yes or no view can be found wpOpen() is called to create a new view.
     217
     218     \remark This method should be use in preference to the wpOpen() method.
     219
     220     \par How to override
     221     This method is usually not overriden.
     222
     223     \param nomFolder The folder view (window) containing the object. Note that an object may
     224     live in different folder windows at the same time.
     225     \param ulView The view to be opened.
     226     \param nameSpaceId See menu handling for more information.
     227     \param pParam Reserved and must be set to NULL.
     228     \return A pointer to the view.
     229
     230     \sa wpOpen(), wpSwitchTo()
     231   */
    100232  gpointer wpViewObject(in PWPFolderWindow nomFolder, in gulong ulView, in nomId nameSpaceId, in gpointer pParam);
     233
     234  /**
     235     Search the objects inuse list for the given view and if found bring it to the front.
     236
     237     \par How to override
     238     This method is usually not overriden.
     239
     240     \param ulView The view to be opened.
     241     \param nameSpaceId See menu handling for more information.
     242     \return A pointer to the view or NULL if no view exists.
     243
     244     \sa wpViewObject()
     245   */
    101246  gpointer wpSwitchTo(in gulong ulView, in nomId nameSpaceId);
    102247  boolean wpRegisterView(in PNOMWindow pWindow, in PNOMString nomStrViewTitle);
    103248
    104   /* Inuse list methods */
     249  /* ---- Inuse list methods ---- */
     250
     251  /**
     252     Register an inuse item in the objects inuse list. Inuse items may describe blocks of
     253     memory used by the object, open views and some more.
     254
     255     \How to override
     256     This method is usually not overriden.
     257
     258     \param
     259     \return TRUE if success.
     260
     261     \sa wpDeleteFromObjUseList(), wpFindUseItem(), wpFindViewItem()
     262   */
    105263  boolean   wpAddToObjUseList(in PUSEITEM pUseItem);
     264
     265  /**
     266     Remove an inuse item from the objects inuse list. Inuse items may describe blocks of
     267     memory used by the object, open views and some more.
     268
     269     \remark The use item will not be freed by this method.
     270
     271     \par How to override
     272     This method is usually not overriden.
     273
     274     \param pUseItem Use item to be removed from the objects inuse list.
     275     \return TRUE if success.
     276
     277     \sa wpAddToObjUseList(), wpFindUseItem(), wpFindViewItem()
     278  */
    106279  boolean   wpDeleteFromObjUseList(in PUSEITEM pUseItem);
     280
     281  /**
     282     \sa wpAddToObjUseList(), wpDeleteFromObjUseList(), wpFindViewItem()
     283   */
    107284  PUSEITEM  wpFindUseItem( in gulong ulType, in PUSEITEM pCurrentUseItem);
    108   PVIEWITEM wpFindViewItem(in gulong ulView, in nomId nameSpaceId, in PVIEWITEM pCurrentItem);
     285  PVIEWITEM wpFindViewItem( in gulong ulView, in nomId nameSpaceId, in PVIEWITEM pCurrentItem);
    109286
    110287  boolean wpSaveDeferred();
     
    112289
    113290  void wpSetFolder(in PWPFolder wpParentFolder);
     291
     292  /**
     293     Get the folder this object is living in.
     294
     295     \return Folder object. Note that this is not a folder view (window)
     296
     297     \sa wpSetFolder()
     298   */
    114299  PWPFolder wpQueryFolder();
    115300
     
    123308
    124309  /* Methods overriden by this class */
     310
     311  /**
     312     Override of nomInit(). The object semaphore for serializing access to
     313     objects data is created here. After setting it up wpInitData() is called.
     314     This method should be overriden by desktop classes instead of nomInit().
     315   */
    125316  NOMOVERRIDE(nomInit);
     317
     318  /**
     319     Override of nomUnInit(). First wpUnitData() is called on the object. Note
     320     that desktop classes should override wpUnInitData() instead of nomUnInit.
     321
     322     After destroying the object semaphor nomUnInit() is called.
     323
     324     \remark This override will put any desktop object on the list of objects with
     325     finalizers.
     326   */
    126327  NOMOVERRIDE(nomUnInit);
    127328
    128329  /* Instancce variables of this class. Theses are not
    129330     attributes. */
     331  /**
     332     Object lock counter instance variable. This variable is private and can't be accessed
     333     from the outside.
     334
     335     \sa wpObjectIsLocked(), wpLockObject(), wpUnlockObject()
     336   */
    130337  NOMINSTANCEVAR(gint iLockCounter);
     338
     339  /**
     340     Object semaphor. This variable is private and can't be accessed
     341     from the outside.
     342
     343     \sa wpRequestObjectMutexSem(), wpReleaseObjectMutexSem()
     344   */
    131345  NOMINSTANCEVAR(HMUX gObjectMutex);
    132346  NOMINSTANCEVAR(PGSList glstObjectInUse);
Note: See TracChangeset for help on using the changeset viewer.