python-awips/dynamicserialize/adapters/LocalizationLevelSerializationAdapter.py
Shay Carter 67c5c0b579 add in the /awips and /dynamicsearlize directories
- see if this satisfies the webpage building
2021-06-08 15:41:53 -06:00

31 lines
993 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