当前位置: 首页>>代码示例>>C++>>正文


C++ Syntax类代码示例

本文整理汇总了C++中Syntax的典型用法代码示例。如果您正苦于以下问题:C++ Syntax类的具体用法?C++ Syntax怎么用?C++ Syntax使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Syntax类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: registerAction

void
SolidMechanicsApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  syntax.registerActionSyntax("EmptyAction", "BCs/CavityPressure");
  syntax.registerActionSyntax("CavityPressureAction", "BCs/CavityPressure/*");
  syntax.registerActionSyntax("CavityPressurePPAction", "BCs/CavityPressure/*");
  syntax.registerActionSyntax("CavityPressureUOAction", "BCs/CavityPressure/*");

  syntax.registerActionSyntax("EmptyAction", "BCs/Pressure");
  syntax.registerActionSyntax("PressureAction", "BCs/Pressure/*");

  syntax.registerActionSyntax("SolidMechanicsAction", "SolidMechanics/*");

  syntax.registerActionSyntax("JIntegralAction", "JIntegral","add_user_object");
  syntax.registerActionSyntax("JIntegralAction", "JIntegral","add_aux_variable");
  syntax.registerActionSyntax("JIntegralAction", "JIntegral","add_aux_kernel");
  syntax.registerActionSyntax("JIntegralAction", "JIntegral","add_postprocessor");

  registerAction(PressureAction, "add_bc");
  registerAction(CavityPressureAction, "add_bc");
  registerAction(CavityPressurePPAction, "add_postprocessor");
  registerAction(CavityPressureUOAction, "add_user_object");
  registerAction(SolidMechanicsAction, "add_kernel");
  registerAction(JIntegralAction, "add_user_object");
  registerAction(JIntegralAction, "add_aux_variable");
  registerAction(JIntegralAction, "add_aux_kernel");
  registerAction(JIntegralAction, "add_postprocessor");
}
开发者ID:atomica,项目名称:moose,代码行数:28,代码来源:SolidMechanicsApp.C

示例2: registerAction

void
TensorMechanicsApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  syntax.registerActionSyntax("EmptyAction", "BCs/CavityPressure");
  syntax.registerActionSyntax("CavityPressureAction", "BCs/CavityPressure/*");
  syntax.registerActionSyntax("CavityPressurePPAction", "BCs/CavityPressure/*");
  syntax.registerActionSyntax("CavityPressureUOAction", "BCs/CavityPressure/*");

  syntax.registerActionSyntax("TensorMechanicsAction", "Kernels/TensorMechanics");
  syntax.registerActionSyntax("DynamicTensorMechanicsAction", "Kernels/DynamicTensorMechanics");
  syntax.registerActionSyntax("PoroMechanicsAction", "Kernels/PoroMechanics");
  syntax.registerActionSyntax("TensorMechanicsAxisymmetricRZAction", "Kernels/StressDivergence2DAxisymmetricRZ");
  syntax.registerActionSyntax("TensorMechanicsRSphericalAction", "Kernels/StressDivergence1DRSpherical");

  syntax.registerActionSyntax("EmptyAction", "BCs/Pressure");
  syntax.registerActionSyntax("PressureAction", "BCs/Pressure/*");

  registerAction(CavityPressureAction, "add_bc");
  registerAction(CavityPressurePPAction, "add_postprocessor");
  registerAction(CavityPressureUOAction, "add_user_object");
  registerAction(TensorMechanicsAction, "add_kernel");
  registerAction(DynamicTensorMechanicsAction, "add_kernel");
  registerAction(PoroMechanicsAction, "add_kernel");
  registerAction(TensorMechanicsAxisymmetricRZAction, "add_kernel");
  registerAction(TensorMechanicsRSphericalAction, "add_kernel");
  registerAction(PressureAction, "add_bc");
}
开发者ID:JasonTurner56,项目名称:ARL,代码行数:27,代码来源:TensorMechanicsApp.C

示例3: registerAction

