VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Friends
DtScriptedTaskMetaData Class Reference

class DtScriptedTaskMetaData

Related Examples

Public Member Functions

 DtScriptedTaskMetaData ()
 
virtual ~DtScriptedTaskMetaData ()
 
 DtScriptedTaskMetaData (const DtScriptedTaskMetaData &orig)
 
DtScriptedTaskMetaDataoperator= (const DtScriptedTaskMetaData &orig)
 
virtual bool load (const DtFilename &)
 
virtual bool load (const std::string &)
 
virtual bool load (std::istream &)
 
virtual bool hasUserEntryVariables () const
 
virtual bool save (const DtFilename &) const
 
virtual bool save (std::string &) const
 
virtual bool save (std::ostream &) const
 
virtual bool save () const
 
virtual void setFilename (const DtFilename &)
 
virtual const DtFilename & filename () const
 
virtual const std::string & scriptId () const
 
virtual void setScriptId (const std::string &, bool makeAliasIfSystemScript=true)
 
virtual void setScriptType (int)
 
virtual int scriptType () const
 
virtual bool usesBehaviorEngine () const
 
virtual void setUsesBehaviorEngine (const bool uses)
 
virtual int commandLevel () const
 
virtual void setCommandLevel (int)
 
virtual bool variable (const std::string &s, DtScriptedTaskVariable &var) const
 
virtual std::string uiLayoutLocation () const
 
virtual void assignNewScriptId ()
 
virtual bool supports (const DtEntityType &) const
 
bool operator== (const DtScriptedTaskMetaData &) const
 
bool operator!= (const DtScriptedTaskMetaData &rhs) const
 
virtual bool encrypt (const std::string &source, std::string &dest) const
 
virtual bool encryptScript ()
 
virtual bool encryptSize (const std::string &source, int &size) const
 
virtual bool decrypt (const std::string &source, std::string &dest) const
 
virtual bool decryptScript ()
 
virtual std::auto_ptr
< DtRwVariableBindings
upgradeVariables (const DtRwVariableBindings &) const
 
virtual std::string removeTrailingLinefeeds (const std::string &)
 
virtual void makeAllIdsLowercase ()
 
virtual unsigned scriptChecksum () const
 
virtual void setScriptChecksum (unsigned checksum)
 
virtual void setMenuText (const std::string &)
 
virtual const std::string & menuText () const
 
virtual void setExtendedMenuText (const std::string &)
 
virtual const std::string & extendedMenuText () const
 
virtual void setToolTip (const std::string &)
 
virtual const std::string & toolTip () const
 
virtual void setMenuIcon (const std::string &)
 
virtual const std::string & menuIcon () const
 
virtual void setUseUiFile (bool)
 
virtual bool useUiFile () const
 
virtual void setUiLayout (const std::string &)
 
virtual const std::string & uiLayout () const
 
virtual void setMagicCommand (bool)
 
virtual bool magicCommand () const
 
virtual void setVersion (double)
 
virtual double version () const
 
virtual void setPriority (int)
 
virtual int priority () const
 
virtual void setEnabled (bool)
 
virtual bool enabled () const
 
virtual void setShortDescription (const std::string &)
 
virtual const std::string & shortDescription () const
 
virtual void setScriptEngine (const std::string &)
 
virtual const std::string & scriptEngine () const
 
virtual bool isInterpretedScript () const
 
virtual void setComments (const std::string &)
 
virtual const std::string & comments () const
 
virtual void setDescription (const std::string &)
 
virtual const std::string & description () const
 
virtual void setShowDescriptionInDialog (bool)
 
virtual bool showDescriptionInDialog () const
 
virtual void setRespectScriptLocation (bool)
 
virtual bool respectScriptLocation () const
 
virtual void setScriptLocation (const std::string &)
 
virtual const std::string & scriptLocation () const
 
virtual void setMenuLocations (const std::vector< std::string > &)
 
virtual void addMenuLocation (const std::string &)
 
virtual void removeMenuLocation (const std::string &)
 
virtual void removeMenuLocation (int)
 
virtual const std::vector
< std::string > & 
menuLocations () const
 
virtual void setShowInMenu (bool)
 
virtual bool showInMenu () const
 
virtual void setToolbarLocation (const std::string &)
 
virtual const std::string & toolbarLocation () const
 
virtual void setShowInToolbar (bool)
 
virtual bool showInToolbar () const
 
virtual void setEntityTypes (const std::vector< DtEntityType > &)
 
virtual void addEntityType (const DtEntityType &)
 
virtual void removeEntityType (const DtEntityType &)
 
virtual void removeEntityType (int)
 
virtual std::vector< DtEntityType > entityTypes () const
 
virtual bool supportsEntityType (const DtEntityType &) const
 
virtual bool hasEntityType (const DtEntityType &) const
 
virtual void setVariables (const std::vector< DtScriptedTaskVariable > &)
 
virtual void addVariable (const DtScriptedTaskVariable &)
 
