NAME
oEdtk::Field - abstract base class for fixed-width record fields
SYNOPSIS
use base 'oEdtk::Field';
my $field = oEdtk::Field->new('NAME', 10);
print $field->get_name, "\n";
print $field->process('value'), "\n";
DESCRIPTION
The root of the field hierarchy used to describe the fixed-width records of an Infinite flux. A field carries a name and a byte length and knows how to turn the raw slice handed to it by oEdtk::Record into a display value. The base class returns the slice unchanged; subclasses (oEdtk::AddrField, oEdtk::DateField, oEdtk::FPField, oEdtk::SignedField) override "process".
METHODS
new
my $field = oEdtk::Field->new($name, $len);
Construct a field of name $name and byte length $len.
process
my $value = $field->process($data);
Return the display value for the raw slice $data. The base implementation is the identity; subclasses override it.
get_name
my $name = $field->get_name;
Return the field name.
set_name
$field->set_name($name);
Set the field name.
get_len
my $len = $field->get_len;
Return the field byte length.
AUTHOR
The oEdtk team.