25#include <vlpi/entityType.h>
26#include <vlpi/disEnums.h>
33#include <tbb/task_arena.h>
76 using DtEntityMap = std::map<DtEntityType, std::shared_ptr<DtPaletteEntry>>;
105 virtual void setSmsList(
const std::vector<DtFilename>& smsList);
122 DtIterator& iter, DtEntityType* nextType = NULL, std::shared_ptr<DtPaletteEntry>* nextEntry = NULL);
129 std::shared_ptr<DtPaletteEntry>
findEntry(
const DtEntityType& type);
139 virtual bool isValid(
const DtEntityType& type,
const std::string& role =
"",
const std::string& display =
"");
146 virtual const std::vector<std::string>
getRoleList(
const DtEntityType& type);
154 virtual std::string
findRoleForSlot(
const DtEntityType& type,
const std::string& slotName);
162 virtual std::string
findSlotForRole(
const DtEntityType& type,
const std::string& roleName);
171 virtual std::shared_ptr<DtEntityRoleDescriptor>
getRoleDescriptor(
const DtEntityType& type,
const std::string& role);
191 const DtEntityType& type,
const std::string& role,
const std::string& display);
227 virtual DtFilename
findFile(
const std::string& file);
284 virtual void getSMSList(std::vector<DtString>& smsList)
const;
298 virtual std::shared_ptr<makVre::DtVreModelSetEntry>
loadModelSetEntry(
const std::string& filename);
Table-based access to Lua state for configuration data.
Definition initializer.h:38
Configuration initializer for VREngage components.
Definition initializer.h:80
virtual std::shared_ptr< makVre::DtVreModelSetEntry > loadModelSetEntry(const std::string &filename)
Loads a model set entry.
virtual std::string findSlotForRole(const DtEntityType &type, const std::string &roleName)
Finds a slot that corresponds to a role name.
std::shared_ptr< DtPaletteEntry > myDefaultPaletteEntry
Default palette entry (used when a specific entry is not found)
Definition playerCreationPalette.h:323
virtual DtInitTable getRoleTemplate(const DtEntityType &type, const std::string &role)
Gets the base template for a role.
virtual const std::vector< DtFilename > & getSMSList() const
Gets the current list of simulation model sets.
virtual std::shared_ptr< DtEntityRoleDescriptor > getRoleDescriptor(const DtEntityType &type, const std::string &role)
Gets the descriptor for a specific role.
void setDataPathsForSms(std::vector< std::string > paths)
Sets the data paths for SMS.
DtInitializer * myInitializer
Initializer for Lua role definitions.
Definition playerCreationPalette.h:335
DtPlayerCreationPalette(DtPlayerStationApp *app)
Constructor.
virtual DtIterator getIterator()
Gets an iterator to the beginning of the entity map.
virtual DtInitializer * initializer()
Gets the palette's initializer.
std::set< std::string > myAllCategories
Set of all unique categories across all entities.
Definition playerCreationPalette.h:326
static std::vector< std::string > theSmsRoleSearchPaths
Static instance of SMS role search paths (for Lua access)
Definition playerCreationPalette.h:317
std::unique_ptr< SmsLoadCompleteMessage > mySmsLoadCompleteMessage
Message to send when SMS loading completes.
Definition playerCreationPalette.h:350
virtual const std::vector< std::string > getRoleList(const DtEntityType &type)
Gets the list of available roles for an entity type.
std::shared_ptr< DtEntityRoleDescriptor > findRole(const DtPaletteEntry &entry)
Finds any role in a palette entry.
virtual bool buildFromSMS(DtPlayerStationApp *, const std::vector< DtFilename > &smsList)
Builds the palette from SMS files.
virtual const std::set< std::string > & categories() const
Gets all categories in the palette.
Definition playerCreationPalette.h:198
DtPlayerStationApp * myApp
Pointer to the player station application.
Definition playerCreationPalette.h:332
std::shared_ptr< DtPaletteEntry > findEntry(const DtEntityType &type)
Finds an entity by its type.
void appendDataPathsForSms(std::string path)
Adds a data path for SMS.
virtual bool getNext(DtIterator &iter, DtEntityType *nextType=NULL, std::shared_ptr< DtPaletteEntry > *nextEntry=NULL)
Advances to the next entity in the palette.
std::map< DtEntityType, std::shared_ptr< DtPaletteEntry > > DtEntityMap
Type definition for a map of entity types to palette entries.
Definition playerCreationPalette.h:76
virtual void setSmsList(const std::vector< DtFilename > &smsList)
Sets the list of simulation model sets (SMS) to load.
virtual void buildFromSMSAsync()
Initiates asynchronous building of the palette from SMS files.
std::set< std::string > myAllCountries
Set of all unique countries across all entities.
Definition playerCreationPalette.h:329
static int getDataPathsForSms(lua_State *L)
Lua callback to get data paths for SMS.
virtual std::string findRoleForSlot(const DtEntityType &type, const std::string &slotName)
Finds a role that corresponds to a slot name.
virtual DtInitTable getPlayerConfiguration(const DtEntityType &type, const std::string &role, const std::string &display)
Gets the complete configuration for a player station.
tbb::task_arena myArena
Task arena for asynchronous operations.
Definition playerCreationPalette.h:353
DtEntityMap::iterator DtIterator
Type definition for an iterator over the entity map.
Definition playerCreationPalette.h:79
virtual void getSMSSearchPaths(std::vector< DtFilename > &searchPaths) const
Gets the search paths for model set entries.
std::vector< DtFilename > mySmsList
Current list of SMS files to load from.
Definition playerCreationPalette.h:338
DtEntityMap myCreationPaletteMap
Map of entity types to palette entries.
Definition playerCreationPalette.h:320
virtual bool isValid(const DtEntityType &type, const std::string &role="", const std::string &display="")
Checks if an entity type, role, and display layout combination is valid.
virtual DtFilename findFile(const std::string &file)
Finds a file in the SMS directories.
std::shared_ptr< DtEntityRoleDescriptor > findRole(const DtPaletteEntry &entry, const std::string &role)
Finds a role in a palette entry by name.
virtual void reloadRoleConfig(const DtEntityType &entityType)
Reloads the role configuration for an entity type.
virtual ~DtPlayerCreationPalette()
Virtual destructor.
void clearDataPathsForSms()
Removes all SMS data paths.
tbb::mutex myBuildMutex
Mutex for synchronizing build operations.
Definition playerCreationPalette.h:344
std::vector< DtFilename > myIncomingSmsList
Incoming list of SMS files for the next rebuild.
Definition playerCreationPalette.h:341
virtual void getSMSList(std::vector< DtString > &smsList) const
Gets the list of SMS files to search.
bool myAsyncBuilding
Flag indicating whether an asynchronous build is in progress.
Definition playerCreationPalette.h:347
virtual void tick()
Updates the palette state.
virtual const std::set< std::string > & countries() const
Gets all countries in the palette.
Definition playerCreationPalette.h:205
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
VR-Engage specific model set entry with role information.
Definition vreModelSetEntry.h:60
Definition smsLoadComplete.h:28
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Provides configuration initialization for VREngage components.
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
std::map< std::string, std::shared_ptr< DtEntityRoleDescriptor > > DtEntityRoleMap
Map of role names to role descriptor objects.
Definition entityRoleDescriptorStructs.h:81
Utility functions for working with role configuration files.
Structure containing information about an entity in the palette.
Definition playerCreationPalette.h:66
std::string myFilename
Source filename (for hot-reloading)
Definition playerCreationPalette.h:72
std::vector< DtString > myCategories
Categories this entity belongs to.
Definition playerCreationPalette.h:69
std::vector< DtForceType > myForceTypes
Force types this entity belongs to.
Definition playerCreationPalette.h:68
DtEntityRoleMap myRoles
Map of roles available for this entity.
Definition playerCreationPalette.h:71
std::string myLabel
Display name for the entity.
Definition playerCreationPalette.h:67
std::vector< DtString > myCountries
Countries this entity is associated with.
Definition playerCreationPalette.h:70