Changeset 225 for trunk/foundation


Ignore:
Timestamp:
Feb 4, 2007, 3:17:09 PM (19 years ago)
Author:
cinc
Message:

Added doxygen documentation.

Location:
trunk/foundation
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/foundation/Makefile

    r162 r225  
    99OBJDIR          =       ./../../../o
    1010BINDIR          =       ./../../../bin
     11DOCDIR          =       ./../../../docs
    1112CDIR            =       ./src
    1213
     
    3536
    3637.PRECIOUS:      $(CLASSINC)/%.ih $(CLASSCDIR)/%.c $(CDIR)/%.c
     38
     39.PHONY:         dox
    3740
    3841all:    $(BINDIR)/$(DLLNAME).dll
     
    8487        mkdir -p $(BINDIR)
    8588        mkdir -p $(CLASSTEMPLATEDIR)
     89        mkdir -p $(DOCDIR)
     90
     91dox:
     92        cd ./dox && doxygen foundation.dox
    8693
    8794clean:
  • trunk/foundation/class_c/nomfilepath.c

    r209 r225  
    4949
    5050#include "nomfilepath.ih"
    51 /*
     51
     52/**
    5253  Append a path to the string. A path separator will be added to the current path if necessary and the
    5354  given string appended. If the given string starts with a separator no additional separator will be
     
    8182}
    8283
    83 /*
     84/**
    8485  Append a separator to the path. If the path already has a separator at the end this method does
    8586  nothing other than returning a new path object. If the given path has zero length a path object
     
    102103}
    103104
    104 /*
     105/**
    105106  Strips the path separator from the end of a path if there's one.
    106107
     
    123124}
    124125
    125 /*
     126/**
    126127  Returns TRUE if the given path is absolute.
    127128  On OS/2 this means it starts with a letter followed by a colon.
     
    167168}
    168169
    169 /*
     170/**
    170171  This method strips all characters from the beginning of a path till the first
    171172  directory separator and also this first separator. If there's no separator in
     
    191192}
    192193
    193 /*
     194/**
    194195  Returns the part of the path up to the first directory separator ('\' on OS/2).
    195196  If there's no directory separator the whole path is returned. This method does
  • trunk/foundation/idl/nomfilepath.idl

    r180 r225  
    4141NOMCLASSNAME(NOMPath);
    4242
     43/** \class NOMPath
     44    NOMPath is a specialized string class for dealing with file or directory paths.
     45    As with NOMString the NOMPath class is always working on copies.
     46 */
    4347interface NOMPath : NOMString
    4448{
     49  /**
     50     The current version of this class is 1.0
     51   */
    4552  NOMCLASSVERSION(1, 0);
    4653
     54  /**
     55     Append a path to the string. A path separator will be added to the current path
     56     if necessary and the given string appended. If the given string starts with a separator
     57     no additional separator will be added to the path prior to appending. If the given string
     58     starts with a separator and the current path ends with a separator the ending separator
     59     will be removed before appending.
     60
     61     \remark
     62     Note that there's no check if the input string is an absolute path. So if an absolute path
     63     is given as input the resulting path may not be valid.
     64
     65     \return
     66     The method returns a new NOMPath instance after appending.
     67
     68     \sa append(), appendCString()
     69   */
    4770  PNOMPath appendPath(in PNOMPath nomPath);   
     71
     72  /**
     73     Append a separator to the path. If the path already has a separator at the end this method
     74     does nothing other than returning a new path object. If the given path has zero length
     75     a path object only holding a separator is returned.
     76
     77     \return
     78     This method always returns a new instance of a NOMPath owned by the caller.
     79
     80     \sa append(), appendPath()
     81   */
    4882  PNOMPath appendSeparator();
     83
     84  /**
     85     Strips the path separator from the end of a path if there's one.
     86
     87     \return
     88     This method always returns a new instance of a NOMPath owned by the caller.
     89
     90     \sa appendSeparator()
     91   */
    4992  PNOMPath stripSeparator();
     93
     94  /**
     95
     96     \remark This method is only implemented for OS/2.
     97
     98     \return
     99     Returns TRUE if the given path is absolute. On OS/2 this means it starts with a letter
     100     followed by a colon.
     101   */
    50102  boolean  pathIsAbsolute();
     103 
     104 /**
     105     Returns the root of the current path. On OS/2 that is a letter followed by a colon.
     106     
     107     \remark This method is only implemented for OS/2.
     108
     109     \return
     110     This method always returns a new instance of a NOMPath owned by the caller.
     111  */
    51112  PNOMPath queryRoot();
     113
     114  /**
     115     This method strips all characters from the beginning of a path till the first
     116     directory separator and also this first separator. If there's no separator in
     117     the path a zero length path is returned.
     118
     119     \return
     120     This method always returns a new instance of a NOMPath owned by the caller.
     121     
     122     \sa queryPathBegin()
     123  */
    52124  PNOMPath erasePathBegin();
     125
     126  /**
     127     Returns the part of the path up to the first directory separator ('\' on OS/2).
     128     If there's no directory separator the whole path is returned. This method does
     129     not remove the part from the given path. Use erasePathBegin() to do that.
     130
     131     \remark This method only works for null terminated string.
     132
     133     \return
     134     A new NOMString object holding the first part of a path.
     135
     136     \sa erasePathBegin()
     137   */
    53138  PNOMPath queryPathBegin();
    54139};
  • trunk/foundation/idl/nomstring.idl

    r209 r225  
    4141NOMCLASSNAME(NOMString);
    4242
     43/** \class NOMString
     44    The NOMString class is used for strings which automatically grow or shrink.
     45    Methods are provided for common tasks when dealing with strings like inserting or
     46    appending strings. A string object never can be empty. It always is a string which may have a length of zero.
     47    These methods are threadsafe by always working with copies.
     48
     49    Note that you don't have to delete a NOMString object. This is done by the garbage collector. Deleting
     50    it doesn't hurt, though.
     51 */
    4352interface NOMString : NOMObject
    4453{
     54  /**
     55     The current version of this class is 1.0
     56   */
    4557  NOMCLASSVERSION(1, 0);
    4658
     59  /**
     60     Assign a string to this NOMString. An initially created NOMString object is empty.
     61     This method can be used to assign some value to it.
     62
     63     \remark
     64     This method does not work on a copy. So by assigning a value to the NOMString the
     65     old contents is lost. This may have sideeffects in multithreaded environments if used without care.
     66
     67     \sa assignCString()
     68   */
    4769  PNOMString assign(in PNOMString nomString);   
    48   /* Assign a C string to this NOMString */
     70
     71  /**
     72     Assign a C string to this NOMString. An initially created NOMString object is empty.
     73     This method can be used to assign some value to it.
     74
     75     \remark
     76     This method does not work on a copy. So by assigning a value to the NOMString the old contents
     77     is lost. This may have sideeffects in multithreaded environments if used without care.
     78
     79     \sa assign()
     80  */
    4981  PNOMString assignCString(in string chrString);   
    50   /* Returns the C string held by this NOMString*/
     82
     83  /**
     84     Returns the C string holding the info inside the string object. Use with care.
     85     In most cases you rather want to use copyCString() instead.
     86
     87     \return The C string representing the contents of the string object.
     88
     89     \sa copyCString()
     90  */
    5191  string queryCString();
    52   PNOMString append(in PNOMString nomString);   
     92
     93  /**
     94     Add the NOMString nomString to the end of the string object.
     95
     96     \param nomString A NOMString object to be put at the end of the string.
     97     \return     
     98     The returned NOMString object is a new object which is owned by the caller.
     99
     100     \sa appendCString(), prepend()
     101   */
     102  PNOMString append(in PNOMString nomString);
     103
     104  /**
     105     Prepend the NOMString \e nomString to the given string object and return a pointer to a
     106     new string object.
     107
     108     \param nomString A NOMString object to be put in front of the string.
     109     \return
     110     The returned NOMString object is a new object which is owned by the caller.
     111
     112     \sa prependCString()
     113   */   
    53114  PNOMString prepend(in PNOMString nomString);
    54   PNOMString appendCString(in string chrString);   
     115
     116  /**
     117     Append the given C string to the end of the string held by the NOMString object.
     118
     119     \param chrString A null terminated string.
     120     \return
     121     The NOMString object is a new object which is owned by the caller.
     122
     123     \sa append(), prependCString()
     124   */
     125  PNOMString appendCString(in string chrString);
     126
     127  /**
     128     Prepend the C string to the string object.
     129
     130     \param chrString A null terminated string.
     131     \return
     132     The NOMString object is a new object which is owned by the caller.
     133
     134     \sa appendCString(), prepend()
     135   */
    55136  PNOMString prependCString(in string chrString);
     137
     138  /**
     139     \return Returns the length of the string in characters.
     140   */
    56141  unsigned long length();
     142
     143  /**
     144     Cuts off the end of a string leaving the first ulNewLen characters.
     145
     146     \return
     147     The returned NOMString object is a new object holding the truncated string
     148     which is owned by the caller.
     149  */
    57150  PNOMString truncate(in unsigned long ulNewLen);
     151
     152  /**
     153     Create a copy of the NOMString object this method is called on. The caller
     154     owns the new NOMString object.
     155
     156     \return A new NOMString object
     157
     158     \sa copyCString()
     159  */
    58160  PNOMString copy();
     161
     162  /**
     163     Returns a copy of the C string holding the info inside the string object.
     164
     165     \return
     166     The returned C string is owned by the caller.
     167
     168     \sa copy()
     169   */
    59170  string copyCString();
    60171
    61   /* Init and uninit the GString */
     172  /**
     173     Override of nomInit() to initialize the GString */
    62174  NOMOVERRIDE(nomInit);
    63175
    64   /* The GString holding the data */
     176  /**
     177     The GString holding the data
     178  */
    65179  NOMINSTANCEVAR(PGString gString);
    66180};
Note: See TracChangeset for help on using the changeset viewer.