Home > vbmeg > functions > common > utility > stack > vb_stack_pop.m

vb_stack_pop

PURPOSE ^

pop from stack

SYNOPSIS ^

function [obj, poped_data] = vb_stack_pop(obj)

DESCRIPTION ^

 pop from stack
 [USAGE]
    [obj, poped_data] = vb_stack_pop(<obj>);
 [IN]
    obj : stack object.
 [OUT]
           obj : stack object.
    poped_data : poped data from stack.

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [obj, poped_data] = vb_stack_pop(obj)
0002 % pop from stack
0003 % [USAGE]
0004 %    [obj, poped_data] = vb_stack_pop(<obj>);
0005 % [IN]
0006 %    obj : stack object.
0007 % [OUT]
0008 %           obj : stack object.
0009 %    poped_data : poped data from stack.
0010 %
0011 % Copyright (C) 2011, ATR All Rights Reserved.
0012 % License : New BSD License(see VBMEG_LICENSE.txt)
0013 
0014 %
0015 % --- Previous check
0016 %
0017 if ~exist('obj', 'var'), error('obj is a required parameter.'); end
0018 
0019 %
0020 % --- Main Procedure
0021 %
0022 switch(obj.class_type)
0023     case 'm_stack'
0024         [obj, poped_data] = vb_m_stack_pop(obj);
0025     case 'f_stack'
0026         [obj, poped_data] = vb_f_stack_pop(obj);
0027     otherwise
0028         error('Specified obj is invalid.');
0029 end
0030 
0031 %
0032 % --- After check
0033 %
0034 if nargout < 1
0035     error('function caller should receive obj.');
0036 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005