Changeset 124
- Timestamp:
- 1999-01-22T10:20:15+13:00 (25 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/gdbmclass.cpp
r114 r124 12 12 /* 13 13 $Log$ 14 Revision 1.4 1999/01/21 21:20:08 sjboddie 15 removed unused collection parameter from several functions 16 14 17 Revision 1.3 1999/01/19 01:38:15 rjmcnab 15 18 … … 357 360 // book from the gdbm 358 361 // if booksection doesn't exist it remains blank 359 void sep erate_parts(const text_t &targetdoc, gdbmclass &gdbm, const text_t &collection,362 void separate_parts(const text_t &targetdoc, gdbmclass &gdbm, 360 363 text_t &classification, text_t &booksection) { 361 364 … … 450 453 // classification or booksection 451 454 void get_siblings (const text_t &classification, const text_t &booksection, 452 gdbmclass &gdbm, const text_t &collection, 453 vector<text_t> &siblings) { 455 gdbmclass &gdbm, vector<text_t> &siblings) { 454 456 455 457 gdbm_info info; -
trunk/gsdl/src/colservr/gdbmclass.h
r112 r124 82 82 void remove_tags (text_t &text); 83 83 84 void sep erate_parts (const text_t &targetdoc, gdbmclass &gdbm, const text_t &collection,84 void separate_parts (const text_t &targetdoc, gdbmclass &gdbm, 85 85 text_t &classification, text_t &booksection); 86 86 void split_targetdoc (const text_t &targetdoc, text_t &classification, … … 89 89 void get_parents (const text_t &targetdoc, vector<text_t> &parents); 90 90 void get_siblings (const text_t &classification, const text_t &booksection, 91 gdbmclass &gdbm, const text_t &collection, 92 vector<text_t> &siblings); 91 gdbmclass &gdbm, vector<text_t> &siblings); 93 92 int are_same_chapter(text_t section1, text_t section2); 94 93 void get_first_section(const text_t &instring, text_t &returnstring); -
trunk/gsdl/src/library/browse.cpp
r112 r124 12 12 /* 13 13 $Log$ 14 Revision 1.8 1999/01/21 21:20:10 sjboddie 15 removed unused collection parameter from several functions 16 14 17 Revision 1.7 1999/01/12 01:51:03 rjmcnab 15 18 … … 46 49 // get_list_toc returns all the titles of the sections in secarray as a list of links 47 50 // (i.e. as used by howto classifications in hdl collection) 48 void browseclass::get_list_toc (vector<text_t> &secarray, text_t &collection, 49 gdbmclass &gdbm, text_t &return_text) { 51 void browseclass::get_list_toc (vector<text_t> &secarray, gdbmclass &gdbm, text_t &return_text) { 50 52 gdbm_info info; 51 53 text_t section, child; … … 92 94 93 95 // get links to previous and next sections. 94 get_prev_next_links(booksection, args["c"],previous, next);96 get_prev_next_links(booksection, previous, next); 95 97 96 98 return_text += "<p>\n<table cellpadding=\"0\" cellspacing=\"0\">\n"; … … 147 149 148 150 get_parents (fulldoc, parents); 149 get_siblings (classification, booksection, gdbm, args["c"],siblings);151 get_siblings (classification, booksection, gdbm, siblings); 150 152 151 153 // remove everything above top level of book from parents … … 196 198 text_t book_top; 197 199 get_book_top (booksection, book_top); 198 get_contents (book_top, gdbm, args["c"],contents, totalcols);200 get_contents (book_top, gdbm, contents, totalcols); 199 201 200 202 vector<text_t>::const_iterator section = contents.begin(); … … 428 430 void browseclass::get_alphabet_links (const text_t &classification, 429 431 const text_t &booksection, gdbmclass &gdbm, 430 const text_t &collection,text_t &return_text) {432 text_t &return_text) { 431 433 432 434 gdbm_info info; … … 472 474 // section at current level then there'll be no arrow. 473 475 void browseclass::get_arrows(text_t &docref, gdbmclass &gdbm, 474 const text_t &collection,text_t &arrows) {476 text_t &arrows) { 475 477 text_t previous, next, firstcontent; 476 478 gdbm_info info; … … 481 483 482 484 // get links to previous and next sections. 483 get_prev_next_links(docref, collection,previous, next);485 get_prev_next_links(docref, previous, next); 484 486 485 487 // get html for previous link if it exists … … 513 515 // defined in the infodb so calling function should check. 514 516 515 void browseclass::get_prev_next_links (text_t docref, const text_t &collection, 516 text_t &previous, text_t &next) { 517 void browseclass::get_prev_next_links (text_t docref, text_t &previous, text_t &next) { 517 518 int prevnum, nextnum, thisnum; 518 519 text_t section; … … 533 534 // a table of contents using contents 534 535 void browseclass::get_contents (text_t expandlevel1, gdbmclass &gdbm, 535 const text_t &collection, vector<text_t> &contents, 536 int &totalcols) { 536 vector<text_t> &contents, int &totalcols) { 537 537 538 538 text_t expandlevel = expandlevel1; … … 591 591 gdbm_info info; 592 592 593 sep erate_parts(args["d"], gdbm, args["c"], classification, booksection);593 separate_parts(args["d"], gdbm, classification, booksection); 594 594 595 595 // don't want links at top levels … … 601 601 return_text += "<tr><td align=left>\n"; 602 602 603 get_siblings (classification, booksection, gdbm, args["c"],siblings);603 get_siblings (classification, booksection, gdbm, siblings); 604 604 605 605 // get older and younger siblings if they exist … … 747 747 // in the book mentioned in targetdoc 748 748 749 void browseclass::get_contents_arr(c giargsclass &args, gdbmclass &gdbm,749 void browseclass::get_contents_arr(const text_t &targetdoc, gdbmclass &gdbm, 750 750 vector<text_t> &contents_arr) { 751 751 text_t booksection; 752 752 int totalcols = 0; 753 get_book( args["d"], booksection);754 get_contents (booksection, gdbm, args["c"],contents_arr, totalcols);753 get_book(targetdoc, booksection); 754 get_contents (booksection, gdbm, contents_arr, totalcols); 755 755 } 756 756 … … 758 758 // sorts an array of sections alphabetically (i.e. by title, author depending 759 759 // on what classification is) or by date 760 void browseclass::sort_array (vector<text_t> &array, gdbmclass &gdbm, 761 const text_t &collection, const text_t classification) { 760 void browseclass::sort_array (vector<text_t> &array, gdbmclass &gdbm, const text_t classification) { 762 761 763 762 if ((classification[0] != 'T') && (classification[0] != 'A') && -
trunk/gsdl/src/library/browse.h
r121 r124 31 31 text_t &/*return_text*/) {} 32 32 virtual void get_links(cgiargsclass &args, gdbmclass &gdbm, text_t &return_text); 33 virtual void get_contents_arr(c giargsclass &args, gdbmclass &gdbm, vector<text_t> &contents_arr);33 virtual void get_contents_arr(const text_t &targetdoc, gdbmclass &gdbm, vector<text_t> &contents_arr); 34 34 35 35 protected: 36 36 37 virtual void get_list_toc (vector<text_t> &secarray, text_t &collection, 38 gdbmclass &gdbm, text_t &return_text); 37 virtual void get_list_toc (vector<text_t> &secarray, gdbmclass &gdbm, text_t &return_text); 39 38 virtual void get_page_toc (cgiargsclass &args, const text_t &booksection, 40 39 const text_t &classification, const text_t &class_string, … … 55 54 virtual void get_alphabet_links (const text_t &classification, 56 55 const text_t &booksection, gdbmclass &gdbm, 57 const text_t &collection,text_t &return_text);56 text_t &return_text); 58 57 virtual void get_arrows(text_t &docref, gdbmclass &gdbm, 59 const text_t &collection, text_t &arrows); 60 virtual void get_prev_next_links (text_t docref, const text_t &collection, 61 text_t &previous, text_t &next); 58 text_t &arrows); 59 virtual void get_prev_next_links (text_t docref, text_t &previous, text_t &next); 62 60 virtual void get_contents (text_t expandlevel1, gdbmclass &gdbm, 63 const text_t &collection, vector<text_t> &contents, 64 int &totalcols); 65 virtual void sort_array (vector<text_t> &array, gdbmclass &gdbm, 66 const text_t &collection, const text_t classification); 61 vector<text_t> &contents, int &totalcols); 62 virtual void sort_array (vector<text_t> &array, gdbmclass &gdbm, const text_t classification); 67 63 }; 68 64 -
trunk/gsdl/src/library/libinterface.cpp
r119 r124 12 12 /* 13 13 $Log$ 14 Revision 1.13 1999/01/21 21:20:15 sjboddie 15 removed unused collection parameter from several functions 16 14 17 Revision 1.12 1999/01/19 08:34:57 rjmcnab 15 18 … … 972 975 levelcount = count_dots(booksection); 973 976 974 browse->get_contents_arr(args, gdbm, contents_arr); 975 977 browse->get_contents_arr(args["d"], gdbm, contents_arr); 976 978 977 979 // get text for each section of book
Note:
See TracChangeset
for help on using the changeset viewer.