Author: bugman Date: Mon Apr 16 00:06:32 2012 New Revision: 15713 URL: http://svn.gna.org/viewcvs/relax?rev=15713&view=rev Log: Introduced the empty() method into the structure API to check if structural data is loaded. This will be used in the spin loading wizard of the spin viewer window. Modified: 1.3/generic_fns/structure/api_base.py Modified: 1.3/generic_fns/structure/api_base.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/api_base.py?rev=15713&r1=15712&r2=15713&view=diff ============================================================================== --- 1.3/generic_fns/structure/api_base.py (original) +++ 1.3/generic_fns/structure/api_base.py Mon Apr 16 00:06:32 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2008-2011 Edward d'Auvergne # +# Copyright (C) 2008-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -244,6 +244,20 @@ raise RelaxImplementError + def empty(self): + """Report if the structural data structure is empty or not. + + @return: True if empty, False otherwise. + @rtype: bool + """ + + # Check the ModelList structure. + if len(self.structural_data) == 0: + return True + else: + return False + + def from_xml(self, str_node, dir=None, id=None): """Recreate the structural object from the XML structural object node.