Swift: reflection of protocol variables
<p>I have a protocol with some { get } and { get set } variables and extension, where I set the former ones, and when initializing the class - to set the latter ones too. And I'd like to return all of them in a dictionary, i.e.:</p>

<pre><code>protocol SomeProtocol {
    var id: Int { get }
    var name: String { get set }
    var isItTrue: Bool { get }
}

extension SomeProtocol where Self: SomeClass {
    var id: Int { return 1 }
    var isItTrue: Bool { return true }

    func classProps() {
        var dict = [String: AnyObject]()
        let mirrorSelf = Mirror(reflecting: self)
        for mirrorChild in mirrorSelf.children { print(mirrorChild.label) }
    }
}

class SomeClass {
// just a class, nothing special
}

class MirrorMe: SomeClass, SomeProtocol {
    var name: String = "Some name"
}

class MirrorMirrorOnTheWall {
    func talkToTheMirror() {
        let mirrorThis = MirrorMe()
        mirrorThis.classProps() // returns only "name" property
    }
}
</code></pre>

<p>as I wrote in the comment, <code>classProps</code> returns only the protocol variable I set in the subclass. How can I include both <strong>id</strong> and <strong>isItTrue</strong> in the Mirror's children as well?</p>

<p>p.s. sorry for the crappy example, this is just a quick example :)</p>