/**************************************************
*
* History: 
*  Creation Dan, <Jul 8 2002>
*
**************************************************/ 
 
#include "stdlib.h"
 
#ifndef _PROPACCUM

#define _PROPACCUM
 
#define CES_FIELD_TAG  FTNODE
/* 
typedef struct CESFieldTag {
  int64_t  Position;// first character effected 
  long     Owner   ;// unique within scope of editor 
  long     Index   ;// uniquie within scope of owner
  char     Type    ;// reference for forign translation
} CESFIELDTAG;
*/

typedef struct FTNode{   
  //    CESFIELDTAG     contents;
      int64_t  Position;      // first character effected 
      long     Owner   ;      // unique within scope of editor 
      long     Index   ;      // uniquie within scope of owner
      char     Type    ;      // reference for translation of tag type
      struct   FTNode * next;
} FTNODE;


class PropAccum {

 public:
                   PropAccum();
                  ~PropAccum();
                  
 int               Set     (int64_t Owner, int64_t Index, int64_t Position, int Type);
 CES_FIELD_TAG *   FindNode(int64_t Owner, int64_t Index);
 int               Set     (CES_FIELD_TAG * Data);
 CES_FIELD_TAG *   Get     (int64_t Owner, int64_t Index, CES_FIELD_TAG * Dest);
 
 
 private:
 
  CES_FIELD_TAG * propList;
 
  int              insert   (int64_t Owner, int64_t Index, int64_t Position, int Type);
  void             modify   (CES_FIELD_TAG * node, int64_t Position, int64_t Type);
  void             deleteAll();

};

#endif
