Ignore:
Timestamp:
1999-03-05T16:53:56+13:00 (25 years ago)
Author:
sjboddie
Message:

fixed some bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/OIDtools.cpp

    r188 r189  
    1212/*
    1313   $Log$
     14   Revision 1.2  1999/03/05 03:53:53  sjboddie
     15
     16   fixed some bugs
     17
    1418   Revision 1.1  1999/03/04 22:38:20  sjboddie
    1519
     
    2428// targetdoc. targetdoc will normally be either a document
    2529// or classification OID so this returns the CLSU, HASH etc.
    26 void targetdoc_gethead (const text_t &targetdoc, text_t &head) {
     30void get_head (const text_t &targetdoc, text_t &head) {
    2731
    2832  head.clear();
     
    3135}
    3236
     37
     38// returns (in top) the top level of targetdoc (i.e. everything
     39// up until the first dot)
     40void get_top (const text_t &targetdoc, text_t &top) {
     41
     42  top.clear();
     43  text_t::const_iterator begin = targetdoc.begin();
     44  text_t::const_iterator end = targetdoc.end();
     45
     46  top.appendrange (begin, findchar(begin, end, '.'));
     47}   
     48
     49
     50// checks if targetdoc is top level of a document (i.e. contains no dots)
     51bool is_top (const text_t &targetdoc) {
     52
     53  text_t::const_iterator here = targetdoc.begin();
     54  text_t::const_iterator end = targetdoc.end();
     55  here = findchar (here, end, '.');
     56
     57  if (here == end) return true;
     58  return false;
     59}
Note: See TracChangeset for help on using the changeset viewer.