Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82356199
class_dumper.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 10, 23:02
Size
757 B
Mime Type
text/x-python
Expires
Thu, Sep 12, 23:02 (2 d)
Engine
blob
Format
Raw Data
Handle
20685394
Attached To
R1692 code_skeleton
class_dumper.py
View Options
from
class_reader
import
ClassReader
class
ClassDumper
:
def
__init__
(
self
):
self
.
base_types
=
[
'int'
,
'double'
,
'float'
,
'unsigned int'
]
self
.
base_types
=
self
.
base_types
+
[
e
+
' *'
for
e
in
self
.
base_types
]
+
[
e
+
' &'
for
e
in
self
.
base_types
]
def
dump
(
self
,
class_file
):
cls_reader
=
ClassReader
()
classes
=
cls_reader
.
read
(
class_file
)
sstr
=
""
for
c
in
classes
:
sstr
+=
self
.
dumpFile
(
c
)
return
sstr
raise
Exception
(
'pure virtual function'
)
def
dumpFile
(
self
,
c
):
raise
Exception
(
'pure virtual function'
)
def
baseType
(
self
,
_type
):
temp_type
=
_type
.
replace
(
'&'
,
''
)
temp_type
=
temp_type
.
strip
()
return
temp_type
Event Timeline
Log In to Comment