################################################
##
## This module generates an SingleDecisionEvent object.
##
## See examples/analyse files for more information.
##
################################################
## 
## CHANGELOG
##
## 1.0 - 25 Apr 2013
## * First public version
##
################################################

package Finance::SingleDecisionEvent;

use strict;
use warnings;

our $AUTHOR  = 'Joachim De Schrijver';
our $VERSION = '1.0';
our $DATE    = '25 Apr 2013';
our $MODULE  = 'Finance::SingleDecisionEvent';

################################################

#################
## Constructor ##
#################

sub new {

	# Set class name
	my $class = shift;	

	# Init obj
	my $self = {	
		date      => undef,
		ticker    => undef,
		Xchange   => undef,
		extra     => undef,
	};

	# Bless
	bless($self, $class);

	# Return blessed obj
	return $self;
}

#############
## Setters ##
#############

sub set_date {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{date} = $a;
}

sub set_ticker {
	
	# Read params
	my ($self, my $a) = @_;
	
	# Set
	$self->{ticker} = $a;
}

sub set_Xchange {
	
	# Read params
	my ($self, my $a) = @_;
	
	# Set
	$self->{Xchange} = $a;
}

sub set_extra {
	
	# Read params
	my ($self, my $a) = @_;
	
	# Set
	$self->{extra} = $a;
}

#############
## Getters ##
#############

sub get_date {
	
	# Read params
	my $self = shift;
	
	# return
	return($self->{date});
}

sub get_ticker {
	
	# Read params
	my $self = shift;
	
	# return
	return($self->{ticker});
}

sub get_Xchange {
	
	# Read params
	my $self = shift;
	
	# return
	return($self->{Xchange});
}

sub get_extra {
	
	# Read params
	my $self = shift;
	
	# return
	return($self->{extra});
}

######################
## Object functions ##
######################

sub quick_setter {

	# Read params
	my @params = @_;
	my $self    = $params[0];
	my $date    = $params[1];
	my $ticker  = $params[2];
	my $Xchange = $params[3];
	my $extra   = $params[4];
	
	# Send to obj
	$self->set_date($date);
	$self->set_ticker($ticker);
	$self->set_Xchange($Xchange);
	$self->set_extra($extra);
}

1;