void
MooseTestApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{

#undef registerAction
#define registerAction(tplt, action) action_factory.reg<tplt>(stringifyName(tplt), action)

  // and add more
  registerAction(ConvDiffMetaAction, "meta_action");
  registerAction(AddLotsOfAuxVariablesAction, "meta_action");

  registerAction(AddLotsOfDiffusion, "add_variable");
  registerAction(AddLotsOfDiffusion, "add_kernel");
  registerAction(AddLotsOfDiffusion, "add_bc");


  syntax.registerActionSyntax("ConvDiffMetaAction", "ConvectionDiffusion");
  syntax.registerActionSyntax("AddAuxVariableAction", "MoreAuxVariables/*", "add_aux_variable");
  syntax.registerActionSyntax("AddLotsOfAuxVariablesAction", "LotsOfAuxVariables/*", "add_variable");

  registerAction(ApplyCoupledVariablesTestAction, "meta_action");
  syntax.registerActionSyntax("ApplyCoupledVariablesTestAction", "ApplyInputParametersTest");

  syntax.registerActionSyntax("AddLotsOfDiffusion", "Testing/LotsOfDiffusion/*");

#undef registerAction
#define registerAction(tplt, action) action_factory.regLegacy<tplt>(stringifyName(tplt), action)
}
开发者ID:raghavaggarwal,项目名称:moose,代码行数:28,代码来源:MooseTestApp.C

示例4: registerAction

void
MooseTestApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  // and add more
  registerAction(ConvDiffMetaAction, "meta_action");
  registerAction(AddLotsOfAuxVariablesAction, "meta_action");
  syntax.registerActionSyntax("ConvDiffMetaAction", "ConvectionDiffusion");
  syntax.registerActionSyntax("AddAuxVariableAction", "MoreAuxVariables/*", "add_aux_variable");
  syntax.registerActionSyntax("AddLotsOfAuxVariablesAction", "LotsOfAuxVariables/*", "add_variable");
}
开发者ID:IoannisSt,项目名称:moose,代码行数:10,代码来源:MooseTestApp.C

示例5: visit

 void visit(Syntax Node) override {
   if (didReuseNode(Node.getId())) {
     // Node has been reused, add it to the list
     auto Start = Node.getAbsolutePositionBeforeLeadingTrivia();
     auto End = Node.getAbsoluteEndPositionAfterTrailingTrivia();
     ReusedRegions.push_back({Start, End});
   } else {
     SyntaxVisitor::visit(Node);
   }
 }
开发者ID:DevAndArtist,项目名称:swift,代码行数:10,代码来源:SyntaxParsingCache.cpp

示例6: registerAction

void
TensorMechanicsApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  syntax.registerActionSyntax("TensorMechanicsAction", "Kernels/TensorMechanics");

  syntax.registerActionSyntax("EmptyAction", "BCs/PressureTM");
  syntax.registerActionSyntax("PressureActionTM", "BCs/PressureTM/*");

  registerAction(TensorMechanicsAction, "add_kernel");
  registerAction(PressureActionTM, "add_bc");
}
开发者ID:ChaliZhg,项目名称:moose,代码行数:11,代码来源:TensorMechanicsApp.C

示例7: registerAction

void
RichardsApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  syntax.registerActionSyntax("Q2PAction", "Q2P", "add_kernel");
  syntax.registerActionSyntax("Q2PAction", "Q2P", "add_aux_variable");
  syntax.registerActionSyntax("Q2PAction", "Q2P", "add_function");
  syntax.registerActionSyntax("Q2PAction", "Q2P", "add_postprocessor");

  registerAction(Q2PAction, "add_kernel");
  registerAction(Q2PAction, "add_aux_variable");
  registerAction(Q2PAction, "add_function");
  registerAction(Q2PAction, "add_postprocessor");
}
开发者ID:AhmedAly83,项目名称:moose,代码行数:13,代码来源:RichardsApp.C

示例8: registerTask

void
XFEMApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  registerTask("setup_xfem", false);
  registerAction(XFEMAction, "setup_xfem");
  syntax.addDependency("setup_xfem","setup_adaptivity");
  registerAction(XFEMAction, "add_aux_variable");
  registerAction(XFEMAction, "add_aux_kernel");

  syntax.registerActionSyntax("XFEMAction", "XFEM");
  syntax.registerActionSyntax("AddUserObjectAction", "XFEM/*");

}
开发者ID:Biyss,项目名称:moose,代码行数:13,代码来源:XFEMApp.C

示例9: registerAction

void
TensorMechanicsApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  syntax.registerActionSyntax("TensorMechanicsAction", "Kernels/TensorMechanics");
  syntax.registerActionSyntax("PoroMechanicsAction", "Kernels/PoroMechanics");
  syntax.registerActionSyntax("TensorMechanicsAxisymmetricRZAction", "Kernels/AxisymmetricRZ");

  syntax.registerActionSyntax("EmptyAction", "BCs/Pressure");
  syntax.registerActionSyntax("PressureAction", "BCs/Pressure/*");

  registerAction(TensorMechanicsAction, "add_kernel");
  registerAction(PoroMechanicsAction, "add_kernel");
  registerAction(TensorMechanicsAxisymmetricRZAction, "add_kernel");
  registerAction(PressureAction, "add_bc");
}
开发者ID:rppawlo,项目名称:moose,代码行数:15,代码来源:TensorMechanicsApp.C

