xquery/XQuery__AnyAtomicTypeToUntypedAtomicCast.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 02 Jul 2018 08:46:01 +0200
changeset 305 bad21c4f64bf
parent 296 ea3dbc023c80
permissions -rw-r--r--
Tagged Smalltalk/X 8.0.0

"{ Package: 'stx:goodies/xmlsuite/xquery' }"

"{ NameSpace: XQuery }"

AnyAtomicTypeToAnyAtomicTypeCast subclass:#AnyAtomicTypeToUntypedAtomicCast
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'XQuery-TypeCasting'
!


!AnyAtomicTypeToUntypedAtomicCast methodsFor:'casting'!

cast
    | value |
    value := atomicValue stringValue.
    ^ AtomicItem withValue: value asType: anotherType typeName.

    "Created: / 16-11-2009 / 18:58:42 / Jan Kurs <kursj1@fel.cvut.cz>"
    "Modified: / 16-11-2009 / 22:38:14 / Jan Kurs <kursj1@fel.cvut.cz>"
! !

!AnyAtomicTypeToUntypedAtomicCast class methodsFor:'documentation'!

version_SVN
    ^ '$Id$'
! !