CAD::Firemen::Change - Object to represant the changes of an option
version 0.7.2
Create a new object of CAD::Firemen::Change with
my $change = new CAD::Firemen::Change("name" => "OPTION_NAME");
afterwards, set the old and new value (or specify them already at the constructor with ("valueOld" => "OLD_VALUE", "valueNew" => "NEW_VALUE"))
$change->setValueOld("OLD_VALUE"); $change->setValueNew("NEW_VALUE");
To evaluate the changes between old and new value, just call
my $changeType = $change->evalChange();
which returns the type of the change as one of the CAD::Firemen::Change::Type. To get the color of which should be used to print the change, use
$change->highlightColor();
To evaluate the change type, you can get it with
$change->changeType();
Creates a new object of type CAD::Firemen::Change. Per default, all values are empty and the change type is set to CAD::Firemen::NoChange.
You can specify values like that:
my $change = new CAD::Firemen::Change( "name" => "OPTION_NAME", "valueOld" => "VALUE_OLD", "valueNew" => "VALUE_NEW" );
Sets the option name. To read it, just use method option().
Returns the name of this option.
Sets the old value of this option. To read it use valueOld().
Returns the old value of this option.
Sets the new value of this option. To read the value use valueNew().
Returns the new value of this option.
Set's the array of possible old values.
Returns an array with old possible values.
Set's the array of possible new values.
Returns an array with new possible values.
Set's the old default value.
Returns the old default value.
Set's the new default value.
Returns the new default value.
Set's the description of this change. It set's automatically by evalChange().
Return the stored description, to give some more info on the current change.
Evaluates the changes from old value to new value and sets the changeType() according to the detected change. It also evaluates changes within the possible and default values.
Sets the change type of this change. But the change type is set automatically by evalChange(). Therefore the user does not need to set it. Just use changeType() to get the current type.
Adds the change type to the already listed ones. Use setChangeType() to overwrite all already listed types.
But the change type is set automatically by evalChange(). Therefore the user does not need to set it. Just use changeType() to get the current type.
Returns true, if that change is of the given type. But it can be also of another type too. The change type is set automatically by evalChange() to one of the values of CAD::Firemen::Change::Type.
Returns the name of the color, which should be used to highlight this type of change.
All other - YELLOW Case - CYAN Path - MAGENTA
Joachim Langenbach <langenbach@imw.tu-clausthal.de>
This software is Copyright (c) 2015 by TU Clausthal, Institut fuer Maschinenwesen.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
To install CAD::Firemen, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CAD::Firemen
CPAN shell
perl -MCPAN -e shell install CAD::Firemen
For more information on module installation, please visit the detailed CPAN module installation guide.