Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
0760c66b
Commit
0760c66b
authored
Jul 01, 2019
by
Maxime Perrotin
Browse files
Work on the templates
parent
2a73e83d
Changes
6
Hide whitespace changes
Inline
Side-by-side
templates/concurrency_view/ada_pohi_gpr/node.tmplt
View file @
0760c66b
...
...
@@ -8,5 +8,5 @@
# @_Node_Name_@ @_CPU_Name_@ @_Ada_Runtime_@
all:
@@TABLE@@
gprbuild -p -P @_LOWER:Partition_Names_@.gpr
gprbuild -p -P @_LOWER:Partition_Names_@.gpr
-cargs:C -DSTATIC=static
@@END_TABLE@@
templates/concurrency_view/ada_pohi_gpr/partition.tmplt
View file @
0760c66b
...
...
@@ -71,6 +71,7 @@ project @_CAPITALIZE:Name_@ is
package
Linker
renames
PolyORB_HI
.
Linker
;
package
Check
renames
PolyORB_HI
.
Check
;
package
Prove
renames
PolyORB_HI
.
Prove
;
end
@
_CAPITALIZE
:
Name_
@;
templates/glue/language_wrappers/invoke_ri-body/function.tmplt
View file @
0760c66b
...
...
@@ -36,7 +36,7 @@
#include <stdlib.h>
#ifdef __unix__
//
#include <stdio.h>
#include <stdio.h>
// #include "PrintTypesAsASN1.h"
// #include "timeInMS.h"
#endif
...
...
templates/glue/language_wrappers/vm_if-body/function.tmplt
View file @
0760c66b
...
...
@@ -36,6 +36,9 @@
#include <stdbool.h>
#include "@_LOWER:Name_@_vm_if.h"
#include "C_ASN1_Types.h"
#ifdef __unix__
#include <stdio.h>
#endif
void init_@_LOWER:Name_@()
{
...
...
templates/glue/language_wrappers/vm_if-body/interface.tmplt
View file @
0760c66b
...
...
@@ -16,27 +16,50 @@ void @_LOWER:Parent_Function_@_@_LOWER:Name_@
@@INLINE( \()(,\n )(\)\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
const char
*IN_@_LOWER:Param_Names_@, size_t IN_@_LOWER:Param_Names_@_len
void
*IN_@_LOWER:Param_Names_@, size_t IN_@_LOWER:Param_Names_@_len
@@ELSE@@
char
*OUT_@_LOWER:Param_Names_@, size_t *OUT_@_LOWER:Param_Names_@_len
void
*OUT_@_LOWER:Param_Names_@, size_t *OUT_@_LOWER:Param_Names_@_len
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
{
@@TABLE@@ @@-- decode input parameters into static variables
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
static asn1Scc@_REPLACE_ALL(-/_):Param_Types_@ IN_@_UPPER:Param_Names_@;
@@ELSE@@
static asn1Scc@_REPLACE_ALL(-/_):Param_Types_@ OUT_@_UPPER:Param_Names_@;
@@END_IF@@
#ifdef __unix__
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
asn1Scc@_REPLACE_ALL(-/_):Param_Types_@_Initialize(&IN_@_UPPER:Param_Names_@);
@@ELSE@@
asn1Scc@_REPLACE_ALL(-/_):Param_Types_@_Initialize(&OUT_@_UPPER:Param_Names_@);
@@END_IF@@
#endif
if (0 != Decode_@_Param_Encodings_@_@_REPLACE_ALL(-/_):Param_Types_@ (&IN_@_UPPER:Param_Names_@, @_LOWER:Param_Names_@_len)) {
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
if (0 != Decode_@_Param_Encodings_@_@_REPLACE_ALL(-/_):Param_Types_@ (&IN_@_UPPER:Param_Names_@, IN_@_LOWER:Param_Names_@, IN_@_LOWER:Param_Names_@_len)) {
#ifdef __unix__
puts("Error decoding @_Param_Types_@ in function @_LOWER:Parent_Function_@_@_LOWER:Name_@");
#endif
return;
}
@@END_IF@@
@@END_TABLE@@
// Call user code
// Declare user code function as external (it may not have a .h if it is in Ada)
extern void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
const asn1Scc@_REPLACE_ALL(-/_):Param_Types_@ *
@@ELSE@@
asn1Scc@_REPLACE_ALL(-/_):Param_Types_@ *
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
// Call user code
@_LOWER:Parent_Function_@_PI_@_LOWER:Name_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
...
...
@@ -53,6 +76,7 @@ void @_LOWER:Parent_Function_@_@_LOWER:Name_@()
{
// Directly call user code, no parameters to pass
// This could be done directly from the concurrency glue...
extern void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@();
@_LOWER:Parent_Function_@_PI_@_LOWER:Name_@();
// puts ("@_LOWER:Parent_Function_@_@_LOWER:Name_@ called");
}
...
...
templates/glue/language_wrappers/vm_if-header/interface.tmplt
View file @
0760c66b
...
...
@@ -17,7 +17,7 @@ void @_LOWER:Parent_Function_@_@_LOWER:Name_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
const char
*IN_@_LOWER:Param_Names_@, size_t IN_@_LOWER:Param_Names_@_len
void
*IN_@_LOWER:Param_Names_@, size_t IN_@_LOWER:Param_Names_@_len
@@ELSE@@
void *OUT_@_LOWER:Param_Names_@, size_t *OUT_@_LOWER:Param_Names_@_len
@@END_IF@@
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment