Topic: Impementation of exotic boundary conditions

I have a pretty exotic boundary condition I'd like to implement;
Basically, I wish to prescribe:
v = d * x = (d_dev* x + 1/3*d_vol* x)
where d_dev is given, and d_vol is unknown and x is the node coordinate.

I've been looking SlaveDof and BoundaryCondition classes for some inspiration.

If a (Dirichlet) BoundaryCondition is applied, then asking for the true dof-value is passed on to "give(Dof *dof, ValueModeType mode, TimeStep *tStep)"
which will let me the velocity as
v = (d_dev* x + 1/3*d_vol* x)
All good, but then, v can't be a slave dof, so assembling the stiffness matrix the to corresponding "masterContributions" cant be done.
Something very similar to this will be needed to implement microperiodicity as well (slave dofs with offsets).

What I would like to have is that when the active boundary condition is to a given dof, it constructs a suitable slave dof.
A special slave-dof class, connected to an active boundary condition.

I just wanted to throw the ideas out here before I start implementing anything.