-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathDestFinfo.cpp
67 lines (58 loc) · 1.56 KB
/
DestFinfo.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**********************************************************************
** This program is part of 'MOOSE', the
** Messaging Object Oriented Simulation Environment.
** Copyright (C) 2003-2010 Upinder S. Bhalla. and NCBS
** It is made available under the terms of the
** GNU Lesser General Public License version 2.1
** See the file COPYING.LIB for the full notice.
**********************************************************************/
#include <typeinfo>
#include "header.h"
DestFinfo::~DestFinfo()
{
delete func_;
}
DestFinfo::DestFinfo(const string& name, const string& doc, OpFunc* func)
: Finfo(name, doc), func_(func)
{
;
}
void DestFinfo::registerFinfo(Cinfo* c)
{
if(c->baseCinfo()) {
const Finfo* bf = c->baseCinfo()->findFinfo(name());
if(bf) {
const DestFinfo* df = dynamic_cast<const DestFinfo*>(bf);
assert(df);
fid_ = df->fid_;
c->overrideFunc(fid_, func_);
return;
}
}
fid_ = c->registerOpFunc(func_);
// cout << c->name() << "." << name() << ": " << fid_ << endl;
}
const OpFunc* DestFinfo::getOpFunc() const
{
return func_;
}
FuncId DestFinfo::getFid() const
{
return fid_;
}
bool DestFinfo::strSet(const Eref& tgt, const string& field,
const string& arg) const
{
assert(0);
return false;
}
bool DestFinfo::strGet(const Eref& tgt, const string& field,
string& returnValue) const
{
assert(0);
return false;
}
string DestFinfo::rttiType() const
{
return func_->rttiType();
}