[aspectc-user] Problem with introducing methods ...
Masoud Mansouri-Samani
masoud at email.arc.nasa.gov
Wed Aug 25 23:23:07 CEST 2004
Hi,
I have a problem with introducing methods in the following simple
example. I am using ac++ version 0.9pre1 on Linux. Here is the command
line and results:
$ ac++ -a test.ah -p . -c test.cpp
test.ah:12: error: invalid member declaration near token `*'
test.ah:17: error: `Employer' has no member named `getAdmin'
Where test.ah is:
class Employer {
};
class Person {
public:
Employer employer;
};
aspect Test
{
private:
advice "Employer": Person *admin;
public:
advice "Employer": Person *getAdmin() { return admin; }
advice "Person": Person *getEmployersAdmin() {
return employer.getAdmin();
}
};
And test.cpp is:
int main(int argc, char *argv[]) {
return 0;
}
What am I doing wrong? What is wrong with the introduction of "Person
*admin" on line 12?
Why does it complain about getAdmin() not being a member of Employer on
line 17. I've just introduced it!
I would appreciate any help on solving this problem.
Regards
Masoud
--
Masoud Mansouri-Samani, Ph.D.
Senior Computer Scientist
Computer Sciences Corporation
Automated Software Engineering Group
NASA Ames Research Center
Mail Stop 269-3
Moffett Field, California 94035-1000
Phone: (650) 604-0467
Email: masoud at email.arc.nasa.gov
More information about the aspectc-user
mailing list