Commit eeec0970 authored by lw's avatar lw

*** empty log message ***

parent 4e76c27e
...@@ -228,7 +228,7 @@ typedef union { ...@@ -228,7 +228,7 @@ typedef union {
typedef struct { typedef struct {
pwr_tOid Objid; pwr_tOid Objid;
pwr_tClassId Body; pwr_tCid Body;
pwr_tUInt32 Offset; pwr_tUInt32 Offset;
pwr_tUInt32 Size; pwr_tUInt32 Size;
pwr_mAttrRef Flags; pwr_mAttrRef Flags;
...@@ -250,6 +250,10 @@ static const pwr_tClassId pwr_cNClassId = 0; ...@@ -250,6 +250,10 @@ static const pwr_tClassId pwr_cNClassId = 0;
static const pwr_tTypeId pwr_cNTypeId = 0; static const pwr_tTypeId pwr_cNTypeId = 0;
static const pwr_tVolumeId pwr_cNVolumeId = 0; static const pwr_tVolumeId pwr_cNVolumeId = 0;
static const pwr_tNodeId pwr_cNNodeId = 0; static const pwr_tNodeId pwr_cNNodeId = 0;
static const pwr_tCid pwr_cNCid = 0;
static const pwr_tTid pwr_cNTid = 0;
static const pwr_tVid pwr_cNVid = 0;
static const pwr_tNid pwr_cNNid = 0;
/* Gereral macro definitions */ /* Gereral macro definitions */
......
...@@ -68,8 +68,9 @@ typedef struct { ...@@ -68,8 +68,9 @@ typedef struct {
unsigned int vid_3 : 8; unsigned int vid_3 : 8;
#endif #endif
} cdh_mObjid; } cdh_mOid;
typedef cdh_mOid cdh_mObjid;
typedef struct { typedef struct {
unsigned int rix : 32; unsigned int rix : 32;
...@@ -88,7 +89,8 @@ typedef struct { ...@@ -88,7 +89,8 @@ typedef struct {
unsigned int vid_3 : 8; unsigned int vid_3 : 8;
#endif #endif
} cdh_mRefId; } cdh_mRid;
typedef cdh_mRid cdh_mRefId;
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -106,7 +108,8 @@ typedef struct { ...@@ -106,7 +108,8 @@ typedef struct {
unsigned int vid_3 : 8; unsigned int vid_3 : 8;
#endif #endif
} cdh_mVolumeId; } cdh_mVid;
typedef cdh_mVid cdh_mVolumeId;
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -124,29 +127,30 @@ typedef struct { ...@@ -124,29 +127,30 @@ typedef struct {
unsigned int nid_3 : 8; unsigned int nid_3 : 8;
#endif #endif
} cdh_mNodeId; } cdh_mNid;
typedef cdh_mNid cdh_mNodeId;
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
unsigned int must_be_two : 2; unsigned int must_be_two : 2;
unsigned int cix : 12; unsigned int cix : 12;
unsigned int bix : 3; unsigned int bix : 3;
unsigned int reserved : 3; unsigned int reserved : 3;
unsigned int aix : 12; unsigned int aix : 12;
unsigned int vid_3 : 8; unsigned int vid_3 : 8;
unsigned int vid_2 : 8; unsigned int vid_2 : 8;
unsigned int vid_1 : 8; unsigned int vid_1 : 8;
unsigned int vid_0 : 8; unsigned int vid_0 : 8;
#elif (pwr_dHost_byteOrder == pwr_dLittleEndian) #elif (pwr_dHost_byteOrder == pwr_dLittleEndian)
unsigned int aix : 12; unsigned int aix : 12;
unsigned int reserved : 3; unsigned int reserved : 3;
unsigned int bix : 3; unsigned int bix : 3;
unsigned int cix : 12; unsigned int cix : 12;
unsigned int must_be_two : 2; unsigned int must_be_two : 2;
unsigned int vid_0 : 8; unsigned int vid_0 : 8;
unsigned int vid_1 : 8; unsigned int vid_1 : 8;
...@@ -176,7 +180,8 @@ typedef struct { ...@@ -176,7 +180,8 @@ typedef struct {
unsigned int vid_1 : 8; unsigned int vid_1 : 8;
#endif #endif
} cdh_mClassId; } cdh_mCid;
typedef cdh_mCid cdh_mClassId;
typedef struct { typedef struct {
#if (pwr_dHost_byteOrder == pwr_dBigEndian) #if (pwr_dHost_byteOrder == pwr_dBigEndian)
...@@ -228,35 +233,41 @@ typedef struct { ...@@ -228,35 +233,41 @@ typedef struct {
unsigned int vid_1 : 8; unsigned int vid_1 : 8;
#endif #endif
} cdh_mTypeId; } cdh_mTid;
typedef cdh_mTid cdh_mTypeId;
typedef union { typedef union {
pwr_tObjid pwr; pwr_tOid pwr;
cdh_mObjid o; cdh_mObjid o;
cdh_mClassObjid c; cdh_mClassObjid c;
cdh_mTypeObjid t; cdh_mTypeObjid t;
} cdh_uObjid; } cdh_uOid;
typedef cdh_uOid cdh_uObjid;
typedef union { typedef union {
pwr_tRefId pwr; pwr_tRid pwr;
cdh_mRefId r; cdh_mRid r;
} cdh_uRefId; } cdh_uRid;
typedef cdh_uRid cdh_uRefId;
typedef union { typedef union {
pwr_tClassId pwr; pwr_tCid pwr;
cdh_mClassId c; cdh_mCid c;
cdh_mTypeId t; cdh_mTid t;
} cdh_uTypeId; } cdh_uTid;
typedef cdh_uTid cdh_uTypeId;
typedef union { typedef union {
pwr_tVolumeId pwr; pwr_tVid pwr;
cdh_mVolumeId v; cdh_mVid v;
} cdh_uVolumeId; } cdh_uVid;
typedef cdh_uVid cdh_uVolumeId;
typedef union { typedef union {
pwr_tNodeId pwr; pwr_tNid pwr;
cdh_mNodeId n; cdh_mNid n;
} cdh_uNodeId; } cdh_uNid;
typedef cdh_uNid cdh_uNodeId;
typedef enum { typedef enum {
cdh_eId__ = 0, cdh_eId__ = 0,
...@@ -272,14 +283,14 @@ typedef enum { ...@@ -272,14 +283,14 @@ typedef enum {
} cdh_eId; } cdh_eId;
typedef union { typedef union {
pwr_tObjectIx oix; pwr_tOix oix;
pwr_tObjid oid; pwr_tOid oid;
pwr_tClassId cid; pwr_tCid cid;
pwr_tVolumeId vid; pwr_tVid vid;
pwr_tTypeId tid; pwr_tTid tid;
pwr_tSubid sid; pwr_tSubid sid;
pwr_tDlid did; pwr_tDlid did;
pwr_sAttrRef aref; pwr_sAttrRef aref;
} cdh_uId; } cdh_uId;
typedef union { typedef union {
...@@ -311,7 +322,7 @@ typedef struct { ...@@ -311,7 +322,7 @@ typedef struct {
typedef struct { typedef struct {
cdh_sObjName name; cdh_sObjName name;
pwr_tObjid poid; pwr_tOid poid;
} cdh_sFamily; } cdh_sFamily;
typedef union { typedef union {
...@@ -527,170 +538,170 @@ typedef union { ...@@ -527,170 +538,170 @@ typedef union {
} cdh_mName; } cdh_mName;
typedef struct { typedef struct {
pwr_tObjid poid; /* Parent objid, or NOBJID */ pwr_tOid poid; /* Parent objid, or NOBJID */
cdh_mParseName parseFlags; cdh_mParseName parseFlags;
cdh_mName flags; cdh_mName flags;
void *ohp; void *ohp;
cdh_eId eId; cdh_eId eId;
cdh_uId uId; cdh_uId uId;
pwr_tTypeId bid; pwr_tTid bid;
pwr_tUInt32 index; pwr_tUInt32 index;
pwr_tUInt32 offset; pwr_tUInt32 offset;
pwr_tUInt32 size; pwr_tUInt32 size;
pwr_tUInt32 nObject; pwr_tUInt32 nObject;
pwr_tUInt32 nBody; pwr_tUInt32 nBody;
cdh_sFamily volume; cdh_sFamily volume;
cdh_sFamily object[20]; cdh_sFamily object[20];
cdh_sFamily body[10]; cdh_sFamily body[10];
cdh_sFamily attribute; cdh_sFamily attribute;
} cdh_sParseName; } cdh_sParseName;
/* Function prototypes to exported functions. */ /* Function prototypes to exported functions. */
int int
cdh_ObjidCompare ( cdh_ObjidCompare (
pwr_tObjid Object_1, pwr_tOid Object_1,
pwr_tObjid Object_2 pwr_tOid Object_2
); );
int int
cdh_ObjidIsEqual ( cdh_ObjidIsEqual (
pwr_tObjid Object_1, pwr_tOid Object_1,
pwr_tObjid Object_2 pwr_tOid Object_2
); );
int int
cdh_ObjidIsNotEqual ( cdh_ObjidIsNotEqual (
pwr_tObjid Object_1, pwr_tOid Object_1,
pwr_tObjid Object_2 pwr_tOid Object_2
); );
int int
cdh_ObjidIsNull ( cdh_ObjidIsNull (
pwr_tObjid Object pwr_tOid Object
); );
int int
cdh_ObjidIsNotNull ( cdh_ObjidIsNotNull (
pwr_tObjid Object pwr_tOid Object
); );
int int
cdh_SubidCompare ( cdh_SubidCompare (
pwr_tSubid Subscription_1, pwr_tSubid Subscription_1,
pwr_tSubid Subscription_2 pwr_tSubid Subscription_2
); );
int int
cdh_SubidIsEqual ( cdh_SubidIsEqual (
pwr_tSubid Subscription_1, pwr_tSubid Subscription_1,
pwr_tSubid Subscription_2 pwr_tSubid Subscription_2
); );
int int
cdh_SubidIsNotEqual ( cdh_SubidIsNotEqual (
pwr_tSubid Subscription_1, pwr_tSubid Subscription_1,
pwr_tSubid Subscription_2 pwr_tSubid Subscription_2
); );
int int
cdh_SubidIsNull ( cdh_SubidIsNull (
pwr_tSubid Subscription pwr_tSubid Subscription
); );
int int
cdh_SubidIsNotNull ( cdh_SubidIsNotNull (
pwr_tSubid Subscription pwr_tSubid Subscription
); );
int int
cdh_RefIdCompare ( cdh_RefIdCompare (
pwr_tRefId Reference_1, pwr_tRefId Reference_1,
pwr_tRefId Reference_2 pwr_tRefId Reference_2
); );
int int
cdh_RefIdIsEqual ( cdh_RefIdIsEqual (
pwr_tRefId Reference_1, pwr_tRefId Reference_1,
pwr_tRefId Reference_2 pwr_tRefId Reference_2
); );
int int
cdh_RefIdIsNotEqual ( cdh_RefIdIsNotEqual (
pwr_tRefId Reference_1, pwr_tRefId Reference_1,
pwr_tRefId Reference_2 pwr_tRefId Reference_2
); );
int int
cdh_RefIdIsNull ( cdh_RefIdIsNull (
pwr_tRefId Reference pwr_tRefId Reference
); );
int int
cdh_RefIdIsNotNull ( cdh_RefIdIsNotNull (
pwr_tRefId Reference pwr_tRefId Reference
); );
int int
cdh_DlidCompare ( cdh_DlidCompare (
pwr_tDlid DirectLink_1, pwr_tDlid DirectLink_1,
pwr_tDlid DirectLink_2 pwr_tDlid DirectLink_2
); );
int int
cdh_DlidIsEqual ( cdh_DlidIsEqual (
pwr_tDlid DirectLink_1, pwr_tDlid DirectLink_1,
pwr_tDlid DirectLink_2 pwr_tDlid DirectLink_2
); );
int int
cdh_DlidIsNotEqual ( cdh_DlidIsNotEqual (
pwr_tDlid DirectLink_1, pwr_tDlid DirectLink_1,
pwr_tDlid DirectLink_2 pwr_tDlid DirectLink_2
); );
int int
cdh_DlidIsNull ( cdh_DlidIsNull (
pwr_tDlid DirectLink pwr_tDlid DirectLink
); );
int int
cdh_DlidIsNotNull ( cdh_DlidIsNotNull (
pwr_tDlid DirectLink pwr_tDlid DirectLink
); );
pwr_tClassId pwr_tCid
cdh_ClassObjidToId ( cdh_ClassObjidToId (
pwr_tObjid Object pwr_tOid Object
); );
pwr_tObjid pwr_tOid
cdh_ClassIdToObjid ( cdh_ClassIdToObjid (
pwr_tClassId Class pwr_tCid Class
); );
pwr_tTypeId pwr_tTid
cdh_TypeObjidToId ( cdh_TypeObjidToId (
pwr_tObjid Object pwr_tOid Object
); );
int int
cdh_TypeIdToIndex ( cdh_TypeIdToIndex (
pwr_tTypeId Type pwr_tTid Type
); );
pwr_tObjid pwr_tOid
cdh_TypeIdToObjid ( cdh_TypeIdToObjid (
pwr_tTypeId Type pwr_tTid Type
); );
pwr_tStatus pwr_tStatus
cdh_AttrValueToString ( cdh_AttrValueToString (
pwr_eType Type, pwr_eType Type,
void *Value, void *Value,
char *String, char *String,
int MaxSize int MaxSize
); );
pwr_tStatus pwr_tStatus
...@@ -703,31 +714,31 @@ cdh_StringToAttrValue ( ...@@ -703,31 +714,31 @@ cdh_StringToAttrValue (
pwr_tStatus pwr_tStatus
cdh_StringToClassId ( cdh_StringToClassId (
const char *s, const char *s,
pwr_tClassId *cid pwr_tCid *cid
); );
pwr_tStatus pwr_tStatus
cdh_StringToTypeId ( cdh_StringToTypeId (
const char *s, const char *s,
pwr_tTypeId *tid pwr_tTid *tid
); );
pwr_tStatus pwr_tStatus
cdh_StringToVolumeId ( cdh_StringToVolumeId (
const char *s, const char *s,
pwr_tVolumeId *tid pwr_tVid *tid
); );
pwr_tStatus pwr_tStatus
cdh_StringToObjectIx ( cdh_StringToObjectIx (
const char *s, const char *s,
pwr_tObjectIx *oix pwr_tOix *oix
); );
pwr_tStatus pwr_tStatus
cdh_StringToObjid ( cdh_StringToObjid (
const char *s, const char *s,
pwr_tObjid *oix pwr_tOid *oid
); );
pwr_tStatus pwr_tStatus
...@@ -738,65 +749,61 @@ cdh_StringToSubid ( ...@@ -738,65 +749,61 @@ cdh_StringToSubid (
pwr_tStatus pwr_tStatus
cdh_StringToDlid ( cdh_StringToDlid (
const char *s, const char *s,
pwr_tDlid *did pwr_tDlid *did
); );
char * char *
cdh_ClassIdToString ( cdh_ClassIdToString (
char *s, char *s,
pwr_tClassId cid, pwr_tCid cid,
int prefix int prefix
); );
char * char *
cdh_ObjectIxToString ( cdh_ObjectIxToString (
char *s, char *s,
pwr_tObjectIx oix, pwr_tOix oix,
int prefix int prefix
); );
char * char *
cdh_ObjidToString ( cdh_ObjidToString (
char *s, char *s,
pwr_tObjid oid, pwr_tOid oid,
int prefix int prefix
); );
char * char *
cdh_ArefToString ( cdh_ArefToString (
char *s, char *s,
pwr_sAttrRef *aref, pwr_sAttrRef *aref,
int prefix int prefix
); );
char * char *
cdh_NodeIdToString ( cdh_NodeIdToString (
char *s, char *s,
pwr_tNodeId nid, pwr_tNid nid,
int prefix, int prefix,
int suffix int suffix
); );
char * char *
cdh_TypeIdToString ( cdh_TypeIdToString(char *s, pwr_tTid tid, int prefix);
char *s,
pwr_tTypeId tid,
int prefix
);
char * char *
cdh_VolumeIdToString ( cdh_VolumeIdToString (
char *s, char *s,
pwr_tVolumeId vid, pwr_tVid vid,
int prefix, int prefix,
int suffix int suffix
); );
char * char *
cdh_SubidToString ( cdh_SubidToString (
char *s, char *s,
pwr_tSubid sid, pwr_tSubid sid,
int prefix int prefix
); );
...@@ -811,7 +818,7 @@ cdh_sFamily * ...@@ -811,7 +818,7 @@ cdh_sFamily *
cdh_Family ( cdh_Family (
cdh_sFamily *f, cdh_sFamily *f,
const char *name, const char *name,
pwr_tObjid poid pwr_tOid poid
); );
cdh_sObjName * cdh_sObjName *
...@@ -829,7 +836,7 @@ cdh_sParseName * ...@@ -829,7 +836,7 @@ cdh_sParseName *
cdh_ParseName ( cdh_ParseName (
pwr_tStatus *sts, pwr_tStatus *sts,
cdh_sParseName *pn, cdh_sParseName *pn,
pwr_tObjid poid, pwr_tOid poid,
const char *name, const char *name,
pwr_tUInt32 flags pwr_tUInt32 flags
); );
......
This diff is collapsed.
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
% | Information about volumes mounted in this volume. | % | Information about volumes mounted in this volume. |
% | | % | |
% +====================================================+ % +====================================================+
% | Oix (Object index) Section | % | Oid (Object identity) Section |
% +----------------------------------------------------+ % +----------------------------------------------------+
% | | % | |
% | | % | |
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
%#define dbs_cAlignInc 7 %#define dbs_cAlignInc 7
%#define dbs_dAlign(size) (((size) + dbs_cAlignInc) & ~dbs_cAlignInc) %#define dbs_dAlign(size) (((size) + dbs_cAlignInc) & ~dbs_cAlignInc)
%#define dbs_dPadding(size) ((((size) + dbs_cAlignInc) & ~dbs_cAlignInc) - (size)) %#define dbs_dPadding(size) ((((size) + dbs_cAlignInc) & ~dbs_cAlignInc) - (size))
%#define dbs_dMakeRef(sect, offset) (0 & ((sect) << dbs_cOffsBits) & (offset)) %#define dbs_dMakeRef(sect, offset) (0 | ((sect) << dbs_cOffsBits) | (offset))
% %
%typedef union { %typedef union {
% struct { % struct {
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
%pwr_tBoolean %pwr_tBoolean
%pdr_dbs_uRefBits(PDR *pdrs, dbs_uRefBits *objp); %pdr_dbs_uRefBits(PDR *pdrs, dbs_uRefBits *objp);
% %
%
#endif #endif
struct dbs_sQlink { struct dbs_sQlink {
...@@ -189,9 +190,9 @@ enum dbs_eSect { ...@@ -189,9 +190,9 @@ enum dbs_eSect {
dbs_eSect_dir = 0, dbs_eSect_dir = 0,
dbs_eSect_volume = 1, dbs_eSect_volume = 1,
dbs_eSect_volref = 2, dbs_eSect_volref = 2,
dbs_eSect_oid = 3,
dbs_eSect_object = 4, dbs_eSect_object = 4,
dbs_eSect_rbody = 5, dbs_eSect_rbody = 5,
dbs_eSect_oix = 3,
dbs_eSect_name = 6, dbs_eSect_name = 6,
dbs_eSect_dbody = 8, dbs_eSect_dbody = 8,
dbs_eSect_class = 10, dbs_eSect_class = 10,
...@@ -202,7 +203,7 @@ enum dbs_eSect { ...@@ -202,7 +203,7 @@ enum dbs_eSect {
#ifdef PDR_HDR #ifdef PDR_HDR
%#define dbs_mSect_volume pwr_Bit(dbs_eSect_volume) %#define dbs_mSect_volume pwr_Bit(dbs_eSect_volume)
%#define dbs_mSect_volref pwr_Bit(dbs_eSect_volref) %#define dbs_mSect_volref pwr_Bit(dbs_eSect_volref)
%#define dbs_mSect_oix pwr_Bit(dbs_eSect_oix) %#define dbs_mSect_oid pwr_Bit(dbs_eSect_oid)
%#define dbs_mSect_object pwr_Bit(dbs_eSect_object) %#define dbs_mSect_object pwr_Bit(dbs_eSect_object)
%#define dbs_mSect_rbody pwr_Bit(dbs_eSect_rbody) %#define dbs_mSect_rbody pwr_Bit(dbs_eSect_rbody)
%#define dbs_mSect_name pwr_Bit(dbs_eSect_name) %#define dbs_mSect_name pwr_Bit(dbs_eSect_name)
...@@ -285,6 +286,12 @@ enum dbs_eFile { ...@@ -285,6 +286,12 @@ enum dbs_eFile {
% %
#endif #endif
struct dbs_sBintab {
dbs_tRef start;
dbs_tRef end;
pwr_tUInt32 rsize;
};
#ifdef PDR_HDR #ifdef PDR_HDR
%/** %/**
% * @note You can't use pdr_dbs_sFile directly due to the format member. % * @note You can't use pdr_dbs_sFile directly due to the format member.
...@@ -342,6 +349,10 @@ struct dbs_sVolume { ...@@ -342,6 +349,10 @@ struct dbs_sVolume {
pwr_tTime time; /**< time at which this load file was created */ pwr_tTime time; /**< time at which this load file was created */
pwr_tUInt32 cardinality; /**< number objects in this volume */ pwr_tUInt32 cardinality; /**< number objects in this volume */
pwr_tUInt32 rbodySize; pwr_tUInt32 rbodySize;
dbs_sBintab name_bt; /**< search for object with parent and name */
dbs_sBintab oid_bt; /**< search for object with identity */
dbs_sBintab class_bt; /**< search for object with class */
}; };
/** /**
...@@ -364,19 +375,19 @@ struct dbs_sVolRef { ...@@ -364,19 +375,19 @@ struct dbs_sVolRef {
/** /**
* Object Index (oix) Section. * Object Identity (oid) Section.
* *
* Layout of an object index table entry. * Layout of an object identity table entry.
* Oix entries are stored in oix-sect. * Oid entries are stored in oid-sect.
* Used to find an object with object index as key. * Used to find an object with object identity as key.
* Table lookup mechanism is binary lookup. * Table lookup mechanism is binary lookup.
*/ */
#ifdef PDR_HDR #ifdef PDR_HDR
%#define dbs_cVersionOix 1 %#define dbs_cVersionOid 1
#endif #endif
struct dbs_sOix { struct dbs_sOid {
pwr_tOix oix; /**< Object index */ pwr_tOid oid; /**< Object identity */
dbs_tRef ref; /**< Address, section relative, to object in object section */ dbs_tRef ref; /**< Address, section relative, to object in object section */
}; };
...@@ -400,12 +411,6 @@ struct dbs_sOlink { ...@@ -400,12 +411,6 @@ struct dbs_sOlink {
pwr_tOix succ; pwr_tOix succ;
}; };
struct dbs_sBintab {
dbs_tRef start;
dbs_tRef end;
pwr_tUInt32 rsize;
};
struct dbs_sObject { struct dbs_sObject {
pwr_tOid oid; /**< object identifier */ pwr_tOid oid; /**< object identifier */
pwr_tCid cid; /**< class identifier */ pwr_tCid cid; /**< class identifier */
...@@ -442,6 +447,7 @@ struct dbs_sObject { ...@@ -442,6 +447,7 @@ struct dbs_sObject {
struct dbs_sClass { struct dbs_sClass {
pwr_tCid cid; /**< class identifier */ pwr_tCid cid; /**< class identifier */
pwr_tUInt32 nObjects;
dbs_sQlink o_lh; /**< root of list of all object dbs_sQlink o_lh; /**< root of list of all object
of this class within this volume */ of this class within this volume */
}; };
...@@ -506,7 +512,7 @@ struct dbs_sName { ...@@ -506,7 +512,7 @@ struct dbs_sName {
% FILE *f; % FILE *f;
% dbs_sFile file; % dbs_sFile file;
% pwr_tUInt32 nSect; % pwr_tUInt32 nSect;
% dbs_sSect sect[dbs_eSect_]; % dbs_sSect *sect;
% %
% /* the rest is used only if mapped */ % /* the rest is used only if mapped */
% pwr_tUInt32 size; /**< size of mapped file */ % pwr_tUInt32 size; /**< size of mapped file */
...@@ -518,37 +524,51 @@ struct dbs_sName { ...@@ -518,37 +524,51 @@ struct dbs_sName {
%#define dbs_Qitem(a, b, c) ((b *)((char *)a - offsetof(b, c))) %#define dbs_Qitem(a, b, c) ((b *)((char *)a - offsetof(b, c)))
%#define dbs_Qlink(a, b, c) ((dbs_sQlink *)((char *)a + offsetof(b, c))) %#define dbs_Qlink(a, b, c) ((dbs_sQlink *)((char *)a + offsetof(b, c)))
% %
%void *dbs_Address(pwr_tStatus*, dbs_sEnv*, dbs_tRef); %void *dbs_Address(pwr_tStatus*, const dbs_sEnv*, dbs_tRef);
%void *dbs_Alloc(pwr_tStatus*, dbs_sEnv*, pwr_tUInt32); %void *dbs_Alloc(pwr_tStatus*, const dbs_sEnv*, pwr_tUInt32);
%pwr_tBoolean dbs_AllocLookasideSegment(pwr_tStatus*, dbs_sEnv*, pwr_tUInt32, pwr_tUInt32); %pwr_tBoolean dbs_AllocLookasideSegment(pwr_tStatus*, const dbs_sEnv*, pwr_tUInt32, pwr_tUInt32);
%void *dbs_AllocNamedSegment(pwr_tStatus*, dbs_sEnv*, pwr_tUInt32, char*); %void *dbs_AllocNamedSegment(pwr_tStatus*, const dbs_sEnv*, pwr_tUInt32, char*);
%dbs_sEnv *dbs_Create(pwr_tStatus*, dbs_sEnv*, char*, pwr_tUInt32, pwr_tUInt32); %dbs_sEnv *dbs_Create(pwr_tStatus*, dbs_sEnv*, char*, pwr_tUInt32, pwr_tUInt32);
%void dbs_Dump(pwr_tStatus*, dbs_sEnv*); %void dbs_Dump(pwr_tStatus*, const dbs_sEnv*);
%pwr_tBoolean dbs_Free(pwr_tStatus*, dbs_sEnv*, void*); %pwr_tBoolean dbs_Free(pwr_tStatus*, const dbs_sEnv*, void*);
%pwr_tBoolean dbs_FreeReference(pwr_tStatus*, dbs_sEnv*, dbs_tRef); %pwr_tBoolean dbs_FreeReference(pwr_tStatus*, const dbs_sEnv*, dbs_tRef);
%dbs_tRef dbs_InDbs(pwr_tStatus*, dbs_sEnv*, void*, pwr_tUInt32); %dbs_tRef dbs_InDbs(pwr_tStatus*, const dbs_sEnv*, void*, pwr_tUInt32);
%dbs_tRef dbs_ItemReference(pwr_tStatus*, dbs_sEnv*, void*); %dbs_tRef dbs_ItemReference(pwr_tStatus*, const dbs_sEnv*, void*);
%dbs_sQlink *dbs_Qalloc(pwr_tStatus*, dbs_sEnv*); %dbs_sQlink *dbs_Qalloc(pwr_tStatus*, const dbs_sEnv*);
%pwr_tBoolean dbs_QhasOne(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %pwr_tBoolean dbs_QhasOne(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%dbs_tRef dbs_Qinit(pwr_tStatus*, dbs_sQlink*, dbs_tRef); %dbs_tRef dbs_Qinit(pwr_tStatus*, dbs_sQlink*, dbs_tRef);
%dbs_sQlink *dbs_Qinsert(pwr_tStatus*, dbs_sQlink*, dbs_sQlink*, dbs_sQlink*); %dbs_sQlink *dbs_Qinsert(pwr_tStatus*, dbs_sQlink*, dbs_sQlink*, dbs_sQlink*);
%dbs_sQlink *dbs_QinsertPred(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*, dbs_sQlink*); %dbs_sQlink *dbs_QinsertPred(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*, dbs_sQlink*);
%dbs_sQlink *dbs_QinsertSucc(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*, dbs_sQlink*); %dbs_sQlink *dbs_QinsertSucc(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*, dbs_sQlink*);
%pwr_tBoolean dbs_QisEmpty(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %pwr_tBoolean dbs_QisEmpty(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%pwr_tBoolean dbs_QisLinked(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %pwr_tBoolean dbs_QisLinked(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%pwr_tBoolean dbs_QisNull(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %pwr_tBoolean dbs_QisNull(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%dbs_sQlink *dbs_Qmove(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*, dbs_sQlink*); %dbs_sQlink *dbs_Qmove(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*, dbs_sQlink*);
%dbs_sQlink *dbs_Qpred(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %dbs_sQlink *dbs_Qpred(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%dbs_sQlink *dbs_Qremove(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %dbs_sQlink *dbs_Qremove(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%dbs_sQlink *dbs_QremovePred(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %dbs_sQlink *dbs_QremovePred(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%dbs_sQlink *dbs_QremoveSucc(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %dbs_sQlink *dbs_QremoveSucc(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%dbs_sQlink *dbs_Qsucc(pwr_tStatus*, dbs_sEnv*, dbs_sQlink*); %dbs_sQlink *dbs_Qsucc(pwr_tStatus*, const dbs_sEnv*, dbs_sQlink*);
%dbs_tRef dbs_RefAlloc(pwr_tStatus*, dbs_sEnv*, pwr_tUInt32); %dbs_tRef dbs_RefAlloc(pwr_tStatus*, const dbs_sEnv*, pwr_tUInt32);
%dbs_tRef dbs_Reference(pwr_tStatus*, dbs_sEnv*, void*); %dbs_tRef dbs_Reference(pwr_tStatus*, const dbs_sEnv*, void*);
% %
%pwr_tBoolean dbs_AlignedRead(pwr_tStatus *sts, void *buf, pwr_tUInt32 size, dbs_sEnv *ep); %pwr_tBoolean dbs_AlignedRead(pwr_tStatus *sts, void *buf, pwr_tUInt32 size, const dbs_sEnv *ep);
%pwr_tBoolean dbs_Close(pwr_tStatus *sts, dbs_sEnv *ep); %pwr_tBoolean dbs_Close(pwr_tStatus *sts, dbs_sEnv *ep);
%dbs_sEnv *dbs_Open(pwr_tStatus *sts, dbs_sEnv *ep, const char *filename); %dbs_sEnv *dbs_Open(pwr_tStatus *sts, dbs_sEnv *ep, const char *filename);
%dbs_sEnv *dbs_Map(pwr_tStatus *sts, dbs_sEnv *ep, const char *filename);
%
%dbs_sObject *dbs_OidToObject(pwr_tStatus *sts, const dbs_sEnv *ep, pwr_tOid oid);
%dbs_sObject *dbs_NameToObject(pwr_tStatus *sts, const dbs_sEnv *ep, pwr_tOid oid, char *name);
%dbs_sObject *dbs_Parent(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_After(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_Before(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_First(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_Last(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_ClassToObject(pwr_tStatus *sts, const dbs_sEnv *ep, pwr_tCid cid);
%dbs_sObject *dbs_Next(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_Previous(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_Child(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op, char *name);
%dbs_sObject *dbs_Ancestor(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
% %
% %
%#ifdef __cplusplus %#ifdef __cplusplus
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "pwr.h" #include "pwr.h"
#include "wb_orep.h" #include "wb_orep.h"
#include "wb_object.h" #include "wb_object.h"
#include "co_dbs.h"
#include "wb_name.h" #include "wb_name.h"
class wb_adef; class wb_adef;
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#include "pwr.h" #include "pwr.h"
#include "pwr_class.h" #include "pwr_class.h"
#include "co_dbs.h"
#include "wb_name.h" #include "wb_name.h"
#include "wb_orep.h" #include "wb_orep.h"
......
This diff is collapsed.
...@@ -31,6 +31,7 @@ struct sOentry { ...@@ -31,6 +31,7 @@ struct sOentry {
dbs_sBody dbody; dbs_sBody dbody;
mOentry flags; mOentry flags;
dbs_tRef ref; dbs_tRef ref;
dbs_tRef oidref;
sOentry *poep; sOentry *poep;
sOentry *boep; sOentry *boep;
...@@ -46,12 +47,14 @@ struct sOentry { ...@@ -46,12 +47,14 @@ struct sOentry {
struct sNentry { struct sNentry {
tree_sNode node; tree_sNode node;
dbs_sName n; dbs_sName n;
dbs_tRef ref;
sOentry *oep; sOentry *oep;
}; };
struct sCentry { struct sCentry {
tree_sNode node; tree_sNode node;
dbs_sClass c; dbs_sClass c;
dbs_tRef ref;
sOentry *o_lh; // Header of object list sOentry *o_lh; // Header of object list
sOentry *o_lt; // Tail of object list sOentry *o_lt; // Tail of object list
}; };
...@@ -73,9 +76,16 @@ public: ...@@ -73,9 +76,16 @@ public:
unsigned int m_warnings; unsigned int m_warnings;
unsigned int m_errors; unsigned int m_errors;
unsigned int m_nObjects;
unsigned int m_nTreeObjects;
unsigned int m_nClassObjects;
unsigned int m_nNameObjects;
unsigned int m_nRbodyObjects;
unsigned int m_nDbodyObjects;
sOentry *m_oep; /* object entry of volume object */ sOentry *m_oep; /* object entry of volume object */
tree_sTable *m_oix_th; tree_sTable *m_oid_th;
tree_sTable *m_name_th; tree_sTable *m_name_th;
tree_sTable *m_class_th; tree_sTable *m_class_th;
...@@ -92,6 +102,7 @@ public: ...@@ -92,6 +102,7 @@ public:
void buildFile(); void buildFile();
void buildSectName(); void buildSectName();
void buildSectOid();
void buildSectClass(); void buildSectClass();
void checkObject(sOentry *oep); void checkObject(sOentry *oep);
pwr_tStatus closeFile(pwr_tBoolean doDelete); pwr_tStatus closeFile(pwr_tBoolean doDelete);
...@@ -110,7 +121,7 @@ public: ...@@ -110,7 +121,7 @@ public:
pwr_tStatus writeSectDirectory(); pwr_tStatus writeSectDirectory();
pwr_tStatus writeSectVolume(); pwr_tStatus writeSectVolume();
pwr_tStatus writeSectVolref(); pwr_tStatus writeSectVolref();
pwr_tStatus writeSectOix(); pwr_tStatus writeSectOid();
pwr_tStatus writeSectObject(); pwr_tStatus writeSectObject();
pwr_tStatus writeSectRbody(); pwr_tStatus writeSectRbody();
pwr_tStatus writeSectName(); pwr_tStatus writeSectName();
......
...@@ -3,17 +3,18 @@ ...@@ -3,17 +3,18 @@
#include "wb_ldh_msg.h" #include "wb_ldh_msg.h"
#include "wb_error.h" #include "wb_error.h"
/* void *
void * wb_orepdbs::operator new(size_t size, wb_vrepdbs *v) wb_orepdbs::operator new(size_t size, wb_vrepdbs *v)
{ {
return v->newOrepDbs(size); return (void *)v->new_wb_repdbs(size);
} }
void wb_orepdbs::operator delete(size_t size, void *p, wb_vrepdbs *v) void
wb_orepdbs::operator delete(void *p, size_t size, wb_vrepdbs *v)
{ {
v->deleteOrepDbs(size, p); v->delete_wb_orepdbs(size, p);
} }
*/
wb_orepdbs::wb_orepdbs(dbs_sObject *o) wb_orepdbs::wb_orepdbs(dbs_sObject *o)
{ {
...@@ -74,44 +75,50 @@ char * const wb_orepdbs::name() ...@@ -74,44 +75,50 @@ char * const wb_orepdbs::name()
wb_orep *wb_orepdbs::after(pwr_tStatus *sts) const wb_orep *wb_orepdbs::after(pwr_tStatus *sts) const
{ {
dbs_sQlink *succ = dbs_Qsucc(sts, m_vrep->m_dbsenv, &m_o->sib_ll); return m_vrep->after(sts, (wb_orep*)this);
if (succ == 0)
return 0;
return new (m_vrep) wb_orepdbs(dbs_Qitem(succ, dbs_sObject, sib_ll));
} }
wb_orep *wb_orepdbs::before(pwr_tStatus *sts) const wb_orep *wb_orepdbs::before(pwr_tStatus *sts) const
{ {
dbs_sQlink *pred = dbs_Qpred(sts, m_vrep->m_dbsenv, &m_o->sib_ll); return m_vrep->before(sts, (wb_orep*)this);
if (pred == 0)
return 0;
return new (m_vrep) wb_orepdbs(dbs_Qitem(pred, dbs_sObject, sib_ll));
} }
wb_orep *wb_orepdbs::parent(pwr_tStatus *sts) const wb_orep *wb_orepdbs::parent(pwr_tStatus *sts) const
{ {
if (m_o->pref == dbs_cNref) { return m_vrep->parent(sts, (wb_orep*)this);
*sts = LDH__NO_PARENT; }
return 0;
} wb_orep *wb_orepdbs::first(pwr_tStatus *sts) const
{
dbs_sObject *dbs_o = (dbs_sObject*)dbs_Address(sts, m_vrep->m_dbsenv, m_o->pref); return m_vrep->first(sts, (wb_orep*)this);
if (dbs_o == 0) { }
return 0;
}
return new (m_vrep) wb_orepdbs(dbs_o); wb_orep *wb_orepdbs::child(pwr_tStatus *sts, char *name) const
{
return m_vrep->child(sts, (wb_orep*)this, name);
}
wb_orep *wb_orepdbs::last(pwr_tStatus *sts) const
{
return m_vrep->last(sts, (wb_orep*)this);
}
wb_orep *wb_orepdbs::next(pwr_tStatus *sts) const
{
return m_vrep->next(sts, (wb_orep*)this);
}
wb_orep *wb_orepdbs::previous(pwr_tStatus *sts) const
{
return m_vrep->previous(sts, (wb_orep*)this);
} }
wb_adrep *attribute(pwr_tStatus *sts) wb_adrep *wb_orepdbs::attribute(pwr_tStatus *sts)
{ {
return 0;; return 0;;
} }
wb_adrep *attribute(pwr_tStatus *sts, const char *name) wb_adrep *wb_orepdbs::attribute(pwr_tStatus *sts, const char *name)
{ {
return 0;//m_vrep->attribute(sts, cid(), name); return 0;//m_vrep->attribute(sts, cid(), name);
} }
...@@ -22,8 +22,8 @@ public: ...@@ -22,8 +22,8 @@ public:
wb_orepdbs(dbs_sObject *o); wb_orepdbs(dbs_sObject *o);
~wb_orepdbs(); ~wb_orepdbs();
// void* operator new(size_t size, wb_vrepdbs *v); void* operator new(size_t size, wb_vrepdbs *v);
// void operator delete(void *p, size_t size, wb_vrepdbs *v); void operator delete(void *p, size_t size, wb_vrepdbs *v);
virtual pwr_tOid oid() const; virtual pwr_tOid oid() const;
virtual pwr_tVid vid() const; virtual pwr_tVid vid() const;
...@@ -63,6 +63,8 @@ public: ...@@ -63,6 +63,8 @@ public:
wb_erep *erep() const { return m_vrep->erep();} wb_erep *erep() const { return m_vrep->erep();}
wb_vrep *vrep() const { return m_vrep;} wb_vrep *vrep() const { return m_vrep;}
dbs_sObject *o() const { return m_o;}
}; };
#endif #endif
...@@ -62,23 +62,23 @@ public: ...@@ -62,23 +62,23 @@ public:
virtual bool writeBody() = 0; virtual bool writeBody() = 0;
virtual wb_orep *ancestor(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *ancestor(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_orep *parent(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *parent(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_orep *after(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *after(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_orep *before(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *before(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_orep *first(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *first(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_orep *child(pwr_tStatus *sts, wb_orep *o, char *name) const = 0; virtual wb_orep *child(pwr_tStatus *sts, wb_orep *o, char *name) = 0;
virtual wb_orep *last(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *last(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_orep *next(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *next(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_orep *previous(pwr_tStatus *sts, wb_orep *o) const = 0; virtual wb_orep *previous(pwr_tStatus *sts, wb_orep *o) = 0;
virtual wb_srep *newSession() = 0; virtual wb_srep *newSession() = 0;
......
...@@ -13,18 +13,44 @@ wb_vrep *wb_vrepdbs::ref() ...@@ -13,18 +13,44 @@ wb_vrep *wb_vrepdbs::ref()
return this; return this;
} }
wb_vrepdbs::wb_vrepdbs() #if 1
wb_vrepdbs::wb_vrepdbs(const char *fileName)
{ {
pwr_tStatus sts;
dbs_sEnv *ep =dbs_Map(&sts, &m_dbsenv, fileName);
if (!ep)
ep = 0;
} }
wb_orep *wb_vrepdbs::object(pwr_tStatus *sts, pwr_tOid oid) wb_orep *wb_vrepdbs::object(pwr_tStatus *sts, pwr_tOid oid)
{ {
//wb_orepdbs *o = new wb_orepdbs(); dbs_sObject *op = dbs_OidToObject(sts, &m_dbsenv, oid);
return 0; if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::object(pwr_tStatus *sts, wb_orep *parent, wb_name name) wb_orep *wb_vrepdbs::object(pwr_tStatus *sts, wb_orep *parent, wb_name name)
{ {
#if 0
dbs_sName n;
n.poix = parent->oix();
strcpy(n.normname, name.normName(cdh_mName_object));
dbs_sName *nrp = dbs_Bfind(&sts, &m_dbsenv, m_dbs.name_bt, &n, dbs_CompName);
if (!nrp)
return 0;
dbs_Object *o = dbs_Address(&sts, &m_dbsenv, nrp->ref);
if (!o)
return 0;
return new (this) orepdbs(o);
#endif
return 0; return 0;
} }
...@@ -108,57 +134,93 @@ bool wb_vrepdbs::writeBody() ...@@ -108,57 +134,93 @@ bool wb_vrepdbs::writeBody()
} }
wb_orep *wb_vrepdbs::ancestor(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::ancestor(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_Ancestor(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::parent(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::parent(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_Parent(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::after(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::after(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_After(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::before(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::before(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_Before(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::first(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::first(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_First(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::child(pwr_tStatus *sts, wb_orep *o, char *name) const wb_orep *wb_vrepdbs::child(pwr_tStatus *sts, wb_orep *o, char *name)
{ {
return 0; dbs_sObject *op = dbs_Child(sts, &m_dbsenv, ((wb_orepdbs *)o)->o(), name);
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::last(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::last(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_Last(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::next(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::next(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_Next(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
wb_orep *wb_vrepdbs::previous(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepdbs::previous(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; dbs_sObject *op = dbs_Previous(sts, &m_dbsenv, ((wb_orepdbs *)o)->o());
if (op == 0)
return 0;
return new (this) wb_orepdbs(op);
} }
...@@ -166,3 +228,4 @@ wb_srep *wb_vrepdbs::newSession() ...@@ -166,3 +228,4 @@ wb_srep *wb_vrepdbs::newSession()
{ {
return (wb_srep*)0; return (wb_srep*)0;
} }
#endif
...@@ -16,10 +16,10 @@ public: ...@@ -16,10 +16,10 @@ public:
unsigned int m_nSession; unsigned int m_nSession;
unsigned int m_nRef; unsigned int m_nRef;
dbs_sEnv *m_dbsenv; dbs_sEnv m_dbsenv;
wb_vrepdbs(); wb_vrepdbs(const char *fileName);
virtual void unref(); virtual void unref();
virtual wb_vrep *ref(); virtual wb_vrep *ref();
...@@ -54,28 +54,31 @@ public: ...@@ -54,28 +54,31 @@ public:
virtual bool writeBody(); virtual bool writeBody();
virtual wb_orep *ancestor(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *ancestor(pwr_tStatus *sts, wb_orep *o);
virtual wb_orep *parent(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *parent(pwr_tStatus *sts, wb_orep *o);
virtual wb_orep *after(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *after(pwr_tStatus *sts, wb_orep *o);
virtual wb_orep *before(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *before(pwr_tStatus *sts, wb_orep *o);
virtual wb_orep *first(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *first(pwr_tStatus *sts, wb_orep *o);
virtual wb_orep *child(pwr_tStatus *sts, wb_orep *o, char *name) const; virtual wb_orep *child(pwr_tStatus *sts, wb_orep *o, char *name);
virtual wb_orep *last(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *last(pwr_tStatus *sts, wb_orep *o);
virtual wb_orep *next(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *next(pwr_tStatus *sts, wb_orep *o);
virtual wb_orep *previous(pwr_tStatus *sts, wb_orep *o) const; virtual wb_orep *previous(pwr_tStatus *sts, wb_orep *o);
virtual wb_srep *newSession(); virtual wb_srep *newSession();
virtual bool isLocal(wb_orep *o) const; virtual bool isLocal(wb_orep *o);
virtual pwr_tVid vid() const; virtual pwr_tVid vid() const;
wb_orepdbs *new_wb_repdbs(size_t size);
void delete_wb_orepdbs(size_t size, void *p);
}; };
#endif #endif
...@@ -927,7 +927,7 @@ wb_orep *wb_vrepwbl::object(pwr_tStatus *sts) ...@@ -927,7 +927,7 @@ wb_orep *wb_vrepwbl::object(pwr_tStatus *sts)
return orep; return orep;
} }
wb_orep *wb_vrepwbl::ancestor(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::ancestor(pwr_tStatus *sts, wb_orep *o)
{ {
wb_orepwbl *orep = 0; wb_orepwbl *orep = 0;
...@@ -941,7 +941,7 @@ wb_orep *wb_vrepwbl::ancestor(pwr_tStatus *sts, wb_orep *o) const ...@@ -941,7 +941,7 @@ wb_orep *wb_vrepwbl::ancestor(pwr_tStatus *sts, wb_orep *o) const
return orep; return orep;
} }
wb_orep *wb_vrepwbl::parent(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::parent(pwr_tStatus *sts, wb_orep *o)
{ {
wb_orepwbl *orep = 0; wb_orepwbl *orep = 0;
...@@ -955,7 +955,7 @@ wb_orep *wb_vrepwbl::parent(pwr_tStatus *sts, wb_orep *o) const ...@@ -955,7 +955,7 @@ wb_orep *wb_vrepwbl::parent(pwr_tStatus *sts, wb_orep *o) const
return orep; return orep;
} }
wb_orep *wb_vrepwbl::after(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::after(pwr_tStatus *sts, wb_orep *o)
{ {
wb_orepwbl *orep = 0; wb_orepwbl *orep = 0;
...@@ -968,7 +968,7 @@ wb_orep *wb_vrepwbl::after(pwr_tStatus *sts, wb_orep *o) const ...@@ -968,7 +968,7 @@ wb_orep *wb_vrepwbl::after(pwr_tStatus *sts, wb_orep *o) const
return orep; return orep;
} }
wb_orep *wb_vrepwbl::before(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::before(pwr_tStatus *sts, wb_orep *o)
{ {
wb_orepwbl *orep = 0; wb_orepwbl *orep = 0;
...@@ -982,7 +982,7 @@ wb_orep *wb_vrepwbl::before(pwr_tStatus *sts, wb_orep *o) const ...@@ -982,7 +982,7 @@ wb_orep *wb_vrepwbl::before(pwr_tStatus *sts, wb_orep *o) const
return orep; return orep;
} }
wb_orep *wb_vrepwbl::first(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::first(pwr_tStatus *sts, wb_orep *o)
{ {
wb_orepwbl *orep = 0; wb_orepwbl *orep = 0;
...@@ -996,12 +996,12 @@ wb_orep *wb_vrepwbl::first(pwr_tStatus *sts, wb_orep *o) const ...@@ -996,12 +996,12 @@ wb_orep *wb_vrepwbl::first(pwr_tStatus *sts, wb_orep *o) const
return orep; return orep;
} }
wb_orep *wb_vrepwbl::child(pwr_tStatus *sts, wb_orep *o, char *name) const wb_orep *wb_vrepwbl::child(pwr_tStatus *sts, wb_orep *o, char *name)
{ {
return 0; return 0;
} }
wb_orep *wb_vrepwbl::last(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::last(pwr_tStatus *sts, wb_orep *o)
{ {
wb_orepwbl *orep = 0; wb_orepwbl *orep = 0;
...@@ -1017,12 +1017,12 @@ wb_orep *wb_vrepwbl::last(pwr_tStatus *sts, wb_orep *o) const ...@@ -1017,12 +1017,12 @@ wb_orep *wb_vrepwbl::last(pwr_tStatus *sts, wb_orep *o) const
return orep; return orep;
} }
wb_orep *wb_vrepwbl::next(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::next(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; return 0;
} }
wb_orep *wb_vrepwbl::previous(pwr_tStatus *sts, wb_orep *o) const wb_orep *wb_vrepwbl::previous(pwr_tStatus *sts, wb_orep *o)
{ {
return 0; return 0;
} }
......
...@@ -150,23 +150,23 @@ public: ...@@ -150,23 +150,23 @@ public:
bool writeBody() {return false;}; bool writeBody() {return false;};
wb_orep *ancestor(pwr_tStatus *sts, wb_orep *o) const; wb_orep *ancestor(pwr_tStatus *sts, wb_orep *o);
wb_orep *parent(pwr_tStatus *sts, wb_orep *o) const; wb_orep *parent(pwr_tStatus *sts, wb_orep *o);
wb_orep *after(pwr_tStatus *sts, wb_orep *o) const; wb_orep *after(pwr_tStatus *sts, wb_orep *o);
wb_orep *before(pwr_tStatus *sts, wb_orep *o) const; wb_orep *before(pwr_tStatus *sts, wb_orep *o);
wb_orep *first(pwr_tStatus *sts, wb_orep *o) const; wb_orep *first(pwr_tStatus *sts, wb_orep *o);
wb_orep *child(pwr_tStatus *sts, wb_orep *o, char *name) const; wb_orep *child(pwr_tStatus *sts, wb_orep *o, char *name);
wb_orep *last(pwr_tStatus *sts, wb_orep *o) const; wb_orep *last(pwr_tStatus *sts, wb_orep *o);
wb_orep *next(pwr_tStatus *sts, wb_orep *o) const; wb_orep *next(pwr_tStatus *sts, wb_orep *o);
wb_orep *previous(pwr_tStatus *sts, wb_orep *o) const; wb_orep *previous(pwr_tStatus *sts, wb_orep *o);
wb_srep *newSession() {return 0;}; wb_srep *newSession() {return 0;};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment