> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ansys::Project::ProjectStoragePolicy Class Reference

[Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_project) storage settings, control folder management, folder names, etc.

`#include "ProjectStoragePolicy.hpp"`

## Public Member Functions

| Type | Name |
| - | - |
| | [ProjectStoragePolicy](#a796f624b5195e85e2e6d1438aae4e5f3) (const std::string pName) Constructor - default storage policies. |
| void | [setProjectSubfolderEnabled](#a531a4a6db648de63a07566b3cfcfaf54) (bool pFlag) |
| bool | [isProjectSubfolderEnabled](#a2be7b219115ccfabd10ec76eec615024) () const indicates if the project is a managed project (with a sidecard folder to store files) |
| void | [setSubProjectMode](#a053d476b7e53ac5eab403e82549ec615) (const std::string \&pSubprojectMode) |
| std::string | [getSubProjectMode](#a96410b6d24c2160ccca6c0a1231c83e5) () const indicates the type of the subproject (the type of the head node of the subproject) - default state is none (empty string) |
| void | [setSimFolderName](#a986365423cee33e4f4ccef640b035fcb) (const std::string \&pName) |
| std::string | [getSimFolderName](#abc5273cd8bf336f2b2ef50b95a08c70a) () const returns the name of the simulation folder in the current policy (default is none) |
| void | [setProjectSubfolderSuffix](#aaae0dc8bdbcf2600d2350121dd727d70) (const std::string \&pSuffix) |
| std::string | [getProjectSubfolderSuffix](#afd7b7487b032863932e9ddc7f28822db) () const indicates the the filename suffix added to a project folder (default is .cffdb) |
| void | [setProjectSubfolderCustomName](#a93526a7d1a56d469400628ea7391c21f) (const std::string \&pCustomFolder) |
| std::string | [getProjectSubfolderCustomName](#ad11cd0726e363557d2687a9953be8914) () const indicates if the project folder has a specific name - default is none (will use project index filename + suffix) |
| void | [setAttr](#a8a9212b1e52d8f43673f19a5dd27e50d) (const std::string \&pKey, const std::string \&pValue) |
| std::string | [getAttr](#aeb4ce83a9ff4ae09d9d69e00649adf1d) (const std::string \&pKey) const |
| void | [saveToMeta](#a255b54d30b865d8f2ed8b7a68fe1d3ef) (MetadataHoof \&pMeta) |
| void | [loadFromMeta](#a8cc10dc4fee5e6658fa43684d53725af) (const MetadataHoof \&pMeta) |
| void | [setReadOnly](#af47a9235fc8b954c14bec443651c671c) (bool pFlag) |
| bool | [isReadOnly](#a3dd58ce3f552dc734da4ee7402dae8e0) () const indicates if the project is read-only, cannot be saved back and many operations will fail |
| void | [setApplicationName](#ad0740910f100893801079c0b62608621) (const std::string \&pName) |
| std::string | [getApplicationName](#a8aae9c1ab4c6ee30c9bf48fca821c5f2) () const return the application owner of this project (optional - default is empty) |
| [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_u_r_l.md) | [getLockInfoFilename](#a3198e10db4a1528ec7013e314917dd9b) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_u_r_l.md) \&pProjectLocation) const if project lock is enabled, returns the lock filename for the specified project location |
| void | [setUseLockInfo](#ac9ec77d9b55c73bd6b211a9c660d7d27) (bool pUseFeature, bool pUseInReadOnly=false) |
| bool | [isLockInfoEnabled](#a6f6b3aafaf32b38b045302ae533a5c58) () const indicates if project lock feature is enabled |
| bool | [isLockInfoOnReadOnlyEnabled](#a2a5a04e54acf832efaeefdc6a1c8538a) () const indicates if project lock will prevent reading even in read-only mode |
| void | [setAutoUpgradeEnabled](#aac3caf991d0ecabf88002fe8d271d8b2) (bool pFlag) |
| bool | [getAutoUpgradeEnabled](#a33ce9eaefe4d08c597c83e0435d20670) () const |

## Detailed Description

[Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_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:

* Managed project (a project folder is created and managed aside the project file)
* [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_project) folder suffix: .cffdb
* [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_project) lock: disabled
* Automatic upgrades: enabled

## Constructor & Destructor Documentation

### ProjectStoragePolicy()

```cpp theme={null}
ansys::Project::ProjectStoragePolicy::ProjectStoragePolicy(const std::string pName)
```

Constructor - default storage policies.

## Member Function Documentation

### getApplicationName()

```cpp theme={null}
std::string ansys::Project::ProjectStoragePolicy::getApplicationName() const
```

return the application owner of this project (optional - default is empty)

### getAttr()

```cpp theme={null}
std::string ansys::Project::ProjectStoragePolicy::getAttr(const std::string & pKey) const
```

### getAutoUpgradeEnabled()

```cpp theme={null}
bool ansys::Project::ProjectStoragePolicy::getAutoUpgradeEnabled() const
```

### getLockInfoFilename()

```cpp theme={null}
URL ansys::Project::ProjectStoragePolicy::getLockInfoFilename(const URL & pProjectLocation) const
```

if project lock is enabled, returns the lock filename for the specified project location

### getProjectSubfolderCustomName()

```cpp theme={null}
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()

```cpp theme={null}
std::string ansys::Project::ProjectStoragePolicy::getProjectSubfolderSuffix() const
```

indicates the the filename suffix added to a project folder (default is .cffdb)

### getSimFolderName()

```cpp theme={null}
std::string ansys::Project::ProjectStoragePolicy::getSimFolderName() const
```

returns the name of the simulation folder in the current policy (default is none)

### getSubProjectMode()

```cpp theme={null}
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()

```cpp theme={null}
bool ansys::Project::ProjectStoragePolicy::isLockInfoEnabled() const
```

indicates if project lock feature is enabled

### isLockInfoOnReadOnlyEnabled()

```cpp theme={null}
bool ansys::Project::ProjectStoragePolicy::isLockInfoOnReadOnlyEnabled() const
```

indicates if project lock will prevent reading even in read-only mode

### isProjectSubfolderEnabled()

```cpp theme={null}
bool ansys::Project::ProjectStoragePolicy::isProjectSubfolderEnabled() const
```

indicates if the project is a managed project (with a sidecard folder to store files)

### isReadOnly()

```cpp theme={null}
bool ansys::Project::ProjectStoragePolicy::isReadOnly() const
```

indicates if the project is read-only, cannot be saved back and many operations will fail

### loadFromMeta()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::loadFromMeta(const MetadataHoof & pMeta)
```

### saveToMeta()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::saveToMeta(MetadataHoof & pMeta)
```

### setApplicationName()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setApplicationName(const std::string & pName)
```

### setAttr()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setAttr(
    const std::string & pKey,
    const std::string & pValue
)
```

### setAutoUpgradeEnabled()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setAutoUpgradeEnabled(bool pFlag)
```

### setProjectSubfolderCustomName()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setProjectSubfolderCustomName(
    const std::string & pCustomFolder
)
```

### setProjectSubfolderEnabled()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setProjectSubfolderEnabled(bool pFlag)
```

### setProjectSubfolderSuffix()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setProjectSubfolderSuffix(
    const std::string & pSuffix
)
```

### setReadOnly()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setReadOnly(bool pFlag)
```

### setSimFolderName()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setSimFolderName(const std::string & pName)
```

### setSubProjectMode()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setSubProjectMode(
    const std::string & pSubprojectMode
)
```

### setUseLockInfo()

```cpp theme={null}
void ansys::Project::ProjectStoragePolicy::setUseLockInfo(
    bool pUseFeature,
    bool pUseInReadOnly = false
)
```