示例10: switch

Syntax syntax::format(Syntax Tree) {
  switch (Tree.getKind()) {
  case SyntaxKind::StructDecl: {
    auto Struct = Tree.castTo<StructDeclSyntax>();
    auto LeftBrace = Struct.getLeftBraceToken();
    if (!LeftBrace->LeadingTrivia.contains(TriviaKind::Newline)) {
      auto NewLeading = Trivia::newlines(1) + LeftBrace->LeadingTrivia;

      const auto NewMembers =
        format(Struct.getMembers()).castTo<DeclMembersSyntax>();

      LeftBrace = LeftBrace->withLeadingTrivia(NewLeading);

      return Struct.withMembers(NewMembers).withLeftBrace(LeftBrace);
    }
    break;
  }
  case SyntaxKind::DeclMembers: {
    auto Members = Tree.castTo<DeclMembersSyntax>();
    // TODO
    break;
  }
  default:
    return Tree;
  }

  return Tree;
}
开发者ID:pk-codebox-evo,项目名称:swift,代码行数:28,代码来源:Format.cpp

示例11: registerSyntax

void
ContactApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  registerSyntax("ContactAction", "Contact/*");

  registerSyntax("ContactPenetrationAuxAction", "Contact/*");
  registerSyntax("ContactPenetrationVarAction", "Contact/*");

  registerSyntax("ContactPressureAuxAction", "Contact/*");
  registerSyntax("ContactPressureVarAction", "Contact/*");

  registerSyntax("NodalAreaAction", "Contact/*");
  registerSyntax("NodalAreaVarAction", "Contact/*");

  registerAction(ContactAction, "add_aux_kernel");
  registerAction(ContactAction, "add_aux_variable");
  registerAction(ContactAction, "add_dirac_kernel");

  registerTask("output_penetration_info_vars", false);
  registerAction(ContactAction, "output_penetration_info_vars");
  syntax.addDependency("output_penetration_info_vars", "add_output");

  registerAction(ContactPenetrationAuxAction, "add_aux_kernel");
  registerAction(ContactPenetrationVarAction, "add_aux_variable");

  registerAction(ContactPressureAuxAction, "add_aux_kernel");
  registerAction(ContactPressureVarAction, "add_aux_variable");

  registerAction(NodalAreaAction, "add_user_object");
  registerAction(NodalAreaVarAction, "add_aux_variable");
}
开发者ID:aeslaughter,项目名称:moose,代码行数:31,代码来源:ContactApp.C

示例12: registerAction

void
ZapdosApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  // add actions
  registerAction(AddLotsOfDiffusion, "add_variable");
  registerAction(AddLotsOfDiffusion, "add_kernel");
  registerAction(AddLotsOfDiffusion, "add_bc");
  syntax.registerActionSyntax("AddLotsOfDiffusion", "LotsOfDiffusion");
  registerAction(AddLotsOfCoeffDiffusion, "add_variable");
  registerAction(AddLotsOfCoeffDiffusion, "add_kernel");
  registerAction(AddLotsOfCoeffDiffusion, "add_bc");
  syntax.registerActionSyntax("AddLotsOfCoeffDiffusion", "LotsOfCoeffDiffusion");
  registerAction(AddLotsOfVariables, "add_variable");
  registerAction(AddLotsOfVariables, "add_kernel");
  registerAction(AddLotsOfVariables, "add_bc");
  syntax.registerActionSyntax("AddLotsOfVariables", "LotsOfVariables");
  registerAction(AddLotsOfSources, "add_variable");
  registerAction(AddLotsOfSources, "add_kernel");
  registerAction(AddLotsOfSources, "add_bc");
  syntax.registerActionSyntax("AddLotsOfSources", "LotsOfSources");
  registerAction(AddLotsOfTimeDerivatives, "add_variable");
  registerAction(AddLotsOfTimeDerivatives, "add_kernel");
  registerAction(AddLotsOfTimeDerivatives, "add_bc");
  syntax.registerActionSyntax("AddLotsOfTimeDerivatives", "LotsOfTimeDerivatives");
  registerAction(AddLotsOfEFieldAdvection, "add_variable");
  registerAction(AddLotsOfEFieldAdvection, "add_kernel");
  registerAction(AddLotsOfEFieldAdvection, "add_bc");
  syntax.registerActionSyntax("AddLotsOfEFieldAdvection", "LotsOfEFieldAdvection");
  registerAction(AddLotsOfPotentialDrivenArtificialDiff, "add_variable");
  registerAction(AddLotsOfPotentialDrivenArtificialDiff, "add_kernel");
  registerAction(AddLotsOfPotentialDrivenArtificialDiff, "add_bc");
  syntax.registerActionSyntax("AddLotsOfPotentialDrivenArtificialDiff", "LotsOfPotentialDrivenArtificialDiff");
}
开发者ID:jhaase1,项目名称:zapdos,代码行数:33,代码来源:ZapdosApp.C

