octane-0.3.0: library/Octane/Type/Actor.hs
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Octane.Type.Actor (Actor(..)) where
import Octane.Core
import Octane.Type.Primitive.PCString
import Octane.Type.Primitive.Int32LE
data Actor = Actor
{ actorName :: PCString
, actorTag :: Int32LE
} deriving (Eq, Generic, NFData, Show)
instance Binary Actor where
get = do
name <- get
tag <- get
return Actor
{ actorName = name
, actorTag = tag
}
put actor = do
actor & actorName & put
actor & actorTag & put