IOSAD-63 trying to use yml2 for PEPMessage

IOS-898
Dirk Zimmermann 5 years ago
parent 956e77ab8e
commit b9899c7216

@ -0,0 +1,13 @@
decl class +name;
decl property(name, type, nullability, key);
class PEPMessage {
property "messageID" type = "NSString *" key="id";
property "direction" type = "PEP_msg_direction" key="outgoing";
property "shortMessage" type = "NSString *" key="shortmsg";
property "longMessage" type = "NSString *" key="longmsg";
property "longMessageFormatted" type = "NSString *" key="longmsg_formatted";
property "attachments" type = "NSArray *" key="attachments";
property "sent" type = "NSDate *" key="sent";
property "received" type = "NSDate *" key="recv";
}

@ -0,0 +1,38 @@
include yslt.yml2
tstylesheet {
template "/" {
apply "class", 0
}
template "class" {//document "{@name}Base.h" {
| //
| // «@name».h
| // pEpObjCAdapter
| //
| // Created by Dirk Zimmermann on 10.11.17.
| // Copyright © 2017 p≡p. All rights reserved.
| //
|
| #import <Foundation/Foundation.h>
|
| #import "PEPSessionProtocol.h"
|
| @interface PEPIdentity : NSObject
|
apply "property"
|
|
| @end
}
template "property" {
choose {
when "@nullability"
| @property (nonatomic, «@nullability») «@type» «@name»;
otherwise
| @property (nonatomic) «@type» «@name»;
}
}
}
Loading…
Cancel
Save