accessByString

Members

Properties

opDispatch
T opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
T opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
auto opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
U opDispatch [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

struct NF
{
    ivec2 data;
    this(E...)( E e ) if( is(typeof(ivec2(e))) ) { data = ivec2(e); }
    mixin accessByString!( 2,int,"data", "near far|n f" );
}

auto b = NF(1,100);
assert( eq( b.near, b.n ) );
assert( eq( b.far, b.f ) );

b.nf = ivec2( 10,20 );
assert( eq( b.near, 10 ) );
assert( eq( b.far, 20 ) );

Meta