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
d24baefa
Commit
d24baefa
authored
Feb 06, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
f3182024
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
111 additions
and
17 deletions
+111
-17
wb/lib/wb/src/wb_attribute.cpp
wb/lib/wb/src/wb_attribute.cpp
+34
-8
wb/lib/wb/src/wb_attribute.h
wb/lib/wb/src/wb_attribute.h
+3
-8
wb/lib/wb/src/wb_cdrep.cpp
wb/lib/wb/src/wb_cdrep.cpp
+24
-0
wb/lib/wb/src/wb_cdrep.h
wb/lib/wb/src/wb_cdrep.h
+2
-1
wb/lib/wb/src/wb_object.cpp
wb/lib/wb/src/wb_object.cpp
+5
-0
wb/lib/wb/src/wb_object.h
wb/lib/wb/src/wb_object.h
+1
-0
wb/lib/wb/src/wb_orep.h
wb/lib/wb/src/wb_orep.h
+1
-0
wb/lib/wb/src/wb_orepdb.h
wb/lib/wb/src/wb_orepdb.h
+1
-0
wb/lib/wb/src/wb_orepdbs.h
wb/lib/wb/src/wb_orepdbs.h
+1
-0
wb/lib/wb/src/wb_orepwbl.cpp
wb/lib/wb/src/wb_orepwbl.cpp
+5
-0
wb/lib/wb/src/wb_orepwbl.h
wb/lib/wb/src/wb_orepwbl.h
+1
-0
wb/lib/wb/src/wb_vrepwbl.cpp
wb/lib/wb/src/wb_vrepwbl.cpp
+29
-0
wb/lib/wb/src/wb_vrepwbl.h
wb/lib/wb/src/wb_vrepwbl.h
+2
-0
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+1
-0
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+1
-0
No files found.
wb/lib/wb/src/wb_attribute.cpp
View file @
d24baefa
#include "wb_attribute.h"
#include "wb_cdrep.h"
#include "pwr.h"
wb_attribute
::
wb_attribute
()
wb_attribute
::
wb_attribute
()
:
wb_status
(
LDH__NOSUCHATTR
),
m_orep
(
0
),
m_adrep
(
0
)
{
}
wb_attribute
::
wb_attribute
(
const
wb_attribute
&
)
wb_attribute
::
wb_attribute
(
const
wb_attribute
&
x
)
:
wb_status
(
x
.
m_sts
),
m_orep
(
x
.
m_orep
),
m_adrep
(
x
.
m_adrep
)
{
if
(
m_orep
)
m_orep
->
ref
();
if
(
m_adrep
)
m_adrep
->
ref
();
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
)
:
m_orep
(
orep
),
m_sts
(
sts
)
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
)
{
m_orep
->
ref
();
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
c
onst
c
har
*
name
)
:
m_orep
(
orep
),
m_sts
(
sts
)
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
char
*
name
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
)
{
wb_cdrep
*
cdrep
=
new
wb_cdrep
(
*
orep
);
cdrep
->
ref
();
m_adrep
=
cdrep
->
adrep
(
&
m_sts
,
name
);
if
(
oddSts
())
m_adrep
->
ref
();
cdrep
->
unref
();
}
wb_attribute
&
wb_attribute
::
operator
=
(
const
wb_attribute
&
)
wb_attribute
&
wb_attribute
::
operator
=
(
const
wb_attribute
&
x
)
{
return
*
this
;
if
(
x
.
m_orep
)
x
.
m_orep
->
ref
();
if
(
x
.
m_adrep
)
x
.
m_adrep
->
ref
();
if
(
m_orep
)
m_orep
->
unref
();
if
(
m_adrep
)
m_adrep
->
unref
();
m_orep
=
x
.
m_orep
;
m_adrep
=
x
.
m_adrep
;
m_sts
=
x
.
m_sts
;
return
*
this
;
}
//
...
...
wb/lib/wb/src/wb_attribute.h
View file @
d24baefa
...
...
@@ -26,19 +26,16 @@ using namespace std;
class
wb_adrep
;
class
wb_orep
;
class
wb_attribute
class
wb_attribute
:
public
wb_status
{
public:
wb_orep
*
m_orep
;
wb_adrep
*
m_adrep
;
pwr_tStatus
m_sts
;
public:
wb_attribute
();
wb_attribute
(
const
wb_attribute
&
);
// x = other_object
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
);
// x = other orep
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
c
onst
c
har
*
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
char
*
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
wb_adrep
*
const
)
{};
wb_attribute
&
operator
=
(
const
wb_attribute
&
);
...
...
@@ -47,8 +44,6 @@ public:
operator
wb_adrep
*
()
const
;
bool
operator
==
(
wb_attribute
&
);
pwr_tStatus
sts
()
const
;
//wb_object& operator=(const wb_orep&);
pwr_tOid
aoid
();
// get objects object id
...
...
wb/lib/wb/src/wb_cdrep.cpp
View file @
d24baefa
...
...
@@ -8,6 +8,7 @@ extern "C" {
#include "co_dbs.h"
#include "wb_orepdbs.h"
#include "wb_bdrep.h"
#include "wb_adrep.h"
void
wb_cdrep
::
unref
()
{
...
...
@@ -75,3 +76,26 @@ wb_bdrep *wb_cdrep::bdrep( pwr_tStatus *sts, char *bname)
wb_bdrep
*
bdrep
=
new
wb_bdrep
(
*
orep
);
return
bdrep
;
}
wb_adrep
*
wb_cdrep
::
adrep
(
pwr_tStatus
*
sts
,
char
*
aname
)
{
wb_orepdbs
*
orep_attr
;
wb_orepdbs
*
orep
=
(
wb_orepdbs
*
)
m_orep
->
first
(
sts
);
while
(
ODD
(
*
sts
))
{
if
(
orep
->
cid
()
==
pwr_eClass_ObjBodyDef
)
{
orep_attr
=
(
wb_orepdbs
*
)
orep
->
m_vrep
->
child
(
sts
,
orep
,
aname
);
if
(
ODD
(
*
sts
))
{
wb_adrep
*
adrep
=
new
wb_adrep
(
*
orep
);
return
adrep
;
}
}
orep_attr
=
(
wb_orepdbs
*
)
orep_attr
->
next
(
sts
);
}
return
0
;
}
wb_name
wb_cdrep
::
name
()
{
wb_name
n
=
wb_name
(
m_orep
->
name
());
return
n
;
}
wb/lib/wb/src/wb_cdrep.h
View file @
d24baefa
...
...
@@ -36,12 +36,13 @@ class wb_cdrep
pwr_tCid
cid
()
{
return
0
;}
// Fix
wb_name
name
()
{
wb_name
n
;
return
n
;}
// Fix
get class name
wb_name
name
()
;
//
get class name
wb_name
name
(
ldh_eName
type
)
{
wb_name
n
;
return
n
;}
// Fix
void
name
(
const
char
*
name
);
void
name
(
wb_name
*
name
);
wb_bdrep
*
bdrep
(
pwr_tStatus
*
sts
,
char
*
bname
);
wb_adrep
*
adrep
(
pwr_tStatus
*
sts
,
char
*
aname
);
pwr_tStatus
sts
()
{
return
m_sts
;}
};
...
...
wb/lib/wb/src/wb_object.cpp
View file @
d24baefa
...
...
@@ -93,6 +93,11 @@ char *wb_object::name()
return
m_orep
->
name
();
}
char
*
wb_object
::
name
(
int
type
)
{
return
m_orep
->
name
(
type
);
}
//
// Get next object of same class
//
...
...
wb/lib/wb/src/wb_object.h
View file @
d24baefa
...
...
@@ -61,6 +61,7 @@ public:
pwr_tOix
aoix
();
//< Object index of object after this object
char
*
name
();
char
*
name
(
int
type
);
pwr_tTime
ohTime
();
//< time when this object was last changed
pwr_tTime
rbTime
();
//< time when run time body of this object was last changed
...
...
wb/lib/wb/src/wb_orep.h
View file @
d24baefa
...
...
@@ -38,6 +38,7 @@ public:
virtual
pwr_tOid
aoid
()
const
=
0
;
virtual
char
*
const
name
()
=
0
;
virtual
char
*
const
name
(
int
type
)
=
0
;
virtual
pwr_tTime
ohTime
()
const
=
0
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
=
0
;
...
...
wb/lib/wb/src/wb_orepdb.h
View file @
d24baefa
...
...
@@ -56,6 +56,7 @@ public:
virtual
pwr_tOid
aoid
()
const
;
virtual
char
*
const
name
();
virtual
char
*
const
name
(
int
type
)
{
return
0
;}
virtual
pwr_tTime
ohTime
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_orepdbs.h
View file @
d24baefa
...
...
@@ -35,6 +35,7 @@ public:
virtual
pwr_tOid
aoid
()
const
;
virtual
char
*
const
name
();
virtual
char
*
const
name
(
int
type
)
{
return
0
;}
virtual
pwr_tTime
ohTime
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_orepwbl.cpp
View file @
d24baefa
...
...
@@ -72,6 +72,11 @@ char *const wb_orepwbl::name()
return
m_wblnode
->
name
;
}
char
*
const
wb_orepwbl
::
name
(
int
type
)
{
return
m_wblnode
->
name
;
// Fix
}
pwr_tTime
wb_orepwbl
::
ohTime
()
const
{
...
...
wb/lib/wb/src/wb_orepwbl.h
View file @
d24baefa
...
...
@@ -33,6 +33,7 @@ public:
virtual
pwr_tOid
aoid
()
const
;
virtual
char
*
const
name
();
virtual
char
*
const
name
(
int
type
);
virtual
pwr_tTime
ohTime
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_vrepwbl.cpp
View file @
d24baefa
...
...
@@ -1010,4 +1010,33 @@ wb_orep *wb_vrepwbl::previous(pwr_tStatus *sts, wb_orep *o) const
return
0
;
}
void
wb_vrepwbl
::
objectName
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
char
*
str
)
const
{
*
str
=
0
;
// Count ancestors
int
cnt
=
0
;
wb_wblnode
*
n
=
((
wb_orepwbl
*
)
o
)
->
wblNode
();
while
(
n
)
{
cnt
++
;
n
=
n
->
o_fth
;
}
wb_wblnode
**
vect
=
(
wb_wblnode
**
)
calloc
(
cnt
,
sizeof
(
vect
));
n
=
((
wb_orepwbl
*
)
o
)
->
wblNode
();
for
(
int
i
=
0
;
i
<
cnt
;
i
++
)
{
vect
[
i
]
=
n
;
n
=
n
->
o_fth
;
}
for
(
int
i
=
cnt
-
1
;
i
>=
0
;
i
--
)
{
strcat
(
str
,
vect
[
i
]
->
name
);
if
(
i
==
cnt
-
1
)
strcat
(
str
,
":"
);
else
if
(
i
!=
0
)
strcat
(
str
,
"-"
);
}
free
(
vect
);
}
wb/lib/wb/src/wb_vrepwbl.h
View file @
d24baefa
...
...
@@ -172,6 +172,8 @@ public:
bool
isLocal
(
wb_orep
*
o
)
const
{
return
false
;};
void
objectName
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
char
*
str
)
const
;
};
#endif
...
...
wb/lib/wb/src/wb_wblnode.cpp
View file @
d24baefa
...
...
@@ -913,6 +913,7 @@ void wb_wblnode::registerNode( wb_vrepwbl *vol)
else
setFirstChild
(
(
RefAST
)
c_template
);
strcpy
(
c_template
->
cname
,
name
);
c_template
->
m_oid
.
oix
=
m_vrep
->
nextOix
();
c_template
->
m_cid
=
c_cid
;
c_template
->
node_type
=
wbl_eNodeType_Template
;
}
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
d24baefa
...
...
@@ -3453,6 +3453,7 @@ static int wnav_create_func( void *client_data,
wb_vrepwbl
*
wbl
=
new
wb_vrepwbl
(
erep
);
wbl
->
load
(
filestr
);
wbl
->
createSnapshot
(
outstr
);
delete
wbl
;
}
catch
(
wb_error
&
e
)
{
sts
=
e
.
sts
();
...
...
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