Session Class Reference

#include <session.h>

Collaboration diagram for Session:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Session ()
 ???

bool getaccount (IStreamAddr *accountptr)
 ???

void free ()
 ???

void freeexplicit (char *ptr)
 ???

void freeitemset (typeitemset itemset)
 ???


Public Attributes

FILE * inp
FILE * outp
FILE * errp
typetthingheadertempspacehead
typetthingheadertempspacetail
IStreamAddr account
bool charinbuff
char charbuff
ErrorCode errorcode

Private Member Functions

int * alloc (int nbytes)
 ???


Friends

void * operator new (size_t nbytes, Session *sess)
 ???


Constructor & Destructor Documentation

Session::Session  ) 
 

???

(to be defined)

Definition at line 95 of file session.cxx.

References errp, inp, NULL, outp, tempspacehead, and tempspacetail.

00096 {
00097     inp           = stdin;
00098     outp          = stdout;
00099     errp          = stderr;
00100     tempspacehead = NULL;
00101     tempspacetail = NULL;
00102 
00103     /* tumblerclear(&account); */
00104 }


Member Function Documentation

int * Session::alloc int  nbytes  )  [private]
 

???

(to be defined)

Definition at line 149 of file session.cxx.

References assert, eallocwithtag(), NULL, SESSTAG, tempspacehead, Session::typetthingheader::tlast, and Session::typetthingheader::tnext.

Referenced by operator new().

00151 {
00152     Session::typetthingheader *head = tempspacehead;
00153 
00154     Session::typetthingheader *xthis = (Session::typetthingheader *) eallocwithtag((unsigned) (sizeof(Session::typetthingheader) + nbytes), SESSTAG);
00155 
00156     assert((((unsigned) xthis) & 1) == 0); // ERROR: ealloc returned unaligned pointer
00157 
00158     xthis->tnext = head;
00159     xthis->tlast = NULL;
00160 
00161     if (head)
00162         head->tlast = xthis;
00163 
00164     tempspacehead = xthis;
00165 
00166     ++xthis;
00167     assert((((unsigned) xthis) & 1) == 0); // ERROR: talloc trying to return unaligned pointer
00168 
00169     return (int *) xthis;
00170 }

void Session::free  ) 
 

???

(to be defined)

Definition at line 180 of file session.cxx.

References checkpointer(), efree(), NULL, tempspacehead, and Session::typetthingheader::tnext.

Referenced by assertspecisstring(), orglwrite(), sourceunixcommand(), subtreewrite(), and xanadu().

00181 {
00182     Session::typetthingheader *p;
00183 
00184     Session::typetthingheader *ptr;
00185     for (ptr = tempspacehead; ptr; ptr = p) {
00186         p = ptr->tnext;
00187         checkpointer("Session::free: ", (char *) ptr);
00188 
00189         /*
00190          * if (ptr > (char *) 0x1b0000)
00191          *     assert(0); // Session::free: ptr pointing into stack region
00192          */
00193 
00194         efree((char *)ptr);
00195     }
00196     tempspacehead = NULL;
00197 }

void Session::freeexplicit char *  ptr  ) 
 

???

(to be defined)

Definition at line 207 of file session.cxx.

References checkpointer(), efree(), tempspacehead, Session::typetthingheader::tlast, and Session::typetthingheader::tnext.

Referenced by comparespans(), and freeitemset().

00209 {
00210     checkpointer("Session::freeexplicit: ", ptr);
00211 
00212     Session::typetthingheader *header = (Session::typetthingheader *) ptr;
00213 
00214     --header;
00215 
00216     if (header->tnext)
00217         header->tnext->tlast = header->tlast;
00218 
00219     if (header->tlast)
00220         header->tlast->tnext = header->tnext;
00221 
00222     if (header == tempspacehead)
00223         tempspacehead = header->tnext;
00224 
00225     efree((char *)header);
00226 }

void Session::freeitemset typeitemset  itemset  ) 
 

