class ConverterManager
package nb.fs
Utility class to keep track of nb.fs.Converters.
Add converters to this class for them to be available globally via this class's
converters. You can do this in MacroInit.hx for them to be available in macro context.
0.1.0
.Static variables
staticconverters:Array<Converter> = []
Contains all stored converters. They are used by this class's convert functions when needed.
Static methods
staticconvert(bytes:Bytes, fromType:String, toType:String, ?keywords:Array<String>):Bytes
Converts data with a stored converter.
Throws an exception if no converter was found.
Parameters:
bytes | The data to convert as bytes. |
|---|---|
fromType |
|
toType | The type to convert |
keywords | If not |
Returns:
bytes converted.
staticgetConverters(fromType:String, ?toType:String, ?keywords:Array<String>):Array<Converter>
Gets all converters from this class that can be used to do a given conversion.
Parameters:
fromType | The converters should be able to convert from this type. |
|---|---|
toType | The converters should be able to convert to this type. |
keywords | If not |
Returns:
An array of converters that satisfies all the aforementioned conditions.