virtual void insertVariableBefore (const DtScriptedTaskVariable &, const std::string &variable)
 
virtual void insertVariableBefore (const DtScriptedTaskVariable &, int i)
 
virtual void removeVariable (const std::string &)
 
virtual void removeVariable (int)
 
virtual std::vector
< DtScriptedTaskVariable
variables () const
 
virtual std::vector
< DtScriptedTaskVariable
scriptedTaskVariables () const
 
virtual DtRwVariableBindingsdefaultVariableBindings () const
 
virtual void setupDefaultsFromBindings (const DtRwVariableBindings &)
 
virtual void setScript (const std::string &)
 
virtual const std::string & script () const
 
virtual bool loadScript ()
 
virtual bool loadScript (const std::string &)
 
virtual bool loadUiLayout ()
 
virtual bool loadUiLayout (const std::string &)
 
virtual void setIsSystemScript (bool)
 
virtual bool isSystemScript () const
 
virtual void setActionCategories (const std::set< std::string > &)
 
virtual void addActionCategory (const std::string &)
 
virtual void removeActionCategory (const std::string &)
 
virtual bool hasActionCategory (const std::string &) const
 
virtual const std::set
< std::string > & 
actionCategories () const
 
virtual void setCanBeExecutedConcurrently (bool)
 
virtual bool canBeExecutedConcurrently () const
 
virtual void setDoctrines (const std::set< std::string > &)
 
virtual bool addDoctrine (const std::string &)
 
virtual bool removeDoctrine (const std::string &)
 
virtual bool supportsDoctrine (const std::string &) const
 
virtual const std::set
< std::string > & 
doctrines () const
 
virtual bool renameDoctrine (const std::string &from, const std::string &to)
 
virtual void setAvailableToAllDoctrines (bool)
 
virtual bool availableToAllDoctrines () const
 
virtual void setShowOnTopLevelRightClickMenu (bool)
 
virtual bool showOnTopLevelRightClickMenu () const
 
virtual void setDirectoryPath (const std::string &)
 
virtual const std::string & directoryPath () const
 
virtual const std::set
< std::string > & 
aliases () const
 
virtual void addAlias (const std::string &)
 
virtual void removeAlias (const std::string &)
 
virtual void clearAliases ()
 
virtual void setAliases (const std::set< std::string > &)
 
virtual bool isAliased (const std::string &) const
 
virtual void setEncrypted (bool)
 
virtual bool encrypted () const
 
virtual void setFlag (int, bool)
 
virtual bool flagSet (int) const
 
virtual void loadTranslationFile (const std::string &lang)
 
virtual void translationData (char *&data, unsigned int &len) const
 
virtual std::string translationLanguage () const
 
virtual void clearTranslationData ()
 

Static Public Member Functions

static void setEncryptDecryptFunction (DtEncryptDecryptFcn, void *usr)
 
static void getEncryptDecryptFunction (DtEncryptDecryptFcn &, void *&usr)
 
static unsigned calculateChecksum (std::istream &strm)
 
static unsigned calculateChecksum (std::vector< std::istream * > &strms)
 
static void addInterpretedScriptEngine (const std::string &)
 
static bool isInterpretedScriptEngine (const std::string &)
 

Public Attributes

std::string myScriptId
 
std::string myMenuText
 
std::string myExtendedMenuText
 
std::string myToolTip
 
std::string myMenuIcon
 
std::string myScriptEngine
 
std::string myComments
 
std::string myDescription
 
std::string myScriptLocation
 
std::string myShortDescription
 
std::string myUiLayout
 
std::string myScript
 
std::string myDirectoryPath
 
std::vector< std::string > myMenuLocations
 
std::vector< std::string > myEntityTypes
 
std::vector< std::string > myVariables
 
std::map< std::string,
DtScriptedTaskVariable
myCachedVariables
 
std::string myActionCategories
 
std::string myDoctrines
 
bool myShowInMenu
 
std::string myToolbarLocation
 
bool myShowInToolbar
 
std::set< std::string > myActionCategoriesSet
 
std::set< std::string > myDoctrinesSet
 
bool myCanBeExecutedConcurrently
 
bool myRespectScriptLocation
 
bool myShowDescriptionInDialog
 
double myVersion
 
DtFilename myFile
 
bool myIsSystemScript
 
bool myEncrypted
 
int myScriptType
 
bool myUsesBehaviorEngine
 
int myFlags
 
charmyTranslationData
 
DtU64 myTranslationDataLen
 
std::string myTranslationLanguage
 
int myCommandLevel
 
DtU32 myChecksum
 
std::set< std::string > myAliases
 
tbb::spin_rw_mutex myVariableMutex
 
tbb::spin_rw_mutex myActionCategoriesMutex
 

Static Public Attributes

static DtEncryptDecryptFcn theEncryptDecryptFunction
 
static void * theEncryptDecryptUserData
 
static std::vector< std::string > theInterpretedScriptEngines
 

