-
Notifications
You must be signed in to change notification settings - Fork 14
SolidityCode
UrsZeidler edited this page Jan 6, 2016
·
16 revisions
The code generator uses the stereotypes defines in the profile and their properties to define what is generated.
As the generation will override the files from time to time the user code can be placed between the comment lines:
// Start of user code Class2.operations
// TODO implement
// End of user code
This text will be protected and preserved between the code generations.
contract Class2 {
enum Enumeration { test1,test2 }
struct TestStruct {
uint test1;
}
string public Attribute1;
uint private Attribute2;
string public Attribute3 = "TestString";
int[4] public Attribute4;
address public Attribute5;
mapping (address=>string)public Attribute6;
// Start of user code Class2.attributes
// TODO implement
// End of user code
// getAttribute1
function getAttribute1() returns(string) {
return Attribute1;
}
// setAttribute1
function setAttribute1 (Attribute1 aAttribute1) {
Attribute1 = aAttribute1;
}
// setAttribute2
function setAttribute2 (Attribute2 aAttribute2) {
Attribute2 = aAttribute2;
}
// getAttribute3
function getAttribute3() returns(string) {
return Attribute3;
}
// setAttribute3
function setAttribute3 (Attribute3 aAttribute3) {
Attribute3 = aAttribute3;
}
// Start of user code Class2.operations
// TODO implement
// End of user code
}