Changeset 2706 for trunk/gsdl/src
- Timestamp:
- 2001-08-21T10:44:35+12:00 (23 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/formattools.cpp
r2001 r2706 340 340 if (langcode == "zu") return "Zulu"; 341 341 return ""; 342 } 343 344 text_t get_href (const text_t &link) { 345 346 text_t href; 347 348 text_t::const_iterator here = findchar(link.begin(), link.end(), '"'); 349 text_t::const_iterator end = link.end(); 350 351 here ++; 352 while (here != end) { 353 if (*here == '"') break; 354 href.push_back(*here); 355 here ++; 356 } 357 358 return href; 342 359 } 343 360 … … 492 509 formatlistptr->command = comEndLink; 493 510 511 else if (meta == "href") 512 formatlistptr->command = comHref; 513 494 514 else if (meta == "num") 495 515 formatlistptr->command = comNum; … … 917 937 ResultDocInfo_t &docinfo, displayclass &disp, 918 938 format_t *formatlistptr, 919 const text_t &link, const text_t &icon, 939 const text_t &link, const text_t &icon, 920 940 const text_t &text, bool highlight, 921 941 ostream& logout) { … … 931 951 if (link.empty()) return ""; 932 952 else return "</a>"; 953 case comHref: 954 return get_href(link); 933 955 case comIcon: 934 956 return icon; … … 1055 1077 text, logout); 1056 1078 } 1057 1058 1059 1060 1061 1062 1063 -
trunk/gsdl/src/recpt/formattools.h
r2001 r2706 34 34 35 35 enum command_t {comIf, comOr, comMeta, comText, comLink, comEndLink, comNum, comIcon, 36 comDoc, comHighlight, comEndHighlight, comRel };//changed36 comDoc, comHighlight, comEndHighlight, comRel, comHref}; 37 37 enum pcommand_t {pNone, pImmediate, pTop, pAll}; 38 38 enum dcommand_t {dMeta, dText}; … … 108 108 text_t iso639 (const text_t &langcode); 109 109 110 text_t get_href (const text_t &link); 111 110 112 text_t get_related_docs(const text_t& collection, recptproto* collectproto, 111 113 ResultDocInfo_t &docinfo, ostream& logout);
Note:
See TracChangeset
for help on using the changeset viewer.