69. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/12/2018 10:18:29 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

69.1 Files compared

# Location File Last Modified
1 MSSRe Build 4.zip\Applications\OncoTrax-E40 OncologyCGI.h Tue Apr 10 19:43:39 2018 UTC
2 MSSRe Build 4.zip\Applications\OncoTrax-E40 OncologyCGI.h Thu Apr 12 08:52:24 2018 UTC

69.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 1068
Changed 2 4
Inserted 0 0
Removed 0 0

69.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

69.4 Active regular expressions

No regular expressions were active.

69.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** ********** ********** /
  2   /*  Packag e:      ON C – Oncolo gy                                                   * /
  3   /*  Date C reated: Ju l 26,2004                                                       * /
  4   /*  Site N ame:    Hi nes OIFO                                                        * /
  5   /*    Developers    Sergey Gav rilov  PII                                             */
  6   /*  Descri ption:  Ma in include  file for  Oncology W eb-service                     * /
  7   /********* ********** ********** ********** ********** ********** ********** ********** /
  8  
  9   #ifndef _O NCOLOGYCGI _H
  10   #define _O NCOLOGYCGI _H
  11  
  12   #define ON CVERSION       "2.00P "
  13   #define IN I_FILE_NAM E "oncsrv. ini"
  14   #define OU TPUT_PATH_ CONFIG_VAL UE_START_T AG "<OUTPU T_PATH>"
  15   #define OU TPUT_PATH_ CONFIG_VAL UE_END_TAG  "</OUTPUT _PATH>"
  16   #define DE BUG_CONFIG _VALUE_STA RT_TAG "<D EBUG>"
  17   #define DE BUG_CONFIG _VALUE_END _TAG "</DE BUG>"
  18   #define VE RSION_CONF IG_VALUE_S TART_TAG " <VERSION>"
  19   #define VE RSION_CONF IG_VALUE_E ND_TAG "</ VERSION>"
  20  
  21   /********* ********** ********** ********** ********** ********** ********** ********** /
  22   /*                               FORWARD DE CLARATIONS                                * /
  23   /********* ********** ********** ********** ********** ********** ********** ********** /
  24  
  25   class TONC Request;
  26  
  27   /********* ********** ********** ********** ********** ********** ********** ********** /
  28   /*                                    PARAM ETERS                                     * /
  29   /********* ********** ********** ********** ********** ********** ********** ********** /
  30  
  31   // Size of  the XML p arser buff er
  32   const int  BUFF_SIZE      = 3200 0;        
  33  
  34   // Oncolog y namespac e
  35   const char  ONCNAMESP ACE[] = "h ttp:// URL         ";
  36  
  37   /********* ********** ********** ********** ********** ********** ********** ********** /
  38   /*                         ERROR  CODES (se e ONC_Faul t.cpp)                         * /
  39   /*-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------* /
  40   /*                       !!! DO  NOT MODIFY  THESE VAL UES !!!                        * /
  41   /********* ********** ********** ********** ********** ********** ********** ********** /
  42  
  43   const int  EC_UNKNOWN _METHOD               =  -2;
  44   const int  EC_UNSUP_M ETHOD                 =  -3;
  45   const int  EC_UNKNOWN _CONTENT     =  -4;
  46   const int  EC_UNSUP_C ONTENT                =  -5;
  47   const int  EC_XMLBUF_ ALLOC                 =  -6;
  48   const int  EC_BAD_XML                       =  -7;
  49   const int  EC_INVALID _REQUEST     =  -8;
  50   const int  EC_INVALID _TABNUM               =  -9;
  51   const int  EC_SITE_HI ST                    = -10;
  52   const int  EC_CALC_WA RNINGS                = -11;
  53   const int  EC_CALC_ER RORS                  = -12;
  54   const int  EC_SERVER_ EXCEPTION    = -13;
  55   const int  EC_NOT_ENO UGH_MEM               = -14;
  56   const int  EC_EDITS_E RROR                  = -15;
  57   const int  EC_EDITS_E RROR_EX               = -16;
  58   const int  EC_INVALID _EDITSCFG    = -17;
  59   const int  EC_NEED_DI SCRIMINATO R = -18;
  60   const int  EC_FOLDER_ NOT_EXISTS   = -19;
  61   const int  EC_ERROR_W RITING_OUT PUT  = -20 ;
  62   const int  EC_ENVIRON MENT_VARIA BLE_NOT_FO UND  = -21 ;
  63  
  64   /********* ********** ********** ********** ********** ********** ********** ********** /
  65   /*                     REQUEST T AG CODES ( see ONC_Pa rser.cpp)                      * /
  66   /********* ********** ********** ********** ********** ********** ********** ********** /
  67  
  68   enum TONCT agCode {
  69           // --- Genera l tags
  70           UN KNOWN_TAG  = 0, SOAP_ ENVELOPE,  SOAP_BODY,  GET_VERSI ON,
  71           // --- CS_CAL CULATE
  72           CS _CALCULATE , CSC_AGE,  CSC_BEHAV , CSC_EXT,  CSC_EXTEV AL, CSC_GR ADE, CSC_H IST,
  73           CS C_LNEXAM,      CSC_LN POS, CSC_M ETS, CSC_M ETSEVAL, C SC_NODES,  CSC_NODESE VAL, 
  74           CS C_SITE, CS C_SIZE, CS C_SSF1, CS C_SSF2, CS C_SSF3, CS C_SSF4, CS C_SSF5, CS C_SSF6,
  75   // JJB 100 105 ->
  76           CS C_SSF7, CS C_SSF8, CS C_SSF9, CS C_SSF10, C SC_SSF11,  CSC_SSF12,
  77           CS C_SSF13, C SC_SSF14,  CSC_SSF15,  CSC_SSF16 , CSC_SSF1 7, CSC_SSF 18,
  78           CS C_SSF19, C SC_SSF20,  CSC_SSF21,  CSC_SSF22 , CSC_SSF2 3, CSC_SSF 24, CSC_SS F25,
  79           CS C_DXYEAR,  CSC_VERORI G, /*CSC_S EX,*/ CSC_ LVI,
  80   // JJB 100 105 <-
  81           // --- CS_GET _SCHEMA
  82           CS _GET_SCHEM A, CSGS_HI ST, CSGS_S ITE, CSGS_ DISCRIMINA TOR,
  83           // --- CS_GET _TABLES
  84           CS _GET_TABLE S, CSGT_SC HEMA, CSGT _TABLE,
  85           // --- ED_GET _EDITINFO
  86           ED _GET_EDITI NFO, EDEI_ EDIT, EDEI _EDITSET,  EDEI_TEXTW IDTH,
  87           // --- ED_RUN _BATCH
  88           ED _RUN_BATCH , EDRB_NAA CCR_RECORD
  89   };
  90  
  91   /********* ********** ********** ********** ********** ********** ********** ********** /
  92   /*                    GENERIC EX CEPTION/ER ROR DESCRI PTOR OBJEC T                   * /
  93   /********* ********** ********** ********** ********** ********** ********** ********** /
  94  
  95   class TONC Fault {
  96           in t              ErrorC ode;                                 // Onc ology web- service er ror code ( see above)
  97           ch ar    Faul tCode[20];                    //  SOAP erro r code (se e ONC_Faul t.cpp)
  98           ch ar    Faul tString[20 0];                //  Error mes sage (see  ONC_Fault. cpp)
  99  
  100   protected:
  101  
  102           /* ****  The  outputDeta il() funct ion writes  optional  error deta ils to the  
  103                             stdout  in XML fo rmat.
  104  
  105                    The  output is  automatica lly enclos ed in the  <detail> a nd </detai l> tags.
  106                    Desc endant cla sses can o verride th is functio n to add m ore detail s in 
  107                    addi tion to th e error co de, which  is writted  by the TO NCFault.
  108           */
  109           vi rtual void  outputDet ail();
  110  
  111   public:
  112           TO NCFault();
  113           TO NCFault(co nst int an ErrorCode,  ...);
  114           vi rtual ~TON CFault() { };
  115  
  116  
  117           /* ****  The  output() f unction wr ites infor mation abo ut the err or (the 
  118                             <soap: Fault> ...  </soap:Fa ult> secti on) to the  stdout in  XML forma t.
  119           */
  120           vo id output( );
  121  
  122   };
  123  
  124   /********* ********** ********** ********** ********** ********** ********** ********** /
  125   /*                                     TEXT  BUFFER                                   * /
  126   /********* ********** ********** ********** ********** ********** ********** ********** /
  127  
  128   class TONC TextBuffer  {
  129           ch ar*   Buff er;                                    // P ointer to  the buffer
  130           si ze_t  Buff erLength;                     //  Buffer le ngth (maxi mum length  of the te xt)
  131           si ze_t  Text Length;                                // C urrent len gth of the  text
  132  
  133   public:
  134           TO NCTextBuff er();
  135           vi rtual ~TON CTextBuffe r();
  136  
  137  
  138           /* ****  The  append() f unction ap pends the  string to  the buffer .
  139  
  140                    text              Appended  text
  141  
  142                    len                        Append no  more that  this numbe r of chara cters. If  this
  143                                               parameter  is omitted  or less t han 0, the n the strl en functio n
  144                                               is used in ternally t o get its  value.
  145  
  146           */
  147           vo id append( const XML_ Char* text , int txtl en = -1);
  148  
  149  
  150           /* ****  The  clear() fu nction cle ars the bu ffer.
  151           */
  152           vo id clear() ;
  153  
  154  
  155           /* ****  The  copyText()  function  copies the  text valu e of the c urrent tag  to 
  156                             the pr ovided buf fer.
  157  
  158                    dst               Pointer  to the des tination b uffer
  159  
  160                    maxl en  No mor e than thi s number o f characte rs are cop ied.
  161  
  162                    appe nd0 If thi s paramete r is true,  then the  function a lways appe nds '\0'
  163                                      after co pied chara cters.  Ot herwise, t he functio n behaves  exaclty
  164                                      as the s trncpy.
  165           */
  166           vo id copyTex t(char* ds t, size_t  maxlen, bo ol append0  = 0);
  167  
  168  
  169           /* ****  The  getText()  function r eturns the  pointer t o the text  buffer.
  170           */
  171           co nst char*  getAsText( ) { return  Buffer; } ;
  172  
  173  
  174           /* ****  The  getAsInt()  function  converts t he text va lue of the  current t ag
  175                             into i nteger and  returns t he result.
  176           */
  177           in t getAsInt () { retur n atoi(Buf fer); };
  178  
  179  
  180           /* ****  The  getAsChar( ) function  returns t he first c haracter o f the text  value
  181                             of the  current t ag.
  182           */
  183           ch ar getAsCh ar() { ret urn Buffer [0]; };
  184  
  185   };
  186  
  187   /********* ********** ********** ********** ********** ********** ********** ********** /
  188   /*                                     XML  PATH                                      * /
  189   /********* ********** ********** ********** ********** ********** ********** ********** /
  190  
  191   class TONC XMLPath {
  192           si ze_t  Path Length;                                // C urrent len gth of the  path
  193           si ze_t  Buff erLength;                     //  Buffer le ngth (maxi mum length  of the pa th)
  194           ch ar    *Buf fer;                                   // P ointer to  the XML pa th buffer
  195  
  196   public:
  197           TO NCXMLPath( );
  198           vi rtual ~TON CXMLPath() ;
  199  
  200  
  201           /* ****  The  clear() fu nction cle ars the pa th buffer.
  202           */
  203           vo id clear() ;
  204  
  205  
  206           /* ****  The  getCode()  function r eturns the  code that  correespo nds to the  current 
  207                             path s tored in t he buffer.
  208           */
  209           TO NCTagCode  getCode();
  210  
  211  
  212           /* ****  The  getLastTag () functio n returns  name of th e current  tag (the l ast 
  213                             one ap pended to  the buffer ).
  214           */
  215           co nst XML_Ch ar* getLas tTag();
  216  
  217  
  218           /* ****  The  getPath()  function r eturns the  XML path  stored in  the path b uffer.
  219           */
  220           co nst XML_Ch ar* getPat h() { retu rn Buffer;  };
  221  
  222  
  223           /* ****  The  popTag() p rocedure r emoves the  current t ag (the la st one app ended)
  224                             from t he buffer.
  225           */
  226           vo id popTag( );
  227  
  228  
  229           /* ****  The  pushTag()  procedure  appends th e tag name  to the XM L path sto red in
  230                             the pa th buffer.
  231  
  232                    tag_ name         Tag name  (in Expat  format)
  233  
  234           */
  235           vo id pushTag (const XML _Char* tag _name);
  236  
  237   };
  238  
  239   /********* ********** ********** ********** ********** ********** ********** ********** /
  240   /*                                 PARAMETE R PARSER                                  * /
  241   /********* ********** ********** ********** ********** ********** ********** ********** /
  242  
  243   class TONC Parser {
  244           TO NCRequest*     Reques t;                 //  Pointer t o the curr ent reques t
  245  
  246   public:
  247           TO NCXMLPath               Path;                     // X ML path
  248           TO NCTextBuff er  TagTex t;                 //  Text of t he current  tag
  249  
  250           TO NCParser() ;
  251  
  252  
  253           /* ****  Get  the Debug  file name   *****/
  254           ch ar* TONCPa rser::GetD ubugFileNa me();
  255  
  256  
  257           /* ****  Get  the curren t date tim e to a str ing and fo rmat it as  YYMMDDHHM MSS.
  258           */
  259           ch ar* TONCPa rser::GetC urrentDate Time();
  260  
  261           /* ****  Get  a string f rom a file
  262           */
  263           ch ar* TONCPa rser::GetS tringFromF ile(char*  fileName);
  264  
  265           /* ****  Get  a string f rom an env ironment v ariable ** **/
  266           ch ar* TONCPa rser::GetS tringEnvir onmentVari able(char*  variableN ame);
  267  
  268           /* ****  Get  a configur ation valu e from the  INI file  ****/
  269           ch ar* TONCPa rser::GetC onfigValue (char* ini FileName,  char* conf igKeyStart Tag, char*  configKey EndTag);
  270  
  271  
  272           /* ****  Get  a file nam e with ful l path
  273           */
  274           ch ar* TONCPa rser::GetF ileNameWit hPath(char * fileName , bool deb ugFolder,  char* outp utSubFolde rName);
  275  
  276           /* ********** ********** ********** ********** ********** ********** ********** ********/
  277           /*  Write the  medical d ata to an  output fil e                                       */
  278           /* ********** ********** ********** ********** ********** ********** ********** ********/
  279           vo id TONCPar ser::Write OutputFile (char* med icalData);
  280  
  281           /* ****  The  createRequ est() func tion creat es the req uest objec t that 
  282                             corres ponds to t he provide d code and  assignes  the pointe r to the 
  283                             Reques t property .
  284  
  285                    TagC ode          Code of  the reques t tag (see  TONCXMLPa th::getTag Code for
  286                                               more detai ls)
  287  
  288                    atts              List of  attributes  and their  values pr ovided by  the Expat
  289                                               XML parser
  290  
  291                    If a nother req uest has b een create d before,  then it is  destroyed  and the
  292                    new  one is cre ated.
  293           */
  294           TO NCRequest*  createReq uest(const  TONCTagCo de TagCode , const XM L_Char **a tts);
  295  
  296  
  297           /* ****  The  getAttrVal () functio n returns  text value  of the at tribute.
  298  
  299                    atts              List of  attributes  and their  values pr ovided by  the Expat
  300                                               XML parser
  301  
  302                    name              Attribut e name
  303  
  304                    If t he request ed attribu te is not  present in  the list,  then an e mpty
  305                    stri ng is retu rned.
  306           */
  307           st atic const  XML_Char*  getAttrVa l(const XM L_Char **a tts, const  char* nam e);
  308  
  309  
  310           /* ****  The  getRequest () functio n returns  pointer to  the curre nt request
  311                             object .
  312           */
  313           TO NCRequest*  getReques t() { retu rn Request ; };
  314  
  315  
  316           /* ****  The  parseParam eters() fu nction rea ds the XML  request f rom the st din, 
  317                             parses  it, creat es the cor responding  request o bject, and  returns t he
  318                             pointe r.
  319  
  320                    cont ent_length   Length o f the requ est body.   If this p arameter i s not 
  321                                                       gr eater than  0, then t he functio ns reads f rom standa rd 
  322                                                       in put stream  until the  'end of f ile' is re ached.
  323           */
  324           TO NCRequest*  parsePara meters(int  content_l ength, cha r* debugFi leName);
  325  
  326   };
  327  
  328   /********* ********** ********** ********** ********** ********** ********** ********** /
  329   /*                                 GENERIC  REQUEST                                   * /
  330   /********* ********** ********** ********** ********** ********** ********** ********** /
  331  
  332   class TONC Request {
  333           TO NCTagCode  Code;                                  // C ode of the  current r equest (ta g code)
  334           TO NCFault*       Fault;                             // P ointer to  the error  descriptor
  335           do uble           Versio n;                          // V ersion of  the curren t request  (optional)
  336  
  337   protected:
  338  
  339           /* ****  The  execute()  function p rocesses t he request  and write s the XML
  340                             respon se to the  stdout.  D escendant  classes mu st overrid e this
  341                             functi on.
  342           */
  343           vi rtual void  execute() ;
  344  
  345  
  346           /* ****  The  getVersion Attr() fun ction retu rns the va lue of the  optional  ver
  347                             attrib ute (versi on of the  reques).   If it is n ot set by  the client ,
  348                             then 0  is return ed.
  349           */
  350           st atic doubl e getVersi onAttr(con st XML_Cha r **atts);
  351  
  352  
  353           /* ****  The  responseTa g() functi on outputs  opening a nd closing  tags of t he
  354                             respon se to the  stdout.
  355  
  356                    open _tag                  If value o f this par ameter is  'true', th en the fun ction
  357                                                       wr ites the o pening tag  (e.g. <CS -RESPONSE> ). Otherwi se,
  358                                                       th e closing  tag is wri tten (e.g.  </CS-RESP ONSE>).
  359  
  360           */
  361           vi rtual void  responseT ag(bool op en_tag);
  362  
  363   public:
  364           TO NCRequest( const TONC TagCode aC ode);
  365           vi rtual ~TON CRequest() ;
  366  
  367  
  368           /* ****  The  createRequ est() func tion creat es the req uest objec t that
  369                             corres ponds to t he request  tag code  and return s the poin ter.
  370  
  371                    TagC ode          Code of  the reques t tag (see  TONCXMLPa th::getTag Code for
  372                                               more detai ls)
  373  
  374                    atts              List of  attributes  and their  values pr ovided by  the Expat
  375                                               XML parser
  376           */
  377           st atic TONCR equest* cr eateReques t(TONCPars er *Parser , const TO NCTagCode  TagCode, c onst XML_C har **atts );
  378  
  379  
  380           /* ****  The  executeReq uest() fun ction proc esses the  request (s ee the exe cute()
  381                             functi on for det ails) and  encloses t he output  in the res ponse tags
  382                             (see t he respons eTag() fun ction for  details).
  383           */
  384           vo id execute Request();
  385  
  386  
  387           /* ****  The  getCode()  function r eturns cod e of the r equest.
  388           */
  389           in t getCode( ) { return  Code; };
  390  
  391  
  392           /* ****  The  getNamespa ce() funct ion return s the onco logy names pace.
  393           */
  394           co nst char*  getNamespa ce() { ret urn ONCNAM ESPACE; };
  395  
  396  
  397           /* ****  The  getVersion () functio n returns  version of  the reque st.
  398           */
  399           do uble getVe rsion() {  return Ver sion; };
  400  
  401  
  402           /* ****  The  parseTagEn d() functi on is call ed by the  XML parser  (see the
  403                             TONCPa rser for d etails) wh en a closi ng tag is  parsed.
  404  
  405                    Pars er           Pointer  to the par ser object
  406  
  407                    TagC ode          Code of  the tag (s ee TONCXML Path::getT agCode for  more deta ils)
  408           */
  409           vi rtual bool  parseTagE nd(TONCPar ser* Parse r, const T ONCTagCode  TagCode);
  410  
  411  
  412           /* ****  The  parseTagSt art() func tion is ca lled by th e XML pars er (see th e
  413                             TONCPa rser for d etails) wh en an open ing tag is  parsed.
  414  
  415                    Pars er           Pointer  to the par ser object
  416  
  417                    TagC ode          Code of  the tag (s ee TONCXML Path::getT agCode for  more deta ils)
  418           */
  419           vi rtual bool  parseTagS tart(TONCP arser* Par ser, const  TONCTagCo de TagCode , const XM L_Char **a tts);
  420  
  421  
  422           /* ****  The  processErr ors() func tion check s if an er ror descri ptor has b een
  423                             create d (see the  Fault pro perty) and  outputs t he Fault s ection of
  424                             the re sponse to  the stdout .
  425           */
  426           vo id process Errors();
  427  
  428  
  429           /* ****  The  setFault()  function  sets the v alue of th e Fault pr operty.
  430  
  431                             If the  property  already ha s a value,  then the  old object  is destro yed
  432                             before  the new p ointer is  assigned.
  433  
  434                    Faul t            Pointer  to an erro r descript or.  The r equest obj ect become s
  435                                               the owner  of the des criptor an d is respo nsible for  its prope r
  436                                               destructio n.
  437           */
  438           vo id setFaul t(TONCFaul t* aFault) ;
  439  
  440   };
  441  
  442   /********* ********** ********** ********** ********** ********** ********** ********** /
  443   /*                               FUNCTION D ECLARATION S                              * /
  444   /********* ********** ********** ********** ********** ********** ********** ********** /
  445  
  446   /*****  Th e getAppPa th() funct ion return s the driv e and path  (includin g the
  447                    trai ling separ ator) from  where the  Oncology  applicatio n was star ted
  448                    (e.g . "c:\iis\ web\cs\cgi -bin\").
  449   */
  450   const char * getAppPa th();
  451  
  452   /*****  Th e IntTag()  function  encloses t he integer  value in  opening an d closing
  453                    tags  and outpu ts it to t he stdout  (e.g. <RC> -12</RC>).
  454  
  455           na me             Name o f the tags
  456  
  457           va l                       Integer  value
  458   */
  459   void IntTa g(const ch ar *name,  int val);
  460  
  461  
  462   /*****  Th e Piece()  function b reaks the  source str ing into p ieces acco rding to
  463                    the  provided d elimiter a nd returns  requested  part(s).   It works  in the
  464                    same  way as th e $PIECE f unction in  M (MUMPS) .
  465  
  466           Va lue            Source  string
  467  
  468           De limiter        Delimi ter string
  469  
  470           St artPiece       Number  of the fi rst extrac ted piece.   If value  of this p arameter
  471                                      is omitt ed, then t he extract ion starts  from the  beginning  of the
  472                                      string.
  473  
  474           En dPiece         Number  of the la st extract ed piece.  If value o f this par ameter
  475                                      is omitt ed, then t he single  piece defi ned by the  StartPiec e
  476                                      paramete r is extra cted.
  477  
  478           If  the Start Piece is n ot greater  than 0 or  the EndPi ece is les s than the
  479           St artPiece,  then an em pty string  is return ed.
  480  
  481   */
  482   string Pie ce(string  Value, str ing Delimi ter, const  int Start Piece = 1) ;
  483   string Pie ce(string  Value, str ing Delimi ter, const  int Start Piece, con st int End Piece);
  484  
  485  
  486   /*****  Th e StrTag()  function  encloses t he string  in opening  and closi ng tags an d
  487                    outp uts it to  the stdout  (e.g. <ED IT-NAME>Ag e at Diagn osis</EDIT -NAME>).
  488  
  489           na me             Name o f the tag
  490  
  491           va l                       Pointer  to a null- terminated  string
  492   */
  493   void StrTa g(const ch ar *name,  const char  *val);
  494  
  495  
  496   /*****  Th e UnitTest s() functi on perform s unit tes ts of diff erent part s of the
  497                    Onco logy CGI a pplication  and write s results  to the std out.
  498  
  499           If  code pass ess all te sts, this  function r eturns EXI T_SUCCESS.  Otherwise ,
  500           EX IT_FAILURE  is return ed.
  501   */
  502   int UnitTe sts();
  503  
  504  
  505   /*****  Th e writeStr ucturedTex t() functi on encodes  special c haracters  ('<', '&',
  506                    '\"' , '\'', an d '>') acc ording to  the XML ru les, enclo ses the li nes of
  507                    text  into the  <P> and </ P> tags, w raps the l ines that  are longer  than
  508                    240  characters , and writ es them to  the stdou t.
  509  
  510           te xt             Pointe r to a nul l-terminat ed string  containing  the sourc e text.
  511   */
  512   void write Structured Text(const  char* tex t);
  513  
  514  
  515   /*****  Th e writeTex t() functi on encodes  special c haracters  ('<', '&',  '\"',
  516                    '\'' , and '>')  according  to the XM L rules, w raps the l ines that  are
  517                    long er than 24 0 characte rs, and wr ites them  to the std out.  The  original
  518                    stru cture of t he text is  not prese rved.
  519  
  520           te xt             Pointe r to a nul l-terminat ed string  containing  the sourc e text.
  521  
  522           cr lf             If val ue of this  parameter  is 'true' , then the  function  starts
  523                                      a new li ne after w riting the  text.  By  default,  this does  not
  524                                      happen.
  525   */
  526   void write Text(const  char* tex t, bool cr lf = false );
  527  
  528  
  529   /*****  Th e xmlEncod e() functi on encodes  special c haracters  ('<', '&',  '\"',
  530                    '\'' , and '>')  according  to the XM L rules an d returns  the result .
  531  
  532           st r                       Source s tring
  533   */
  534   string xml Encode(str ing str);
  535  
  536   #endif