Templates and // *MENU* comment

I have the following problem:

I have a template class with a method that I want to be in context menu:

class MyData : public TObject
{
private:

T fData; // Simple Data member
public:

void SetData(T data) { fData = data;}; //MENU
}

T can be a Bool_t , in this case I must use //TOGGLE, right?
How can i solve this problem?
thank you
Andrea Dotti