-
Notifications
You must be signed in to change notification settings - Fork 64
[23153] Generate code for interfaces and support @nested
#470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or 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
* Refs #22761. Add builtin `@feed` annotation. Signed-off-by: Miguel Company <[email protected]> * Refs #22761. Add auxiliary STG utilities to Operation class. Signed-off-by: Miguel Company <[email protected]> * Refs #22761. Add auxiliary STG utilities to Param class. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
* Refs #22768. Added test file for exceptions. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Add new flag to context. In order to know that at least one exception is to be generated. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Generate exceptions on main header file. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Generate serialization code for exceptions. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Serialization of exception message. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Update IDL parser. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Mark exceptions as DLL API. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Apply suggestion. Signed-off-by: Miguel Company <[email protected]> * Refs #22768. Update submodules. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
* Refs #22909. Add file to test interfaces generation. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Add generation of interfaces to TypesHeader template. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Fail for output feed parameters. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Add include directives for input feed. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Add include directives for output feed. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Add include directives for futures. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Address review comment. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Fix namespace. Signed-off-by: Miguel Company <[email protected]> * Refs #22909. Update test submodule. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
* Refs #22917. Add check method in Context. Signed-off-by: Miguel Company <[email protected]> * Refs #22917. Set scope when creating interfaces. Signed-off-by: Miguel Company <[email protected]> * Refs #22917. Generate basic details file. Signed-off-by: Miguel Company <[email protected]> * Refs #22917. Generate Reply struct. Signed-off-by: Miguel Company <[email protected]> * Refs #22917. Generate Request struct. * Refs #22917. Generate operation details. Signed-off-by: Miguel Company <[email protected]> * Refs #22917. Include interface details in `TypesCdrAuxHeader`. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
* Refs #22996. Skeleton for TypesCdrAuxHeaderImpl. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Added code to get reply type. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Added Operation `getOutTypeCode` and `getResultTypeCode` Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Added typecode for Exception. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Generate serialization code for replies. * Refs #22996. Generate serialization code for operation inputs. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Generate serialization code for input feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Generate serialization code for requests. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Generate code in PubSubTypeHeader. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Skeleton for code generation in PubSubTypeSource. Signed-off-by: Miguel Company <[email protected]> * Refs #22996. Code generation in PubSubTypeSource. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
* Refs #23017. Add virtual destructor to interface abstract class. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Skeleton for client creation code. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Skeleton for client class. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Generate processing thread code. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Add `process_reply` implementation. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Code for basic requests. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Improve linters. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Code for basic replies. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Add support for operation exceptions. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Skeleton for output feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Generate code for input feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Add cancellation logic to output feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Validation and exceptions in output feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Initial implementation for `read` methods. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Linters. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Improve cancel method. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Process values in output feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Return values before exception. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Exceptions finish the feed instead of cancelling it. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Process incoming exceptions in output feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Fail when reply is for a different operation. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Add feed cancellation to request type. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Implement feed cancellation on client reader. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Fix atomic initialization. Signed-off-by: Miguel Company <[email protected]> * Refs #23017. Make generated code compatible with C++11. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
* Refs #23069. Skeleton for server creation code. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Skeleton for server class. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Initial implementation for run and stop. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Request validation. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Initial processing code. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Prepare method per operation. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Thread pool implementation. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Generate operation prototypes. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Generate operation empty implementations. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Generate skeleton for calling operations. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Code for calling basic operations. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Code for handling user exceptions. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Code for output feed writers. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Code for handling output feed operations. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Refactor to improve readability. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Generate code to handle output feed cancellation. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Fix client code for output feed cancellation. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Infrastructure for input feed processing. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Generate code for input feed readers. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Improve readability. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Code for operations with input feeds. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Generate declatation of implementation interface. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. ServerLogic depends on implementation interface. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Generate empty implementation interface. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Fix linters. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Avoid processing `feed_cancel_` when not generated. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Log error when trying to cancel a non-feed request. Signed-off-by: Miguel Company <[email protected]> * Refs #23069. Cancel requests before terminating thread pool. Signed-off-by: Miguel Company <[email protected]> * Refs #23079. Change dll export macro. Signed-off-by: Miguel Company <[email protected]> * Refs #23079. Remove unnecessary namespace aliasing. Signed-off-by: Miguel Company <[email protected]> * Refs #23079. Remove detail namespace in server implementation. Signed-off-by: Miguel Company <[email protected]> * Refs #23079. Avoid nested structures (not supported by Swig). Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
56fbbda
to
c19fcd8
Compare
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
16a93cb
to
edec6c2
Compare
Signed-off-by: Miguel Company <[email protected]>
edec6c2
to
1bb59cb
Compare
richiware
requested changes
May 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated code for the following IDL is not compiling.
exception MyEx
{
long id;
string message;
};
interface MyIf
{
exception MyEx2
{
long id;
string message;
};
struct MySt
{
char array[30];
};
void test1(in short s, out string m) raises (MyEx);
string test2(inout char s, inout string m) raises (MyEx2);
@feed
MySt test3(in long id) raises (MyEx);
};
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
This fixes link issues when we have an IDL that includes another IDL where all the structures are declared as nested. Signed-off-by: Miguel Company <[email protected]>
e00e2e0
to
86cfe76
Compare
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
ef077df
to
aac53be
Compare
@nested
richiware
previously approved these changes
May 14, 2025
Signed-off-by: Miguel Company <[email protected]>
richiware
approved these changes
May 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds C++ code generation for IDL interfaces (a.k.a RPC).
std::future
.@feed
.This PR depends on the following ones and must be merged after them:
interface
and@nested
IDL-Parser#176Contributor Checklist
Reviewer Checklist