ffead.server.doc
Method.cpp
1 /*
2  Copyright 2009-2012, Sumeet Chhetri
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 /*
17  * Method.cpp
18  *
19  * Created on: Oct 10, 2009
20  * Author: sumeet
21  */
22 
23 #include "Method.h"
24 
25 Method::Method() {
26  // TODO Auto-generated constructor stub
27 
28 }
29 
30 Method::~Method() {
31  // TODO Auto-generated destructor stub
32 }
33 
34 string Method::getAccessSpecifier() const
35 {
36  return accessSpecifier;
37 }
38 
39 void Method::setAccessSpecifier(string accessSpecifier)
40 {
41  this->accessSpecifier = accessSpecifier;
42 }
43 
44 string Method::getMethodName() const
45 {
46  return methodName;
47 }
48 
49 void Method::setMethodName(string methodName)
50 {
51  this->methodName = methodName;
52 }
53 
54 string Method::getReturnType() const
55 {
56  return returnType;
57 }
58 
59 void Method::setReturnType(string returnType)
60 {
61  this->returnType = returnType;
62 }
63 
64 args Method::getArgumentTypes() const
65 {
66  return argumentTypes;
67 }
68 
69 void Method::setArgumentTypes(args argumentTypes)
70 {
71  this->argumentTypes = argumentTypes;
72 }
73 
74 int Method::getArgNum() const
75 {
76  return this->argumentTypes.size();
77 }
78 
79 void Method::clear()
80 {
81  accessSpecifier ="";
82  methodName="";
83  returnType="";
84  argumentTypes.clear();
85 }
86 
87 /*string Method::getKey()
88 {
89  string key = getMethodName();
90  for (unsigned int var = 0; var < getArgumentTypes().size(); var++)
91  {
92  if(getArgumentTypes().at(var)!="")
93  key += getArgumentTypes().at(var);
94  }
95  return key;
96 }*/