???

(to be defined)

Definition at line 236 of file session.cxx.

References checkitem(), freeexplicit(), typeitemset, and VSPECID.

Referenced by removespansnotinoriginal(), and restrictspecsetsaccordingtoispans().

00238 {
00239     typeitem *nextitem;
00240 
00241     for (; itemset; itemset = nextitem) {
00242         checkitem("Session::freeitemset: ", itemset);
00243 
00244         nextitem = (typeitem *) ((typeitemheader *) itemset)->next;
00245 
00246         if (((typeitemheader *) itemset)->itemid == VSPECID)
00247             freeitemset((typeitemset) ((typevspec *) itemset)->vspanset);
00248 
00249         freeexplicit((char *)itemset);
00250     }
00251 }

bool Session::getaccount IStreamAddr accountptr  ) 
 

???

(to be defined)

Definition at line 114 of file session.cxx.

References tumblerclear.

Referenced by main().

00116 {
00117     tumblerclear((Tumbler *) accountptr);
00118     return true;
00119 
00120     /* prompt (sess, "account? "); */
00121 
00122     /* gettumbler (sess, accountptr) && validaccount(sess, accountptr); L("in get account \n");
00123      * return(true); */
00124 }


Friends And Related Function Documentation

void* operator new size_t  nbytes,
Session sess
[friend]
 

???

(to be defined)

Parameters:
sess  Input: User's session context

Definition at line 134 of file session.cxx.

00136                                      : User's session context
00137 {
00138     return sess->alloc(nbytes);
00139 }


Member Data Documentation

IStreamAddr Session::account
 

Definition at line 110 of file session.h.

Referenced by docreatenewdocument(), doopen(), getxaccount(), isthisusersdocument(), and main().

char Session::charbuff
 

Definition at line 112 of file session.h.

Referenced by pullc(), and pushc().

bool Session::charinbuff
 

Definition at line 111 of file session.h.

Referenced by getrequest(), pullc(), and pushc().

ErrorCode Session::errorcode
 

Definition at line 113 of file session.h.

Referenced by doclose(), and doopen().

FILE* Session::errp
 

Definition at line 107 of file session.h.

Referenced by error(), establishprotocol(), getnum(), gettumbler(), needchar(), Session(), and validrequest().

FILE* Session::inp
 

Definition at line 105 of file session.h.

Referenced by dumpgranfwids(), eatchar(), establishprotocol(), examine(), getbool(), getmuchtext(), getnum(), getrequest(), gettext(), main(), new_players(), pullc(), Session(), setmaximumsetupsize(), showenfilades(), sourceunixcommand(), and xanadu().

FILE* Session::outp
 

Definition at line 106 of file session.h.

Referenced by establishprotocol(), main(), new_players(), prompt(), putclose(), putcopy(), putcreatelink(), putcreatenewdocument(), putcreatenewversion(), putcreatenode_or_account(), putdeletevspan(), putfinddocscontaining(), putfindlinksfromtothree(), putfindnextnlinksfromtothree(), putfindnumoflinksfromtothree(), putfollowlink(), putinsert(), putisa(), putitem(), putitemset(), putopen(), putquitxanadu(), putrearrange(), putrequestfailed(), putretrievedocvspan(), putretrievedocvspanset(), putretrieveendsets(), putretrievev(), putshowrelationof2versions(), putspan(), putspanpair(), putspanpairset(), puttext(), puttextset(), putxaccount(), sendresultoutput(), Session(), and setmaximumsetupsize().

typetthingheader* Session::tempspacehead
 

Definition at line 108 of file session.h.

Referenced by alloc(), free(), freeexplicit(), and Session().

typetthingheader* Session::tempspacetail
 

Definition at line 109 of file session.h.

Referenced by Session().


The documentation for this class was generated from the following files:

Generated on Sun Aug 21 04:18:50 2005 for Udanax-Green by doxygen1.3.4