@classmethod
def from_cdtclass(cls, cdt, vname, **kwds):
    """
        Declaration of C member

        Parameters
        ----------
        cdt : class
            This class must have the following two attributes

            _ctype_ : ctype
                It will be used for field of `SimObject._struct_`
                (subclass of `ctypes.Structure`).
                It must be an attribute of the *class* `cdt`,
                ie., accessible via `cdt._ctype_`.
            _cdata_ : data
                It will be passed to `SimObject._struct_`
                (instance of `ctypes.Structure` subclass).
                This is required only for instance of the class, so that
                you can set this in `cdt.__init__`.
        vname : str
            Name of C member

        """
    if not hasattr(cdt, '_ctype_'):
        raise ValueError('%r (cdt of %s) does not have _ctype_ attribute' %
            (cdt, vname))
    parsed = cls()
    parsed.cdt = cdt
    parsed.vname = vname
    parsed.valtype = 'object'
    if 'default' in kwds:
        parsed.has_default = True
        parsed.default = kwds['default']
    else:
        parsed.has_default = False
    return parsed