Protected Member Functions

virtual std::string readFile (const std::string &) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Constructor & Destructor Documentation

DtScriptedTaskMetaData::DtScriptedTaskMetaData ( )

default constructor

virtual DtScriptedTaskMetaData::~DtScriptedTaskMetaData ( )
virtual

destructor

DtScriptedTaskMetaData::DtScriptedTaskMetaData ( const DtScriptedTaskMetaData orig)

copy constructor

Member Function Documentation

DtScriptedTaskMetaData& DtScriptedTaskMetaData::operator= ( const DtScriptedTaskMetaData orig)

assignment operator

virtual bool DtScriptedTaskMetaData::load ( const DtFilename &  )
virtual

Load data from specified file.

virtual bool DtScriptedTaskMetaData::load ( const std::string &  )
virtual

Loads the object from the given xml string buffer.

virtual bool DtScriptedTaskMetaData::load ( std::istream &  )
virtual

Loads the object from the given stream.

virtual bool DtScriptedTaskMetaData::hasUserEntryVariables ( ) const
virtual

Returns true if there is a variable that allows user entry.

virtual bool DtScriptedTaskMetaData::save ( const DtFilename &  ) const
virtual

Save file to given location. If no previously loaded filename will set filename to the supplied name.

virtual bool DtScriptedTaskMetaData::save ( std::string &  ) const
virtual

Saves the value to the given string buffer.

virtual bool DtScriptedTaskMetaData::save ( std::ostream &  ) const
virtual

Saves the object to the given stream.

virtual bool DtScriptedTaskMetaData::save ( ) const
virtual

Saves to the last loaded filename. If not loaded will not save.

virtual void DtScriptedTaskMetaData::setFilename ( const DtFilename &  )
virtual

Set the filename to save to by default.

virtual const DtFilename& DtScriptedTaskMetaData::filename ( ) const
virtual

File where this was loaded from. If saved to a different file will not change the location.

virtual const std::string& DtScriptedTaskMetaData::scriptId ( ) const
virtual

Accessor for script id. Set as part of the constructor and assigned in the copy/equivalence operator.

virtual void DtScriptedTaskMetaData::setScriptId ( const std::string &  ,
bool  makeAliasIfSystemScript = true 
)
virtual

Sets the script id. Use with care as this could effect related referencing items. If the final flag is true and this is a system script will add an alias to the original script id.

virtual void DtScriptedTaskMetaData::setScriptType ( int  )
virtual

Sets the script type.

virtual int DtScriptedTaskMetaData::scriptType ( ) const
virtual

Retrieves the script type.

virtual bool DtScriptedTaskMetaData::usesBehaviorEngine ( ) const
virtual

Accessor for indicator of whether this script is intended to use the behavior engine Lua package.

virtual void DtScriptedTaskMetaData::setUsesBehaviorEngine ( const bool  uses)
virtual
virtual int DtScriptedTaskMetaData::commandLevel ( ) const
virtual

Accessor for what command level this scripted task is on for command panel filtering.

virtual void DtScriptedTaskMetaData::setCommandLevel ( int  )
virtual
virtual void DtScriptedTaskMetaData::setMenuText ( const std::string &  )
virtual

Accessor for menu text. This is the name that will appear on menus.

virtual const std::string& DtScriptedTaskMetaData::menuText ( ) const
virtual

Accessor for menu text. This is the name that will appear on menus.

virtual void DtScriptedTaskMetaData::setExtendedMenuText ( const std::string &  )
virtual

Accessor for extended menu text. This is the name that will appear on menus.

virtual const std::string& DtScriptedTaskMetaData::extendedMenuText ( ) const
virtual

Accessor for extended menu text. This is the name that will appear on menus.

virtual void DtScriptedTaskMetaData::setToolTip ( const std::string &  )
virtual

Accessors for menu tool-tip.

virtual const std::string& DtScriptedTaskMetaData::toolTip ( ) const
virtual

Accessors for menu tool-tip.

virtual void DtScriptedTaskMetaData::setMenuIcon ( const std::string &  )
virtual

Accessors for menu icon.

virtual const std::string& DtScriptedTaskMetaData::menuIcon ( ) const
virtual

Accessors for menu icon.

virtual void DtScriptedTaskMetaData::setUseUiFile ( bool  )
virtual

Accessors for Qt UI layout files.

virtual bool DtScriptedTaskMetaData::useUiFile ( ) const
virtual

Accessors for Qt UI layout files.

virtual void DtScriptedTaskMetaData::setUiLayout ( const std::string &  )
virtual

Accessors for Qt UI layout files.

virtual const std::string& DtScriptedTaskMetaData::uiLayout ( ) const
virtual

Accessors for Qt UI layout files.

virtual void DtScriptedTaskMetaData::setMagicCommand ( bool  )
virtual

