Arrays of an interface

Abdulhaq alynch4047 at gmail.com
Tue Dec 31 06:45:02 PST 2013


On Tuesday, 31 December 2013 at 14:41:39 UTC, Adam D. Ruppe wrote:
> Can you post more of the code? Maybe MethodImpl forgot to 
> inherit from Method or there's a const mismatch or something 
> like that.

Here you are:

/**
* The MethodImpl class is the main implementation of Method
*/
class MethodImpl: Method {
	
	/**
	* Either package_or klass should be set but not both,
	* package indicates it is a function
	*/
	private Klass _klass;
	private Package package_;
	
	/// index is used to distinguish methods of the same name but
differing arguments
	private int index;
	
	private bool _virtual = false;
	private bool _abstract_ = false;
	private bool _static_ = false;
	private bool _constructor = false;
	private bool _destructor = false;
	private bool _hasEllipsis = false;
	private bool _const_ = false;
	
	private Annotation[] annotations;
	private Visibility _visibility;
	private string _name;
	private string _annotatedDName;
	private string _methodCodeD;
	private Argument[] _arguments;
	private CType _returnType;	
	
	@property bool virtual() {return _virtual;}
	@property bool abstract_() {return _abstract_;}
	@property bool static_() {return _static_;}
	@property bool constructor() {return _constructor;}
	@property bool destructor() {return _destructor;}
	@property bool hasEllipsis() {return _hasEllipsis;}
	@property bool const_() {return _const_;}
	@property CType returnType() {return _returnType;}
	@property Klass klass() {return _klass;}
	@property Argument[] arguments() {return _arguments;}
	@property Visibility visibility() {return _visibility;}
	@property string name() {return _name;}
	string methodCodeD() {return _methodCodeD;}
	void setMethodCodeD(string code) {_methodCodeD = code;}
	@property bool transferBack() {
		return canFind(annotations, new Annotation(TRANSFERBACK));
	}
etc....


More information about the Digitalmars-d-learn mailing list