generated from ThalesGroup/template-project
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix build with java 21 use google inject instead of javax inject in esa-cdk do not replace "_" by "." in package name in xsmp-sdk do not generate unused parameter if possible
- Loading branch information
Showing
20 changed files
with
226 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
...ile.esa_cdk/src/org/eclipse/xsmp/profile/esa_cdk/generator/EsaCdkGeneratorExtension.xtend
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
...esa_cdk/src/org/eclipse/xsmp/profile/esa_cdk/generator/cpp/EsaCdkGeneratorExtension.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/******************************************************************************* | ||
* Copyright (C) 2020-2022 THALES ALENIA SPACE FRANCE. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
******************************************************************************/ | ||
package org.eclipse.xsmp.profile.esa_cdk.generator.cpp | ||
|
||
import com.google.inject.Singleton | ||
import org.eclipse.xsmp.generator.cpp.GeneratorUtil | ||
import org.eclipse.xsmp.util.QualifiedNames | ||
import org.eclipse.xsmp.xcatalogue.NamedElement | ||
import org.eclipse.xsmp.xcatalogue.Type | ||
import org.eclipse.xsmp.xcatalogue.Operation | ||
import org.eclipse.xsmp.xcatalogue.SimpleType | ||
import org.eclipse.xsmp.xcatalogue.String | ||
|
||
@Singleton | ||
class EsaCdkGeneratorExtension extends GeneratorUtil { | ||
|
||
override CharSequence uuidDeclaration(Type it) { | ||
''' | ||
/// Universally unique identifier of type «name». | ||
class UuidProvider_«name» | ||
{ | ||
public: | ||
static constexpr ::Smp::Uuid UUID «generateUUID()»; | ||
}; | ||
''' | ||
} | ||
|
||
override CharSequence uuidDefinition(Type it) { | ||
''' | ||
/// Definition of the UuidProvider constexpr for «name» | ||
constexpr Smp::Uuid UuidProvider_«name»::UUID; | ||
''' | ||
} | ||
|
||
override CharSequence uuid(Type it) { | ||
val fqn = fqn | ||
|
||
// In Smp, Uuids are in a separate namespace ::Smp::Uuids:: | ||
if (fqn.startsWith(QualifiedNames.Smp)) | ||
'''::Smp::Uuids::Uuid_«name»''' | ||
else | ||
'''«(eContainer as NamedElement).id»::UuidProvider_«name»::UUID''' | ||
} | ||
|
||
override protected computeIsInvokable(Operation op) { | ||
super.computeIsInvokable(op) && op.attributeValue(QualifiedNames.Attributes_View) !== null && | ||
!op.parameter.exists[!(it.type instanceof SimpleType) || (it.type instanceof String)] | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.