Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: f46d6e959338309eba6f862fe14ad8cb5c3d9f62 (plain) (tree)
1
2
3
                                                                                                                
                                                  
                                                                 














                                                                                                                       


                                                                                                  

           



                                                           
[module CppClassTypeAndEnum('http://www.eclipse.org/uml2/4.0.0/UML', 'http://www.eclipse.org/papyrus/C_Cpp/1')/]
[import org::eclipse::papyrus::acceleo::GenUtils/]
[import org::eclipse::papyrus::cpp::codegen::utils::CppGenUtils/]
[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppPrimitiveTypes/]
[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppEnumerations/]

[template public TypeAndEnumForVisibility(element : Element, visibilityFilter : VisibilityKind)]
[if (not hasStereotype(NoCodeGen) and oclIsKindOf(Classifier) and oclAsType(Classifier).visibility = visibilityFilter)]
[  if (oclIsKindOf(Enumeration))][oclAsType(Enumeration).CppEnumerationDefinition()/][/if]
[  if (oclIsKindOf(PrimitiveType))][oclAsType(PrimitiveType).CppPrimitiveTypeDefinition()/][/if]
[/if]
[/template]

[template public TypesAndEnumsForVisibility(ne : Namespace, visibilityFilter : VisibilityKind)]
[for (ownedElement)][TypeAndEnumForVisibility(visibilityFilter)/][/for]
[/template]

[template public CppClassTypeAndEnum(class : Classifier)]
    [VisibilityKind::public.getSection(TypesAndEnumsForVisibility(VisibilityKind::public))/]
    [VisibilityKind::protected.getSection(TypesAndEnumsForVisibility(VisibilityKind::protected))/]
    [VisibilityKind::private.getSection(TypesAndEnumsForVisibility(VisibilityKind::private))/]
[/template]

[template public CppClassTypeAndEnumPackage(pkg : Package)]
[TypesAndEnumsForVisibility(VisibilityKind::_package)/]
[TypesAndEnumsForVisibility(VisibilityKind::public)/]
[/template]

Back to the top