All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
test_propertysystem.cc File Reference

This file tests the properties system. More...

#include "config.h"
#include <ewoms/common/propertysystem.hh>
#include <iostream>

Functions

 Ewoms::Properties::NEW_TYPE_TAG (Vehicle)
 
 Ewoms::Properties::NEW_TYPE_TAG (CompactCar, INHERITS_FROM(Vehicle))
 
 Ewoms::Properties::NEW_TYPE_TAG (Truck, INHERITS_FROM(Vehicle))
 
 Ewoms::Properties::NEW_TYPE_TAG (Tank, INHERITS_FROM(Vehicle))
 
 Ewoms::Properties::NEW_TYPE_TAG (Sedan, INHERITS_FROM(CompactCar))
 
 Ewoms::Properties::NEW_TYPE_TAG (Pickup, INHERITS_FROM(Sedan, Truck))
 
 Ewoms::Properties::NEW_TYPE_TAG (HummerH1, INHERITS_FROM(Sedan, Pickup, Tank))
 
 Ewoms::Properties::NEW_PROP_TAG (TopSpeed)
 
 Ewoms::Properties::NEW_PROP_TAG (NumSeats)
 
 Ewoms::Properties::NEW_PROP_TAG (CanonCaliber)
 
 Ewoms::Properties::NEW_PROP_TAG (GasUsage)
 
 Ewoms::Properties::NEW_PROP_TAG (AutomaticTransmission)
 
 Ewoms::Properties::NEW_PROP_TAG (Payload)
 
 Ewoms::Properties::SET_BOOL_PROP (Vehicle, AutomaticTransmission, false)
 
 Ewoms::Properties::SET_INT_PROP (CompactCar, TopSpeed, GET_PROP_VALUE(TypeTag, GasUsage)*30)
 
 Ewoms::Properties::SET_INT_PROP (CompactCar, NumSeats, 5)
 
 Ewoms::Properties::SET_INT_PROP (CompactCar, GasUsage, 4)
 
 Ewoms::Properties::SET_INT_PROP (Truck, TopSpeed, 100)
 
 Ewoms::Properties::SET_INT_PROP (Truck, NumSeats, 2)
 
 Ewoms::Properties::SET_INT_PROP (Truck, GasUsage, 12)
 
 Ewoms::Properties::SET_INT_PROP (Truck, Payload, 35)
 
 Ewoms::Properties::SET_INT_PROP (Tank, TopSpeed, 60)
 
 Ewoms::Properties::SET_INT_PROP (Tank, GasUsage, 65)
 
 Ewoms::Properties::SET_INT_PROP (Tank, CanonCaliber, 120)
 
 Ewoms::Properties::SET_INT_PROP (Sedan, GasUsage, 7)
 
 Ewoms::Properties::SET_BOOL_PROP (Sedan, AutomaticTransmission, true)
 
 Ewoms::Properties::SET_INT_PROP (Pickup, TopSpeed, 120)
 
 Ewoms::Properties::SET_INT_PROP (Pickup, Payload, 5)
 
 Ewoms::Properties::SET_INT_PROP (HummerH1, TopSpeed, GET_PROP_VALUE(TTAG(Pickup), TopSpeed))
 
 Ewoms::Properties::UNSET_PROP (HummerH1, CanonCaliber)
 
int main ()
 

Detailed Description

This file tests the properties system.

We define a few type tags and property tags, then we attach values to (TypeTag, PropertyTag) tuples and finally we use them in the main function and print some diagnostic messages.