Creates a table with specifications of type *specType*. If no label AND no caption are given this method returns a LaTeX tabular snippet. Else it returns a table snippet. :param specs: List with SLiCAP.SLiCAPdesignData.specItem objects. :type specs: list
(self, specs, specType, label="", caption="")
| 385 | return Snippet(RST, self.format) |
| 386 | |
| 387 | def specs(self, specs, specType, label="", caption=""): |
| 388 | """ |
| 389 | Creates a table with specifications of type *specType*. |
| 390 | If no label AND no caption are given this method returns a LaTeX |
| 391 | tabular snippet. Else it returns a table snippet. |
| 392 | |
| 393 | :param specs: List with SLiCAP.SLiCAPdesignData.specItem objects. |
| 394 | :type specs: list |
| 395 | |
| 396 | :param label: Reference label for the table. Defaults to an empty string. |
| 397 | :type label: str |
| 398 | |
| 399 | :param caption: Table caption. |
| 400 | :type caption: str |
| 401 | |
| 402 | :return: SLiCAP Snippet object |
| 403 | :rtype: SLiCAP.SLiCAPprotos.Snippet |
| 404 | """ |
| 405 | linesList = [] |
| 406 | headerList = ["Name", "Description", "value", "units"] |
| 407 | for specItem in specs: |
| 408 | if specItem.specType.lower()==specType.lower(): |
| 409 | linesList.append(specItem._specLine()) |
| 410 | if len(linesList) > 0: |
| 411 | RST = _RSTcreateCSVtable(caption, headerList, linesList, |
| 412 | label=label) + '\n' |
| 413 | else: |
| 414 | RST = "**Found no specifications of type: " + specType + ".**\n\n" |
| 415 | return Snippet(RST, self.format) |
| 416 | |
| 417 | def eqn(self, LHS, RHS, units="", label="", multiline=False): |
| 418 | """ |
no test coverage detected