~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2013-10-03 20:30:16 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131003203016-d4ug6l0xgosasumq
Tags: 8.2.1-1
* New upstream release.
* Updated autotools documentation sources.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*******************************************************************************
2
 
 * Copyright (c) 2005, 2012 IBM Corporation and others.
 
2
 * Copyright (c) 2005, 2013 IBM Corporation and others.
3
3
 * All rights reserved. This program and the accompanying materials
4
4
 * are made available under the terms of the Eclipse Public License v1.0
5
5
 * which accompanies this distribution, and is available at
9
9
 *     Andrew Niefer (IBM) - Initial API and implementation
10
10
 *     Markus Schorn (Wind River Systems)
11
11
 *     Thomas Corbat (IFS)
 
12
 *     Nathan Ridge
12
13
 *******************************************************************************/
13
14
package org.eclipse.cdt.internal.core.dom.parser.cpp;
14
15
 
15
16
import org.eclipse.cdt.core.dom.ast.IBinding;
16
17
import org.eclipse.cdt.core.dom.ast.IType;
 
18
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization;
17
19
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
18
20
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
19
21
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
 
22
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
20
23
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap;
21
24
 
22
25
/**
23
26
 * The specialization of a method template in the context of a class specialization.
24
27
 */
25
 
public class CPPMethodTemplateSpecialization extends CPPFunctionTemplateSpecialization 
 
28
public class CPPMethodTemplateSpecialization extends CPPFunctionTemplateSpecialization
26
29
                implements ICPPMethod {
 
30
        private ICPPTemplateParameter[] fTemplateParameters;
27
31
 
28
 
        public CPPMethodTemplateSpecialization(ICPPMethod specialized, ICPPClassType owner, 
 
32
        public CPPMethodTemplateSpecialization(ICPPMethod specialized, ICPPClassSpecialization owner,
29
33
                        ICPPTemplateParameterMap ctmap, ICPPFunctionType type, IType[] exceptionSpecs) {
30
34
                super(specialized, owner, ctmap, type, exceptionSpecs);
31
35
        }
32
36
 
 
37
        public void setTemplateParameters(ICPPTemplateParameter[] templateParameters) {
 
38
                fTemplateParameters = templateParameters;
 
39
        }
 
40
 
 
41
        @Override
 
42
        public ICPPTemplateParameter[] getTemplateParameters() {
 
43
                return fTemplateParameters;
 
44
        }
 
45
 
33
46
        @Override
34
47
        public boolean isVirtual() {
35
48
                IBinding m = getSpecializedBinding();
45
58
                        return ((ICPPMethod) m).getVisibility();
46
59
                return 0;
47
60
        }
48
 
        
 
61
 
49
62
        @Override
50
63
        public ICPPClassType getClassOwner() {
51
 
                return (ICPPClassType) getOwner();
 
64
                return getOwner();
52
65
        }
53
66
 
54
67
        @Override
56
69
                char[] name = getNameCharArray();
57
70
                if (name.length > 1 && name[0] == '~')
58
71
                        return true;
59
 
                
 
72
 
60
73
                return false;
61
74
        }
62
75
 
67
80
                        return ((ICPPMethod) m).isImplicit();
68
81
                return false;
69
82
        }
70
 
        
 
83
 
71
84
        @Override
72
85
        public boolean isExplicit() {
73
86
                IBinding m = getSpecializedBinding();
93
106
        public boolean isFinal() {
94
107
                return false;
95
108
        }
 
109
 
 
110
        @Override
 
111
        public ICPPClassSpecialization getOwner() {
 
112
                return (ICPPClassSpecialization) super.getOwner();
 
113
        }
96
114
}