19
19
#ifndef __CArgumentInfo_h__
20
20
#define __CArgumentInfo_h__
22
// function parameter info
23
* Semantic information about a function parameter. */
24
25
#include "Puma/CScopeRequest.h"
30
* Representation of a function parameter.
31
* \see Puma::CArgumentInfo */
33
/** \class CArgumentInfo CArgumentInfo.h Puma/infos/CArgumentInfo.h
34
* A CArgumentInfo object represents a function parameter declaration. */
30
/** \class CArgumentInfo CArgumentInfo.h Puma/CArgumentInfo.h
31
* Semantic information about a function parameter. */
35
32
class CArgumentInfo : public CScopeRequest {
36
33
bool _hasDefaultArg; // can be set to true even without an init tree
37
34
// (needed for inline member functions)
39
/** Construct a function parameter info. */
41
/** Destruct the function parameter info. If the object id is
42
* \c ARGUMENT_INFO, Puma::CObjectInfo::CleanUp() is called. */
38
/** Destructor. If the object type is CObjectInfo::ARGUMENT_INFO,
39
* then CObjectInfo::CleanUp() is called. */
45
42
/** Get the default argument of the parameter.
46
43
* \return The syntax tree node of the default argument or
47
* \c NULL if parameter has no default argument. */
44
* NULL if the parameter has no default argument. */
48
45
CT_ExprList *Init () const;
49
46
/** Return \e true if the parameter has a default argument. */
50
47
bool hasDefaultArg () const;
51
/** Set whether the parameter has a default argument. */
52
void hasDefaultArg (bool);
48
/** Set whether the parameter has a default argument.
49
* \param v True for yes, false for no. */
50
void hasDefaultArg (bool v);
55
53
inline CArgumentInfo::CArgumentInfo () :