function self = set( self, key, theStruct )

% tsg_nc/set -- set new pair key/value for "tsg_nc" object.
%
% Input
% -------
% self      ........... instance of 'tsg_nc' object
% key       ........... hashtable key
% theStruct ........... hashtable structure
%
% Output
% --------
% self      ........... instance of updated 'tsg_nc' object
%
% $Id$

% get members list of structure platform_name
% -------------------------------------------
% field = fieldnames(theStruct);
% types = self.header;
% 
% % iterate on all members
% % ----------------------
% for i=1:numel(field)
%   
%   member = field{i};
%   type   = get(types, member);
%   
%   if ~isempty(theStruct.(member)) && ischar(theStruct.(member))
%     
%     switch type
% 
%       case 'integer'
%         theStruct.(member) = int16(str2num(theStruct.(member)));
% 
%       case 'double'
%         theStruct.(member) = str2double(value);
% 
%     end
% 
%   end
%   
% end
  
% populate the internal hashtable
% -------------------------------
self.hashtable = put(self.hashtable, key, theStruct);

% update self.size
% ----------------
self.size = numel(keys(self.hashtable));
