19
19
#ifndef __CCandidateInfo_h__
20
20
#define __CCandidateInfo_h__
22
/** \internal Internal part of the overload resolution mechanism. */
25
* Representation of a C++ overload resolution candidate. */
22
27
#include "Puma/CCConvSeq.h"
23
28
#include "Puma/Array.h"
27
32
class CFunctionInfo;
29
/** \internal Internal part of the overload resolution mechanism. */
32
* Representation of a C++ overload resolution candidate.
33
* \see Puma::CCandidateInfo */
35
/** \class CCandidateInfo CCandidateInfo.h Puma/infos/CCandidateInfo.h
36
* A CCandidateInfo object represents a candidate for the C++
37
* function overload resolution mechanism. Such a candidate stores
38
* the candidate function and the conversion sequences of the function
39
* call arguments needed to match the function parameter types. */
34
/** \class CCandidateInfo CCandidateInfo.h Puma/CCandidateInfo.h
35
* Representation of a candidate for the C++ function overload
36
* resolution mechanism. Such a candidate stores the candidate
37
* function and the conversion sequences of the function call
38
* arguments needed to match the function parameter types of
39
* the overloaded function. */
40
40
class CCandidateInfo {
41
41
Array<CCConvSeq*> _ConvSequences;
42
42
CFunctionInfo *_Function;
43
43
CCConvSeq *_SecondConvSeq;
46
/** Construct a new candidate info.
47
* \param fi The function info of the candidate. */
47
* \param fi The candidate function. */
48
48
CCandidateInfo (CFunctionInfo *fi);
49
/** Destruct the candidate info. */
50
50
~CCandidateInfo ();
52
52
/** Get the candidate function. */
53
53
CFunctionInfo *Function () const;
54
54
/** Set the candidate function.
55
* \param fi The candidate function info. */
55
* \param fi The candidate function. */
56
56
void Function (CFunctionInfo *fi);
58
/** Add a conversion sequence for an argument. The conversion
59
* sequences are added in the order of the argument of the
58
/** Add a conversion sequence for a function argument.
59
* The conversion sequences are added in the order of
60
* the arguments of the function call.
61
61
* \param seq The conversion sequence. */
62
62
void addConvSequence (CCConvSeq *seq);
65
65
unsigned ConvSequences () const;
66
66
/** Get the n-th conversion sequence. The n-th conversion sequence
67
67
* corresponds to the n-th function call argument.
68
* \param n The conversion sequence or \c NULL if \e n is invalid. */
68
* \param n The conversion sequence or NULL if \e n is invalid. */
69
69
CCConvSeq *ConvSequence (unsigned n);
71
71
/** Set the \e second conversion sequence. This is a user-defined
72
72
* conversion by means of a user-defined conversion function.
73
73
* \param seq The conversion sequence. */
74
74
void SecondConvSeq (CCConvSeq *seq);
75
/** Set the \e second conversion sequence. */
75
/** Get the \e second conversion sequence. */
76
76
CCConvSeq *SecondConvSeq () const;