Files
ippserver/packages/ipp/keyword.go

38 lines
577 B
Go

package ipp
type KeyWord struct {
sos *SetOfStrings
}
func NewKeyWord(name string, values ...string) *KeyWord {
k := new(KeyWord)
k.sos = NewSetOfStrings(name, keyWordValueTag, values)
return k
}
func (k KeyWord) Name() string {
return k.sos.name
}
func (k KeyWord) String() string {
return k.sos.String()
}
func (k *KeyWord) size() int {
return k.sos.size()
}
func (k *KeyWord) valueTag() tag {
return k.sos.valueTag()
}
func (k *KeyWord) marshal() []byte {
return k.sos.marshal()
}
func (k *KeyWord) addValue(v interface{}) {
k.sos.AddValue(v.(string))
}