Changeset 308 for trunk/lib/Trac.h


Ignore:
Timestamp:
May 12, 2007, 12:36:23 PM (14 years ago)
Author:
Peter Johansson
Message:

Refs #189. Added doc to private classes in Trac class. Re-ordered functions. Changed the behaviour: revisions does not need to be an integer can for example be head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Trac.h

    r294 r308  
    5050
    5151  private:
     52    ///
     53    /// @see changeset1 changeset2 changeset3
     54    ///
     55    /// @return true if any of changesetX returns true
     56    ///
    5257    bool changeset(std::string::const_iterator& first,
    5358                   const std::string::const_iterator& last);
    5459
     60    ///
     61    /// \brief search for 'r123'
     62    ///
     63    /// Search in range [\a first, \a last) for expression
     64    /// /r(\d+)/. If expression is found an anchor to
     65    /// trac-root/changeset/123, displaying expression, and first is
     66    /// pointing to character after expression.
     67    ///
     68    /// @return true if expression is found
     69    ///
    5570    bool changeset1(std::string::const_iterator& first,
    5671                   const std::string::const_iterator& last);
    5772
     73    ///
     74    /// \brief search for '[123]'
     75    ///
     76    /// Search in range [\a first, \a last) for expression
     77    /// /\[(\d+)\]/. If expression is found an anchor to
     78    /// trac-root/changeset/123, displaying expression, and first is
     79    /// pointing to character after expression.
     80    ///
     81    /// @return true if expression is found
     82    ///
    5883    bool changeset2(std::string::const_iterator& first,
    5984                   const std::string::const_iterator& last);
    6085
     86    ///
     87    /// \brief search for changeset:123
     88    ///
     89    /// Search in range [\a first, \a last) for expression
     90    /// /changeset:(\d+)/. If expression is found an anchor to
     91    /// trac-root/changeset/123, displaying expression, and first is
     92    /// pointing to character after expression.
     93    ///
     94    /// @return true if expression is found
     95    ///
    6196    bool changeset3(std::string::const_iterator& first,
    6297                   const std::string::const_iterator& last);
    6398
     99    ///
     100    /// \brief search for /comment:ticket:123:1/
     101    ///
     102    /// Search in range [\a first, \a last) for expression
     103    /// /comment:ticket:(\w+):(\d+)/. If expression is found an anchor
     104    /// to trac-root/ticket/123#comment:1, displaying expression, and
     105    /// first is pointing to character after expression.
     106    ///
     107    /// @return true if expression is found
     108    ///
     109    bool comment(std::string::const_iterator& first,
     110                 const std::string::const_iterator& last);
     111
     112    ///
     113    /// @see diff1 diff2 diff3
     114    ///
     115    /// @return true if any of diffX returns true
     116    ///
    64117    bool diff(std::string::const_iterator& first,
    65118              const std::string::const_iterator& last);
    66119
     120    ///
     121    /// \brief search for diff:trunk@12+:123
     122    ///
     123    /// Search in range [\a first, \a last) for expression
     124    /// /diff:(.*)@(\w+):(\w+)/. If expression is found an anchor is
     125    /// created, displaying the expression, and first is pointing to
     126    /// character after expression.
     127    ///
     128    /// If $1 (trunk) is empty anchor goes to
     129    /// trac-root/changeset?new=123&old=12 otherwise it goes to
     130    /// trac-root/changeset?new=123&newpath=trunk&old=12&oldpath=trunk
     131    ///
     132    /// @return true if expression is found
     133    ///
    67134    bool diff1(std::string::const_iterator& first,
    68135               const std::string::const_iterator& last);
    69136
     137    ///
     138    /// @brief search for diff:tags/1.0 or diff:tags/1.0//1.0.1
     139    ///
     140    /// Search in range [\a first, \a last) for expression
     141    /// /diff:(^\s+)/ or /diff:(^\s+)\/\/(^\s+)/. If expression is found
     142    /// an anchor is created, displaying the expression, and first is
     143    /// pointing to character after expression.
     144    ///
     145    /// The created anchor goes to
     146    /// trac-root/changeset?new_path=tags/1.0&old_path=tags/1.0 or
     147    /// trac-root/changeset?new_path=tags/1.0&old_path=tags/1.0.1
     148    /// respectively.
     149    ///
     150    /// @return true if expression is found
     151    ///
    70152    bool diff2(std::string::const_iterator& first,
    71153               const std::string::const_iterator& last);
    72154
     155    ///
     156    /// @brief search for diff:tags/1.0@123//trunk@236
     157    ///
     158    /// Search in range [\a first, \a last) for expression
     159    /// /diff:(^\s+)@(\w+)\/\/(^\s+)@(\w+)/. If expression is found an
     160    /// anchor is created, displaying the expression, and first is
     161    /// pointing to character after expression.
     162    ///
     163    /// The created anchor goes to
     164    /// trac-root/changeset?new=236&new_path=trunk&old=236&old_path=tags/1.0
     165    ///
     166    /// @return true if expression is found
     167    ///
    73168    bool diff3(std::string::const_iterator& first,
    74169               const std::string::const_iterator& last);
    75170
    76     bool comment(std::string::const_iterator& first,
    77                  const std::string::const_iterator& last);
    78 
     171
     172    ///
     173    /// @see log1 log2 log3
     174    ///
     175    /// @return true if any of logX returns true
     176    ///
    79177    bool log(std::string::const_iterator& first,
    80178             const std::string::const_iterator& last);
    81179
     180    ///
     181    /// @brief search for r123:236
     182    ///
     183    /// Search in range [\a first, \a last) for expression
     184    /// /r(\w+):(\w+)/. If expression is found an
     185    /// anchor is created, displaying the expression, and first is
     186    /// pointing to character after expression.
     187    ///
     188    /// The created anchor goes to trac-root/log/?rev=236&stop_rev=123
     189    ///
     190    /// @return true if expression is found
     191    ///
    82192    bool log1(std::string::const_iterator& first,
    83193              const std::string::const_iterator& last);
    84194
     195    ///
     196    /// @brief search for [123:236]
     197    ///
     198    /// Search in range [\a first, \a last) for expression
     199    /// /\[(\w+):(\w+)\]/. If expression is found an
     200    /// anchor is created, displaying the expression, and first is
     201    /// pointing to character after expression.
     202    ///
     203    /// The created anchor goes to trac-root/log/?rev=236&stop_rev=123
     204    ///
     205    /// @return true if expression is found
     206    ///
    85207    bool log2(std::string::const_iterator& first,
    86208              const std::string::const_iterator& last);
    87209
     210    ///
     211    /// @brief search for log:trunk@123:236 or log:trunk#123:236
     212    ///
     213    /// Search in range [\a first, \a last) for expression
     214    /// /log:(^\s*)(@|#)(\w+):(\w+)/. If expression is found an
     215    /// anchor is created, displaying the expression, and first is
     216    /// pointing to character after expression.
     217    ///
     218    /// The created anchor goes to trac-root/log/trunk?rev=236&stop_rev=123
     219    ///
     220    /// @return true if expression is found
     221    ///
    88222    bool log3(std::string::const_iterator& first,
    89223              const std::string::const_iterator& last);
    90224
     225    ///
     226    /// @brief search for milestone:1.0
     227    ///
     228    /// Search in range [\a first, \a last) for expression
     229    /// /milestone:(^s\*)\w/. If expression is found an
     230    /// anchor is created, displaying the expression, and first is
     231    /// pointing to character after expression.
     232    ///
     233    /// The created anchor goes to trac-root/milestone/1.0
     234    ///
     235    /// @return true if expression is found
     236    ///
    91237    bool milestone(std::string::const_iterator& first,
    92238                   const std::string::const_iterator& last);
    93239
     240    ///
     241    /// @brief search for source:trunk or source:trunk@123 or
     242    /// source:trunk@123#L3
     243    ///
     244    /// Search in range [\a first, \a last) for expression
     245    /// /source:(^s\*)/, /source:(^s\*)@(\w+)/ or
     246    /// /source:(^s\*)@(\w+)#L(\d+)/. If expression is found an anchor
     247    /// is created, displaying the expression, and first is pointing
     248    /// to character after expression.
     249    ///
     250    /// The created anchor goes to trac-root/browser/trunk or
     251    /// trac-root/browser/trunk?rev=123 or
     252    /// trac-root/browser/trunk?rev=123#L3
     253    ///
     254    /// @return true if expression is found
     255    ///
    94256    bool source(std::string::const_iterator& first,
    95257                const std::string::const_iterator& last);
    96258
     259    ///
     260    /// @see ticket1 ticket2
     261    ///
     262    /// @return true ticket1 or ticket2 returns true
     263    ///
    97264    bool ticket(std::string::const_iterator& first,
    98265                const std::string::const_iterator& last);
    99266
    100     /// if range (first, last) starts with /#[:digit:]*/ a ticket link
    101     /// is written;
    102     /// @return if ticket is found iterator pointing to after found
    103     /// ticket; else first is returned.
     267    ///
     268    /// @brief search for #65
     269    ///
     270    /// Search in range [\a first, \a last) for expression
     271    /// /#(\d+)/. If expression is found an
     272    /// anchor is created, displaying the expression, and first is
     273    /// pointing to character after expression.
     274    ///
     275    /// The created anchor goes to trac-root/ticket/65
     276    ///
     277    /// @return true if expression is found
     278    ///
    104279    bool ticket1(std::string::const_iterator& first,
    105280                 const std::string::const_iterator& last);
    106281
     282    ///
     283    /// @brief search for ticket:65
     284    ///
     285    /// Search in range [\a first, \a last) for expression
     286    /// /ticket:(\d+)/. If expression is found an
     287    /// anchor is created, displaying the expression, and first is
     288    /// pointing to character after expression.
     289    ///
     290    /// The created anchor goes to trac-root/ticket/65
     291    ///
     292    /// @return true if expression is found
     293    ///
    107294    bool ticket2(std::string::const_iterator& first,
    108295                 const std::string::const_iterator& last);
Note: See TracChangeset for help on using the changeset viewer.