original_docstring: Try to do check if a structure is always considered valid (i.e. there's no rules to its acceptance).
docstring: Try to do check if a structure is always considered valid .
docstring_tokens: Try to do check if a structure is always considered valid .
code: def isStructAlwaysValid(self, structname):
          """Try to do check if a structure is always considered valid (i.e. there's no rules to its acceptance)."""
          # A conventions object is required for this call.
          if not self.conventions:
              raise RuntimeError("To use isStructAlwaysValid, be sure your options include a Conventions object.")
  
          if self.conventions.type_always_valid(structname):
              return True
  
          category = self.getTypeCategory(structname)
          if self.conventions.category_requires_validation(category):
              return False
  
          info = self.registry.typedict.get(structname)
          assert(info is not None)
  
          members = info.getMembers()
  
          for member in members:
              member_name = getElemName(member)
              if member_name in (self.conventions.structtype_member_name,
                                 self.conventions.nextpointer_member_name):
                  return False
  
              if member.get('noautovalidity'):
                  return False
  
              member_type = getElemType(member)
  
              if member_type in ('void', 'char') or self.paramIsArray(member) or self.paramIsPointer(member):
                  return False
  
              if self.conventions.type_always_valid(member_type):
                  continue
  
              member_category = self.getTypeCategory(member_type)
  
              if self.conventions.category_requires_validation(member_category):
                  return False
  
              if member_category in ('struct', 'union'):
                  if self.isStructAlwaysValid(member_type) is False:
                      return False
  
          return True
code_tokens: def isStructAlwaysValid ( self , structname ) : if not self . conventions : raise RuntimeError ( "To use isStructAlwaysValid, be sure your options include a Conventions object." ) if self . conventions . type_always_valid ( structname ) : return True category = self . getTypeCategory ( structname ) if self . conventions . category_requires_validation ( category ) : return False info = self . registry . typedict . get ( structname ) assert ( info is not None ) members = info . getMembers ( ) for member in members : member_name = getElemName ( member ) if member_name in ( self . conventions . structtype_member_name , self . conventions . nextpointer_member_name ) : return False if member . get ( 'noautovalidity' ) : return False member_type = getElemType ( member ) if member_type in ( 'void' , 'char' ) or self . paramIsArray ( member ) or self . paramIsPointer ( member ) : return False if self . conventions . type_always_valid ( member_type ) : continue member_category = self . getTypeCategory ( member_type ) if self . conventions . category_requires_validation ( member_category ) : return False if member_category in ( 'struct' , 'union' ) : if self . isStructAlwaysValid ( member_type ) is False : return False return True
short_docstring: Try to do check if a structure is always considered valid (i.e.
short_docstring_tokens: Try to do check if a structure is always considered valid ( i . e .
comment: """Try to do check if a structure is always considered valid (i.e. there's no rules to its acceptance)."""$SEP$# A conventions object is required for this call.