Free Electron
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
fe::RecordCookbook Class Reference

Instructions to set attributes of a Record. More...

#include <RecordCookbook.h>

Inheritance diagram for fe::RecordCookbook:
Inheritance graph
[legend]

Public Types

typedef AutoHashMap< String, StringStringStringMap
 
typedef AutoHashMap< String, Ingredient > StringIngredientMap
 
typedef AutoHashMap< sp< Scope >, StringIngredientMap > ScopeCacheMap
 

Public Member Functions

void initialize (void)
 
void registerDependency (sp< Registry > a_spRegistry)
 
void clear (void)
 
void derive (String recipeName, String parentName)
 Add a prerequisite to a recipe. More...
 
void findLayoutList (sp< Scope > spScope, String recipeName, Array< String > &rLayoutList)
 Return the layouts for a recipe. More...
 
void add (String recipeName, String attributeName, String value)
 Define an initial value for a recipe's attribute. More...
 
void cook (sp< Scope > spScope, String recipeName, Record &rRecord)
 Apply initial values for a recipe to a Record. More...
 
void cook_internal (sp< Scope > spScope, String recipeName, Record &rRecord, BWORD try_cache, StringIngredientMap *pNewCacheMap)
 Recursively cook recipes. More...
 
void spoil (String recipeName)
 Recursively clear cached Record templates. More...
 
const Stringname (void) const
 
StringStringsMap & factoryMultiMap (void)
 
- Public Member Functions inherited from fe::Component
const Stringname (void) const
 Return the components chosen name. More...
 
const String verboseName (void) const
 Return the annotated chosen name. More...
 
void setName (const String &name)
 Rename the component to anything you want. More...
 
hp< Registryregistry (void) const
 Get the Registry that created this component. More...
 
void adjoin (sp< Component > spComponent)
 Tie this component's lifetime to another. More...
 
sp< Componentcreate (const String &implementation, BWORD quiet=FALSE) const
 Convienience function to registry()->create() More...
 
void disjoin (void)
 Untie component from Hub, if connected. More...
 
void setLibrary (sp< Library > spLibrary)
 Store a reference to the library used to instantiate this component. More...
 
sp< Librarylibrary (void)
 Get the library that created the component. More...
 
void setSingleton (BWORD set)
 Specify whether component is a singleton. More...
 
BWORD isSingleton (void)
 Return whether component is a singleton. More...
 
virtual void acquire (void)
 Specialized reference increment. More...
 
virtual void release (void)
 Specialized reference decrement. More...
 
- Public Member Functions inherited from fe::Handled< Component >
const hp< Component > & getHandle (void) const
 Get a safe handle to this object. More...
 
- Public Member Functions inherited from fe::Protectable
virtual I32 protection (void) const
 
virtual void protect (void)
 
virtual void unprotect (void)
 
virtual Protectableclone (Protectable *pInstance=NULL)
 
- Public Member Functions inherited from fe::Counted
virtual void acquire (int &rCount)
 Increment the reference count (and get the count) More...
 
virtual void abandon (void)
 Decrement the reference count. More...
 
int count (void) const
 Return the count of references. More...
 
void setName (const String &)
 
void trackReference (void *pReference, String what)
 
void untrackReference (void *pReference)
 
void registerRegion (void *pT, U32 bytes)
 
- Public Member Functions inherited from fe::Initialized
void initializeAll (void)
 
void setActive (bool a_active)
 

Private Types

typedef HashMap< String, sp< Recipe >, hash_string, eq_string > StringRecipeMap
 

Private Member Functions

sp< Recipe > lookup (String recipeName)
 

Private Attributes

String m_name
 
StringRecipeMap m_recipeMap
 
StringStringsMap m_factoryMultiMap
 

Additional Inherited Members

- Static Public Member Functions inherited from fe::Counted
static String reportTracker (void)
 
static U32 trackerCount (void)
 
- Protected Types inherited from fe::Initialized
typedef void(* InitializeFunction) (Initialized *)
 
- Protected Member Functions inherited from fe::Handled< Component >
void abandonHandle (void)
 
- Protected Member Functions inherited from fe::Counted
int releaseInternal (void)
 Decrement the reference count. More...
 
void suppressReport (void)
 
- Protected Member Functions inherited from fe::Initialized
void addInitializer (InitializeFunction function)
 

Detailed Description

Instructions to set attributes of a Record.

Member Function Documentation

◆ add()

void fe::RecordCookbook::add ( String  recipeName,
String  attributeName,
String  value 
)

Define an initial value for a recipe's attribute.

Redundant definitions favor the latest.

◆ cook()

void fe::RecordCookbook::cook ( sp< Scope spScope,
String  recipeName,
Record rRecord 
)

Apply initial values for a recipe to a Record.

◆ cook_internal()

void fe::RecordCookbook::cook_internal ( sp< Scope spScope,
String  recipeName,
Record rRecord,
BWORD  try_cache,
StringIngredientMap *  pNewCacheMap 
)

Recursively cook recipes.

References fe::RecordSB::isValid().

◆ derive()

void fe::RecordCookbook::derive ( String  recipeName,
String  parentName 
)

Add a prerequisite to a recipe.

◆ findLayoutList()

void fe::RecordCookbook::findLayoutList ( sp< Scope spScope,
String  recipeName,
Array< String > &  rLayoutList 
)

Return the layouts for a recipe.

Often the Layout name will match the recipe name, but if a derived recipe is merging Layouts or just replacing replacing initial values, it may not. In this case, the parent classes are searched for a required Layouts.

◆ spoil()

void fe::RecordCookbook::spoil ( String  recipeName)

Recursively clear cached Record templates.


The documentation for this class was generated from the following files: