Changeset 155 for trunk/gsdl/src/recpt/action.cpp
- Timestamp:
- 1999-02-08T14:28:04+13:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/action.cpp
r150 r155 12 12 /* 13 13 $Log$ 14 Revision 1.4 1999/02/08 01:27:59 rjmcnab 15 16 Got the receptionist producing something using the statusaction. 17 14 18 Revision 1.3 1999/02/05 10:42:41 rjmcnab 15 19 … … 36 40 37 41 42 // define all the macros which are related to pages generated 43 // by this action 44 void action::define_internal_macros (displayclass &/*disp*/, cgiargsclass &/*args*/, 45 ostream &/*logout*/) { 46 } 47 38 48 action::action () { 39 49 } … … 49 59 } 50 60 61 // check_cgiargs should be called before get_cgihead_info, 62 // define_external_macros, and do_action. If an error is found 63 // a message will be written to logout, if the error is severe 64 // then the function will return false and no page content 65 // should be produced based on the arguments. 66 bool action::check_cgiargs (cgiargsclass &args, ostream &logout) { 67 return true; 68 } 69 51 70 // get_cgihead_info determines the cgi header information for 52 71 // a set of cgi arguments. If response contains location then … … 54 73 // contains content then reponse_data contains the content-type. 55 74 // Note that images can now be produced by the receptionist. 56 void action::get_cgihead_info (cgiargsclass & args, response_t &response,57 text_t &response_data, ostream & logout) {75 void action::get_cgihead_info (cgiargsclass &/*args*/, response_t &response, 76 text_t &response_data, ostream &/*logout*/) { 58 77 response = location; 59 78 response_data = "http://www.nzdl.org"; 60 79 } 61 80 81 // define all the macros which might be used by other actions 82 // to produce pages. These macros should be well documented. 83 void action::define_external_macros (displayclass &/*disp*/, cgiargsclass &/*args*/, 84 ostream &/*logout*/) { 85 } 86 62 87 // returns false if there was an error which prevented the action 63 88 // from outputing anything. 64 bool action::do_action (cgiargsclass & args, outconvertclass &outconvert,65 ostream & textout, ostream &logout) {89 bool action::do_action (cgiargsclass &/*args*/, outconvertclass &/*outconvert*/, 90 ostream &/*textout*/, ostream &/*logout*/) { 66 91 return true; 67 92 } 68 93 69 94 // configure should be called once for each configuration line 70 void action::configure (const text_tarray &cfgline) { 95 // the default version configures the default for any arguments 96 // which this action uses 97 void action::configure (const text_t &key, const text_tarray &cfgline) { 98 cgiarginfo *info = NULL; 99 if ((key == "argdefault") && (cfgline.size() == 2) && 100 ((info = argsinfo.getarginfo(cfgline[0])) != NULL)) { 101 if (info->defaultstatus <= cgiarginfo::config) { 102 info->defaultstatus = cgiarginfo::config; 103 info->argdefault = cfgline[1]; 104 } 105 } 71 106 } 72 107 73 108 109 110 actionmapclass::actionmapclass () { 111 } 74 112 75 113 // theaction becomes the property of this class after addaction … … 98 136 return (*here).second.a; 99 137 } 138
Note:
See TracChangeset
for help on using the changeset viewer.