def register(self,obj,cls=type(None),hist={}):
<EOL>if is_submodule(obj,cls):<EOL><INDENT>if obj not in self.submodules: self.submodules[obj] = SubmodNode(obj,self)<EOL><DEDENT>elif is_module(obj,cls):<EOL><INDENT>if obj not in self.modules: self.modules[obj] = ModNode(obj,self)<EOL><DEDENT>elif is_type(obj,cls):<EOL><INDENT>if obj not in self.types: self.types[obj] = TypeNode(obj,self,hist)<EOL><DEDENT>elif is_proc(obj,cls):<EOL><INDENT>if obj not in self.procedures: self.procedures[obj] = ProcNode(obj,self,hist)<EOL><DEDENT>elif is_program(obj,cls):<EOL><INDENT>if obj not in self.programs: self.programs[obj] = ProgNode(obj,self)<EOL><DEDENT>elif is_sourcefile(obj,cls):<EOL><INDENT>if obj not in self.sourcefiles: self.sourcefiles[obj] = FileNode(obj,self)<EOL><DEDENT>elif is_blockdata(obj,cls):<EOL><INDENT>if obj not in self.blockdata: self.blockdata[obj] = BlockNode(obj,self)<EOL><DEDENT>else:<EOL><INDENT>raise BadType("<STR_LIT>".format(type(obj).__name__))<EOL><DEDENT>
Takes a FortranObject and adds it to the appropriate list, if
not already present.