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
b4c01e7f
Commit
b4c01e7f
authored
Feb 19, 2003
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
3f1bece2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
11 deletions
+40
-11
wb/lib/wb/src/wb_attribute.cpp
wb/lib/wb/src/wb_attribute.cpp
+16
-7
wb/lib/wb/src/wb_attribute.h
wb/lib/wb/src/wb_attribute.h
+2
-2
wb/lib/wb/src/wb_name.cpp
wb/lib/wb/src/wb_name.cpp
+3
-0
wb/lib/wb/src/wb_name.h
wb/lib/wb/src/wb_name.h
+19
-2
No files found.
wb/lib/wb/src/wb_attribute.cpp
View file @
b4c01e7f
...
...
@@ -4,6 +4,9 @@
#include "wb_attrname.h"
#include "pwr.h"
static
const
char
*
s_emptyString
=
""
;
wb_attribute
::
wb_attribute
()
:
wb_status
(
LDH__NOSUCHATTR
),
m_orep
(
0
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
...
...
@@ -48,8 +51,9 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep * const orep, wb_adrep * con
m_adrep
->
ref
();
m_size
=
m_adrep
->
size
();
m_offset
=
m_adrep
->
offset
();
m_type
=
m_adrep
->
type
();
m_tid
=
m_adrep
->
tid
();
m_elements
=
m_adrep
->
nElement
();
m_type
=
m_adrep
->
type
();
m_flags
=
m_adrep
->
flags
();
}
else
{
...
...
@@ -142,6 +146,7 @@ wb_attribute& wb_attribute::operator=(const wb_attribute& x)
m_size
=
x
.
m_size
;
m_offset
=
x
.
m_offset
;
m_tid
=
x
.
m_tid
;
m_elements
=
x
.
m_elements
;
m_type
=
x
.
m_type
;
m_flags
=
x
.
m_flags
;
return
*
this
;
...
...
@@ -299,16 +304,20 @@ wb_attribute wb_attribute::prev()
return
a
;
}
wb_name
wb_attribute
::
name
()
const
char
*
wb_attribute
::
name
()
const
{
wb_name
n
;
return
n
;
if
(
m_adrep
)
return
m_adrep
->
name
();
else
return
s_emptyString
;
}
wb_name
wb_attribute
::
name
(
ldh_eName
type
)
wb_name
wb_attribute
::
longName
(
)
{
wb_name
n
;
return
n
;
if
(
m_adrep
)
return
m_adrep
->
longName
();
else
return
wb_name
();
}
void
wb_attribute
::
name
(
const
char
*
name
)
...
...
wb/lib/wb/src/wb_attribute.h
View file @
b4c01e7f
...
...
@@ -84,8 +84,8 @@ public:
wb_attribute
prev
();
wb_name
name
()
;
// get attribute name
wb_name
name
(
ldh_eName
type
);
const
char
*
name
()
const
;
// get attribute name
wb_name
longName
(
);
void
name
(
const
char
*
name
);
void
name
(
wb_name
*
name
);
...
...
wb/lib/wb/src/wb_name.cpp
View file @
b4c01e7f
#include "wb_name.h"
const
char
*
wb_name
::
m_emptyString
=
""
;
wb_name
::
wb_name
(
const
char
*
name
)
{
...
...
wb/lib/wb/src/wb_name.h
View file @
b4c01e7f
...
...
@@ -97,7 +97,7 @@ class wb_name : public wb_status
{
protected:
wb_nrep
*
m_nrep
;
static
const
char
*
m_emptyString
;
public:
wb_name
()
:
wb_status
(
LDH__NONAME
),
m_nrep
(
0
)
{}
...
...
@@ -107,7 +107,7 @@ public:
~
wb_name
();
const
char
*
c_str
()
const
{
return
m_nrep
->
name
();}
const
char
*
c_str
()
const
;
wb_name
&
operator
=
(
const
wb_name
&
n
);
...
...
@@ -158,6 +158,23 @@ public:
void
check
()
const
{
if
(
evenSts
())
throw
wb_error
(
m_sts
);}
};
inline
const
char
*
wb_name
::
c_str
()
const
{
if
(
m_nrep
==
0
)
return
m_emptyString
;
else
return
m_nrep
->
name
();
}
inline
ostream
&
operator
<<
(
ostream
&
os
,
const
wb_name
&
name
)
{
return
os
<<
name
.
c_str
();
}
#endif
...
...
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