-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fea8009
commit 86209c7
Showing
2 changed files
with
11 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
Class { | ||
#name : #OPXMIWriter, | ||
#superclass : #Object, | ||
#category : 'OP-XMI-Writer' | ||
#category : #'OP-XMI-Writer' | ||
} | ||
|
||
{ #category : #writing } | ||
OPXMIWriter class >> write: anXMI to: aStream [ | ||
^ self new write: anXMI to: aStream | ||
] | ||
OPXMIWriter class >> toString: anXMI [ | ||
|
||
{ #category : #writing } | ||
OPXMIWriter class >> writeToString: anXMI [ | ||
^ String streamContents: [ :stream | self write: anXMI to: stream ] | ||
] | ||
|
||
{ #category : #writing } | ||
OPXMIWriter >> write: anXMI to: aStream [ | ||
| visitor | | ||
visitor := OPXMIWriterVisitor new. | ||
visitor visit: anXMI. | ||
aStream << visitor contents | ||
^ visitor contents | ||
] | ||
|
||
{ #category : #writing } | ||
OPXMIWriter class >> write: anXMI toStream: aStream [ | ||
|
||
aStream << (self toString: anXMI) | ||
] |