1 package Bcd
::Data
::Model
;
3 # This file is part of the breadcrumbs daemon (bcd).
4 # Copyright (C) 2007 Pasqualino Ferrentino
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # Contact: lino.ferrentino@yahoo.it (in Italian, English or German).
23 #this file should be the main container of the breadcrumbs model.
24 #this is the other singleton in the application (the other is the
25 #manager of the listeners)
30 use Bcd
::Commands
::CommandFactory
;
36 if (! defined ($myself)){
37 #ok, I should create a model
38 my $model = Bcd
::Data
::Model
->_new_instance();
52 my $factory = Bcd
::Commands
::CommandFactory
->new();
53 $self->{factory
} = $factory;
54 bless ($self, $class);
61 return $myself->{id
} ++;
65 my ($self, $command, $in, $out) = @_;
66 return $self->get_factory()->get_command($command, $in, $out);
71 return $self->{factory
};