www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Ddoc doesn't support documentation for mixined code?

reply "Alex Moroz" <hypothermia.frost gmail.com> writes:
Hi,

As of present Ddoc doesn't seem to process documenatation for code that is  
inserted with mixins.
For example:

/**
*Declares a protected field of type T, with default setter and getter for  
it.
*/
template Property(T,string name,string setterExtra="")
{
	enum string Property="void "~name~"("~(T).stringof~"  
_"~name~"){this._"~name~"=_"~name~";"~setterExtra~"}///ditto\n nothrow  
"~(T).stringof~" "~name~"(){return this._"~name~";} protected  
"~(T).stringof~" _"~name~";";
}
/**
*item.
*/
class Item: {
	/**
	*No documentation generated!
	*/
	mixin(Property!(Image,"image"));
}

I think its important keeping the documentation together, and I probably  
will have to switch to hand written methods because of this.
So will it will ever be possible that ddoc will actually generate the  
documentation? Or are there any other ways to achieve this?

Thanks
Dec 10 2010
parent Don <nospam nospam.com> writes:
Alex Moroz wrote:
 Hi,
 
 As of present Ddoc doesn't seem to process documenatation for code that 
 is inserted with mixins.
Bug 2440?
Dec 10 2010