ansys::Project::ProjectStoragePolicy Class Reference
Last update: 19.05.2025Project storage settings, control folder management, folder names, etc. More...
#include "ProjectStoragePolicy.hpp"
Public Member Functions | |
| ProjectStoragePolicy (const std::string pName) | |
| Constructor - default storage policies. More... | |
| void | setProjectSubfolderEnabled (bool pFlag) |
| bool | isProjectSubfolderEnabled () const |
| indicates if the project is a managed project (with a sidecard folder to store files) More... | |
| void | setSubProjectMode (const std::string &pSubprojectMode) |
| std::string | getSubProjectMode () const |
| indicates the type of the subproject (the type of the head node of the subproject) - default state is none (empty string) More... | |
| void | setSimFolderName (const std::string &pName) |
| std::string | getSimFolderName () const |
| returns the name of the simulation folder in the current policy (default is none) More... | |
| void | setProjectSubfolderSuffix (const std::string &pSuffix) |
| std::string | getProjectSubfolderSuffix () const |
| indicates the the filename suffix added to a project folder (default is .cffdb) More... | |
| void | setProjectSubfolderCustomName (const std::string &pCustomFolder) |
| std::string | getProjectSubfolderCustomName () const |
| indicates if the project folder has a specific name - default is none (will use project index filename + suffix) More... | |
| void | setAttr (const std::string &pKey, const std::string &pValue) |
| std::string | getAttr (const std::string &pKey) const |
| void | saveToMeta (MetadataHoof &pMeta) |
| void | loadFromMeta (const MetadataHoof &pMeta) |
| void | setReadOnly (bool pFlag) |
| bool | isReadOnly () const |
| indicates if the project is read-only, cannot be saved back and many operations will fail More... | |
| void | setApplicationName (const std::string &pName) |
| std::string | getApplicationName () const |
| return the application owner of this project (optional - default is empty) More... | |
| URL | getLockInfoFilename (const URL &pProjectLocation) const |
| if project lock is enabled, returns the lock filename for the specified project location More... | |
| void | setUseLockInfo (bool pUseFeature, bool pUseInReadOnly=false) |
| bool | isLockInfoEnabled () const |
| indicates if project lock feature is enabled More... | |
| bool | isLockInfoOnReadOnlyEnabled () const |
| indicates if project lock will prevent reading even in read-only mode More... | |
| void | setAutoUpgradeEnabled (bool pFlag) |
| bool | getAutoUpgradeEnabled () const |
Detailed Description
Project storage settings, control folder management, folder names, etc.
The storage policy is to be set before creating a new project, or the read project settings can be retrieved after opening an existing project. The policy is saved in the project file itself.
Default policies:
Constructor & Destructor Documentation
◆ ProjectStoragePolicy()
| ansys::Project::ProjectStoragePolicy::ProjectStoragePolicy | ( | const std::string | pName | ) |
Constructor - default storage policies.
Member Function Documentation
◆ getApplicationName()
| std::string ansys::Project::ProjectStoragePolicy::getApplicationName | ( | ) | const |
return the application owner of this project (optional - default is empty)
◆ getAttr()
| std::string ansys::Project::ProjectStoragePolicy::getAttr | ( | const std::string & | pKey | ) | const |
◆ getAutoUpgradeEnabled()
| bool ansys::Project::ProjectStoragePolicy::getAutoUpgradeEnabled | ( | ) | const |
◆ getLockInfoFilename()
if project lock is enabled, returns the lock filename for the specified project location
◆ getProjectSubfolderCustomName()
| std::string ansys::Project::ProjectStoragePolicy::getProjectSubfolderCustomName | ( | ) | const |
indicates if the project folder has a specific name - default is none (will use project index filename + suffix)
◆ getProjectSubfolderSuffix()
| std::string ansys::Project::ProjectStoragePolicy::getProjectSubfolderSuffix | ( | ) | const |
indicates the the filename suffix added to a project folder (default is .cffdb)
◆ getSimFolderName()
| std::string ansys::Project::ProjectStoragePolicy::getSimFolderName | ( | ) | const |
returns the name of the simulation folder in the current policy (default is none)
◆ getSubProjectMode()
| std::string ansys::Project::ProjectStoragePolicy::getSubProjectMode | ( | ) | const |
indicates the type of the subproject (the type of the head node of the subproject) - default state is none (empty string)
◆ isLockInfoEnabled()
| bool ansys::Project::ProjectStoragePolicy::isLockInfoEnabled | ( | ) | const |
indicates if project lock feature is enabled
◆ isLockInfoOnReadOnlyEnabled()
| bool ansys::Project::ProjectStoragePolicy::isLockInfoOnReadOnlyEnabled | ( | ) | const |
indicates if project lock will prevent reading even in read-only mode
◆ isProjectSubfolderEnabled()
| bool ansys::Project::ProjectStoragePolicy::isProjectSubfolderEnabled | ( | ) | const |
indicates if the project is a managed project (with a sidecard folder to store files)
◆ isReadOnly()
| bool ansys::Project::ProjectStoragePolicy::isReadOnly | ( | ) | const |
indicates if the project is read-only, cannot be saved back and many operations will fail
◆ loadFromMeta()
| void ansys::Project::ProjectStoragePolicy::loadFromMeta | ( | const MetadataHoof & | pMeta | ) |
◆ saveToMeta()
| void ansys::Project::ProjectStoragePolicy::saveToMeta | ( | MetadataHoof & | pMeta | ) |
◆ setApplicationName()
| void ansys::Project::ProjectStoragePolicy::setApplicationName | ( | const std::string & | pName | ) |
◆ setAttr()
| void ansys::Project::ProjectStoragePolicy::setAttr | ( | const std::string & | pKey, |
| const std::string & | pValue | ||
| ) |
◆ setAutoUpgradeEnabled()
| void ansys::Project::ProjectStoragePolicy::setAutoUpgradeEnabled | ( | bool | pFlag | ) |
◆ setProjectSubfolderCustomName()
| void ansys::Project::ProjectStoragePolicy::setProjectSubfolderCustomName | ( | const std::string & | pCustomFolder | ) |
◆ setProjectSubfolderEnabled()
| void ansys::Project::ProjectStoragePolicy::setProjectSubfolderEnabled | ( | bool | pFlag | ) |
◆ setProjectSubfolderSuffix()
| void ansys::Project::ProjectStoragePolicy::setProjectSubfolderSuffix | ( | const std::string & | pSuffix | ) |
◆ setReadOnly()
| void ansys::Project::ProjectStoragePolicy::setReadOnly | ( | bool | pFlag | ) |
◆ setSimFolderName()
| void ansys::Project::ProjectStoragePolicy::setSimFolderName | ( | const std::string & | pName | ) |
◆ setSubProjectMode()
| void ansys::Project::ProjectStoragePolicy::setSubProjectMode | ( | const std::string & | pSubprojectMode | ) |
◆ setUseLockInfo()
| void ansys::Project::ProjectStoragePolicy::setUseLockInfo | ( | bool | pUseFeature, |
| bool | pUseInReadOnly = false |
||
| ) |