Puma Reference Manual Puma::ACAdviceInfo Class Reference



Puma::ACAdviceInfo Class Reference

Semantic information about an AspectC++ 'advice' declaration. More...

#include <Puma/ACAdviceInfo.h>

Public Types

enum  advice_type {
  BEFORE,
  AROUND,
  AFTER
}
 The three advice types: before, around, and after advice. More...
 

Public Member Functions

 ACAdviceInfo (int n)
 Construct an advice info object. More...
 
const char * name ()
 Get the internal name of the advice. More...
 
bool is_inherited ()
 Return true if the advice is inherited from another aspect. More...
 
void is_inherited (bool i)
 Set the inherited state of the advice info. More...
 
void parent (ACAdviceInfo *p)
 Set the parent advice. More...
 
ACAdviceInfoparent ()
 Get the parent advice info. More...
 
ACAdviceInforoot ()
 If an advice is inherited, this method returns the info of the advice of the aspect first defining the advice. More...
 
advice_type type ()
 Get the type of the advice. More...
 
void def_node (CT_AdviceDecl *ad)
 Set the syntax tree node of the definition of the advice. More...
 
CT_AdviceDecldef_node ()
 Get the advice definition syntax tree node. More...
 
void decl_node (CT_AdviceDecl *ad)
 Set the syntax tree node of the declaration of the advice. More...
 
CT_AdviceDecldecl_node ()
 Get the advice declaration syntax tree node. More...
 
void Aspect (ACAspectInfo *ai)
 Set the aspect containing the advice. More...
 
ACAspectInfoAspect ()
 Get the aspect containing the advice. More...
 
CFunctionInfofunction ()
 Get the function info of the advice. More...
 
bool uses_aspectOf () const
 Return true if the advice uses the aspectOf() function. More...
 
void uses_aspectOf (bool u)
 Set the state whether the advice uses the aspectOf() function. More...
 

Detailed Description

Semantic information about an AspectC++ 'advice' declaration.

An advice is part of an aspect declaration.

Member Enumeration Documentation

The three advice types: before, around, and after advice.

Enumerator
BEFORE 
AROUND 
AFTER 

Constructor & Destructor Documentation

Puma::ACAdviceInfo::ACAdviceInfo ( int  n)
inline

Construct an advice info object.

Also constructs the internal name of an advice.

Parameters
nA consecutive number used for the unique internal name of the advice.

Member Function Documentation

void Puma::ACAdviceInfo::Aspect ( ACAspectInfo ai)
inline

Set the aspect containing the advice.

Parameters
aiThe aspect info.
ACAspectInfo* Puma::ACAdviceInfo::Aspect ( )
inline

Get the aspect containing the advice.

void Puma::ACAdviceInfo::decl_node ( CT_AdviceDecl ad)
inline

Set the syntax tree node of the declaration of the advice.

Parameters
adThe advice declaration syntax tree node.
CT_AdviceDecl* Puma::ACAdviceInfo::decl_node ( )
inline

Get the advice declaration syntax tree node.

void Puma::ACAdviceInfo::def_node ( CT_AdviceDecl ad)
inline

Set the syntax tree node of the definition of the advice.

Parameters
adThe advice definition syntax tree node.
CT_AdviceDecl* Puma::ACAdviceInfo::def_node ( )
inline

Get the advice definition syntax tree node.

CFunctionInfo* Puma::ACAdviceInfo::function ( )

Get the function info of the advice.

Advice declarations are syntactically realized as function declaration.

bool Puma::ACAdviceInfo::is_inherited ( )
inline

Return true if the advice is inherited from another aspect.

void Puma::ACAdviceInfo::is_inherited ( bool  i)
inline

Set the inherited state of the advice info.

Parameters
itrue if the advice is inherited from another aspect.
const char* Puma::ACAdviceInfo::name ( )
inline

Get the internal name of the advice.

void Puma::ACAdviceInfo::parent ( ACAdviceInfo p)
inline

Set the parent advice.

The parent advice is the advice in the base aspect from which this advice inherits.

Parameters
pThe advice info of the parent advice.
ACAdviceInfo* Puma::ACAdviceInfo::parent ( )
inline

Get the parent advice info.

If an advice is inherited from another aspect, this method returns the info of the corresponding advice of the base aspect.

Returns
The advice info or NULL if advice is not inherited.
ACAdviceInfo* Puma::ACAdviceInfo::root ( )
inline

If an advice is inherited, this method returns the info of the advice of the aspect first defining the advice.

Returns
The advice info or this if the advice is not inherited.
advice_type Puma::ACAdviceInfo::type ( )
inline

Get the type of the advice.

bool Puma::ACAdviceInfo::uses_aspectOf ( ) const
inline

Return true if the advice uses the aspectOf() function.

void Puma::ACAdviceInfo::uses_aspectOf ( bool  u)
inline

Set the state whether the advice uses the aspectOf() function.

Parameters
utrue if the advice uses the aspectOf() function.



Puma Reference Manual. Created on Fri Oct 24 2014.