1 puts "================"
3 puts "================"
5 ###################################################################################################
6 # Add the possibility in OCAF to open/save a document from/to a stream object (BinOcaf format)
7 ###################################################################################################
13 # Add an attribute to a data framework
16 SetInteger D ${aLabel} ${aSetAttr1}
18 # Close/Open the transaction
22 set aFile ${imagedir}/${casename}.cbf
24 SaveAs D ${aFile} -stream
25 if { ![file exists ${aFile}] } {
26 puts "Error: there is not ${aFile} file; SaveAs command"
31 # Restore the document
33 Open ${aFile} DD -stream
35 # Get a value of the attribute
36 set IsDone [catch {set aGetAttr3 [GetInteger DD ${aLabel}]} aResult]
37 if { ${IsDone} != 0 ||
38 ${aSetAttr1}!=${aGetAttr3} } {
40 puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}"
41 puts "Error: get a value of TDataStd_Integer attribute from Streamed restoring document"
43 puts "Get a value of TDataStd_Integer attribute from Streamed restoring document: OK"