Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
673dac28
Commit
673dac28
authored
Apr 22, 2004
by
lw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dumping a Db to wbload file did not work.
parent
1c7cda1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
13 deletions
+32
-13
wb/lib/wb/src/wb_attribute.cpp
wb/lib/wb/src/wb_attribute.cpp
+27
-9
wb/lib/wb/src/wb_attribute.h
wb/lib/wb/src/wb_attribute.h
+5
-4
No files found.
wb/lib/wb/src/wb_attribute.cpp
View file @
673dac28
...
...
@@ -10,14 +10,14 @@
wb_attribute
::
wb_attribute
()
:
wb_status
(
LDH__NOSUCHATTR
),
m_orep
(
0
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_idx
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
,
m_body
(
0
)
{
}
wb_attribute
::
wb_attribute
(
const
wb_attribute
&
x
)
:
wb_status
(
x
.
m_sts
),
m_orep
(
x
.
m_orep
),
m_adrep
(
x
.
m_adrep
),
m_size
(
x
.
m_size
),
m_offset
(
x
.
m_offset
)
,
m_idx
(
x
.
m_idx
),
m_tid
(
x
.
m_tid
),
m_elements
(
x
.
m_elements
),
m_type
(
x
.
m_type
),
m_flags
(
x
.
m_flags
),
m_bix
(
x
.
m_bix
)
m_flags
(
x
.
m_flags
),
m_bix
(
x
.
m_bix
)
,
m_body
(
0
)
{
if
(
m_orep
)
m_orep
->
ref
();
...
...
@@ -27,7 +27,7 @@ wb_attribute::wb_attribute(const wb_attribute& x) :
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_idx
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
,
m_body
(
0
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -40,7 +40,7 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep * orep) :
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
,
wb_adrep
*
adrep
,
int
idx
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
adrep
),
m_size
(
0
),
m_offset
(
0
),
m_idx
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
,
m_body
(
0
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -95,7 +95,7 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep* orep, wb_adrep* adrep, int
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
,
const
char
*
bname
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_idx
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
,
m_body
(
0
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -119,7 +119,7 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep* orep, const char *bname) :
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
,
const
char
*
bname
,
const
char
*
aname
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_idx
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
,
m_body
(
0
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -164,7 +164,7 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep* orep, const char *bname, co
wb_attribute
::
wb_attribute
(
const
wb_attribute
&
pa
,
int
idx
,
const
char
*
aname
)
:
wb_status
(
LDH__NOSUCHATTR
),
m_orep
(
0
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
,
m_body
(
0
)
{
pwr_tCid
cid
;
wb_attrname
n
;
...
...
@@ -246,6 +246,11 @@ wb_attribute::~wb_attribute()
m_adrep
=
0
;
}
if
(
m_body
)
{
//printf("a: %8.8x free\n", m_body);
free
(
m_body
);
}
}
bool
wb_attribute
::
operator
==
(
const
wb_attribute
&
x
)
const
...
...
@@ -279,6 +284,11 @@ wb_attribute& wb_attribute::operator=(const wb_attribute& x)
m_type
=
x
.
m_type
;
m_flags
=
x
.
m_flags
;
m_bix
=
x
.
m_bix
;
if
(
m_body
)
{
//printf("a: %8.8x free ==\n", m_body);
free
(
m_body
);
}
m_body
=
0
;
return
*
this
;
}
...
...
@@ -432,12 +442,20 @@ pwr_sObjXRef *wb_attribute::oxref() const
return
(
pwr_sObjXRef
*
)
0
;
// Fix
}
void
*
wb_attribute
::
value
(
void
*
p
)
const
void
*
wb_attribute
::
value
(
void
*
p
)
{
pwr_eBix
bix
;
pwr_tStatus
sts
;
check
();
if
(
!
p
)
{
if
(
!
m_body
)
{
m_body
=
(
void
*
)
calloc
(
1
,
m_size
);
//printf("a: %8.8x alloc\n", m_body);
}
p
=
m_body
;
}
if
(
m_adrep
==
0
)
{
if
(
m_bix
==
pwr_eBix_dev
)
return
m_orep
->
vrep
()
->
readBody
(
&
sts
,
m_orep
,
pwr_eBix_dev
,
p
);
...
...
@@ -453,7 +471,7 @@ void *wb_attribute::value( void *p) const
return
m_orep
->
vrep
()
->
readAttribute
(
&
sts
,
m_orep
,
bix
,
m_offset
,
m_size
,
p
);
}
void
*
wb_attribute
::
value
(
void
*
vp
,
size_t
size
,
pwr_tStatus
*
sts
)
const
void
*
wb_attribute
::
value
(
void
*
vp
,
size_t
size
,
pwr_tStatus
*
sts
)
{
return
0
;
}
...
...
wb/lib/wb/src/wb_attribute.h
View file @
673dac28
...
...
@@ -37,8 +37,9 @@ class wb_attribute : public wb_status
int
m_elements
;
pwr_eType
m_type
;
int
m_flags
;
pwr_eBix
m_bix
;
// Used when sub class
void
*
m_body
;
public:
wb_attribute
();
...
...
@@ -55,7 +56,7 @@ public:
operator
wb_orep
*
()
const
{
return
m_orep
;}
bool
operator
==
(
const
wb_attribute
&
)
const
;
//wb_object& operator=(const wb_orep&);
bool
isClass
()
const
{
return
(
m_flags
&
PWR_MASK_CLASS
||
m_flags
&
PWR_MASK_BUFFER
);}
...
...
@@ -81,8 +82,8 @@ public:
pwr_sObjXRef
*
oxref
()
const
;
pwr_tCid
subClass
()
const
;
void
*
value
(
void
*
p
=
0
)
const
;
void
*
value
(
void
*
vp
,
size_t
size
,
pwr_tStatus
*
)
const
;
void
*
value
(
void
*
p
=
0
);
void
*
value
(
void
*
vp
,
size_t
size
,
pwr_tStatus
*
);
string
toString
()
const
;
pwr_tStatus
fromString
(
string
)
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment