portvalue update - in progress

parent 77498128
Pipeline #59 failed with stages
...@@ -47,7 +47,7 @@ string [pvCN/]::toString() const { ...@@ -47,7 +47,7 @@ string [pvCN/]::toString() const {
[file (container.hppRoot() + '/' + fullHpp, false, 'UTF-8')] [file (container.hppRoot() + '/' + fullHpp, false, 'UTF-8')]
[startHeaderGuard(fullHpp) /] [startHeaderGuard(fullHpp) /]
#include <PortValue.hpp> #include <PortValue.hpp>
#include <Variables.hpp>
#include <[aPortType.relHppFilePath()/]> #include <[aPortType.relHppFilePath()/]>
class [pvCN/] : public PortValue { class [pvCN/] : public PortValue {
...@@ -55,6 +55,14 @@ public: ...@@ -55,6 +55,14 @@ public:
[aPortType.genCtorProto()/]; [aPortType.genCtorProto()/];
virtual ~[pvCN/](); virtual ~[pvCN/]();
[for (datadecl : PortDataParameterDeclaration | aPortType.dataParameterDeclarations)
before('\n // get/set for data.\n')
separator('\n')]
[pvCN/]([datadecl.dataType.typeName()/] &_[datadecl.varName() /] , string name) : PortValue(), [datadecl.varName()/](_[datadecl.varName()/]) {
name = name;
}
[/for]
[if (not disableSerialization)] [if (not disableSerialization)]
virtual string toString() const; virtual string toString() const;
[/if] [/if]
...@@ -68,8 +76,9 @@ public: ...@@ -68,8 +76,9 @@ public:
void set_[datadecl.name/](const [datadecl.dataType.typeName()/] &_[datadecl.varName()/]); void set_[datadecl.name/](const [datadecl.dataType.typeName()/] &_[datadecl.varName()/]);
[/if] [/if]
[/for] [/for]
private: private:
string name;
[for (datadecl : PortDataParameterDeclaration | aPortType.dataParameterDeclarations) [for (datadecl : PortDataParameterDeclaration | aPortType.dataParameterDeclarations)
before(' // data fields from Port type.\n')] before(' // data fields from Port type.\n')]
[if (datadecl.const)]const [/if][datadecl.dataType.typeName()/] &[datadecl.varName()/]; [if (datadecl.const)]const [/if][datadecl.dataType.typeName()/] &[datadecl.varName()/];
...@@ -82,16 +91,18 @@ private: ...@@ -82,16 +91,18 @@ private:
separator('\n')] separator('\n')]
inline inline
const [datadecl.dataType.typeName()/]& [pvCN/]::get_[datadecl.name/]() const { const [datadecl.dataType.typeName()/]& [pvCN/]::get_[datadecl.name/]() const {
return [datadecl.varName()/]; return [datadecl.dataType.typeName() + '_variables[name]' /];
} }
[if (not datadecl.const)] [if (not datadecl.const)]
inline inline
[datadecl.dataType.typeName()/]& [pvCN/]::get_[datadecl.name/]() { [datadecl.dataType.typeName()/]& [pvCN/]::get_[datadecl.name/]() {
return [datadecl.varName()/]; return [datadecl.dataType.typeName() + '_variables[name]' /];
} }
inline inline
void [pvCN/]::set_[datadecl.name/](const [datadecl.dataType.typeName()/] &_[datadecl.varName()/]) { void [pvCN/]::set_[datadecl.name/](const [datadecl.dataType.typeName()/] &_[datadecl.varName()/]) {
[datadecl.varName()/] = _[datadecl.varName()/]; [datadecl.varName()/] = _[datadecl.varName()/];
[datadecl.dataType.typeName() + '_variables[name]'/] = _[datadecl.varName()/];
} }
[/if] [/if]
[/for] [/for]
......
...@@ -7,5 +7,5 @@ package ujf.verimag.bip.userinterface.cli; ...@@ -7,5 +7,5 @@ package ujf.verimag.bip.userinterface.cli;
* use "svn annotate" and BLAME the one who has commited it ! * use "svn annotate" and BLAME the one who has commited it !
*/ */
public class Version { public class Version {
public static final String VERSION = "2022.01.215322-DEV"; public static final String VERSION = "2022.01.195807-DEV";
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment