rules
Class Rule

java.lang.Object
  extended byrules.Rule
Direct Known Subclasses:
CA10Rule, CA11Rule, CA12Rule, CA13Rule, CA14Rule, CA1Rule, CA2Rule, CA3Rule, CA4Rule, CA5Rule, CA7Rule, CA9Rule, CB1Rule, CB2Rule, CB3Rule, CB4Rule, CB5Rule, CC2Rule, CC3Rule, CC4Rule, CF1Rule, CF2Rule, CF3Rule, CF4Rule, CF5Rule, CH5Rule, CI1Rule, CI2Rule, CI3Rule, CI4Rule, CI5Rule, CI6Rule, CI7Rule, CI8Rule, CI9Rule, CL10Rule, CL11Rule, CL1Rule, CL2Rule, CL3Rule, CL4Rule, CL5Rule, CL6Rule, CL8Rule, CN2Rule, CN3Rule, CN4Rule, CO1Rule, CO2Rule, CO3Rule, CO4Rule, CP10Rule, CP4Rule, CP7Rule, CP8Rule, CR1Rule, CR3Rule, CS1Rule, CS2Rule, CT1Rule, GC1Rule, GC2Rule, NC1Rule, NC2Rule, NC5Rule, NC6Rule, NC7Rule, NF1Rule, NF2Rule, NI1Rule, NI2Rule, RC10Rule, RC11Rule, RC12Rule, RC14Rule, RC16Rule, RC3Rule, RC4Rule, RC5Rule, RC6Rule, RC7Rule, RC8Rule, RC9Rule, RN11Rule, RN13Rule, RN15Rule, RN17Rule, RN19Rule, RN22Rule, RN3Rule, RN4Rule, RN5Rule, RN6Rule, RN9Rule, RS1Rule, RS2Rule, RS3Rule, RS4Rule, RS5Rule, SC1Rule, SG1Rule, SG2Rule, SG3Rule, SG4Rule, SG5Rule, SG7Rule

public abstract class Rule
extends java.lang.Object

Class Rule encapsulates the notion of coding rule to be checked on a given C++ source code. Abstract class Rule contains an abstract check method, to be implemented by every concrete Rule, performing the check.


Field Summary
protected  java.lang.String ruleContent
           
protected  java.lang.String ruleName
           
 
Constructor Summary
Rule(java.lang.String name, java.lang.String content)
           
 
Method Summary
abstract  void check(Module module)
          Checks the coding rule against the input source.
 void printViolationMessage(java.lang.String specialMessage)
          Prints the name of the rule that has been violated and its content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ruleName

protected java.lang.String ruleName

ruleContent

protected java.lang.String ruleContent
Constructor Detail

Rule

public Rule(java.lang.String name,
            java.lang.String content)
Parameters:
name - Name of the rule.
content - Content of the rule.
Method Detail

printViolationMessage

public void printViolationMessage(java.lang.String specialMessage)
Prints the name of the rule that has been violated and its content.

Parameters:
specialMessage - Contains a more specific message about the violation.

check

public abstract void check(Module module)
Checks the coding rule against the input source. The implementation of this method is delegated to each subclass. It accesses C++ syntactic entities to perform the check, and, if the rule is violated, it reports a warning on the standard output.

See Also:
entities