Solstice::State::Node - Representation for one State node inside of a Solstice::State::Machine.


Solstice documentation Contained in the Solstice distribution.

Index


Code Index:

NAME

Top

Solstice::State::Node - Representation for one State node inside of a Solstice::State::Machine.

SYNOPSIS

Top

use Solstice::State::Node;

my $state = new Solstice::State::Node($stateName, $controller); $state->getController();

Methods

new($stateName, $controller)

Creates a new Solstice::State::Node object.

$stateName - the name of the state $controller - the name of the controller class

returns - a new state object.

getName()

returns - the name of the state

getController()

returns - the name of the controller

COPYRIGHT

Top


Solstice documentation Contained in the Solstice distribution.
package Solstice::State::Node;


use 5.006_000;
use strict;
use warnings;

sub new {
    my ($classname, $state_name, $controller) = @_;

    my $self = bless {}, $classname;
    $self->{_name} = $state_name;
    $self->{_controller} = $controller;

    return $self;
}


sub getName {
    my ($self) = @_;
    return $self->{_name};
}


sub getController {
    my ($self) = @_;
    return $self->{_controller};
}


1;