splitInfoLine

split info line

Rules:

1 property:
2     type name
3 
4 type:
5     d_type
6     cl_type:d_type
7 
8 name:
9     prop_name
10     cl_param_name:prop_name
package
splitInfoLine
(
string ln
)

Examples

1 auto r = splitInfoLine( "uint param" );
2 assertEq( r.d_type, "uint" );
3 assertEq( r.cl_type, "uint" );
4 assertEq( r.prop_name, "param" );
5 assertEq( r.cl_param_name, "param" );
1 auto r = splitInfoLine( "cl_uint:MyEnum param" );
2 assertEq( r.d_type, "MyEnum" );
3 assertEq( r.cl_type, "cl_uint" );
4 assertEq( r.prop_name, "param" );
5 assertEq( r.cl_param_name, "param" );
1 auto r = splitInfoLine( "uint param:prop" );
2 assertEq( r.d_type, "uint" );
3 assertEq( r.cl_type, "uint" );
4 assertEq( r.prop_name, "prop" );
5 assertEq( r.cl_param_name, "param" );
1 auto r = splitInfoLine( "cl_uint:MyEnum param:prop" );
2 assertEq( r.d_type, "MyEnum" );
3 assertEq( r.cl_type, "cl_uint" );
4 assertEq( r.prop_name, "prop" );
5 assertEq( r.cl_param_name, "param" );

Meta