Hi, 
I am trying to modify the routing module in nox 6 version. I have made changes 
in routing.cc and routing.hh files in the netapps/routing component.

At compilation I am getting error:

src/nox/netapps/routing/routing.cc:93: error: invalid use of nonstatic data 
member ‘vigil::applications::Routing_module::weight_map’

I have following hashmap added in the routing.hh file:

 typedef hash_map<RoutePtr, int, routehash, routeq> WeightMap;
 WeightMap weight_map;

Following is the code line in routing.cc which gives error:
bool
Routing_module::ruleptrcmp::operator()(const RoutePtr& a, const RoutePtr& b) 
const
{
      return( weight_map.find(a)->second > weight_map.find(b)->second );// 
error in this statement
}

After some exploration, we have found that the error is because the overload 
function is defined in a structure and it cannot directly access the class 
member.

How do we get access to the Routing_module class member from inside the 
operator()?

Thanks,
Shruti

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to