VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrf::DtCreateMenuBuilder Class Reference
Inheritance diagram for makVrf::DtCreateMenuBuilder:
Inheritance graph
[legend]

Public Types

enum  Flags {
  CategoryFolderOnly = 0x00000001, AddAllEnvironmentals = 0x00000002, AddAllForces = 0x00000004, PlaceOnPaletteSubmenu = 0x00000010,
  CategoryTopLevelTagsOnly = 0x00000020, AddAll = (AddAllEnvironmentals | AddAllForces), DefaultCreationFlags = (CategoryTopLevelTagsOnly | PlaceOnPaletteSubmenu)
}
typedef std::map< std::string,
makVrv::DtUnicode
MenuPalettes

Public Member Functions

 DtCreateMenuBuilder (makVrv::DtDe &)
 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 (const DtModelSet *modelSet, Flags) const
 Creates a menu from the loaded structure and returns a pointer to it (which must be deleted by the caller).
const MenuPalettesmenuPalettes () const
 Returns currently mapped palettes and titles.
virtual makVrv::DtUnicode paletteTitle (const std::string &) const
 Returns palette title.
virtual void addPalette (const std::string &key, const makVrv::DtUnicode &title)
 Adds a menu mapping for an internal palette option (TacticalGraphicCreationPalette, HazardAreaCreationPalette) and the menu name associated with it.
virtual void removePalette (const std::string &)
 Removes a palette mapping.
virtual void setTags (const DtSimulationObjectCategoryInformation &)
 If using tags only (top level) this must be set.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtCreateMenuBuilderinstance (makVrv::DtDe &de)
 Returns instance of the manager.
static void registerInstance (makVrv::DtDe &, DtCreateMenuBuilder *)
 Register a new manager instance.

Protected Member Functions

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

Protected Attributes

makVrv::DtDemyDe
std::vector< DtEntityMapperKeymyIndividualMenuItems
MenuPalettes myMenuPalettes
DtSimulationObjectCategoryInformation myTags

Private Member Functions

 DtCreateMenuBuilder ()
 Not implemented.

Member Typedef Documentation

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

PlaceOnPaletteSubmenu 

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

CategoryTopLevelTagsOnly 

Places items in a sub menu by palette name.

AddAll 

Looks at only top level tags when assigning tag categories. A superset of Folder Only.

DefaultCreationFlags 

Constructor & Destructor Documentation

makVrf::DtCreateMenuBuilder::DtCreateMenuBuilder ( )
private

Not implemented.

makVrf::DtCreateMenuBuilder::DtCreateMenuBuilder ( makVrv::DtDe )

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 ( const DtModelSet modelSet,
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

const MenuPalettes& makVrf::DtCreateMenuBuilder::menuPalettes ( ) const
inline

Returns currently mapped palettes and titles.

virtual makVrv::DtUnicode makVrf::DtCreateMenuBuilder::paletteTitle ( const std::string &  ) const
virtual

Returns palette title.

virtual void makVrf::DtCreateMenuBuilder::addPalette ( const std::string &  key,
const makVrv::DtUnicode title 
)
virtual

Adds a menu mapping for an internal palette option (TacticalGraphicCreationPalette, HazardAreaCreationPalette) and the menu name associated with it.

virtual void makVrf::DtCreateMenuBuilder::removePalette ( const std::string &  )
virtual

Removes a palette mapping.

static DtCreateMenuBuilder& makVrf::DtCreateMenuBuilder::instance ( makVrv::DtDe de)
static

Returns instance of the manager.

static void makVrf::DtCreateMenuBuilder::registerInstance ( makVrv::DtDe ,
DtCreateMenuBuilder  
)
static

Register a new manager instance.

virtual void makVrf::DtCreateMenuBuilder::setTags ( const DtSimulationObjectCategoryInformation )
virtual

If using tags only (top level) this must be set.

If there are no top level tags will default back to using folders only

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
std::vector<DtEntityMapperKey> makVrf::DtCreateMenuBuilder::myIndividualMenuItems
protected
MenuPalettes makVrf::DtCreateMenuBuilder::myMenuPalettes
protected
DtSimulationObjectCategoryInformation makVrf::DtCreateMenuBuilder::myTags
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)