File: XdmfExampleCoreItemFactory.py

package info (click to toggle)
xdmf 3.0%2Bgit20190531-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,756 kB
  • sloc: cpp: 67,089; ansic: 5,172; python: 4,566; f90: 1,247; java: 187; fortran: 173; makefile: 83; 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