ffead.server.doc
Class.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  * Class.cpp
18  *
19  * Created on: Nov 20, 2009
20  * Author: sumeet
21  */
22 
23 #include "Class.h"
24 
25 Class::Class() {
26  // TODO Auto-generated constructor stub
27 
28 }
29 
30 Class::~Class() {
31  // TODO Auto-generated destructor stub
32 }
33 
34 string Class::getName() const
35 {
36  return name;
37 }
38 
39 void Class::setName(string name)
40 {
41  this->name = name;
42 }
43 
44 string Class::getAccess() const
45 {
46  return access;
47 }
48 
49 void Class::setAccess(string access)
50 {
51  this->access = access;
52 }
53 
54 string Class::getType() const
55 {
56  return type;
57 }
58 
59 void Class::setType(string type)
60 {
61  this->type = type;
62 }
63 
64 string Class::getPackage() const
65 {
66  return package;
67 }
68 
69 void Class::setPackage(string package)
70 {
71  this->package = package;
72 }
73 
74 string Class::getBase() const
75 {
76  return base;
77 }
78 
79 void Class::setBase(string base)
80 {
81  this->base = base;
82 }
83 
84 string Class::getInterfaces() const
85 {
86  return interfaces;
87 }
88 
89 void Class::setInterfaces(string interfaces)
90 {
91  this->interfaces = interfaces;
92 }
93 
94 string Class::getLang() const
95 {
96  return lang;
97 }
98 
99 void Class::setLang(string lang)
100 {
101  this->lang = lang;
102 }
103 
104 /*Method Class::getMethod(string name,args args)
105 {
106  for (int var = 0; var < args.size(); ++var)
107  {
108  name += (args.at(var));
109  }
110  return this->methods[name];
111 }*/
112 
113 Field Class::getField(string name)
114 {
115  return this->fields[name];
116 }
117 
118 void Class::addMethod(Method meth)
119 {
120  string key = meth.getMethodName();
121  for (int var = 0; var < (int)meth.getArgumentTypes().size(); ++var)
122  {
123  key += (meth.getArgumentTypes().at(var));
124  }
125  this->methods[key] = meth;
126 }
127 /*void Class::addField(Field fld)
128 {
129  this->field[fld.getFieldName()] = fld;
130 }*/