use of org.applause.lang.applauseDsl.Attribute in project applause by applause.
the class EntityHeaderFileCompiler method compileHeader.
public CharSequence compileHeader(final Entity it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("#import <Foundation/Foundation.h>");
_builder.newLine();
CharSequence _superTypeForwardDeclaration = this.superTypeForwardDeclaration(it);
_builder.append(_superTypeForwardDeclaration, "");
_builder.newLineIfNotEmpty();
_builder.newLine();
_builder.append("@interface ");
String _name = it.getName();
_builder.append(_name, "");
_builder.append(" : ");
Entity _superType = it.getSuperType();
String _typeName = this._typeExtensions.typeName(_superType);
_builder.append(_typeName, "");
_builder.newLineIfNotEmpty();
{
EList<Attribute> _attributes = it.getAttributes();
for (final Attribute attribute : _attributes) {
CharSequence _compile = this.compile(attribute);
_builder.append(_compile, "");
_builder.newLineIfNotEmpty();
}
}
_builder.append("@end");
_builder.newLine();
return _builder;
}
use of org.applause.lang.applauseDsl.Attribute in project applause by applause.
the class EntityCompiler method compile.
public CharSequence compile(final Entity it) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("public class ");
String _name = it.getName();
_builder.append(_name, "");
_builder.append(" {");
_builder.newLineIfNotEmpty();
{
EList<Attribute> _attributes = it.getAttributes();
for (final Attribute attribute : _attributes) {
_builder.append("\t");
CharSequence _compile = this.compile(attribute);
_builder.append(_compile, " ");
_builder.newLineIfNotEmpty();
}
}
_builder.append("}");
_builder.newLine();
return _builder;
}
use of org.applause.lang.applauseDsl.Attribute in project applause by applause.
the class ExpressionExtensions method _evaluateExpression.
protected String _evaluateExpression(final EntityMemberCall it) {
Attribute _head = it.getHead();
String _evaluateExpression = this.evaluateExpression(_head);
String _xifexpression = null;
EntityMemberCallTail _tail = it.getTail();
boolean _notEquals = (!Objects.equal(_tail, null));
if (_notEquals) {
EntityMemberCallTail _tail_1 = it.getTail();
String _evaluateExpression_1 = this.evaluateExpression(_tail_1);
String _plus = ("memberCall.tail:" + _evaluateExpression_1);
_xifexpression = _plus;
} else {
_xifexpression = "";
}
String _plus_1 = (_evaluateExpression + _xifexpression);
return _plus_1;
}
use of org.applause.lang.applauseDsl.Attribute in project applause by applause.
the class AttributeReferenceImpl method setValue.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(Attribute newValue) {
Attribute oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.ATTRIBUTE_REFERENCE__VALUE, oldValue, value));
}
use of org.applause.lang.applauseDsl.Attribute in project applause by applause.
the class EntityMemberCallImpl method setHead.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setHead(Attribute newHead) {
Attribute oldHead = head;
head = newHead;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.ENTITY_MEMBER_CALL__HEAD, oldHead, head));
}
Aggregations