示例13: registerAction

void
ChemicalReactionsApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{

#undef registerAction
#define registerAction(tplt, action) action_factory.reg<tplt>(stringifyName(tplt), action)


  syntax.registerActionSyntax("AddPrimarySpeciesAction", "ReactionNetwork");
  syntax.registerActionSyntax("AddSecondarySpeciesAction", "ReactionNetwork/AqueousEquilibriumReactions");
  syntax.registerActionSyntax("AddSecondarySpeciesAction", "ReactionNetwork/SolidKineticReactions");
  syntax.registerActionSyntax("AddCoupledEqSpeciesKernelsAction", "ReactionNetwork/AqueousEquilibriumReactions");
  syntax.registerActionSyntax("AddCoupledEqSpeciesAuxKernelsAction", "ReactionNetwork/AqueousEquilibriumReactions");
  syntax.registerActionSyntax("AddCoupledSolidKinSpeciesKernelsAction", "ReactionNetwork/SolidKineticReactions");
  syntax.registerActionSyntax("AddCoupledSolidKinSpeciesAuxKernelsAction", "ReactionNetwork/SolidKineticReactions");
  registerAction(AddPrimarySpeciesAction, "add_variable");
  registerAction(AddSecondarySpeciesAction, "add_aux_variable");
  registerAction(AddCoupledEqSpeciesKernelsAction, "add_kernel");
  registerAction(AddCoupledEqSpeciesAuxKernelsAction, "add_aux_kernel");
  registerAction(AddCoupledSolidKinSpeciesKernelsAction, "add_kernel");
  registerAction(AddCoupledSolidKinSpeciesAuxKernelsAction, "add_aux_kernel");

#undef registerAction
#define registerAction(tplt, action) action_factory.regLegacy<tplt>(stringifyName(tplt), action)
}
开发者ID:acasagran,项目名称:moose,代码行数:25,代码来源:ChemicalReactionsApp.C

示例14: registerAction

void
TrexApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  //syntax.registerActionSyntax(<File Name>, <input block/name>); 
  //registerAction(<File Name>, <type>);

  syntax.registerActionSyntax("ImageGrainVariableAction", "AuxVariables/ImageGrainVariable");
  registerAction(ImageGrainVariableAction, "add_aux_variable");

  syntax.registerActionSyntax("ImageGrainICsAction", "ICs/ImageGrainICs");
  registerAction(ImageGrainICsAction, "add_ic");

  syntax.registerActionSyntax("PointValueOnLineAction", "Postprocessors/PointValueOnLine");
  registerAction(PointValueOnLineAction, "add_postprocessor");

  syntax.registerActionSyntax("PolycrystalKernelTensorAction", "Kernels/PolycrystalKernelAniso");
  registerAction(PolycrystalKernelTensorAction, "add_kernel");
}
开发者ID:jonathongardner,项目名称:TREX,代码行数:18,代码来源:TrexApp.C

示例15: registerAction

void
MooseTestApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
{
  // and add more
  registerAction(ConvDiffMetaAction, "meta_action");
  registerAction(AddLotsOfAuxVariablesAction, "meta_action");

  registerAction(AddLotsOfDiffusion, "add_variable");
  registerAction(AddLotsOfDiffusion, "add_kernel");
  registerAction(AddLotsOfDiffusion, "add_bc");


  syntax.registerActionSyntax("ConvDiffMetaAction", "ConvectionDiffusion");
  syntax.registerActionSyntax("AddAuxVariableAction", "MoreAuxVariables/*", "add_aux_variable");
  syntax.registerActionSyntax("AddLotsOfAuxVariablesAction", "LotsOfAuxVariables/*", "add_variable");

  registerAction(ApplyCoupledVariablesTestAction, "meta_action");
  syntax.registerActionSyntax("ApplyCoupledVariablesTestAction", "ApplyInputParametersTest");

  syntax.registerActionSyntax("AddLotsOfDiffusion", "Testing/LotsOfDiffusion/*");
}
开发者ID:danielru,项目名称:moose,代码行数:21,代码来源:MooseTestApp.C


注:本文中的Syntax类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。