示例#1
0
文件: class.cs 项目: shugo/babel
 public virtual void IncludeTo(ClassDefinition cls,
                               FeatureModifier featureModifier)
 {
     AttrDefinition attr = (AttrDefinition) Clone();
     attr.name = featureModifier.NewName;
     switch (featureModifier.NewModifier) {
     case IncludeModifier.None:
         attr.modifier = AttrModifier.None;
         break;
     case IncludeModifier.Private:
         attr.modifier = AttrModifier.Private;
         break;
     case IncludeModifier.Readonly:
         attr.modifier = AttrModifier.Readonly;
         break;
     }
     cls.AddChild(attr);
 }
示例#2
0
文件: class.cs 项目: shugo/babel
 public virtual void IncludeTo(ClassDefinition cls,
                               FeatureModifier featureModifier)
 {
     ConstDefinition constDef = (ConstDefinition) Clone();
     constDef.name = featureModifier.NewName;
     switch (featureModifier.NewModifier) {
     case IncludeModifier.None:
         constDef.modifier = ConstModifier.None;
         break;
     case IncludeModifier.Private:
         constDef.modifier = ConstModifier.Private;
         break;
     }
     cls.AddChild(constDef);
 }
示例#3
0
文件: class.cs 项目: shugo/babel
 public virtual void IncludeTo(ClassDefinition cls,
                               FeatureModifier featureModifier)
 {
     RoutineDefinition rout = (RoutineDefinition) Clone();
     rout.name = featureModifier.NewName;
     switch (featureModifier.NewModifier) {
     case IncludeModifier.None:
         rout.modifier = RoutineModifier.None;
         break;
     case IncludeModifier.Private:
         rout.modifier = RoutineModifier.Private;
         break;
     case IncludeModifier.Readonly:
         // FIXME
         break;
     }
     cls.AddChild(rout);
 }