Wallaroo  0.8
Classes | Namespaces | Macros | Functions
catalog.h File Reference
#include <string>
#include <typeinfo>
#include <cassert>
#include "detail/partshell.h"
#include "cxx0x.h"
#include "part.h"
#include "class.h"

Go to the source code of this file.

Classes

class  wallaroo::Catalog
 
class  wallaroo::UseAsExpression
 
class  wallaroo::UseExpression
 
class  wallaroo::SetOfExpression
 
class  wallaroo::SetExpression
 
class  wallaroo::Context
 

Namespaces

 wallaroo
 

Macros

#define wallaroo_within(C)
 

Functions

UseExpression wallaroo::use (const detail::PartShell &destClass)
 
UseExpression wallaroo::use (const std::string &destClass)
 
SetExpression wallaroo::set_attribute (const std::string &attribute)
 

Macro Definition Documentation

#define wallaroo_within (   C)

This preamble creates a scope in which every statement use().as().of() will use the catalog C withouth the need to specify it every time. So, this code:

Catalog myCatalog;
...
wallaroo_within( myCatalog )
{
use( "f136e" ).as( "engine" ).of( "ferrari_f430" );
use( "m139p" ).as( "engine" ).of( "maserati_granturismo" );
}

is equivalent to:

Catalog myCatalog;
...
use( myCatalog[ "f136e" ] ).as( "engine" ).of( myCatalog[ "ferrari_f430" ] );
use( myCatalog[ "m139p" ] ).as( "engine" ).of( myCatalog[ "maserati_granturismo" ] );