diff --git a/@node/data.m b/@node/data.m new file mode 100644 index 0000000000000000000000000000000000000000..89704c5f0d20555c8f4e8cc2100ac093d602bb19 --- /dev/null +++ b/@node/data.m @@ -0,0 +1,6 @@ +function val = data(self) + +% get access methods for properties +% --------------------------------- +val = self.data; + diff --git a/@node/get.m b/@node/get.m new file mode 100644 index 0000000000000000000000000000000000000000..7296058ac805a3cca21c05c4065a2e8526af547c --- /dev/null +++ b/@node/get.m @@ -0,0 +1,13 @@ +function val = get(self, arg) + +% get access methods for properties +% --------------------------------- +switch arg +case 'data' + val = self.data; +case 'next' + val = self.next; +otherwise + error('Wrong input args'); +end + diff --git a/@node/next.m b/@node/next.m new file mode 100644 index 0000000000000000000000000000000000000000..6bad71410aa772ef4997ddec2d7679afe08d78de --- /dev/null +++ b/@node/next.m @@ -0,0 +1,6 @@ +function val = next(self) + +% get access methods for properties +% --------------------------------- +val = self.next; + diff --git a/@node/node.m b/@node/node.m new file mode 100644 index 0000000000000000000000000000000000000000..72d570d7b16d3b6aace50c40fcb2eeed915e6618 --- /dev/null +++ b/@node/node.m @@ -0,0 +1,38 @@ +function n = node(data,next) +% node.m +% +% This class is used with stack class to implemete LIFO stack +% +% $Id$ + +%% COPYRIGHT & LICENSE +% Copyright 2009 - IRD US191, all rights reserved. +% +% This file is part of tsg-qc Matlab program. +% +% tsg-qc program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 2 of the License, or +% (at your option) any later version. +% +% tsgqc is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with Datagui; if not, write to the Free Software +% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +% USA + +if nargin == 2 + self.data = data; + self.next = next; +else + self.data = {}; + self.next = {}; +end + +% class constructor +% ----------------- +n = class(self, 'node');