Sets whether or not this will fall under the "Magic Command" filter (i.e. one that happens immediately.

virtual bool DtScriptedTaskMetaData::magicCommand ( ) const
virtual

Sets whether or not this will fall under the "Magic Command" filter (i.e. one that happens immediately.

virtual void DtScriptedTaskMetaData::setVersion ( double  )
virtual

Accessors for version. When the task is sent to the back-end for processing, the version will be packaged as part of the variables available for the task.

virtual double DtScriptedTaskMetaData::version ( ) const
virtual

Accessors for version. When the task is sent to the back-end for processing, the version will be packaged as part of the variables available for the task.

virtual void DtScriptedTaskMetaData::setPriority ( int  )
virtual

Accessors for priority. If the task is a reactive task then this priority is where it will be executed.

virtual int DtScriptedTaskMetaData::priority ( ) const
virtual

Accessors for priority. If the task is a reactive task then this priority is where it will be executed.

virtual void DtScriptedTaskMetaData::setEnabled ( bool  )
virtual

Accessors for enabled/disabled state. If the task is a reactive task then this will determine if the reactive task is enabled or disabled by default.

virtual bool DtScriptedTaskMetaData::enabled ( ) const
virtual

Accessors for enabled/disabled state. If the task is a reactive task then this will determine if the reactive task is enabled or disabled by default.

virtual void DtScriptedTaskMetaData::setShortDescription ( const std::string &  )
virtual

The description that will be used in the plan language or when displaying the current task instead of the stringRep which is the display of all the variables. To display a variable value use the $<var-name> nomenclature, so, Move To Location $location.

virtual const std::string& DtScriptedTaskMetaData::shortDescription ( ) const
virtual

The description that will be used in the plan language or when displaying the current task instead of the stringRep which is the display of all the variables. To display a variable value use the $<var-name> nomenclature, so, Move To Location $location.

virtual bool DtScriptedTaskMetaData::variable ( const std::string &  s,
DtScriptedTaskVariable var 
) const
virtual

Returns the variable associated with the given variable. If no variable of that name returns false.

virtual void DtScriptedTaskMetaData::setScriptEngine ( const std::string &  )
virtual

Accessor for script engine to use when evaluating script. Default is LUA.

virtual const std::string& DtScriptedTaskMetaData::scriptEngine ( ) const
virtual

Accessor for script engine to use when evaluating script. Default is LUA.

virtual bool DtScriptedTaskMetaData::isInterpretedScript ( ) const
virtual

Returns true if the script engine in question is one that is loaded and executed via a parse (such as lua). Use the static addInterpretedScriptEngine to add a script engine that will return true for this.

static void DtScriptedTaskMetaData::addInterpretedScriptEngine ( const std::string &  )
static

Add an interpreted script engine. Once added cannot be removed.

static bool DtScriptedTaskMetaData::isInterpretedScriptEngine ( const std::string &  )
static

Add an interpreted script engine. Once added cannot be removed.

virtual void DtScriptedTaskMetaData::setComments ( const std::string &  )
virtual

Accessor for comments that can be used to describe this task. Will not be displayed to the user.

virtual const std::string& DtScriptedTaskMetaData::comments ( ) const
virtual

Accessor for comments that can be used to describe this task. Will not be displayed to the user.

virtual void DtScriptedTaskMetaData::setDescription ( const std::string &  )
virtual

Accessor for comments that can be used to describe this task. Will be displayed to the user on the task data entry form.

virtual const std::string& DtScriptedTaskMetaData::description ( ) const
virtual

Accessor for comments that can be used to describe this task. Will be displayed to the user on the task data entry form.

virtual void DtScriptedTaskMetaData::setShowDescriptionInDialog ( bool  )
virtual

Accessors for whether or not to show the description in the dialog. Default is false.

virtual bool DtScriptedTaskMetaData::showDescriptionInDialog ( ) const
virtual

Accessors for whether or not to show the description in the dialog. Default is false.

virtual void DtScriptedTaskMetaData::setRespectScriptLocation ( bool  )
virtual

Accessor/mutator for whether or not to use the script location member. Default is false. Set to true if you want the lua file in a different location than the xml file.

virtual bool DtScriptedTaskMetaData::respectScriptLocation ( ) const
virtual

Accessor/mutator for whether or not to use the script location member. Default is false. Set to true if you want the lua file in a different location than the xml file.

virtual void DtScriptedTaskMetaData::setScriptLocation ( const std::string &  )
virtual

Location where to find the script file to execute. If blank (default) assumes same location as meta-data file.

virtual const std::string& DtScriptedTaskMetaData::scriptLocation ( ) const
virtual

Location where to find the script file to execute. If blank (default) assumes same location as meta-data file.

virtual std::string DtScriptedTaskMetaData::uiLayoutLocation ( ) const
virtual

The location of the ui file. The script location with .ui instead of script engine extension.

virtual void DtScriptedTaskMetaData::setMenuLocations ( const std::vector< std::string > &  )
virtual

Accessor for locations where on the task menu this script should show up. Currently assumed to only be on task menu.

virtual void DtScriptedTaskMetaData::addMenuLocation ( const std::string &  )
virtual

Accessor for locations where on the task menu this script should show up. Currently assumed to only be on task menu.

virtual void DtScriptedTaskMetaData::removeMenuLocation ( const std::string &  )
virtual

Accessor for locations where on the task menu this script should show up. Currently assumed to only be on task menu.

virtual void DtScriptedTaskMetaData::removeMenuLocation ( int  )
virtual

Accessor for locations where on the task menu this script should show up. Currently assumed to only be on task menu.

virtual const std::vector<std::string>& DtScriptedTaskMetaData::menuLocations ( ) const
virtual

Accessor for locations where on the task menu this script should show up. Currently assumed to only be on task menu.

virtual void DtScriptedTaskMetaData::setShowInMenu ( bool  )
virtual

Accessor for locations where on the task menu this script should show up. Currently assumed to only be on task menu.

virtual bool DtScriptedTaskMetaData::showInMenu ( ) const
virtual

Accessor for locations where on the task menu this script should show up. Currently assumed to only be on task menu.

virtual void DtScriptedTaskMetaData::setToolbarLocation ( const std::string &  )
virtual

Accessor for location where on the task toolbar this script should show up.

virtual const std::string& DtScriptedTaskMetaData::toolbarLocation ( ) const
virtual

Accessor for location where on the task toolbar this script should show up.

virtual void DtScriptedTaskMetaData::setShowInToolbar ( bool  )
virtual

Accessor for location where on the task toolbar this script should show up.

virtual bool DtScriptedTaskMetaData::showInToolbar ( ) const
virtual

Accessor for location where on the task toolbar this script should show up.

virtual void DtScriptedTaskMetaData::setEntityTypes ( const std::vector< DtEntityType > &  )
virtual

Accessor for entity types that this task is valid for. An empty list will make the assumption it is valid for all entity types (default)

virtual void DtScriptedTaskMetaData::addEntityType ( const DtEntityType &  )
virtual

Accessor for entity types that this task is valid for. An empty list will make the assumption it is valid for all entity types (default)

virtual void DtScriptedTaskMetaData::removeEntityType ( const DtEntityType &  )
virtual

Accessor for entity types that this task is valid for. An empty list will make the assumption it is valid for all entity types (default)

virtual void DtScriptedTaskMetaData::removeEntityType ( int  )
virtual

Accessor for entity types that this task is valid for. An empty list will make the assumption it is valid for all entity types (default)

virtual std::vector<DtEntityType> DtScriptedTaskMetaData::entityTypes ( ) const
virtual

Accessor for entity types that this task is valid for. An empty list will make the assumption it is valid for all entity types (default)

virtual bool DtScriptedTaskMetaData::supportsEntityType ( const DtEntityType &  ) const
virtual

Accessor for entity types that this task is valid for. An empty list will make the assumption it is valid for all entity types (default)

virtual bool DtScriptedTaskMetaData::hasEntityType ( const DtEntityType &  ) const
virtual

Returns true if the specific entity type is there.

virtual void DtScriptedTaskMetaData::setVariables ( const std::vector< DtScriptedTaskVariable > &  )
virtual

Accessor for the variables that are part of this scripted task. The variables will be referenced by their bound name. The order in which they appear in the UI will be the order in which they appear in the variables list.

virtual void DtScriptedTaskMetaData::addVariable ( const DtScriptedTaskVariable )
virtual

Accessor for the variables that are part of this scripted task. The variables will be referenced by their bound name. The order in which they appear in the UI will be the order in which they appear in the variables list.

virtual void DtScriptedTaskMetaData::insertVariableBefore ( const DtScriptedTaskVariable ,
const std::string &  variable 
)
virtual

Accessor for the variables that are part of this scripted task. The variables will be referenced by their bound name. The order in which they appear in the UI will be the order in which they appear in the variables list.

virtual void DtScriptedTaskMetaData::insertVariableBefore ( const DtScriptedTaskVariable ,
int  i 
)
virtual

Accessor for the variables that are part of this scripted task. The variables will be referenced by their bound name. The order in which they appear in the UI will be the order in which they appear in the variables list.

virtual void DtScriptedTaskMetaData::removeVariable ( const std::string &  )
virtual

Accessor for the variables that are part of this scripted task. The variables will be referenced by their bound name. The order in which they appear in the UI will be the order in which they appear in the variables list.

virtual void DtScriptedTaskMetaData::removeVariable ( int  )
virtual

Accessor for the variables that are part of this scripted task. The variables will be referenced by their bound name. The order in which they appear in the UI will be the order in which they appear in the variables list.

virtual std::vector<DtScriptedTaskVariable> DtScriptedTaskMetaData::variables ( ) const
virtual

This returns the full list of variables. Note that these variables could contain "duplicate" variables if they are part of a button group.

virtual std::vector<DtScriptedTaskVariable> DtScriptedTaskMetaData::scriptedTaskVariables ( ) const
virtual

Returns a unique list of variables that picks the first variable of a button group as the guiding variable of that group.

virtual DtRwVariableBindings* DtScriptedTaskMetaData::defaultVariableBindings ( ) const
virtual

Returns a variable binding list of all the variables default values. This is to be considered a read-only view into the default values. You must also free the return pointer when you are done with it.

virtual void DtScriptedTaskMetaData::setupDefaultsFromBindings ( const DtRwVariableBindings )
virtual

Sets the default variables from the bindings.

virtual void DtScriptedTaskMetaData::setScript ( const std::string &  )
virtual

The actual script code loaded from disk or saved with the meta data.

virtual const std::string& DtScriptedTaskMetaData::script ( ) const
virtual

The actual script code loaded from disk or saved with the meta data.

virtual bool DtScriptedTaskMetaData::loadScript ( )
virtual

Loads the script from the location of this meta data file or from the file defined in scriptLocation.

virtual bool DtScriptedTaskMetaData::loadScript ( const std::string &  )
virtual

Loads the script from the specified file and replaces the existing script with it.

virtual bool DtScriptedTaskMetaData::loadUiLayout ( )
virtual

Loads the ui file from the location of this meta data file or from the file defined in scriptLocation.

virtual bool DtScriptedTaskMetaData::loadUiLayout ( const std::string &  )
virtual

Loads the ui layout from the specified file and replaces the existing script with it.

virtual void DtScriptedTaskMetaData::setIsSystemScript ( bool  )
virtual

Accessor for whether or not this is a system vs. scenario level script.

virtual bool DtScriptedTaskMetaData::isSystemScript ( ) const
virtual

The actual script code loaded from disk or saved with the meta data.

virtual void DtScriptedTaskMetaData::setActionCategories ( const std::set< std::string > &  )
virtual

Keeps list of action categories that this script is part of.

virtual void DtScriptedTaskMetaData::addActionCategory ( const std::string &  )
virtual

Keeps list of action categories that this script is part of.

virtual void DtScriptedTaskMetaData::removeActionCategory ( const std::string &  )
virtual

Keeps list of action categories that this script is part of.

virtual bool DtScriptedTaskMetaData::hasActionCategory ( const std::string &  ) const
virtual

Keeps list of action categories that this script is part of.

virtual const std::set<std::string>& DtScriptedTaskMetaData::actionCategories ( ) const
virtual

Keeps list of action categories that this script is part of.

virtual void DtScriptedTaskMetaData::setCanBeExecutedConcurrently ( bool  )
virtual

Whether or not this task can be executed concurrently with another copy of itself.

virtual bool DtScriptedTaskMetaData::canBeExecutedConcurrently ( ) const
virtual

Whether or not this task can be executed concurrently with another copy of itself.

virtual void DtScriptedTaskMetaData::setDoctrines ( const std::set< std::string > &  )
virtual

Keeps list of doctrine categories that this script is part of.

virtual bool DtScriptedTaskMetaData::addDoctrine ( const std::string &  )
virtual

Keeps list of doctrine categories that this script is part of.

virtual bool DtScriptedTaskMetaData::removeDoctrine ( const std::string &  )
virtual

Keeps list of doctrine categories that this script is part of.

virtual bool DtScriptedTaskMetaData::supportsDoctrine ( const std::string &  ) const
virtual

Keeps list of doctrine categories that this script is part of.

virtual const std::set<std::string>& DtScriptedTaskMetaData::doctrines ( ) const
virtual

Keeps list of doctrine categories that this script is part of.

virtual bool DtScriptedTaskMetaData::renameDoctrine ( const std::string &  from,
const std::string &  to 
)
virtual

Keeps list of doctrine categories that this script is part of.

virtual void DtScriptedTaskMetaData::setAvailableToAllDoctrines ( bool  )
virtual

Keeps list of doctrine categories that this script is part of.

virtual bool DtScriptedTaskMetaData::availableToAllDoctrines ( ) const
virtual

Keeps list of doctrine categories that this script is part of.

virtual void DtScriptedTaskMetaData::setShowOnTopLevelRightClickMenu ( bool  )
virtual

Whether or not this item is available on the top of the right click menu.

virtual bool DtScriptedTaskMetaData::showOnTopLevelRightClickMenu ( ) const
virtual

Whether or not this item is available on the top of the right click menu.

virtual void DtScriptedTaskMetaData::setDirectoryPath ( const std::string &  )
virtual

Accessor for the directory location. The directory location is a path separated by the / marker. A blank directory path means this script is a top-level script.

virtual const std::string& DtScriptedTaskMetaData::directoryPath ( ) const
virtual

Accessor for the directory location. The directory location is a path separated by the / marker. A blank directory path means this script is a top-level script.

virtual const std::set<std::string>& DtScriptedTaskMetaData::aliases ( ) const
virtual

Set of script ids that are used as an alias for this script. Used for backwards compatibility when a script id is changed in a script.

virtual void DtScriptedTaskMetaData::addAlias ( const std::string &  )
virtual

Set of script ids that are used as an alias for this script. Used for backwards compatibility when a script id is changed in a script.

virtual void DtScriptedTaskMetaData::removeAlias ( const std::string &  )
virtual

Set of script ids that are used as an alias for this script. Used for backwards compatibility when a script id is changed in a script.

virtual void DtScriptedTaskMetaData::clearAliases ( )
virtual

Set of script ids that are used as an alias for this script. Used for backwards compatibility when a script id is changed in a script.

virtual void DtScriptedTaskMetaData::setAliases ( const std::set< std::string > &  )
virtual

Set of script ids that are used as an alias for this script. Used for backwards compatibility when a script id is changed in a script.

virtual bool DtScriptedTaskMetaData::isAliased ( const std::string &  ) const
virtual

Set of script ids that are used as an alias for this script. Used for backwards compatibility when a script id is changed in a script.

virtual void DtScriptedTaskMetaData::assignNewScriptId ( )
virtual

Assigns a new unique id to this meta data

virtual bool DtScriptedTaskMetaData::supports ( const DtEntityType &  ) const
virtual

Returns true if this script supports the specific entity type.

bool DtScriptedTaskMetaData::operator== ( const DtScriptedTaskMetaData ) const

Equality operators.

bool DtScriptedTaskMetaData::operator!= ( const DtScriptedTaskMetaData rhs) const
inline
static void DtScriptedTaskMetaData::setEncryptDecryptFunction ( DtEncryptDecryptFcn  ,
void *  usr 
)
static

Sets encrypt/decrypt function.

static void DtScriptedTaskMetaData::getEncryptDecryptFunction ( DtEncryptDecryptFcn ,
void *&  usr 
)
static
virtual bool DtScriptedTaskMetaData::encrypt ( const std::string &  source,
std::string &  dest 
) const
virtual

Return true if buffer was encrypted.

virtual bool DtScriptedTaskMetaData::encryptScript ( )
virtual

If there is an encryption routine, encrypt the script back into the myScript member.

virtual bool DtScriptedTaskMetaData::encryptSize ( const std::string &  source,
int size 
) const
virtual

Return the size of the encrypted buffer'.

virtual bool DtScriptedTaskMetaData::decrypt ( const std::string &  source,
std::string &  dest 
) const
virtual

Returns true if buffer successfully decrypted.

virtual bool DtScriptedTaskMetaData::decryptScript ( )
virtual

If the script is encrypted, decrypt into myScript. Note that calling decryptScript on a script that is already decrypted will have unexpected results.

virtual std::auto_ptr<DtRwVariableBindings> DtScriptedTaskMetaData::upgradeVariables ( const DtRwVariableBindings ) const
virtual

Upgrade the supplied variables and return a pointer to the new variables that will include missing variable parameters.

virtual void DtScriptedTaskMetaData::setEncrypted ( bool  )
virtual

Sets/gets whether or not buffer should be encrypted/decrypted. If there is an encrypt/decrypt function set that will be used when saving the scripted task to a scenario to determine if the buffer should be encrypted. If a system script, set as to whether or not the file on disk is encrypted.

virtual bool DtScriptedTaskMetaData::encrypted ( ) const
virtual

Sets/gets whether or not buffer should be encrypted/decrypted. If there is an encrypt/decrypt function set that will be used when saving the scripted task to a scenario to determine if the buffer should be encrypted. If a system script, set as to whether or not the file on disk is encrypted.

virtual void DtScriptedTaskMetaData::setFlag ( int  ,
bool   
)
virtual

Flag manipulation.

virtual bool DtScriptedTaskMetaData::flagSet ( int  ) const
virtual

Flag manipulation.

virtual void DtScriptedTaskMetaData::loadTranslationFile ( const std::string &  lang)
virtual

If there is translation data associated with this file it can be set here. Note that this data is not saved with the xml or lua file. It will be transported over the network, however, if requested. The language file is expected to be of the format <script_id>_<lang>.qm. Only one language at a time will be stored. If another language is loaded the data from the previous language will be removed.

virtual void DtScriptedTaskMetaData::translationData ( char *&  data,
unsigned int len 
) const
virtual

If there is translation data associated with this file it can be set here. Note that this data is not saved with the xml or lua file. It will be transported over the network, however, if requested. The language file is expected to be of the format <script_id>_<lang>.qm. Only one language at a time will be stored. If another language is loaded the data from the previous language will be removed.

virtual std::string DtScriptedTaskMetaData::translationLanguage ( ) const
virtual

If there is translation data associated with this file it can be set here. Note that this data is not saved with the xml or lua file. It will be transported over the network, however, if requested. The language file is expected to be of the format <script_id>_<lang>.qm. Only one language at a time will be stored. If another language is loaded the data from the previous language will be removed.

virtual void DtScriptedTaskMetaData::clearTranslationData ( )
virtual

If there is translation data associated with this file it can be set here. Note that this data is not saved with the xml or lua file. It will be transported over the network, however, if requested. The language file is expected to be of the format <script_id>_<lang>.qm. Only one language at a time will be stored. If another language is loaded the data from the previous language will be removed.

virtual std::string DtScriptedTaskMetaData::removeTrailingLinefeeds ( const std::string &  )
virtual

Removes trailing CR/LFs if there are multiple.

virtual void DtScriptedTaskMetaData::makeAllIdsLowercase ( )
virtual

Makes script ids and aliases all lowercase.

virtual unsigned DtScriptedTaskMetaData::scriptChecksum ( ) const
virtual

Returns a CRC checksum for the files associated with this script.

virtual void DtScriptedTaskMetaData::setScriptChecksum ( unsigned  checksum)
virtual

Sets a CRC checksum for this script. Normally not required to be called.

static unsigned DtScriptedTaskMetaData::calculateChecksum ( std::istream &  strm)
static

Will calculate and return the script checksum based on the stream input. Mostly used by scriptChecksum(), but can be called externally.

static unsigned DtScriptedTaskMetaData::calculateChecksum ( std::vector< std::istream * > &  strms)
static
virtual std::string DtScriptedTaskMetaData::readFile ( const std::string &  ) const
protectedvirtual
template<class Archive >
void DtScriptedTaskMetaData::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprotected

When the class Archive corresponds to an output archive, the & operator is defined similar to <<. Likewise, when the class Archive is a type of input archive the & operator is defined similar to >>.

References DtScriptedTask_AvailableToAllDoctrines, and DtScriptedTaskScriptedTask.

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Serialization/Deserialization //!

Member Data Documentation

std::string DtScriptedTaskMetaData::myScriptId
std::string DtScriptedTaskMetaData::myMenuText
std::string DtScriptedTaskMetaData::myExtendedMenuText
std::string DtScriptedTaskMetaData::myToolTip
std::string DtScriptedTaskMetaData::myMenuIcon
std::string DtScriptedTaskMetaData::myScriptEngine
std::string DtScriptedTaskMetaData::myComments
std::string DtScriptedTaskMetaData::myDescription
std::string DtScriptedTaskMetaData::myScriptLocation
mutable
std::string DtScriptedTaskMetaData::myShortDescription
std::string DtScriptedTaskMetaData::myUiLayout
std::string DtScriptedTaskMetaData::myScript
mutable
std::string DtScriptedTaskMetaData::myDirectoryPath
std::vector<std::string> DtScriptedTaskMetaData::myMenuLocations
std::vector<std::string> DtScriptedTaskMetaData::myEntityTypes
std::vector<std::string> DtScriptedTaskMetaData::myVariables
std::map<std::string, DtScriptedTaskVariable> DtScriptedTaskMetaData::myCachedVariables
mutable
std::string DtScriptedTaskMetaData::myActionCategories
std::string DtScriptedTaskMetaData::myDoctrines
bool DtScriptedTaskMetaData::myShowInMenu
std::string DtScriptedTaskMetaData::myToolbarLocation
bool DtScriptedTaskMetaData::myShowInToolbar
std::set<std::string> DtScriptedTaskMetaData::myActionCategoriesSet
mutable
std::set<std::string> DtScriptedTaskMetaData::myDoctrinesSet
mutable
bool DtScriptedTaskMetaData::myCanBeExecutedConcurrently
bool DtScriptedTaskMetaData::myRespectScriptLocation
bool DtScriptedTaskMetaData::myShowDescriptionInDialog
double DtScriptedTaskMetaData::myVersion
DtFilename DtScriptedTaskMetaData::myFile
mutable
bool DtScriptedTaskMetaData::myIsSystemScript
bool DtScriptedTaskMetaData::myEncrypted
mutable
DtEncryptDecryptFcn DtScriptedTaskMetaData::theEncryptDecryptFunction
static
void* DtScriptedTaskMetaData::theEncryptDecryptUserData
static
int DtScriptedTaskMetaData::myScriptType
bool DtScriptedTaskMetaData::myUsesBehaviorEngine
int DtScriptedTaskMetaData::myFlags
char* DtScriptedTaskMetaData::myTranslationData
DtU64 DtScriptedTaskMetaData::myTranslationDataLen
std::string DtScriptedTaskMetaData::myTranslationLanguage
int DtScriptedTaskMetaData::myCommandLevel
DtU32 DtScriptedTaskMetaData::myChecksum
mutable
std::set<std::string> DtScriptedTaskMetaData::myAliases
std::vector<std::string> DtScriptedTaskMetaData::theInterpretedScriptEngines
static
tbb::spin_rw_mutex DtScriptedTaskMetaData::myVariableMutex
mutable
tbb::spin_rw_mutex DtScriptedTaskMetaData::myActionCategoriesMutex
mutable

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)