VR-Forces 4.2 Class Documentation
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrf::DtCreateMenuBuilder Class Reference

Public Types

enum  Flags { CategoryFolderOnly = 0x00000001, AddAllEnvironmentals = 0x00000002, AddAllForces = 0x00000004, AddAll = (AddAllEnvironmentals | AddAllForces) }

Public Member Functions

 DtCreateMenuBuilder (makVrv::DtDe &, const DtModelSet *modelSet)
 CTOR.
virtual ~DtCreateMenuBuilder ()
 DTOR.
virtual void setIndividualMenuItems (const std::vector< DtEntityMapperKey > &)
 If set before createMenu() is called, places these items not in a sub-menu, but, at the end of the menu as flat items.
virtual DtMenucreateMenu (Flags) const
 Creates a menu from the loaded structure and returns a pointer to it (which must be deleted by the caller).

Protected Member Functions

virtual bool isIndividualMenuItem (const DtModelSetEntry *) const
virtual std::map< DtString, int > categoriesWithOnlyOneForce (const DtModelSet *) const
 Returns a mapped list of categories that only have a single force.

Protected Attributes

makVrv::DtDe & myDe
const DtModelSetmyModelSet
std::vector< DtEntityMapperKeymyIndividualMenuItems

Private Member Functions

 DtCreateMenuBuilder ()
 Not implemented.

Member Enumeration Documentation

Enumerator:
CategoryFolderOnly 
AddAllEnvironmentals 

Place all items in a single force folder vs.

individual force folders. Note that if under a category there is only one force then all items will be placed directly under the category without a force folder

AddAllForces 

Adds all environmentals regardless of whether or not they are favorites.

If not specified will only add favorite environmentals. Environmentals will be added under force specific menus, unless only one force present, in which case that will be the assumed menu

AddAll 

Adds all forces regardless of whether or not they are favorites.

Constructor & Destructor Documentation

makVrf::DtCreateMenuBuilder::DtCreateMenuBuilder ( )
private

Not implemented.

makVrf::DtCreateMenuBuilder::DtCreateMenuBuilder ( makVrv::DtDe &  ,
const DtModelSet modelSet 
)

CTOR.

virtual makVrf::DtCreateMenuBuilder::~DtCreateMenuBuilder ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrf::DtCreateMenuBuilder::setIndividualMenuItems ( const std::vector< DtEntityMapperKey > &  )
virtual

If set before createMenu() is called, places these items not in a sub-menu, but, at the end of the menu as flat items.

The force type selected will be DtForceNeutral if DtForceAny is specified. If specific forces are specified, then it will be created with the first force in the list

virtual DtMenu* makVrf::DtCreateMenuBuilder::createMenu ( Flags  ) const
virtual

Creates a menu from the loaded structure and returns a pointer to it (which must be deleted by the caller).

The structure will be category-><all force="" types="" under="" category>="">-><object for="" each="" force="" type>=""> The menu will never be more than two levels deep

virtual bool makVrf::DtCreateMenuBuilder::isIndividualMenuItem ( const DtModelSetEntry ) const
protectedvirtual
virtual std::map<DtString, int> makVrf::DtCreateMenuBuilder::categoriesWithOnlyOneForce ( const DtModelSet ) const
protectedvirtual

Returns a mapped list of categories that only have a single force.

When creating then menu, these items will be flattened out. The value of the map is that force type

Member Data Documentation

makVrv::DtDe& makVrf::DtCreateMenuBuilder::myDe
protected
const DtModelSet* makVrf::DtCreateMenuBuilder::myModelSet
protected
std::vector<DtEntityMapperKey> makVrf::DtCreateMenuBuilder::myIndividualMenuItems
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)