Ignore:
Timestamp:
2006-07-07T00:52:39+12:00 (18 years ago)
Author:
sjboddie
Message:

Wrapped browsetools up into a class and renamed it browsetoolsclass. The
intention of this change is only to make it easier to customise, and it
shouldn't make any functional difference. One exception to this is the
removal of some old code (notably some code for RelatedDocs) which is
now obsolete (I hope).

File:
1 edited

Legend:

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

    r12001 r12044  
    2727#include <assert.h>
    2828#include "OIDtools.h"
    29 #include "browsetools.h"
     29#include "browsetoolsclass.h"
    3030
    3131vlistbrowserclass::vlistbrowserclass () {
     
    6363}
    6464
    65 int vlistbrowserclass::output_section_group (ResultDocInfo_t &section, cgiargsclass &args,
    66                          const text_t &collection, int colnumber,
    67                          format_t *formatlistptr, bool use_table,
    68                          text_tset &/*metadata*/, bool &/*getParents*/,
    69                          recptproto * collectproto, displayclass &disp,
    70                          outconvertclass &outconvert, ostream &textout,
    71                          ostream& logout) {
    72 
     65int vlistbrowserclass::output_section_group(ResultDocInfo_t &section, cgiargsclass &args,
     66                                            const text_t &collection, int colnumber,
     67                                            format_t *formatlistptr, bool use_table,
     68                                            text_tset &metadata, bool &getParents,
     69                                            recptproto * collectproto, displayclass &disp,
     70                                            outconvertclass &outconvert, ostream &textout,
     71                                            ostream& logout)
     72{
     73  browsetoolsclass btools;
    7374  text_t link, icon;
    74 
    7575  text_t collink = collection;
    7676
     
    106106  if (highlight) options["highlight"] = "1";
    107107  else options["highlight"] = "0";
    108   options["DocImage"] = get_cover_image();
     108  options["DocImage"] = btools.get_cover_image();
    109109  textout << outconvert << disp
    110110      << get_formatted_string (collection, collectproto,
     
    121121}
    122122
    123 int vlistbrowserclass::output_section_group (FilterResponse_t &sections, cgiargsclass &args,
    124                          const text_t &collection, int colnumber,
    125                          format_t *formatlistptr, bool use_table,
    126                          text_tset &/*metadata*/, bool &/*getParents*/,
    127                          recptproto * collectproto, displayclass &disp,
    128                          outconvertclass &outconvert, ostream &textout,
    129                          ostream& logout) {
    130 
     123int vlistbrowserclass::output_section_group(FilterResponse_t &sections, cgiargsclass &args,
     124                                            const text_t &collection, int colnumber,
     125                                            format_t *formatlistptr, bool use_table,
     126                                            text_tset &/*metadata*/, bool &/*getParents*/,
     127                                            recptproto * collectproto, displayclass &disp,
     128                                            outconvertclass &outconvert, ostream &textout,
     129                                            ostream& logout)
     130{
     131  browsetoolsclass btools;
    131132  text_t link, icon;
    132133  text_t &arg_d = args["d"];
     
    168169  options["icon"] = icon;
    169170  options["highlight"] = "0";
    170   options["DocImage"] = get_cover_image();
     171  options["DocImage"] = btools.get_cover_image();
    171172 
    172173  if ( thissection != endsection ) { // only if there are results (else corrupts display)
     
    198199    if (highlight) options["highlight"] = "1";
    199200    else options["highlight"] = "0";
    200     options["DocImage"] = get_cover_image();
     201    options["DocImage"] = btools.get_cover_image();
    201202   
    202203    textout << outconvert << disp
Note: See TracChangeset for help on using the changeset viewer.