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
195c155c
Commit
195c155c
authored
Sep 06, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ohTime, rbTime and dbTime in wb_load files and orep, classversion modified
parent
0f3466cd
Changes
46
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
1522 additions
and
511 deletions
+1522
-511
wb/lib/wb/src/wb_bdrep.cpp
wb/lib/wb/src/wb_bdrep.cpp
+6
-1
wb/lib/wb/src/wb_bdrep.h
wb/lib/wb/src/wb_bdrep.h
+2
-2
wb/lib/wb/src/wb_cdrep.cpp
wb/lib/wb/src/wb_cdrep.cpp
+32
-1
wb/lib/wb/src/wb_cdrep.h
wb/lib/wb/src/wb_cdrep.h
+4
-1
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+13
-1
wb/lib/wb/src/wb_ldh.h
wb/lib/wb/src/wb_ldh.h
+8
-1
wb/lib/wb/src/wb_merep.cpp
wb/lib/wb/src/wb_merep.cpp
+9
-2
wb/lib/wb/src/wb_object.cpp
wb/lib/wb/src/wb_object.cpp
+29
-1
wb/lib/wb/src/wb_object.h
wb/lib/wb/src/wb_object.h
+4
-2
wb/lib/wb/src/wb_orep.cpp
wb/lib/wb/src/wb_orep.cpp
+37
-1
wb/lib/wb/src/wb_orep.h
wb/lib/wb/src/wb_orep.h
+7
-1
wb/lib/wb/src/wb_orepdb.cpp
wb/lib/wb/src/wb_orepdb.cpp
+16
-2
wb/lib/wb/src/wb_orepdb.h
wb/lib/wb/src/wb_orepdb.h
+4
-1
wb/lib/wb/src/wb_orepdbs.cpp
wb/lib/wb/src/wb_orepdbs.cpp
+11
-1
wb/lib/wb/src/wb_orepdbs.h
wb/lib/wb/src/wb_orepdbs.h
+4
-1
wb/lib/wb/src/wb_orepext.cpp
wb/lib/wb/src/wb_orepext.cpp
+12
-3
wb/lib/wb/src/wb_orepext.h
wb/lib/wb/src/wb_orepext.h
+4
-1
wb/lib/wb/src/wb_orepmem.cpp
wb/lib/wb/src/wb_orepmem.cpp
+12
-3
wb/lib/wb/src/wb_orepmem.h
wb/lib/wb/src/wb_orepmem.h
+4
-1
wb/lib/wb/src/wb_orepref.h
wb/lib/wb/src/wb_orepref.h
+4
-1
wb/lib/wb/src/wb_orepwbl.cpp
wb/lib/wb/src/wb_orepwbl.cpp
+14
-2
wb/lib/wb/src/wb_orepwbl.h
wb/lib/wb/src/wb_orepwbl.h
+4
-1
wb/lib/wb/src/wb_print_wbl.cpp
wb/lib/wb/src/wb_print_wbl.cpp
+30
-3
wb/lib/wb/src/wb_print_wbl.h
wb/lib/wb/src/wb_print_wbl.h
+2
-1
wb/lib/wb/src/wb_vrep.h
wb/lib/wb/src/wb_vrep.h
+3
-1
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+31
-1
wb/lib/wb/src/wb_vrepdb.h
wb/lib/wb/src/wb_vrepdb.h
+3
-1
wb/lib/wb/src/wb_vrepdbs.cpp
wb/lib/wb/src/wb_vrepdbs.cpp
+11
-1
wb/lib/wb/src/wb_vrepdbs.h
wb/lib/wb/src/wb_vrepdbs.h
+3
-1
wb/lib/wb/src/wb_vrepext.h
wb/lib/wb/src/wb_vrepext.h
+4
-2
wb/lib/wb/src/wb_vrepmem.cpp
wb/lib/wb/src/wb_vrepmem.cpp
+47
-3
wb/lib/wb/src/wb_vrepmem.h
wb/lib/wb/src/wb_vrepmem.h
+13
-3
wb/lib/wb/src/wb_vrepref.h
wb/lib/wb/src/wb_vrepref.h
+4
-2
wb/lib/wb/src/wb_vrepwbl.h
wb/lib/wb/src/wb_vrepwbl.h
+4
-2
wb/lib/wb/src/wb_wbllexer.cpp
wb/lib/wb/src/wb_wbllexer.cpp
+824
-328
wb/lib/wb/src/wb_wbllexer.g
wb/lib/wb/src/wb_wbllexer.g
+8
-0
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+45
-6
wb/lib/wb/src/wb_wblnode.h
wb/lib/wb/src/wb_wblnode.h
+14
-4
wb/lib/wb/src/wb_wblparser.cpp
wb/lib/wb/src/wb_wblparser.cpp
+116
-69
wb/lib/wb/src/wb_wblparser.g
wb/lib/wb/src/wb_wblparser.g
+3
-3
wb/lib/wb/src/wb_wblparserTokenTypes.hpp
wb/lib/wb/src/wb_wblparserTokenTypes.hpp
+12
-11
wb/lib/wb/src/wb_wblparserTokenTypes.txt
wb/lib/wb/src/wb_wblparserTokenTypes.txt
+12
-11
wb/lib/wb/src/wb_wblvocabTokenTypes.hpp
wb/lib/wb/src/wb_wblvocabTokenTypes.hpp
+12
-11
wb/lib/wb/src/wb_wblvocabTokenTypes.txt
wb/lib/wb/src/wb_wblvocabTokenTypes.txt
+12
-11
wb/lib/wb/src/wb_wnav_item.cpp
wb/lib/wb/src/wb_wnav_item.cpp
+54
-3
wb/lib/wb/src/wb_wnav_item.h
wb/lib/wb/src/wb_wnav_item.h
+15
-2
No files found.
wb/lib/wb/src/wb_bdrep.cpp
View file @
195c155c
/**
* Proview $Id: wb_bdrep.cpp,v 1.1
5 2005-09-01 14:57:57
claes Exp $
* Proview $Id: wb_bdrep.cpp,v 1.1
6 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -298,3 +298,8 @@ wb_name wb_bdrep::longName() const
{
return
m_orep
->
longName
();
}
pwr_tTime
wb_bdrep
::
modTime
()
{
return
m_orep
->
treeModTime
();
}
wb/lib/wb/src/wb_bdrep.h
View file @
195c155c
/**
* Proview $Id: wb_bdrep.h,v 1.1
2 2005-09-01 14:57:57
claes Exp $
* Proview $Id: wb_bdrep.h,v 1.1
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -58,7 +58,7 @@ public:
wb_adrep
*
super
(
pwr_tStatus
*
sts
);
pwr_tStatus
sts
()
{
return
m_sts
;}
pwr_tTime
modTime
();
};
...
...
wb/lib/wb/src/wb_cdrep.cpp
View file @
195c155c
/**
* Proview $Id: wb_cdrep.cpp,v 1.2
5 2005-09-01 14:57:57
claes Exp $
* Proview $Id: wb_cdrep.cpp,v 1.2
6 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -18,6 +18,7 @@
**/
#include "co_cdh.h"
#include "co_time.h"
#include "wb_cdrep.h"
#include "wb_erep.h"
#include "wb_merep.h"
...
...
@@ -450,6 +451,32 @@ pwr_tTime wb_cdrep::ohTime()
return
m_orep
->
ohTime
();
}
pwr_tTime
wb_cdrep
::
modTime
()
{
return
m_orep
->
treeModTime
();
}
pwr_tTime
wb_cdrep
::
structModTime
()
{
pwr_tStatus
sts
;
pwr_tTime
t
=
m_orep
->
modTime
();
wb_bdrep
*
rbd
=
bdrep
(
&
sts
,
pwr_eBix_rt
);
if
(
ODD
(
sts
))
{
pwr_tTime
rbt
=
rbd
->
modTime
();
if
(
time_Acomp
(
&
rbt
,
&
t
)
==
1
)
t
=
rbt
;
delete
rbd
;
}
wb_bdrep
*
dbd
=
bdrep
(
&
sts
,
pwr_eBix_dev
);
if
(
ODD
(
sts
))
{
pwr_tTime
dbt
=
dbd
->
modTime
();
if
(
time_Acomp
(
&
dbt
,
&
t
)
==
1
)
t
=
dbt
;
}
return
t
;
}
wb_cdrep
*
wb_cdrep
::
super
(
pwr_tStatus
*
sts
)
{
wb_bdrep
*
bd
=
bdrep
(
sts
,
pwr_eBix_rt
);
...
...
@@ -759,5 +786,9 @@ void wb_cdrep::updateTemplate( pwr_eBix bix, void *b, pwr_tOid oid, pwr_tOid toi
delete
bd
;
}
ldh_eVolRep
wb_cdrep
::
vtype
()
const
{
return
m_orep
->
vtype
();
}
wb/lib/wb/src/wb_cdrep.h
View file @
195c155c
/**
* Proview $Id: wb_cdrep.h,v 1.
19 2005-09-01 14:57:57
claes Exp $
* Proview $Id: wb_cdrep.h,v 1.
20 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -76,6 +76,8 @@ public:
wb_orep
*
menuFirst
(
pwr_tStatus
*
sts
,
wb_orep
*
orep
,
void
**
o
);
pwr_tTime
ohTime
();
pwr_tTime
modTime
();
pwr_tTime
structModTime
();
void
convertSubClass
(
pwr_tCid
cid
,
wb_merep
*
merep
,
void
*
body_source
,
void
*
body_target
);
void
convertObject
(
wb_merep
*
merep
,
void
*
rbody
,
void
*
dbody
,
...
...
@@ -86,6 +88,7 @@ public:
pwr_tOid
toid
);
void
updateTemplate
(
pwr_eBix
bix
,
void
*
b
,
pwr_tOid
oid
,
pwr_tOid
toid
);
pwr_tStatus
sts
()
{
return
m_sts
;}
ldh_eVolRep
vtype
()
const
;
};
#endif
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
195c155c
/**
* Proview $Id: wb_ldh.cpp,v 1.4
3 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_ldh.cpp,v 1.4
4 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2055,6 +2055,17 @@ ldh_GetSubClass(ldh_tSession session, pwr_tCid supercid, pwr_tCid subcid, pwr_tC
return
sp
->
sts
();
}
pwr_tStatus
ldh_GetModTime
(
ldh_tSession
session
,
pwr_tOid
oid
,
pwr_tTime
*
time
)
{
wb_session
*
sp
=
(
wb_session
*
)
session
;
wb_object
o
=
sp
->
object
(
oid
);
if
(
!
o
)
return
o
.
sts
();
*
time
=
o
.
modTime
();
return
o
.
sts
();
}
#endif
...
...
@@ -2062,3 +2073,4 @@ ldh_GetSubClass(ldh_tSession session, pwr_tCid supercid, pwr_tCid subcid, pwr_tC
wb/lib/wb/src/wb_ldh.h
View file @
195c155c
/**
* Proview $Id: wb_ldh.h,v 1.2
5 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_ldh.h,v 1.2
6 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1175,6 +1175,13 @@ ldh_GetSubClass(
pwr_tCid
*
nextsubcid
);
pwr_tStatus
ldh_GetModTime
(
ldh_tSession
session
,
pwr_tOid
oid
,
pwr_tTime
*
time
);
#ifdef __cplusplus
}
#endif
...
...
wb/lib/wb/src/wb_merep.cpp
View file @
195c155c
/**
* Proview $Id: wb_merep.cpp,v 1.
29 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_merep.cpp,v 1.
30 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -364,6 +364,13 @@ void wb_merep::classVersion( pwr_tStatus *sts, pwr_tCid cid, pwr_tTime *time)
wb_cdrep
*
cd
=
cdrep
(
sts
,
cid
);
if
(
!
cd
)
return
;
if
(
cd
->
vtype
()
==
ldh_eVolRep_Dbs
)
{
// ohTime contains class version for a class in vrepdbs
*
time
=
cd
->
ohTime
();
*
sts
=
LDH__SUCCESS
;
return
;
}
wb_bdrep
*
bd
=
cd
->
bdrep
(
sts
,
pwr_eBix_rt
);
if
(
!
bd
)
{
delete
cd
;
...
...
@@ -375,7 +382,7 @@ void wb_merep::classVersion( pwr_tStatus *sts, pwr_tCid cid, pwr_tTime *time)
return
;
}
*
time
=
cd
->
oh
Time
();
*
time
=
cd
->
structMod
Time
();
wb_adrep
*
ad
,
*
oad
;
for
(
ad
=
bd
->
adrep
(
sts
);
ad
;)
{
...
...
wb/lib/wb/src/wb_object.cpp
View file @
195c155c
/**
* Proview $Id: wb_object.cpp,v 1.1
3 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_object.cpp,v 1.1
4 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -290,6 +290,34 @@ pwr_tTime wb_object::ohTime()
return
m_orep
->
ohTime
();
}
pwr_tTime
wb_object
::
rbTime
()
{
check
();
return
m_orep
->
rbTime
();
}
pwr_tTime
wb_object
::
dbTime
()
{
check
();
return
m_orep
->
dbTime
();
}
pwr_tTime
wb_object
::
modTime
()
{
check
();
return
m_orep
->
modTime
();
}
pwr_tTime
wb_object
::
treeModTime
()
{
check
();
return
m_orep
->
treeModTime
();
}
pwr_mClassDef
wb_object
::
flags
()
{
check
();
...
...
wb/lib/wb/src/wb_object.h
View file @
195c155c
/**
* Proview $Id: wb_object.h,v 1.1
2 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_object.h,v 1.1
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -82,9 +82,11 @@ public:
const
char
*
name
();
wb_name
longName
();
pwr_tTime
ohTime
();
//< time when this object was last changed
pwr_tTime
ohTime
();
//< time when
header of
this object was last changed
pwr_tTime
rbTime
();
//< time when run time body of this object was last changed
pwr_tTime
dbTime
();
//< time when development body of this object was last changed
pwr_tTime
modTime
();
//< time when this object was last changed
pwr_tTime
treeModTime
();
//< time when this object or any ancestor was last changed
pwr_mClassDef
flags
();
...
...
wb/lib/wb/src/wb_orep.cpp
View file @
195c155c
/**
* Proview $Id: wb_orep.cpp,v 1.
5 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orep.cpp,v 1.
6 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -18,6 +18,7 @@
**/
#include "wb_orep.h"
#include "co_time.h"
wb_orep
::
wb_orep
()
:
m_nRef
(
0
)
{
...
...
@@ -37,3 +38,38 @@ wb_orep *wb_orep::ref()
m_nRef
++
;
return
this
;
}
pwr_tTime
wb_orep
::
modTime
()
{
pwr_tTime
t
=
ohTime
();
pwr_tTime
rbt
=
rbTime
();
pwr_tTime
dbt
=
dbTime
();
if
(
time_Acomp
(
&
rbt
,
&
t
)
==
1
)
t
=
rbt
;
if
(
time_Acomp
(
&
dbt
,
&
rbt
)
==
1
)
t
=
dbt
;
return
t
;
}
pwr_tTime
wb_orep
::
treeModTime
()
{
pwr_tStatus
sts
;
pwr_tTime
t
=
modTime
();
pwr_tTime
tchild
;
wb_orep
*
after
;
for
(
wb_orep
*
child
=
first
(
&
sts
);
ODD
(
sts
);
child
=
after
)
{
child
->
ref
();
tchild
=
child
->
treeModTime
();
if
(
time_Acomp
(
&
tchild
,
&
t
)
==
1
)
t
=
tchild
;
after
=
child
->
after
(
&
sts
);
child
->
unref
();
}
return
t
;
}
wb/lib/wb/src/wb_orep.h
View file @
195c155c
/**
* Proview $Id: wb_orep.h,v 1.1
2 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orep.h,v 1.1
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -62,6 +62,8 @@ public:
virtual
const
char
*
name
()
const
=
0
;
virtual
wb_name
longName
()
=
0
;
virtual
pwr_tTime
ohTime
()
const
=
0
;
virtual
pwr_tTime
rbTime
()
const
=
0
;
virtual
pwr_tTime
dbTime
()
const
=
0
;
virtual
pwr_mClassDef
flags
()
const
=
0
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
=
0
;
...
...
@@ -85,6 +87,10 @@ public:
virtual
wb_erep
*
erep
()
const
=
0
;
virtual
wb_vrep
*
vrep
()
const
=
0
;
virtual
ldh_eVolRep
vtype
()
const
=
0
;
pwr_tTime
modTime
();
pwr_tTime
treeModTime
();
};
#endif
wb/lib/wb/src/wb_orepdb.cpp
View file @
195c155c
/**
* Proview $Id: wb_orepdb.cpp,v 1.
9 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepdb.cpp,v 1.
10 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -129,10 +129,24 @@ const char * wb_orepdb::name() const
pwr_tTime
wb_orepdb
::
ohTime
()
const
{
pwr_tStatus
sts
;
return
m_vrep
->
ohTime
(
&
sts
,
(
wb_orep
*
)
this
);
}
pwr_tTime
wb_orepdb
::
rbTime
()
const
{
pwr_tStatus
sts
;
return
m_vrep
->
rbTime
(
&
sts
,
(
wb_orep
*
)
this
);
}
pwr_tTime
wb_orepdb
::
dbTime
()
const
{
pwr_tStatus
sts
;
return
m_vrep
->
dbTime
(
&
sts
,
(
wb_orep
*
)
this
);
}
pwr_mClassDef
wb_orepdb
::
flags
()
const
{
pwr_tStatus
sts
;
...
...
wb/lib/wb/src/wb_orepdb.h
View file @
195c155c
/**
* Proview $Id: wb_orepdb.h,v 1.1
0 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepdb.h,v 1.1
1 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -55,6 +55,8 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_tTime
rbTime
()
const
;
virtual
pwr_tTime
dbTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
@@ -76,6 +78,7 @@ public:
wb_erep
*
erep
()
const
{
return
m_vrep
->
erep
();}
wb_vrep
*
vrep
()
const
{
return
m_vrep
;}
virtual
ldh_eVolRep
vtype
()
const
{
return
ldh_eVolRep_Db
;}
};
#endif
wb/lib/wb/src/wb_orepdbs.cpp
View file @
195c155c
/**
* Proview $Id: wb_orepdbs.cpp,v 1.1
4 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepdbs.cpp,v 1.1
5 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -156,6 +156,16 @@ pwr_tTime wb_orepdbs::ohTime() const
return
m_o
->
time
;
}
pwr_tTime
wb_orepdbs
::
rbTime
()
const
{
return
m_o
->
rbody
.
time
;
}
pwr_tTime
wb_orepdbs
::
dbTime
()
const
{
return
m_o
->
dbody
.
time
;
}
pwr_mClassDef
wb_orepdbs
::
flags
()
const
{
return
m_o
->
ohFlags
;
...
...
wb/lib/wb/src/wb_orepdbs.h
View file @
195c155c
/**
* Proview $Id: wb_orepdbs.h,v 1.1
4 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepdbs.h,v 1.1
5 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -58,6 +58,8 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_tTime
rbTime
()
const
;
virtual
pwr_tTime
dbTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
@@ -79,6 +81,7 @@ public:
wb_erep
*
erep
()
const
{
return
m_vrep
->
erep
();}
wb_vrep
*
vrep
()
const
{
return
m_vrep
;}
virtual
ldh_eVolRep
vtype
()
const
{
return
ldh_eVolRep_Dbs
;}
dbs_sObject
*
o
()
const
{
return
m_o
;}
...
...
wb/lib/wb/src/wb_orepext.cpp
View file @
195c155c
/**
* Proview $Id: wb_orepext.cpp,v 1.
2 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepext.cpp,v 1.
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -89,8 +89,17 @@ wb_name wb_orepext::longName()
pwr_tTime
wb_orepext
::
ohTime
()
const
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;
return
m_extobject
.
time
;
}
pwr_tTime
wb_orepext
::
rbTime
()
const
{
return
m_extobject
.
time
;
}
pwr_tTime
wb_orepext
::
dbTime
()
const
{
return
m_extobject
.
time
;
}
pwr_mClassDef
wb_orepext
::
flags
()
const
...
...
wb/lib/wb/src/wb_orepext.h
View file @
195c155c
/**
* Proview $Id: wb_orepext.h,v 1.
2 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepext.h,v 1.
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -53,6 +53,8 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_tTime
rbTime
()
const
;
virtual
pwr_tTime
dbTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
@@ -75,6 +77,7 @@ public:
wb_erep
*
erep
()
const
{
return
m_vrep
->
erep
();}
wb_vrep
*
vrep
()
const
{
return
m_vrep
;}
virtual
ldh_eVolRep
vtype
()
const
{
return
ldh_eVolRep_Ext
;}
virtual
bool
docBlock
(
char
**
block
,
int
*
size
)
const
{
return
false
;}
virtual
bool
docBlock
(
char
*
block
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_orepmem.cpp
View file @
195c155c
/**
* Proview $Id: wb_orepmem.cpp,v 1.
4 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepmem.cpp,v 1.
5 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -103,8 +103,17 @@ wb_name wb_orepmem::longName()
pwr_tTime
wb_orepmem
::
ohTime
()
const
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;
return
m_memobject
->
m_ohtime
;
}
pwr_tTime
wb_orepmem
::
rbTime
()
const
{
return
m_memobject
->
m_rbtime
;
}
pwr_tTime
wb_orepmem
::
dbTime
()
const
{
return
m_memobject
->
m_dbtime
;
}
pwr_mClassDef
wb_orepmem
::
flags
()
const
...
...
wb/lib/wb/src/wb_orepmem.h
View file @
195c155c
/**
* Proview $Id: wb_orepmem.h,v 1.
4 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepmem.h,v 1.
5 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -54,6 +54,8 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_tTime
rbTime
()
const
;
virtual
pwr_tTime
dbTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
@@ -78,6 +80,7 @@ public:
wb_erep
*
erep
()
const
{
return
m_vrep
->
erep
();}
wb_vrep
*
vrep
()
const
{
return
m_vrep
;}
virtual
ldh_eVolRep
vtype
()
const
{
return
ldh_eVolRep_Mem
;}
virtual
bool
docBlock
(
char
**
block
,
int
*
size
)
const
;
virtual
bool
docBlock
(
char
*
block
);
...
...
wb/lib/wb/src/wb_orepref.h
View file @
195c155c
/**
* Proview $Id: wb_orepref.h,v 1.
2 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepref.h,v 1.
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -55,6 +55,8 @@ public:
return
wb_name
(
str
);
}
virtual
pwr_tTime
ohTime
()
const
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_tTime
rbTime
()
const
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_tTime
dbTime
()
const
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_mClassDef
flags
()
const
{
pwr_mClassDef
m
;
m
.
m
=
0
;
return
m
;}
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
{
return
false
;}
...
...
@@ -71,6 +73,7 @@ public:
virtual
wb_adrep
*
attribute
(
pwr_tStatus
*
sts
)
{
*
sts
=
LDH__NOSUCHOBJ
;
return
0
;}
wb_erep
*
erep
()
const
{
return
m_vrep
->
erep
();}
wb_vrep
*
vrep
()
const
{
return
m_vrep
;}
virtual
ldh_eVolRep
vtype
()
const
{
return
ldh_eVolRep_Ref
;}
virtual
bool
docBlock
(
char
**
block
,
int
*
size
)
const
{
return
false
;}
virtual
bool
docBlock
(
char
*
block
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_orepwbl.cpp
View file @
195c155c
/**
* Proview $Id: wb_orepwbl.cpp,v 1.1
1 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepwbl.cpp,v 1.1
2 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -103,7 +103,19 @@ wb_name wb_orepwbl::longName()
pwr_tTime
wb_orepwbl
::
ohTime
()
const
{
return
m_wblnode
->
getFileTime
();
return
m_wblnode
->
o
->
m_ohtime
;
}
pwr_tTime
wb_orepwbl
::
rbTime
()
const
{
return
m_wblnode
->
o
->
m_rbtime
;
}
pwr_tTime
wb_orepwbl
::
dbTime
()
const
{
return
m_wblnode
->
o
->
m_dbtime
;
}
...
...
wb/lib/wb/src/wb_orepwbl.h
View file @
195c155c
/**
* Proview $Id: wb_orepwbl.h,v 1.1
0 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_orepwbl.h,v 1.1
1 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -54,6 +54,8 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_tTime
rbTime
()
const
;
virtual
pwr_tTime
dbTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
@@ -78,6 +80,7 @@ public:
wb_erep
*
erep
()
const
{
return
m_vrep
->
erep
();}
wb_vrep
*
vrep
()
const
{
return
m_vrep
;}
virtual
ldh_eVolRep
vtype
()
const
{
return
ldh_eVolRep_Wbl
;}
bool
docBlock
(
char
**
block
,
int
*
size
)
const
;
};
...
...
wb/lib/wb/src/wb_print_wbl.cpp
View file @
195c155c
/**
* Proview $Id: wb_print_wbl.cpp,v 1.1
1 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_print_wbl.cpp,v 1.1
2 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -38,6 +38,7 @@
wb_print_wbl
::
wb_print_wbl
(
ostream
&
os
,
int
levelIndentation
)
:
m_errCnt
(
0
),
m_idxFlag
(
true
),
m_timeFlag
(
true
),
m_level
(
0
),
m_levelInd
(
levelIndentation
),
m_keepName
(
false
),
...
...
@@ -106,6 +107,7 @@ void wb_print_wbl::printBody(wb_volume& v,
wb_attribute
attr
;
wb_attribute
tattr
;
const
char
*
bname
;
char
timestr
[
40
]
=
" "
;
wb_bdef
bdef
=
cdef
.
bdef
(
bix
);
...
...
@@ -122,8 +124,25 @@ void wb_print_wbl::printBody(wb_volume& v,
return
;
}
indent
(
1
)
<<
"Body "
<<
bdef
.
name
()
<<
endl
;
if
(
m_timeFlag
)
{
// Get body time
pwr_tTime
btime
;
switch
(
bix
)
{
case
pwr_eBix_rt
:
btime
=
o
.
rbTime
();
strcpy
(
timestr
,
" "
);
time_AtoAscii
(
&
btime
,
time_eFormat_DateAndTime
,
&
timestr
[
1
],
sizeof
(
timestr
)
-
1
);
break
;
case
pwr_eBix_dev
:
btime
=
o
.
dbTime
();
strcpy
(
timestr
,
" "
);
time_AtoAscii
(
&
btime
,
time_eFormat_DateAndTime
,
&
timestr
[
1
],
sizeof
(
timestr
)
-
1
);
break
;
default:
;
}
}
indent
(
1
)
<<
"Body "
<<
bdef
.
name
()
<<
timestr
<<
endl
;
for
(
adef
=
bdef
.
adef
();
adef
;
adef
=
adef
.
next
())
{
attr
=
o
.
attribute
(
bname
,
adef
.
name
());
tattr
=
templ
.
attribute
(
bname
,
adef
.
name
());
...
...
@@ -425,6 +444,14 @@ void wb_print_wbl::printObject(wb_volume& v, wb_object& o, bool recursive)
}
m_os
<<
" "
<<
idx
;
}
if
(
m_timeFlag
)
{
// Get oh time
char
timestr
[
40
];
pwr_tTime
ohtime
=
o
.
ohTime
();
time_AtoAscii
(
&
ohtime
,
time_eFormat_DateAndTime
,
timestr
,
sizeof
(
timestr
));
m_os
<<
" "
<<
timestr
;
}
m_os
<<
endl
;
wb_object
co
=
v
.
object
(
cdh_ClassIdToObjid
(
cdef
.
cid
()));
...
...
wb/lib/wb/src/wb_print_wbl.h
View file @
195c155c
/**
* Proview $Id: wb_print_wbl.h,v 1.
6 2005-09-01 14:57:58
claes Exp $
* Proview $Id: wb_print_wbl.h,v 1.
7 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -43,6 +43,7 @@ class wb_print_wbl
protected:
int
m_errCnt
;
bool
m_idxFlag
;
bool
m_timeFlag
;
int
m_level
;
int
m_levelInd
;
char
m_indBuf
[
256
];
...
...
wb/lib/wb/src/wb_vrep.h
View file @
195c155c
/**
* Proview $Id: wb_vrep.h,v 1.2
2 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrep.h,v 1.2
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -81,6 +81,8 @@ public:
virtual
const
char
*
objectName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
pwr_tTime
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
pwr_tTime
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
=
0
;
...
...
wb/lib/wb/src/wb_vrepdb.cpp
View file @
195c155c
/**
* Proview $Id: wb_vrepdb.cpp,v 1.3
8 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepdb.cpp,v 1.3
9 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -818,6 +818,36 @@ pwr_tTime wb_vrepdb::ohTime(pwr_tStatus *sts, const wb_orep *orp)
}
}
pwr_tTime
wb_vrepdb
::
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
orp
)
{
*
sts
=
LDH__SUCCESS
;
try
{
return
m_ohead
.
get
(
m_db
->
m_txn
,
orp
->
oid
()).
rbTime
();
}
catch
(
DbException
&
e
)
{
*
sts
=
LDH__NOSUCHOBJ
;
pwr_tTime
t
=
{
0
,
0
};
printf
(
"vrepdb: %s
\n
"
,
e
.
what
());
return
t
;
}
}
pwr_tTime
wb_vrepdb
::
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
orp
)
{
*
sts
=
LDH__SUCCESS
;
try
{
return
m_ohead
.
get
(
m_db
->
m_txn
,
orp
->
oid
()).
dbTime
();
}
catch
(
DbException
&
e
)
{
*
sts
=
LDH__NOSUCHOBJ
;
pwr_tTime
t
=
{
0
,
0
};
printf
(
"vrepdb: %s
\n
"
,
e
.
what
());
return
t
;
}
}
pwr_mClassDef
wb_vrepdb
::
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
orp
)
{
*
sts
=
LDH__SUCCESS
;
...
...
wb/lib/wb/src/wb_vrepdb.h
View file @
195c155c
/**
* Proview $Id: wb_vrepdb.h,v 1.2
6 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepdb.h,v 1.2
7 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -98,6 +98,8 @@ public:
virtual
wb_vrep
*
next
();
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tTime
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tTime
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tOid
oid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tVid
vid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
...
...
wb/lib/wb/src/wb_vrepdbs.cpp
View file @
195c155c
/**
* Proview $Id: wb_vrepdbs.cpp,v 1.4
3 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepdbs.cpp,v 1.4
4 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -170,6 +170,16 @@ pwr_tTime wb_vrepdbs::ohTime(pwr_tStatus *sts, const wb_orep *o)
return
o
->
ohTime
();
}
pwr_tTime
wb_vrepdbs
::
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
rbTime
();
}
pwr_tTime
wb_vrepdbs
::
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
dbTime
();
}
pwr_mClassDef
wb_vrepdbs
::
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
flags
();
...
...
wb/lib/wb/src/wb_vrepdbs.h
View file @
195c155c
/**
* Proview $Id: wb_vrepdbs.h,v 1.3
1 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepdbs.h,v 1.3
2 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -75,6 +75,8 @@ public:
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tTime
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tTime
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_vrepext.h
View file @
195c155c
/**
* Proview $Id: wb_vrepext.h,v 1.
2 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepext.h,v 1.
3 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -171,7 +171,9 @@ public:
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
wb_name
();}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
ohTime
();}
virtual
pwr_tTime
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
rbTime
();}
virtual
pwr_tTime
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
dbTime
();}
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_mClassDef
f
;
f
.
m
=
0
;
return
f
;}
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_vrepmem.cpp
View file @
195c155c
/**
* Proview $Id: wb_vrepmem.cpp,v 1.1
6 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepmem.cpp,v 1.1
7 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -514,7 +514,11 @@ void wb_vrepmem::objectName(const wb_orep *o, char *str)
bool
wb_vrepmem
::
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr_eBix
bix
,
size_t
offset
,
size_t
size
,
void
*
p
)
{
pwr_tTime
time
;
*
sts
=
LDH__SUCCESS
;
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
mem_object
*
n
=
((
wb_orepmem
*
)
o
)
->
memobject
();
...
...
@@ -525,6 +529,7 @@ bool wb_vrepmem::writeAttribute(pwr_tStatus *sts, wb_orep *o, pwr_eBix bix, size
return
false
;
}
memcpy
(
(
char
*
)
n
->
rbody
+
offset
,
p
,
MIN
(
n
->
rbody_size
-
offset
,
size
));
n
->
m_rbtime
=
time
;
return
true
;
case
pwr_eBix_dev
:
if
(
n
->
dbody_size
==
0
)
{
...
...
@@ -532,6 +537,7 @@ bool wb_vrepmem::writeAttribute(pwr_tStatus *sts, wb_orep *o, pwr_eBix bix, size
return
false
;
}
memcpy
(
(
char
*
)
n
->
dbody
+
offset
,
p
,
MIN
(
n
->
dbody_size
-
offset
,
size
));
n
->
m_dbtime
=
time
;
return
true
;
default:
*
sts
=
LDH__NOSUCHBODY
;
...
...
@@ -574,7 +580,10 @@ void *wb_vrepmem::readAttribute(pwr_tStatus *sts, const wb_orep *o, pwr_eBix bix
bool
wb_vrepmem
::
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr_eBix
bix
,
void
*
p
)
{
pwr_tTime
time
;
*
sts
=
LDH__SUCCESS
;
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
mem_object
*
n
=
((
wb_orepmem
*
)
o
)
->
memobject
();
...
...
@@ -586,6 +595,7 @@ bool wb_vrepmem::writeBody(pwr_tStatus *sts, wb_orep *o, pwr_eBix bix, void *p)
}
memcpy
(
n
->
rbody
,
p
,
n
->
rbody_size
);
n
->
m_rbtime
=
time
;
return
true
;
case
pwr_eBix_dev
:
if
(
n
->
dbody_size
==
0
)
{
...
...
@@ -593,6 +603,7 @@ bool wb_vrepmem::writeBody(pwr_tStatus *sts, wb_orep *o, pwr_eBix bix, void *p)
return
false
;
}
memcpy
(
n
->
dbody
,
p
,
n
->
dbody_size
);
n
->
m_dbtime
=
time
;
return
true
;
default:
*
sts
=
LDH__NOSUCHBODY
;
...
...
@@ -681,6 +692,9 @@ wb_orep *wb_vrepmem::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
ldh_eDest
code
=
d
.
code
();
char
name_str
[
32
];
pwr_tOix
oix
;
pwr_tTime
time
;
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
if
(
d
.
oid
().
oix
==
0
)
{
dest
=
root_object
;
...
...
@@ -717,20 +731,24 @@ wb_orep *wb_vrepmem::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
strcpy
(
name_str
,
name
.
object
());
}
mem_object
*
memo
=
new
mem_object
();
strcpy
(
memo
->
m_name
,
name_str
);
memo
->
m_oid
.
oix
=
oix
;
memo
->
m_oid
.
vid
=
m_vid
;
memo
->
m_cid
=
cdef
.
cid
();
memo
->
m_flags
=
cdef
.
flags
();
memo
->
m_ohtime
=
time
;
memo
->
rbody_size
=
cdef
.
size
(
pwr_eBix_rt
);
if
(
memo
->
rbody_size
)
{
memo
->
m_rbtime
=
time
;
memo
->
rbody
=
malloc
(
memo
->
rbody_size
);
cdef
.
templateBody
(
sts
,
pwr_eBix_rt
,
memo
->
rbody
,
memo
->
m_oid
);
if
(
EVEN
(
*
sts
))
return
0
;
}
memo
->
dbody_size
=
cdef
.
size
(
pwr_eBix_dev
);
if
(
memo
->
dbody_size
)
{
memo
->
m_dbtime
=
time
;
memo
->
dbody
=
malloc
(
memo
->
dbody_size
);
cdef
.
templateBody
(
sts
,
pwr_eBix_dev
,
memo
->
dbody
,
memo
->
m_oid
);
if
(
EVEN
(
*
sts
))
return
0
;
...
...
@@ -830,6 +848,9 @@ wb_orep *wb_vrepmem::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destin
mem_object
*
dest
;
ldh_eDest
code
=
d
.
code
();
char
name_str
[
32
];
pwr_tTime
time
;
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
if
(
cdh_ObjidIsNull
(
d
.
oid
()))
{
dest
=
root_object
;
...
...
@@ -867,12 +888,14 @@ wb_orep *wb_vrepmem::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destin
memo
->
m_oid
.
oix
=
oix
;
memo
->
m_oid
.
vid
=
m_vid
;
memo
->
m_cid
=
orep
->
cid
();
memo
->
m_ohtime
=
time
;
wb_attribute
rbody
;
rbody
=
wb_attribute
(
LDH__SUCCESS
,
(
wb_orep
*
)
orep
,
"RtBody"
);
if
(
!
rbody
)
rbody
=
wb_attribute
(
LDH__SUCCESS
,
(
wb_orep
*
)
orep
,
"SysBody"
);
if
(
rbody
)
{
memo
->
m_rbtime
=
time
;
memo
->
rbody_size
=
rbody
.
size
();
memo
->
rbody
=
malloc
(
memo
->
rbody_size
);
rbody
.
value
(
memo
->
rbody
);
...
...
@@ -881,6 +904,7 @@ wb_orep *wb_vrepmem::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destin
wb_attribute
dbody
;
dbody
=
wb_attribute
(
LDH__SUCCESS
,
(
wb_orep
*
)
orep
,
"DevBody"
);
if
(
dbody
)
{
memo
->
m_dbtime
=
time
;
memo
->
dbody_size
=
dbody
.
size
();
memo
->
dbody
=
malloc
(
memo
->
dbody_size
);
dbody
.
value
(
memo
->
dbody
);
...
...
@@ -953,6 +977,9 @@ bool wb_vrepmem::moveObject(pwr_tStatus *sts, wb_orep *orep, wb_destination &d)
{
mem_object
*
dest
;
ldh_eDest
code
=
d
.
code
();
pwr_tTime
time
;
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
if
(
cdh_ObjidIsEqual
(
d
.
oid
(),
orep
->
oid
()))
return
false
;
...
...
@@ -1038,6 +1065,8 @@ bool wb_vrepmem::moveObject(pwr_tStatus *sts, wb_orep *orep, wb_destination &d)
return
false
;
}
memo
->
m_ohtime
=
time
;
return
true
;
}
...
...
@@ -1105,6 +1134,10 @@ void wb_vrepmem::deleteChildren( mem_object *memo)
bool
wb_vrepmem
::
renameObject
(
pwr_tStatus
*
sts
,
wb_orep
*
orep
,
wb_name
&
name
)
{
pwr_tTime
time
;
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
mem_object
*
memo
=
((
wb_orepmem
*
)
orep
)
->
memobject
();
if
(
!
memo
)
return
false
;
...
...
@@ -1128,6 +1161,9 @@ bool wb_vrepmem::renameObject(pwr_tStatus *sts, wb_orep *orep, wb_name &name)
strcpy
(
memo
->
m_name
,
old_name
);
return
LDH__NAMALREXI
;
}
memo
->
m_ohtime
=
time
;
*
sts
=
LDH__SUCCESS
;
return
true
;
}
...
...
@@ -1399,6 +1435,9 @@ bool wb_vrepmem::importPasteObject(pwr_tOid destination, ldh_eDest destcode,
pwr_tOid
*
roid
)
{
pwr_tStatus
sts
;
pwr_tTime
time
;
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
mem_object
*
memo
=
new
mem_object
();
strcpy
(
memo
->
m_name
,
name
);
...
...
@@ -1475,13 +1514,16 @@ bool wb_vrepmem::importPasteObject(pwr_tOid destination, ldh_eDest destcode,
memo
->
m_oid
.
vid
=
m_vid
;
memo
->
m_cid
=
cid
;
memo
->
m_flags
=
flags
;
memo
->
m_ohtime
=
time
;
memo
->
rbody_size
=
rbSize
;
if
(
memo
->
rbody_size
)
{
memo
->
m_rbtime
=
time
;
memo
->
rbody
=
malloc
(
memo
->
rbody_size
);
memcpy
(
memo
->
rbody
,
rbody
,
memo
->
rbody_size
);
}
memo
->
dbody_size
=
dbSize
;
if
(
memo
->
dbody_size
)
{
memo
->
m_dbtime
=
time
;
memo
->
dbody
=
malloc
(
memo
->
dbody_size
);
memcpy
(
memo
->
dbody
,
dbody
,
memo
->
dbody_size
);
}
...
...
@@ -1716,7 +1758,7 @@ bool wb_vrepmem::importBuildObject( mem_object *memo)
bool
wb_vrepmem
::
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
pwr_tOid
aoid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
pwr_mClassDef
flags
,
pwr_tTime
t
ime
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
pwr_tTime
ohT
ime
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
)
{
...
...
@@ -1732,7 +1774,9 @@ bool wb_vrepmem::importHead(pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
memo
->
bwsoid
=
boid
;
memo
->
fwsoid
=
aoid
;
memo
->
fchoid
=
foid
;
memo
->
time
=
time
;
memo
->
m_ohtime
=
ohTime
;
memo
->
m_rbtime
=
rbTime
;
memo
->
m_dbtime
=
dbTime
;
if
(
oid
.
oix
==
pwr_cNOix
)
{
// this is the volume object
...
...
wb/lib/wb/src/wb_vrepmem.h
View file @
195c155c
/**
* Proview $Id: wb_vrepmem.h,v 1.1
5 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepmem.h,v 1.1
6 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -45,6 +45,12 @@ class mem_object
m_flags
.
m
=
0
;
m_oid
.
oix
=
0
;
m_oid
.
vid
=
0
;
m_ohtime
.
tv_sec
=
0
;
m_ohtime
.
tv_nsec
=
0
;
m_rbtime
.
tv_sec
=
0
;
m_rbtime
.
tv_nsec
=
0
;
m_dbtime
.
tv_sec
=
0
;
m_dbtime
.
tv_nsec
=
0
;
}
~
mem_object
()
{
if
(
rbody_size
)
free
(
rbody
);
...
...
@@ -180,7 +186,9 @@ class mem_object
pwr_tOid
fwsoid
;
pwr_tOid
fchoid
;
int
is_built
;
pwr_tTime
time
;
pwr_tTime
m_ohtime
;
pwr_tTime
m_rbtime
;
pwr_tTime
m_dbtime
;
};
class
wb_orepmem
;
...
...
@@ -256,7 +264,9 @@ public:
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
wb_name
();}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
ohTime
();}
virtual
pwr_tTime
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
rbTime
();}
virtual
pwr_tTime
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
dbTime
();}
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_mClassDef
f
;
f
.
m
=
0
;
return
f
;}
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_vrepref.h
View file @
195c155c
/**
* Proview $Id: wb_vrepref.h,v 1.
3 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepref.h,v 1.
4 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -88,7 +88,9 @@ public:
virtual
pwr_tOid
aoid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
pwr_cNOid
;}
virtual
const
char
*
objectName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
""
;}
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
wb_name
();}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
ohTime
();}
virtual
pwr_tTime
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
rbTime
();}
virtual
pwr_tTime
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
dbTime
();}
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_mClassDef
f
;
f
.
m
=
0
;
return
f
;}
virtual
void
objectName
(
const
wb_orep
*
o
,
char
*
str
);
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_vrepwbl.h
View file @
195c155c
/**
* Proview $Id: wb_vrepwbl.h,v 1.3
3 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_vrepwbl.h,v 1.3
4 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -139,7 +139,9 @@ public:
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
wb_name
();}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
ohTime
();}
virtual
pwr_tTime
rbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
rbTime
();}
virtual
pwr_tTime
dbTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
o
->
dbTime
();}
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_mClassDef
f
;
f
.
m
=
0
;
return
f
;}
...
...
wb/lib/wb/src/wb_wbllexer.cpp
View file @
195c155c
This diff is collapsed.
Click to expand it.
wb/lib/wb/src/wb_wbllexer.g
View file @
195c155c
...
...
@@ -35,6 +35,7 @@ tokens {
INT;
OID;
DOCBLOCK;
ASC_TIME;
}
EQ : '='
...
...
@@ -124,6 +125,8 @@ options {
{$setType(ATTRIBUTE);}
| (DIGITS '.' DIGITS '.' ) => DIGITS '.' DIGITS '.' DIGITS '.' DIGITS (':' DIGITS)?
{$setType(OID);}
| ( ('0'..'9') ('0'..'9') '-' ('a'..'z'|'A'..'Z')('a'..'z'|'A'..'Z')('a'..'z'|'A'..'Z') '-') => ( ('0'..'9') ('0'..'9') '-' ('a'..'z'|'A'..'Z')('a'..'z'|'A'..'Z')('a'..'z'|'A'..'Z') '-' ('0'..'9')('0'..'9')('0'..'9')('0'..'9') ' ' ('0'..'9')('0'..'9') ':' ('0'..'9')('0'..'9') ':' ('0'..'9')('0'..'9') ('.' ('0'..'9')('0'..'9'))?)
{$setType(ASC_TIME);}
| (DIGITS '.') => DIGITS '.' ('0'..'9')* (('e'|'E') ('+'|'-')? ('0'..'9')+)?
{$setType(NUM_FLOAT);}
| ('-' DIGITS '.') => '-' DIGITS '.' ('0'..'9')* (('e'|'E') ('+'|'-')? ('0'..'9')+)?
...
...
@@ -137,6 +140,11 @@ options {
| ('a'..'z'|'A'..'Z'|'$'|'_'|SWEC) ('a'..'z'|'A'..'Z'|'0'..'9'|'$'|'_'|SWEC)*
;
/*
{$setType(ASC_TIME);}
| ('0'..'9')+ '-' (SWEC)+ '-' ('0'..'9')+ ' ' ('0'..'9')+ ':' ('0'..'9')+ ':' ('0'..'9')+ ('.' ('0'..'9')+)?
*/
CHAR_LITERAL
: '\'' (ESC|~'\'') '\''
;
...
...
wb/lib/wb/src/wb_wblnode.cpp
View file @
195c155c
/**
* Proview $Id: wb_wblnode.cpp,v 1.4
4 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_wblnode.cpp,v 1.4
5 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -369,6 +369,13 @@ int wb_wblnode::stringToOix( const char *buf, pwr_tOix *oix) const
return
1
;
}
int
wb_wblnode
::
stringToTime
(
const
char
*
buf
,
pwr_tTime
*
time
)
const
{
pwr_tStatus
sts
;
sts
=
time_AsciiToA
(
(
char
*
)
buf
,
time
);
return
ODD
(
sts
);
}
int
wb_wblnode
::
lookup
(
int
*
type
,
const
char
*
keyword
,
wbl_sSym
*
table
)
{
int
cond
;
...
...
@@ -980,9 +987,26 @@ void wb_wblnode::buildBody( ref_wblnode object)
m_vrep
->
error
(
"Bad body name"
,
getFileName
(),
line_number
);
}
for
(
first_child
=
getFirstChild
();
first_child
=
getFirstChild
();
// First child might be body time
if
(
first_child
&&
first_child
->
getType
()
==
tokens
.
ASC_TIME
)
{
string
timestr
=
first_child
->
getText
();
pwr_tTime
bodytime
;
if
(
stringToTime
(
timestr
.
c_str
(),
&
bodytime
))
{
if
(
bix
==
pwr_eBix_rt
)
object
->
o
->
m_rbtime
=
bodytime
;
else
object
->
o
->
m_dbtime
=
bodytime
;
}
else
m_vrep
->
error
(
"Time syntax"
,
getFileName
(),
line_number
);
first_child
=
first_child
->
getNextSibling
();
}
for
(
;
first_child
;
first_child
=
first_child
->
getNextSibling
())
first_child
=
first_child
->
getNextSibling
())
first_child
->
buildAttr
(
object
,
bix
);
next_sibling
=
getNextSibling
();
...
...
@@ -1501,6 +1525,9 @@ void wb_wblnode::registerNode( wb_vrepwbl *vol)
m_vrep
->
error
(
"Bad object name"
,
getFileName
(),
line_number
);
}
// Filetime is default for ohtime
o
->
m_ohtime
=
getFileTime
();
// Get class
if
(
first_child
)
{
string
class_name
=
first_child
->
getText
();
...
...
@@ -1556,16 +1583,28 @@ void wb_wblnode::registerNode( wb_vrepwbl *vol)
// Get oix
ref_wblnode
second_child
=
first_child
->
getNextSibling
();
if
(
second_child
)
{
ref_wblnode
third_child
=
second_child
->
getNextSibling
();
switch
(
second_child
->
getType
())
{
case
tokens
.
VALUE
:
case
tokens
.
INT
:
{
case
tokens
.
INT
:
{
string
oixstr
=
second_child
->
getText
();
if
(
!
stringToOix
(
oixstr
.
c_str
(),
&
o
->
m_oid
.
oix
))
{
o
->
m_oid
.
oix
=
m_vrep
->
nextOix
();
}
if
(
third_child
&&
third_child
->
getType
()
==
tokens
.
ASC_TIME
)
{
string
timestr
=
third_child
->
getText
();
if
(
!
stringToTime
(
timestr
.
c_str
(),
&
o
->
m_ohtime
))
m_vrep
->
error
(
"Time syntax"
,
getFileName
(),
line_number
);
}
break
;
}
case
tokens
.
ASC_TIME
:
{
string
timestr
=
second_child
->
getText
();
if
(
!
stringToTime
(
timestr
.
c_str
(),
&
o
->
m_ohtime
))
m_vrep
->
error
(
"Time syntax"
,
getFileName
(),
line_number
);
break
;
}
case
tokens
.
ENDOBJECT
:
case
tokens
.
OBJECT
:
case
tokens
.
BODY
:
...
...
@@ -1821,7 +1860,7 @@ bool wb_wblnode::exportHead(wb_import &i)
i
.
importHead
(
o
->
m_oid
,
o
->
m_cid
,
fthoid
,
bwsoid
,
fwsoid
,
fchoid
,
lchoid
,
name
(),
n
.
normName
(
cdh_mName_object
),
o
->
m_flags
,
getFileTime
(),
getFileTime
(),
getFileTime
()
,
o
->
rbody_size
,
o
->
dbody_size
);
o
->
m_ohtime
,
o
->
m_rbtime
,
o
->
m_dbtime
,
o
->
rbody_size
,
o
->
dbody_size
);
if
(
o
->
fch
)
o
->
fch
->
exportHead
(
i
);
...
...
wb/lib/wb/src/wb_wblnode.h
View file @
195c155c
/**
* Proview $Id: wb_wblnode.h,v 1.1
7 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_wblnode.h,v 1.1
8 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -80,9 +80,9 @@ class wbl_type {
class
wbl_body
{
public:
wbl_body
()
:
bix
(
pwr_eBix__
),
size
(
0
)
{}
;
pwr_eBix
bix
;
size_t
size
;
wbl_body
()
:
bix
(
pwr_eBix__
),
size
(
0
)
{}
pwr_eBix
bix
;
size_t
size
;
};
class
wbl_attribute
{
...
...
@@ -114,6 +114,12 @@ class wbl_object {
m_flags
.
m
=
0
;
m_oid
.
oix
=
0
;
m_oid
.
vid
=
0
;
m_ohtime
.
tv_sec
=
0
;
m_ohtime
.
tv_nsec
=
0
;
m_rbtime
.
tv_sec
=
0
;
m_rbtime
.
tv_nsec
=
0
;
m_dbtime
.
tv_sec
=
0
;
m_dbtime
.
tv_nsec
=
0
;
};
~
wbl_object
()
{
if
(
rbody_size
)
free
(
rbody
);
...
...
@@ -126,6 +132,9 @@ class wbl_object {
pwr_tCid
m_cid
;
pwr_tTid
m_tid
;
pwr_tOid
m_oid
;
pwr_tTime
m_ohtime
;
pwr_tTime
m_rbtime
;
pwr_tTime
m_dbtime
;
char
cname
[
32
];
pwr_mClassDef
m_flags
;
wb_wblnode
*
fth
;
...
...
@@ -269,6 +278,7 @@ public:
ref_wblnode
get_o_lch
();
int
classNameToCid
(
char
*
cname
,
pwr_tCid
*
cid
);
int
stringToOix
(
const
char
*
buf
,
pwr_tOix
*
oix
)
const
;
int
stringToTime
(
const
char
*
buf
,
pwr_tTime
*
time
)
const
;
pwr_tCid
Cid
()
{
return
o
->
c
.
cid
;}
int
attrStringToValue
(
int
type_id
,
char
*
value_str
,
void
*
buffer_ptr
,
size_t
buff_size
,
size_t
attr_size
);
...
...
wb/lib/wb/src/wb_wblparser.cpp
View file @
195c155c
This diff is collapsed.
Click to expand it.
wb/lib/wb/src/wb_wblparser.g
View file @
195c155c
...
...
@@ -8,7 +8,7 @@ header {
header "post_include_hpp" {
extern int wblparser_error_cnt;
# This
declarations should be moved inside parser class in wb_wblparser.hpp
!!
# This
_declarations_should_be_moved_inside_parser_class_in_wb_wblparser_hpp_
!!
void reportError(const RecognitionException& ex);
}
header "post_include_cpp" {
...
...
@@ -49,11 +49,11 @@ sobject
;
object
: OBJECT^ cid (oix)? (body)* ((DOCBLOCK)? object)* ENDOBJECT
: OBJECT^ cid (oix)? (
ASC_TIME)? (
body)* ((DOCBLOCK)? object)* ENDOBJECT
;
body
: BODY^ (attribute)* ENDBODY
: BODY^ (
ASC_TIME)? (
attribute)* ENDBODY
;
attribute
...
...
wb/lib/wb/src/wb_wblparserTokenTypes.hpp
View file @
195c155c
...
...
@@ -25,17 +25,18 @@ struct wb_wblparserTokenTypes {
INT
=
21
,
OID
=
22
,
DOCBLOCK
=
23
,
EQ
=
24
,
OREQ
=
25
,
WS
=
26
,
COMMENT
=
27
,
INDEX
=
28
,
VALUE
=
29
,
CHAR_LITERAL
=
30
,
STRING_LITERAL
=
31
,
DIGITS
=
32
,
ESC
=
33
,
SWEC
=
34
,
ASC_TIME
=
24
,
EQ
=
25
,
OREQ
=
26
,
WS
=
27
,
COMMENT
=
28
,
INDEX
=
29
,
VALUE
=
30
,
CHAR_LITERAL
=
31
,
STRING_LITERAL
=
32
,
DIGITS
=
33
,
ESC
=
34
,
SWEC
=
35
,
NULL_TREE_LOOKAHEAD
=
3
};
};
...
...
wb/lib/wb/src/wb_wblparserTokenTypes.txt
View file @
195c155c
...
...
@@ -20,14 +20,15 @@ NUM_FLOAT=20
INT=21
OID=22
DOCBLOCK=23
EQ=24
OREQ=25
WS=26
COMMENT=27
INDEX("an index")=28
VALUE("an identifer")=29
CHAR_LITERAL=30
STRING_LITERAL=31
DIGITS=32
ESC=33
SWEC=34
ASC_TIME=24
EQ=25
OREQ=26
WS=27
COMMENT=28
INDEX("an index")=29
VALUE("an identifer")=30
CHAR_LITERAL=31
STRING_LITERAL=32
DIGITS=33
ESC=34
SWEC=35
wb/lib/wb/src/wb_wblvocabTokenTypes.hpp
View file @
195c155c
...
...
@@ -25,17 +25,18 @@ struct wb_wblvocabTokenTypes {
INT
=
21
,
OID
=
22
,
DOCBLOCK
=
23
,
EQ
=
24
,
OREQ
=
25
,
WS
=
26
,
COMMENT
=
27
,
INDEX
=
28
,
VALUE
=
29
,
CHAR_LITERAL
=
30
,
STRING_LITERAL
=
31
,
DIGITS
=
32
,
ESC
=
33
,
SWEC
=
34
,
ASC_TIME
=
24
,
EQ
=
25
,
OREQ
=
26
,
WS
=
27
,
COMMENT
=
28
,
INDEX
=
29
,
VALUE
=
30
,
CHAR_LITERAL
=
31
,
STRING_LITERAL
=
32
,
DIGITS
=
33
,
ESC
=
34
,
SWEC
=
35
,
NULL_TREE_LOOKAHEAD
=
3
};
};
...
...
wb/lib/wb/src/wb_wblvocabTokenTypes.txt
View file @
195c155c
...
...
@@ -20,14 +20,15 @@ NUM_FLOAT=20
INT=21
OID=22
DOCBLOCK=23
EQ=24
OREQ=25
WS=26
COMMENT=27
INDEX("an index")=28
VALUE("an identifer")=29
CHAR_LITERAL=30
STRING_LITERAL=31
DIGITS=32
ESC=33
SWEC=34
ASC_TIME=24
EQ=25
OREQ=26
WS=27
COMMENT=28
INDEX("an index")=29
VALUE("an identifer")=30
CHAR_LITERAL=31
STRING_LITERAL=32
DIGITS=33
ESC=34
SWEC=35
wb/lib/wb/src/wb_wnav_item.cpp
View file @
195c155c
/**
* Proview $Id: wb_wnav_item.cpp,v 1.1
3 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_wnav_item.cpp,v 1.1
4 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -344,12 +344,19 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
// Display object name
if
(
wnav
->
editmode
)
{
if
(
wnav
->
editmode
)
{
item
=
(
WItem
*
)
new
WItemObjectName
(
wnav
->
brow
,
wnav
->
ldhses
,
objid
,
node
,
flow_eDest_IntoLast
);
attr_exist
=
1
;
}
// Display modification time
if
(
wnav
->
gbl
.
show_truedb
)
{
item
=
(
WItem
*
)
new
WItemObjectModTime
(
wnav
->
brow
,
wnav
->
ldhses
,
objid
,
node
,
flow_eDest_IntoLast
);
attr_exist
=
1
;
}
// Get bodydef for rtbody, devbody or sysbody
sts
=
ldh_GetObjectClass
(
wnav
->
ldhses
,
objid
,
&
classid
);
...
...
@@ -929,6 +936,50 @@ int WItemObjectName::get_value( char **value)
return
WNAV__SUCCESS
;
}
WItemObjectModTime
::
WItemObjectModTime
(
WNavBrow
*
item_brow
,
ldh_tSesContext
item_ldhses
,
pwr_tObjid
item_objid
,
brow_tNode
dest
,
flow_eDest
dest_code
)
:
WItem
(
item_objid
,
0
),
brow
(
item_brow
),
ldhses
(
item_ldhses
)
{
int
sts
;
char
timestr
[
40
];
pwr_tTime
time
;
type
=
wnav_eItemType_ObjectModTime
;
sts
=
ldh_GetModTime
(
ldhses
,
objid
,
&
time
);
if
(
ODD
(
sts
))
sts
=
time_AtoAscii
(
&
time
,
time_eFormat_DateAndTime
,
timestr
,
sizeof
(
timestr
));
if
(
EVEN
(
sts
))
strcpy
(
timestr
,
"Undefined"
);
brow_CreateNode
(
brow
->
ctx
,
"ModTime"
,
brow
->
nc_attr
,
dest
,
dest_code
,
(
void
*
)
this
,
1
,
&
node
);
brow_SetAnnotPixmap
(
node
,
0
,
brow
->
pixmap_objname
);
// Set name
brow_SetAnnotation
(
node
,
0
,
"ModificationTime"
,
strlen
(
"ModificaionTime"
));
brow_SetAnnotation
(
node
,
1
,
timestr
,
strlen
(
timestr
));
}
int
WItemObjectModTime
::
update
()
{
char
timestr
[
40
];
pwr_tTime
time
;
int
sts
;
sts
=
ldh_GetModTime
(
ldhses
,
objid
,
&
time
);
if
(
ODD
(
sts
))
sts
=
time_AtoAscii
(
&
time
,
time_eFormat_DateAndTime
,
timestr
,
sizeof
(
timestr
));
if
(
EVEN
(
sts
))
strcpy
(
timestr
,
"Undefined"
);
brow_SetAnnotation
(
node
,
1
,
timestr
,
strlen
(
timestr
));
return
WNAV__SUCCESS
;
}
WItemFile
::
WItemFile
(
WNav
*
wnav
,
char
*
item_name
,
char
*
text
,
char
*
item_file_name
,
item_eFileType
item_filetype
,
brow_tNode
dest
,
flow_eDest
dest_code
)
:
...
...
wb/lib/wb/src/wb_wnav_item.h
View file @
195c155c
/**
* Proview $Id: wb_wnav_item.h,v 1.
8 2005-09-01 14:57:59
claes Exp $
* Proview $Id: wb_wnav_item.h,v 1.
9 2005-09-06 08:02:04
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -59,7 +59,8 @@ typedef enum {
wnav_eItemType_File
,
wnav_eItemType_Text
,
wnav_eItemType_Crossref
,
wnav_eItemType_DocBlock
wnav_eItemType_DocBlock
,
wnav_eItemType_ObjectModTime
}
wnav_eItemType
;
typedef
enum
{
...
...
@@ -188,6 +189,18 @@ class WItemObjectName : public WItem {
int
get_value
(
char
**
value
);
// The value should be freed with free
};
class
WItemObjectModTime
:
public
WItem
{
public:
WItemObjectModTime
(
WNavBrow
*
item_brow
,
ldh_tSesContext
item_ldhses
,
pwr_tObjid
item_objid
,
brow_tNode
dest
,
flow_eDest
dest_code
);
WNavBrow
*
brow
;
ldh_tSesContext
ldhses
;
int
update
();
};
class
WItemDocBlock
:
public
WItem
{
public:
WItemDocBlock
(
...
...
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