-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathREADME.md.orig
74 lines (55 loc) · 3.56 KB
/
README.md.orig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# ClassiFile 
An Open Source Mac app to created Automated Swift Classes + Extensions for your model
<<<<<<< Updated upstream
=======
## Download App
To download this app click on the link below.
ClassiFile (./classifileicon.png)
>>>>>>> Stashed changes
## In-App Models
There are few models we have defined to draw dynamic code.
* **A**: `Class` is a model which is crystal clear with name. `Class` has few attributes that define its prior logic.
* **1**: `name` which store the name of class.
* **2**: `variables` is an Array of type `Variable` this array contains all entered variables.
to add a variable in class you can use below method.
`classObj.addVariable(name: "id", variableType: .string, shouldHaveSort: true, shouldHaveFilter: false)`
* **B**: `Variable` is model to store information about a single variable. `Variable` contains some attributes use for special purpose.
* **1**: `name` store the name of a variable.
* **2**: `type` is enumeration of type `VariableType` which store the data type of variable.
* **3**: `shouldHaveSortMethod` is boolean which interprets whether this class needs sorting method by this variable or not. `By Default this attribute will be false`.
* **4**: `shouldHaveFindFilterMethod` is boolean which interprets whether this class needs filter and find methods for this variable or not. `By Default this attribute will be false`.
* **5**: `variableSecurity` is an enumeration of type `CodeSecurity` which tell the access specifier of current variable. `By default this will be .public`.
* **6**: `nameOfClass` this attributes contains the name of the class of which this variable belongs. You do not need to assign this value.
* **C**: `Extension` this is class which is responsible to create extension file for your class which desired method i.e `filter/find/sort`. You just need to initialized like this. `Extension(with: yourClassObject)`. Extension class will automatically traverse each variable and check if there is any variable that requested to have some method in extension or not. Just save this initialize extension.
* **D**: `File` is class of a file which have attributes.
* **1**: `name` is the name of creating file.
* **2**: `localURL` is the path where this file should store.
* **3**: `completeCode` is a string which have entire string of the code which will save in this file.
>Both `Class` and `Extension` is the subclass of class `File`. This class holds the common properties of a class file and extension file.
## Enumerations
Enumerations that we use in this projects are following.
```
enum CodeSecurity: String {
case publicVar = "public"
case internalVar = "internal"
case openVar = "open"
case privateVar = "private"
case filePrivateVar = "filePrivate"
}
enum VariableType: String {
case int = "Int"
case string = "String"
case float = "Float"
case double = "Double"
case bool = "Bool"
case date = "Date"
case void = "Void"
}
```
`CodeSecurity` is being used for making any **functions**, **variables** and **classes** either `public`, `private` etc.
`VariableType` is primarily used as `DataType` of each variable which this enumeration can reuse as data type of a function as well.
Currently this project only focus to create only **Swift** classes.
We are contributing to make development more riliable and fast.
**Your help will be appriciated and warmly welcome.**
**Owner**
* [Syed Qamar Abbas (Facebook)](https://www.facebook.com/syedqamar.a)