mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-24 14:57:57 -05:00
40 lines
1,008 B
Python
40 lines
1,008 B
Python
|
##
|
||
|
##
|
||
|
|
||
|
|
||
|
#
|
||
|
# Adapter for com.raytheon.uf.common.localization.LocalizationContext$LocalizationLevel
|
||
|
#
|
||
|
#
|
||
|
# SOFTWARE HISTORY
|
||
|
#
|
||
|
# Date Ticket# Engineer Description
|
||
|
# ------------ ---------- ----------- --------------------------
|
||
|
# 01/11/11 dgilling Initial Creation.
|
||
|
#
|
||
|
#
|
||
|
#
|
||
|
|
||
|
|
||
|
|
||
|
from dynamicserialize.dstypes.com.raytheon.uf.common.localization import LocalizationLevel
|
||
|
|
||
|
ClassAdapter = [
|
||
|
'com.raytheon.uf.common.localization.LocalizationContext$LocalizationLevel',
|
||
|
'com.raytheon.uf.common.localization.LocalizationLevel'
|
||
|
]
|
||
|
|
||
|
def serialize(context, level):
|
||
|
context.writeString(level.getText())
|
||
|
context.writeI32(level.getOrder())
|
||
|
context.writeBool(level.isSystemLevel());
|
||
|
|
||
|
def deserialize(context):
|
||
|
text = context.readString()
|
||
|
order = context.readI32()
|
||
|
systemLevel = context.readBool()
|
||
|
level = LocalizationLevel(text, order, systemLevel=systemLevel)
|
||
|
return level
|
||
|
|
||
|
|