File: XdmfExampleCoreItemFactory.py

package info (click to toggle)
xdmf 3.0%2Bgit20160803-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 35,388 kB
  • ctags: 36,627
  • sloc: ansic: 265,382; cpp: 162,889; python: 10,976; f90: 1,378; yacc: 687; fortran: 464; xml: 200; java: 187; lex: 125; makefile: 82; sh: 28
file content (15 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from Xdmf import *

if __name__ == "__main__":
        #//createItem begin

        #using XdmfItemFactory because XdmfCoreItemFactory is abstract
        exampleFactory = XdmfItemFactory.New()
        newProperties = StringMap()
        newChildren = ItemVector()
        exampleItem = exampleFactory.createItem(XdmfAttribute.ItemTag, newProperties, newChildren)
        #Same usage as the individual constructors
        #childItems and itemProperties are not added to the item when created this way
        #the collections are used to determine type

        #//createItem end