|
1 | 1 | (* ::Package:: *) |
2 | 2 |
|
3 | | -$packageHeader |
| 3 | +(************************************************************************) |
| 4 | +(* This file was generated automatically by the Mathematica front end. *) |
| 5 | +(* It contains Initialization cells from a Notebook file, which *) |
| 6 | +(* typically will have the same name as this file except ending in *) |
| 7 | +(* ".nb" instead of ".m". *) |
| 8 | +(* *) |
| 9 | +(* This file is intended to be loaded into the Mathematica kernel using *) |
| 10 | +(* the package loading commands Get or Needs. Doing so is equivalent *) |
| 11 | +(* to using the Evaluate Initialization Cells menu command in the front *) |
| 12 | +(* end. *) |
| 13 | +(* *) |
| 14 | +(* DO NOT EDIT THIS FILE. This entire file is regenerated *) |
| 15 | +(* automatically each time the parent Notebook file is saved in the *) |
| 16 | +(* Mathematica front end. Any changes you make to this file will be *) |
| 17 | +(* overwritten. *) |
| 18 | +(************************************************************************) |
| 19 | + |
| 20 | + |
4 | 21 |
|
5 | 22 | $OFObjectTable::usage= |
6 | 23 | "The master table of objects an types"; |
|
122 | 139 | ]; |
123 | 140 |
|
124 | 141 |
|
125 | | -OFNew[a:{(_Association->_)..}]:= |
| 142 | +OFNew[objs:{__Association}]:= |
126 | 143 | With[{ |
127 | | -types=Lookup[Map[First,a],"ObjectType","Object"], |
128 | | -objs=Map[First,a], |
129 | | -args=Map[Last,a] |
| 144 | +types=Lookup[objs,"ObjectType","Object"], |
| 145 | +args=Lookup[objs,"ObjectInitializationArguments",{}] |
130 | 146 | }, |
131 | 147 | With[{uuids=CreateUUID[#<>"-"]&/@types}, |
132 | 148 | AssociateTo[$OFObjectTable["Objects"], |
133 | 149 | MapThread[ |
134 | 150 | #3-> |
135 | 151 | Join[ |
136 | | -#, |
| 152 | +KeyDrop[#,"ObjectInitializationArguments"], |
137 | 153 | <| |
138 | 154 | "ObjectType"->#2 |
139 | 155 | |> |
|
160 | 176 | OFObject/@uuids |
161 | 177 | ] |
162 | 178 | ]; |
163 | | -OFNew[s_String,args___]:= |
164 | | -OFNew[<|"ObjectType"->s|>,args]; |
| 179 | +OFNew[a:{(_String->_Association|_String)..}]:= |
| 180 | +OFNew@ |
| 181 | +Map[ |
| 182 | +If[Length[#]==2, |
| 183 | +Append[#[[2]],"ObjectType"->#[[1]]], |
| 184 | +<|"ObjectType"->#|> |
| 185 | +]&, |
| 186 | +a]; |
| 187 | +OFNew[a:_Association|_String|(_String->_Association)]:= |
| 188 | +First@OFNew[{a}]; |
165 | 189 |
|
166 | 190 |
|
167 | 191 | OFSelect[pattern_:_]:= |
|
0 commit comments