Skip to content
Snippets Groups Projects
Select Git revision
  • b9c121f44a0f2e2c8fc6ec7209bf3c5f96165e2b
  • main default protected
  • rosification
  • refactoring
  • pp
  • mpc
  • realtimelogplotter
  • alv
  • gitlab_ci_podman
  • restructuring
  • viz_fix
11 results

README.md

Blame
  • TypeReferences.jrag 1.26 KiB
    aspect User_Types {
      syn String Type.getTypeName();
      eq Type.getTypeName() = getClass().getName();
      eq PrimType.getTypeName() = getName();
      eq UserType.getTypeName() = getName();
    
      syn boolean Type.isUserType();
      eq Type.isUserType() = false;
      eq UserType.isUserType() = true;
    }
    
    aspect Type_References {
     
      // The dependencies on other type declarations for a Decl.
      coll Set<Decl> Decl.type_dependencies() [new HashSet<Decl>()] with add;
    
      Field contributes ((UserType)getType()).decl()   
      when parentDecl() != null && getType().isUserType()
      to Decl.type_dependencies() 
      for parentDecl();
    
      UserType contributes decl()   
      when parentDecl() != null 
      to Decl.type_dependencies() 
      for parentDecl();
      /*
      Field contributes getType().decl()   
      when parentDecl() != null && getType().isLeafType()
      to Decl.type_dependencies() 
      for parentDecl();
      */
    
    
      // The references from other type declarations to a Decl.
      coll Set<Decl> Decl.type_references() [new HashSet<Decl>()] with add;
    
      Decl contributes this
      to Decl.type_references()
      for each type_dependencies();
    
      syn boolean Decl.hasDependencies();
      eq Decl.hasDependencies() = !type_dependencies().isEmpty();
    
      syn boolean Decl.isReferenced();
      eq Decl.isReferenced() = !type_references().isEmpty();
    }