Changeset 250 for trunk/nom


Ignore:
Timestamp:
Mar 11, 2007, 11:43:15 AM (19 years ago)
Author:
cinc
Message:

Improvements for the documentation.

Location:
trunk/nom
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/nom/idl/nomclassmanager.idl

    r239 r250  
    1616* The Initial Developer of the Original Code is
    1717* netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>.
    18 * Portions created by the Initial Developer are Copyright (C) 2005-2006
     18* Portions created by the Initial Developer are Copyright (C) 2005-2007
    1919* the Initial Developer. All Rights Reserved.
    2020*
     
    3232*
    3333* ***** END LICENSE BLOCK ***** */
     34/** \file nomclassmanager.idl
     35   
     36Class definition file for the NOM class NOMClassMgr
     37*/
    3438
    3539#ifndef nomcm_idl
     
    3842#include <nomobj.idl>
    3943
    40 
     44/** \interface NOMClassMgr
     45
     46    The NOMClassMgr class provides methods for managing the whole
     47    object system. One single instance is created and a pointer is to it is
     48    put into the global variable \i NOMClassMgrObject.
     49   
     50 */
    4151interface NOMClassMgr : NOMObject
    4252{
     
    97107     checking the memories mtab pointer against the registered list of mtabs.
    98108
    99      \remark Classes are registered usually from within nomClassReady().
     109     \remarks Classes are registered usually from within nomClassReady().
    100110
    101111     \par How to override
     
    109119     Get the internal list of classes.
    110120
    111      \par How to override
     121     \remarks This method is only for NOM kernel implemeters. You can gather all
     122     information of this list by using provided methods.
     123
     124     \par How to override:
    112125     This method is usually not overriden.
    113126
     
    119132
    120133  /**
    121 
    122      \par How to override
     134     This method returns a pointer to a class specific private structure holding additional
     135     information. The structure is only used by the NOM kernel.
     136
     137     \remarks This method is only for NOM kernel implemeters.
     138
     139     \par How to override:
    123140     This method is usually not overriden.
    124141
     
    143160     list of mtabs.
    144161
    145      \par How to override
     162     \remarks You probably want to use the function nomIsObj() instead which subsequently
     163     calls this method.
     164
     165     \par How to override:
    146166     This method is usually not overriden.
    147167
    148168     \param nomObject The object to be checked.
    149      \return
    150      True if the given object is a NOMObject.
     169
     170     \returns True if the given object is a NOMObject.
    151171   */
    152172  boolean nomIsObject(in PNOMObject nomObject);
     
    162182     method.
    163183
    164      \par How to override
     184     \par How to override:
    165185     This method is usually not overriden.
    166186
    167187     \param oldClass The class to be replaced
    168188     \param replacementClass The class which will be used instead of \e oldClass
    169      \return TRUE if replacement succeeded.
     189     \returns TRUE if replacement succeeded.
     190
     191     \warning
     192     This method is not implemented yet.
    170193
    171194   */
     
    177200
    178201     \remark The returned path is in the system encoding.
     202
     203     \warning
     204     This method is not implemented yet.
    179205   */
    180206  string nomQueryDLLForClass(in string chrClassName);
  • trunk/nom/idl/nomcls.idl

    r219 r250  
    3232*
    3333* ***** END LICENSE BLOCK ***** */
     34/** \file nomcls.idl
     35   
     36Class definition file for NOM class NOMClass the root metaclass.
     37*/
    3438#ifndef NOMCLS_IDL_INCLUDED
    3539#define NOMCLS_IDL_INCLUDED
     
    3943//NOMCLASSNAME(NOMClass);
    4044
     45/** \interface NOMClass
     46
     47    This is the root class for metaclasses.
     48
     49 */
    4150interface NOMClass:NOMObject
    4251{
     
    5867     This method returns the name of the class this class object is an instance of.
    5968
    60      \par How to override
     69     \par How to override:
    6170     This method is usually not overriden.
    6271
     
    7382     and then calls nomInit() on the newly created object.
    7483
    75      \par How to override
     84     \par How to override:
    7685     This method is usually not overriden.
    7786     
     
    110119     memory is zeroed similar to using NOMCalloc().
    111120
    112      \par How to override
     121     \par How to override:
    113122     This method is usually not overriden.
    114123     
     
    132141  /**
    133142     This method is called after the class object is built. It registers the new
    134      class with the NOMClassMagrObj.
     143     class with the NOMClassMgrObj.
    135144     In addition to registering the class object the class this metaclass can create will
    136145     also be registered.
  • trunk/nom/idl/nomobj.idl

    r219 r250  
    1616* The Initial Developer of the Original Code is
    1717* netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>.
    18 * Portions created by the Initial Developer are Copyright (C) 2005-2006
     18* Portions created by the Initial Developer are Copyright (C) 2005-2007
    1919* the Initial Developer. All Rights Reserved.
    2020*
     
    3232*
    3333* ***** END LICENSE BLOCK ***** */
     34/** \file nomobj.idl
     35   
     36Class definition file for the NOM class NOMObject.
     37*/
     38
    3439#ifndef NOMOBJ_IDL_INCLUDED
    3540#define NOMOBJ_IDL_INCLUDED
     
    3944//NOMCLASSNAME(NOMObject);
    4045
     46/** \interface NOMObject
     47
     48    This is the root class of NOM. It provides methods common to all objects.
     49
     50    \remarks NOMObject can't be replaced.
     51   
     52 */
    4153interface NOMObject
    4254{
     
    4759     This method is intended to be overriden by classes which need some initialization.
    4860
    49      \par How to override
     61     \remarks This method is called by the system during object creation. Don't call it
     62     from your code or unexpected things may happen.
     63
     64     \par How to override:
    5065     The parent class must always be called first when overriden.
    5166
    52      \sa impl_NOMObject_nomInit()
     67     \sa impl_NOMObject_nomInit(), nomUnInit()
    5368   */
    5469  void nomInit();
     
    6075     collected and calls nomUnInit() to give the object a chance for cleanup.
    6176
    62      \note It's not necessary to free memory in nomUnInit(). This is the job of the garbage collector.
    63      Only system resources like file handles etc. must be explicitely freed.
     77     \remarks It's not necessary to free memory in nomUnInit(). This is the job of the garbage collector.
     78     Only system resources like file handles etc. must be explicitely freed.
     79     This method is called by the system during object deletion. Don't call it
     80     from your code or unexpected things may happen.
    6481
    65      \par How to override
     82     \par How to override:
    6683     The parent method must be called after doing the own processing.
    6784
    68      \sa impl_NOMObject_nomUnInit()
     85     \sa impl_NOMObject_nomUnInit(), nomInit();
    6986   */
    7087  void nomUnInit();
     
    7390     Return the size of the object. That is sizeof(mTab*)+sizeof(all instance vars)
    7491
    75      \par How to override
     92     \par How to override:
    7693     This method is usually not overriden.
    7794
     
    8198
    8299  /**
    83      This method calls nomUnInit() to give the object a chance of freeing system resources.
     100     Delete an object. This method is useful if you have to control the point in time when
     101     an object is actually destroyed. Normally the garbage collector destroys any object when
     102     no longer in use but there is no way to control when this happens.
     103
     104     \remarks This method calls nomUnInit() to give the object a chance of freeing system resources.
    84105     Afterwards the memory occupied by the object is given back to the system and the
    85106     object is not accessible anymore.
    86107
    87      \sa impl_NOMObject_delete()
     108     \par HowTo override:
     109     This method is usually not overriden. If you need some own processing during object
     110     destruction override nomUnInit().
     111
     112     \sa impl_NOMObject_delete(), nomUnInit()
    88113   */
    89114  void delete();
     
    92117     This method returns a pointer to the class object of this object.
    93118
    94      \par How to override
     119     \par How to override:
    95120     This method is usually not overriden.
    96121
     
    105130     are properly handled without the need to override this method in every subclass.
    106131
     132     When deriving from classes new methods are added to a class but the already present ones are
     133     usually not changed. If one of these classes creates a new object of the class itself
     134     is an instance of unexpected things may happen. Consider the
     135     following class hierarchy:
     136
     137     \code
     138     NOMObject->NOMString->NOMPath
     139     \endcode
     140
     141     When a method introduced by \e NOMString tries to create a new \e NOMString object it may
     142     use the \e NOMStringNew() macro to do so. Problems arise if the method is called from
     143     within a \e NOMPath object. The caller probably doesn't want a \e NOMString but rather
     144     a \e NOMPath object. So instead of having to override the method using the creation macro
     145     which may mean to recreate the whole method implementation the macro should be replaced
     146     by a call to new().
     147
    107148     This method will get the class object of nomSelf and call nomNew() on it creating
    108149     a new object which has exactly the same class hierarchy of nomSelf.
    109150
    110      \par How to override
     151     \remarks Because a new object is created the whole object creation sequence will take
     152     place which means a call to nomInit() will be made by the system.
     153
     154     \par How to override:
    111155     This method is usually not overriden.
    112156
  • trunk/nom/include/nomapi.h

    r210 r250  
    1616* The Initial Developer of the Original Code is
    1717* netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>.
    18 * Portions created by the Initial Developer are Copyright (C) 2005-2006
     18* Portions created by the Initial Developer are Copyright (C) 2005-2007
    1919* the Initial Developer. All Rights Reserved.
    2020*
     
    7373} nomClassDataStructure, *NomClassDataStructurePtr;
    7474
     75typedef struct nomParmInfoStruct {
     76  gulong ulNumParms;  /* The number of parameters for this method */
     77  gchar* pReturnType;
     78  gchar* pParm[];    /* Parameter types */
     79}nomParmInfo;
     80
     81/**
     82   This structure defines the method introduced by a class. The IDL compiler
     83   puts an array of such structs into the *.ih file which is used by the NOM
     84   kernel to build the class.
     85 */
    7586typedef struct nomStaticMethodDescStruct {
    76   nomMToken *nomMAddressInClassData;
    77   nomID nomMethodId;
    78   char** chrMethodDescriptor;
    79   nomMethodProc *nomMethod;
     87  nomMToken *nomMAddressInClassData; /* Method token in class data struct */
     88  nomID nomMethodId;          /* This is a 'gchar**' pointing to something like
     89                                 "wpQueryContainerHandle" */
     90  char** chrMethodDescriptor; /* This points to something like:
     91                                 "WPFolderWindow:wpQueryContainerHandle" */
     92  nomMethodProc *nomMethod;   /* Address of the function implementing this
     93                                 method. */
     94  nomParmInfo  *pParamInfo;   /* Information about the parameter types */
    8095} nomStaticMethodDesc;
    8196
     97/**
     98   Structure describing an overriden method. An array of these structures
     99   is put into the *.ih file.
     100 */
    82101typedef struct nomOverridenMethodDescStruct {
    83102  nomID nomMethodId;
Note: See TracChangeset for help on using the changeset viewer.