OCL 2.0 NO IDEA Avatar
  1. OMG Issue

OCL2_ — context Classifier

  • Key: OCL2_-70
  • Legacy Issue Number: 7499
  • Status: closed  
  • Source: OpenModeling ( Jos Warmer)
  • Summary:

    def: lookupAttribute(attName : String) : Attribute =
    self.allAttributes->any(me | me.name = attName)
    def: lookupAssociationEnd(name : String) : AssociationEnd =
    self.allAssociationEnds->any (ae | ae.name = name)
    def: lookupAssociationClass(name : String) : AssociationClass =
    self.allAssociationClasses->any (ae | ae.name = name)
    def: lookupOperation (name: String, paramTypes: Sequence(Classifier)):
    Operation =
    self.allOperations->any (op | op.name = name and
    op.hasMatchingSignature(paramTypes))
    def: lookupSignal (sigName: String, paramTypes: Sequence(Classifier)):
    Operation =
    self.allReceptions.signal->any (sig | sig.name = sigName and
    sig.hasMatchingSignature(paramTypes))
    ==> all references to operations like allAttributes are missing brackets, and the returnType of lookup-
    Signal should be Signal. The whole expression should be:
    context Classifier
    def: lookupAttribute(attName : String) : Attribute =
    self.allAttributes()->any(me | me.name = attName)
    def: lookupAssociationEnd(name : String) : AssociationEnd =
    self.allAssociationEnds()->any (ae | ae.name = name)
    def: lookupAssociationClass(name : String) : AssociationClass =
    self.allAssociationClasses()->any (ae | ae.name = name)
    def: lookupOperation (name: String, paramTypes: Sequence(Classifier)):
    Operation =
    self.allOperations()->any (op | op.name = name and
    op.hasMatchingSignature(paramTypes))
    def: lookupSignal (sigName: String, paramTypes: Sequence(Classifier)):
    Signal =
    self.allReceptions().signal->any (sig | sig.name = sigName and
    sig.hasMatchingSignature(paramTypes))

  • Reported: OCL 2.0b2 — Thu, 10 Jun 2004 04:00 GMT
  • Disposition: Resolved — OCL 2.0
  • Disposition Summary:

    No Data Available

  • Updated: Sun, 8 Mar 2015 13:35 GMT