title: Swift properties - avoid multiple declarations over n class?
body: <p>I've defined in Swift the following protocol:</p>
  
  <pre><code>protocol Condition {
  
  var column : RepositoryTableColumn! {get set}
  var sourceTable : RepositoryTable! {get set}
  var conditionalValue : String! {get set}
  var preventsClear : Bool! {get set}
  
  func getCondition() -&gt; String
  func accept(visitor : ConditionVisitor)
  </code></pre>
  
  <p>}</p>
  
  <p>And the protocol is extended by (for now on) 8 classes meaning that each class needs to have a declaration as:</p>
  
  <pre><code>class IsEqual : Condition {
  
  var column : RepositoryTableColumn!
  var sourceTable : RepositoryTable!
  var conditionalValue : String!
  var preventsClear : Bool!
  
  }
  </code></pre>
  
  <p>My question is, how is it possible to avoid having these four declarations within every class? The reason why I'm trying to avoid this is that I don't want to duplicate code, i.e. in this case declarations.</p>
  
  <p>For the constructor I've created an extension of the Condition class, however this cannot imply to properties because extensions cannot hold them. </p>
  
  <p>Any piece of advice?</p>