classdef SCDclass_mdsparscalar < SCDclass_mdspar
    % A constant real (single) MDS+ parameter
    
    properties
    end
    
   
    methods
        
        function obj=SCDclass_mdsparscalar(srctdimodel, destparam, varargin)   
            obj@SCDclass_mdspar();
            % Constructor parser customization definitions here
            obj=obj.parseconstructor(srctdimodel, destparam, varargin);
            % Constructor parser customization results here
            obj.classname=class(obj);
            obj.marteclassname='MDSParScalar';
        end

        function actualizedata(obj, shot) 
              obj=obj.preactualize(shot);
              if ~obj.actualizable, return; end
              obj.caststring=sprintf('%s=single(%s);',obj.assignvar,obj.assignvar);
              obj.postactualize(shot);
        end
                
        function [obj, value] = getdata(obj, shot)
              [obj,value]=getdata@SCDclass_mdspar(obj,shot);
              value=single(value);
        end
       
        function printinfo(obj)
            printinfo@SCDclass_mdspar(obj);
        end
         
        function entrystring = genMARTe2entry(obj, shot)
            entrystring=obj.genMARTe2entrycommon(shot);
            entrystring=[entrystring ' }'];
        end

        function out = casttomds(obj, in)
            out = single(in);
        end
    end
end

