@ -196,6 +196,21 @@ protected:
ASTPointer < ASTString > m_documentation ;
} ;
/**
* Abstract class that is added to AST nodes that can be marked as not being fully implemented
*/
class ImplementationOptional
{
public :
explicit ImplementationOptional ( bool _implemented ) : m_implemented ( _implemented ) { }
/// @return whether this node is fully implemented or not
bool isFullyImplemented ( ) const { return m_implemented ; }
protected :
bool m_implemented ;
} ;
/// @}
/**
@ -203,10 +218,11 @@ protected:
* document order . It first visits all struct declarations , then all variable declarations and
* finally all function declarations .
*/
class ContractDefinition : public Declaration , public Documented
class ContractDefinition : public Declaration , public Documented , public ImplementationOptional
{
public :
ContractDefinition ( SourceLocation const & _location ,
ContractDefinition (
SourceLocation const & _location ,
ASTPointer < ASTString > const & _name ,
ASTPointer < ASTString > const & _documentation ,
std : : vector < ASTPointer < InheritanceSpecifier > > const & _baseContracts ,
@ -215,8 +231,12 @@ public:
std : : vector < ASTPointer < VariableDeclaration > > const & _stateVariables ,
std : : vector < ASTPointer < FunctionDefinition > > const & _definedFunctions ,
std : : vector < ASTPointer < ModifierDefinition > > const & _functionModifiers ,
std : : vector < ASTPointer < EventDefinition > > const & _events ) :
Declaration ( _location , _name ) , Documented ( _documentation ) ,
std : : vector < ASTPointer < EventDefinition > > const & _events ,
bool _isFullyImplemented
) :
Declaration ( _location , _name ) ,
Documented ( _documentation ) ,
ImplementationOptional ( _isFullyImplemented ) ,
m_baseContracts ( _baseContracts ) ,
m_definedStructs ( _definedStructs ) ,
m_definedEnums ( _definedEnums ) ,
@ -378,18 +398,23 @@ private:
std : : vector < ASTPointer < VariableDeclaration > > m_parameters ;
} ;
class FunctionDefinition : public Declaration , public VariableScope , public Documented
class FunctionDefinition : public Declaration , public VariableScope , public Documented , public ImplementationOptional
{
public :
FunctionDefinition ( SourceLocation const & _location , ASTPointer < ASTString > const & _name ,
FunctionDefinition (
SourceLocation const & _location ,
ASTPointer < ASTString > const & _name ,
Declaration : : Visibility _visibility , bool _isConstructor ,
ASTPointer < ASTString > const & _documentation ,
ASTPointer < ParameterList > const & _parameters ,
bool _isDeclaredConst ,
std : : vector < ASTPointer < ModifierInvocation > > const & _modifiers ,
ASTPointer < ParameterList > const & _returnParameters ,
ASTPointer < Block > const & _body ) :
Declaration ( _location , _name , _visibility ) , Documented ( _documentation ) ,
ASTPointer < Block > const & _body
) :
Declaration ( _location , _name , _visibility ) ,
Documented ( _documentation ) ,
ImplementationOptional ( _body ! = nullptr ) ,
m_isConstructor ( _isConstructor ) ,
m_parameters ( _parameters ) ,
m_isDeclaredConst ( _isDeclaredConst ) ,