Files
epics-base/src/dbHost/DBD/Breaktable.pm
T

33 lines
606 B
Perl

package DBD::Breaktable;
use DBD::Util;
@ISA = qw(DBD::Util);
use Carp;
sub init {
my ($this, $name) = @_;
$this->SUPER::init($name, "breakpoint table name");
$this->{POINT_LIST} = [];
return $this;
}
sub add_point {
my ($this, $raw, $eng) = @_;
confess "Raw value undefined!" unless defined $raw;
$raw = unquote($raw);
confess "Engineering value undefined!" unless defined $eng;
$eng = unquote($eng);
push @{$this->{POINT_LIST}}, [$raw, $eng];
}
sub points {
return @{shift->{POINT_LIST}};
}
sub point {
my ($this, $idx) = @_;
return $this->{POINT_LIST}[$idx];
}
1;