|
3D Repo Bouncer
1.4
|
Public Member Functions | |
| void | cleanUp (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &dbName, const std::string &projectName) |
| bool | connectAndAuthenticate (std::string &errMsg, const std::string &address, const uint32_t &port, const uint32_t &maxConnections, const std::string &dbName, const std::string &username, const std::string &password, const bool &pwDigested=false) |
| bool | connectAndAuthenticate (std::string &errMsg, const std::string &address, const uint32_t &port, const uint32_t &maxConnections, const std::string &dbName, const repo::core::model::RepoBSON *credentials) |
| bool | connectAndAuthenticateWithAdmin (std::string &errMsg, const std::string &address, const uint32_t &port, const uint32_t &maxConnections, const std::string &username, const std::string &password, const bool &pwDigested=false) |
| bool | commitScene (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene, const std::string &owner="", const std::string &tag="", const std::string &desc="") |
| void | compareScenes (repo::core::model::RepoScene *base, repo::core::model::RepoScene *compare, repo_diff_result_t &baseResults, repo_diff_result_t &compResults, const repo::DiffMode &diffMode, const repo::core::model::RepoScene::GraphType &gType=repo::core::model::RepoScene::GraphType::DEFAULT) |
| repo::core::model::RepoBSON * | createCredBSON (const std::string &databaseAd, const std::string &username, const std::string &password, const bool &pwDigested) |
| repo::core::model::RepoScene * | createFederatedScene (const std::map< repo::core::model::TransformationNode, repo::core::model::ReferenceNode > &fedMap) |
| repo::core::model::RepoScene * | createMapScene (const repo::core::model::MapNode &mapNode) |
| uint64_t | countItemsInCollection (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &collection, std::string &errMsg) |
| void | disconnectFromDatabase (const std::string &databaseAd) |
| bool | dropCollection (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &databaseName, const std::string &collectionName, std::string &errMsg) |
| bool | dropDatabase (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &databaseName, std::string &errMsg) |
| std::list< std::string > | fetchDatabases (const std::string &databaseAd, const repo::core::model::RepoBSON *cred) |
| std::list< std::string > | fetchCollections (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database) |
| repo::core::model::RepoScene * | fetchScene (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &collection, const repoUUID &uuid, const bool &headRevision=false, const bool &lightFetch=false) |
| void | fetchScene (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene) |
| bool | generateAndCommitSelectionTree (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene) |
| bool | generateAndCommitStashGraph (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene) |
| bool | generateAndCommitWebViewBuffer (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene, repo_web_buffers_t &buffers, const modelconvertor::WebExportType &exType) |
| bool | generateAndCommitGLTFBuffer (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene) |
| bool | generateAndCommitSRCBuffer (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene) |
| repo_web_buffers_t | generateGLTFBuffer (repo::core::model::RepoScene *scene) |
| repo_web_buffers_t | generateSRCBuffer (repo::core::model::RepoScene *scene) |
| bool | generateStashGraph (repo::core::model::RepoScene *scene) |
| std::vector< repo::core::model::RepoBSON > | getAllFromCollectionTailable (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &collection, const uint64_t &skip=0, const uint32_t &limit=0) |
| std::vector< repo::core::model::RepoBSON > | getAllFromCollectionTailable (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &collection, const std::list< std::string > &fields, const std::string &sortField=std::string(), const int &sortOrder=-1, const uint64_t &skip=0, const uint32_t &limit=0) |
| repo::core::model::CollectionStats | getCollectionStats (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &collection, std::string &errMsg) |
| std::map< std::string, std::list< std::string > > | getDatabasesWithProjects (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::list< std::string > &databases) |
| std::list< std::string > | getAdminDatabaseRoles (const std::string &databaseAd) |
| repo::core::model::RepoRoleSettings | getRoleSettingByName (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &uniqueRoleName) |
| std::shared_ptr< repo_partitioning_tree_t > | getScenePartitioning (const repo::core::model::RepoScene *scene, const uint32_t &maxDepth=8) |
| std::list< std::string > | getStandardDatabaseRoles (const std::string &databaseAd) |
| std::string | getNameOfAdminDatabase (const std::string &databaseAd) const |
| bool | hasCollection (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &dbName, const std::string &project) |
| bool | hasDatabase (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &dbName) |
| void | insertBinaryFileToDatabase (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &collection, const std::string &name, const std::vector< uint8_t > &rawData, const std::string &mimeType="") |
| void | insertRole (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const repo::core::model::RepoRole &role) |
| void | insertUser (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const repo::core::model::RepoUser &user) |
| repo::core::model::RepoNodeSet | loadMetadataFromFile (const std::string &filePath, const char &delimiter= ',') |
| repo::core::model::RepoScene * | loadSceneFromFile (const std::string &filePath, std::string &msg, const bool &applyReduction=true, const bool &rotateModel=false, const repo::manipulator::modelconvertor::ModelImportConfig *config=nullptr) |
| void | removeDocument (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &databaseName, const std::string &collectionName, const repo::core::model::RepoBSON &bson) |
| bool | removeProject (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &databaseName, const std::string &projectName, std::string &errMsg) |
| void | reduceTransformations (repo::core::model::RepoScene *scene, const repo::core::model::RepoScene::GraphType &gType=repo::core::model::RepoScene::GraphType::DEFAULT) |
| bool | removeStashGraphFromDatabase (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, repo::core::model::RepoScene *scene) |
| void | removeRole (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const repo::core::model::RepoRole &role) |
| void | removeUser (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const repo::core::model::RepoUser &user) |
| void | saveOriginalFiles (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const repo::core::model::RepoScene *scene, const std::string &directory) |
| void | saveOriginalFiles (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &database, const std::string &project, const std::string &directory) |
| bool | saveSceneToFile (const std::string &filePath, const repo::core::model::RepoScene *scene) |
| void | updateRole (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const repo::core::model::RepoRole &role) |
| void | updateUser (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const repo::core::model::RepoUser &user) |
| void | upsertDocument (const std::string &databaseAd, const repo::core::model::RepoBSON *cred, const std::string &databaseName, const std::string &collectionName, const repo::core::model::RepoBSON &bson) |
| void RepoManipulator::cleanUp | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | dbName, | ||
| const std::string & | projectName | ||
| ) |
Clean up any incomplete commits within the project
| address | mongo database address |
| port | port number |
| dbName | name of the database |
| projectName | name of the project |
| bool RepoManipulator::commitScene | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene, | ||
| const std::string & | owner = "", |
||
| const std::string & | tag = "", |
||
| const std::string & | desc = "" |
||
| ) |
Commit a scene graph
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| scene | scene to commit |
| owner | specify the owner of the scene (by default it is the user authorised to commit) |
| void RepoManipulator::compareScenes | ( | repo::core::model::RepoScene * | base, |
| repo::core::model::RepoScene * | compare, | ||
| repo_diff_result_t & | baseResults, | ||
| repo_diff_result_t & | compResults, | ||
| const repo::DiffMode & | diffMode, | ||
| const repo::core::model::RepoScene::GraphType & | gType = repo::core::model::RepoScene::GraphType::DEFAULT |
||
| ) |
Compare 2 scenes.
| base | base scene to compare against |
| compare | scene to compare base scene against |
| baseResults | Diff results in the perspective of base |
| compResults | Diff results in the perspective of compare |
| repo::DiffMode | the mode to use to compare the scenes |
| gType | graph type to diff (default: unoptimised) |
| bool RepoManipulator::connectAndAuthenticate | ( | std::string & | errMsg, |
| const std::string & | address, | ||
| const uint32_t & | port, | ||
| const uint32_t & | maxConnections, | ||
| const std::string & | dbName, | ||
| const std::string & | username, | ||
| const std::string & | password, | ||
| const bool & | pwDigested = false |
||
| ) |
Connect to the given database address/port and authenticat the user
| errMsg | error message if the function returns false |
| address | mongo database address |
| port | port number |
| maxConnections | maxmimum number of concurrent connections allowed to the database |
| dbName | database name to authenticate against |
| username | user name |
| password | password of the user |
| pwDigested | is the password provided in digested form (default: false) |
| bool RepoManipulator::connectAndAuthenticate | ( | std::string & | errMsg, |
| const std::string & | address, | ||
| const uint32_t & | port, | ||
| const uint32_t & | maxConnections, | ||
| const std::string & | dbName, | ||
| const repo::core::model::RepoBSON * | credentials | ||
| ) |
Connect to the given database address/port and authenticat the user
| errMsg | error message if the function returns false |
| address | mongo database address |
| port | port number |
| maxConnections | maxmimum number of concurrent connections allowed to the database |
| dbName | database name to authenticate against |
| credentials | user credentials |
| bool RepoManipulator::connectAndAuthenticateWithAdmin | ( | std::string & | errMsg, |
| const std::string & | address, | ||
| const uint32_t & | port, | ||
| const uint32_t & | maxConnections, | ||
| const std::string & | username, | ||
| const std::string & | password, | ||
| const bool & | pwDigested = false |
||
| ) |
Connect to the given database address/port and authenticat the user using Admin database
| errMsg | error message if the function returns false |
| address | mongo database address |
| port | port number |
| maxConnections | maxmimum number of concurrent connections allowed to the database |
| username | user name |
| password | password of the user |
| pwDigested | is the password provided in digested form (default: false) |
| uint64_t RepoManipulator::countItemsInCollection | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | collection, | ||
| std::string & | errMsg | ||
| ) |
Count the number of documents within the collection
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | name of database |
| collection | name of collection |
| repo::core::model::RepoBSON * RepoManipulator::createCredBSON | ( | const std::string & | databaseAd, |
| const std::string & | username, | ||
| const std::string & | password, | ||
| const bool & | pwDigested | ||
| ) |
Create a bson object storing user credentials
| databaseAd | mongo database address:port |
| username | user name |
| password | password of the user |
| pwDigested | is the password provided in digested form (default: false) |
| repo::core::model::RepoScene * RepoManipulator::createFederatedScene | ( | const std::map< repo::core::model::TransformationNode, repo::core::model::ReferenceNode > & | fedMap | ) |
Create a federated scene with the given scene collections
| fedMap | a map of reference scene and transformation from root where the scene should lie |
| repo::core::model::RepoScene * RepoManipulator::createMapScene | ( | const repo::core::model::MapNode & | mapNode | ) |
Create a map scene with the given map
| mapNode | the map node to create the scene with |
| void RepoManipulator::disconnectFromDatabase | ( | const std::string & | databaseAd | ) |
Disconnects from the given database host
| databaseAd | database address:port |
| bool RepoManipulator::dropCollection | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | databaseName, | ||
| const std::string & | collectionName, | ||
| std::string & | errMsg | ||
| ) |
Remove a collection from the database
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | the database the collection resides in |
| collection | name of the collection to drop |
| errMsg | error message if failed |
| bool RepoManipulator::dropDatabase | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | databaseName, | ||
| std::string & | errMsg | ||
| ) |
Remove a database from the database instance
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | the database the collection resides in |
| errMsg | error message if failed |
| std::list< std::string > RepoManipulator::fetchCollections | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database | ||
| ) |
Get a list of all available collections.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | database name |
| std::list< std::string > RepoManipulator::fetchDatabases | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred | ||
| ) |
Get a list of all available databases, alphabetically sorted by default.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| repo::core::model::RepoScene * RepoManipulator::fetchScene | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | collection, | ||
| const repoUUID & | uuid, | ||
| const bool & | headRevision = false, |
||
| const bool & | lightFetch = false |
||
| ) |
Retrieve a RepoScene with a specific revision loaded.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | the database the collection resides in |
| project | name of the project |
| uuid | if headRevision, uuid represents the branch id, otherwise the unique id of the revision branch |
| headRevision | true if retrieving head revision |
| lightFetch | fetches only the stash (or scene if stash failed), reduce computation and memory usage (ideal for visualisation only) |
| void RepoManipulator::fetchScene | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene | ||
| ) |
Retrieve all RepoScene representations given a partially loaded scene.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| scene | scene to fully load |
| bool RepoManipulator::generateAndCommitGLTFBuffer | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene | ||
| ) |
Generate and commit a GLTF encoding for the given scene This requires the stash to have been generated already
| databaseAd | database address:portdatabase |
| cred | user credentials in bson form |
| scene | the scene to generate the gltf encoding from |
| bool RepoManipulator::generateAndCommitSelectionTree | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene | ||
| ) |
Generate and commit scene's selection tree in JSON format The generated data will be also commited to the database/project set within the scene
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| scene | scene to optimise |
| return | true upon success |
| bool RepoManipulator::generateAndCommitSRCBuffer | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene | ||
| ) |
Generate and commit a SRC encoding for the given scene This requires the stash to have been generated already
| databaseAd | database address:portdatabase |
| cred | user credentials in bson form |
| scene | the scene to generate the src encoding from |
| bool RepoManipulator::generateAndCommitStashGraph | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene | ||
| ) |
Generate and commit stash graph (multipart viewing graph) The generated graph will be added into the scene provided also commited to the database/project set within the scene
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| scene | scene to optimise |
| return | true upon success |
| bool RepoManipulator::generateAndCommitWebViewBuffer | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene, | ||
| repo_web_buffers_t & | buffers, | ||
| const modelconvertor::WebExportType & | exType | ||
| ) |
Generate and commit a exType encoding for the given scene This requires the stash to have been generated already
| databaseAd | database address:portdatabase |
| cred | user credentials in bson form |
| scene | the scene to generate the src encoding from |
| buffers | buffers that are geneated and commited |
| exType | the type of export it is |
| repo_web_buffers_t RepoManipulator::generateGLTFBuffer | ( | repo::core::model::RepoScene * | scene | ) |
Generate a gltf encoding in the form of a buffer for the given scene This requires the stash to have been generated already
| scene | the scene to generate the gltf encoding from |
| repo_web_buffers_t RepoManipulator::generateSRCBuffer | ( | repo::core::model::RepoScene * | scene | ) |
Generate a SRC encoding in the form of a buffer for the given scene This requires the stash to have been generated already
| scene | the scene to generate the src encoding from |
| bool RepoManipulator::generateStashGraph | ( | repo::core::model::RepoScene * | scene | ) |
Generate a stash graph for the given scene and populate it into the given scene
| scene | scene to generate stash graph for |
| std::list< std::string > RepoManipulator::getAdminDatabaseRoles | ( | const std::string & | databaseAd | ) |
Get a list of admin roles from the database
| databaseAd | database address:portdatabase |
| std::vector< repo::core::model::RepoBSON > RepoManipulator::getAllFromCollectionTailable | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | collection, | ||
| const uint64_t & | skip = 0, |
||
| const uint32_t & | limit = 0 |
||
| ) |
Retrieve documents from a specified collection due to limitations of the transfer protocol this might need to be called multiple times, utilising the skip index to skip the first n items.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| collection | name of collection |
| skip | specify how many documents to skip |
| limit | limits the max amount of documents to retrieve (0 = no limit) |
| std::vector< repo::core::model::RepoBSON > RepoManipulator::getAllFromCollectionTailable | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | collection, | ||
| const std::list< std::string > & | fields, | ||
| const std::string & | sortField = std::string(), |
||
| const int & | sortOrder = -1, |
||
| const uint64_t & | skip = 0, |
||
| const uint32_t & | limit = 0 |
||
| ) |
Retrieve documents from a specified collection due to limitations of the transfer protocol this might need to be called multiple times, utilising the skip index to skip the first n items.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| collection | name of collection |
| fields | fields to get back from the database |
| sortField | field to sort upon |
| sortOrder | 1 ascending, -1 descending |
| skip | specify how many documents to skip |
| limit | limits the max amount of documents to retrieve (0 = no limit) |
| repo::core::model::CollectionStats RepoManipulator::getCollectionStats | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | collection, | ||
| std::string & | errMsg | ||
| ) |
Get the collection statistics of the given collection
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | Name of database |
| collection | Name of collection |
| errMsg | error message when error occurs |
| std::map< std::string, std::list< std::string > > RepoManipulator::getDatabasesWithProjects | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::list< std::string > & | databases | ||
| ) |
Return a list of projects with the database available to the user
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| databases | list of databases to look up |
| std::string RepoManipulator::getNameOfAdminDatabase | ( | const std::string & | databaseAd | ) | const |
Get the name of the admin database note it is done this way to support different admin database names for different handlers (which may be of different database types)
| databaseAd | database address:portdatabase |
| repo::core::model::RepoRoleSettings RepoManipulator::getRoleSettingByName | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | uniqueRoleName | ||
| ) |
Get a role settings within a database
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | name of database |
| uniqueRoleName | name of the role to look for |
| std::shared_ptr< repo_partitioning_tree_t > RepoManipulator::getScenePartitioning | ( | const repo::core::model::RepoScene * | scene, |
| const uint32_t & | maxDepth = 8 |
||
| ) |
Get a hierachical spatial partitioning in form of a tree
| scene | scene to partition |
| maxDepth | max partitioning depth |
| std::list< std::string > RepoManipulator::getStandardDatabaseRoles | ( | const std::string & | databaseAd | ) |
Get a list of standard roles from the database
| databaseAd | database address:portdatabase |
| bool RepoManipulator::hasDatabase | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | dbName | ||
| ) |
Check if the database exist in the given database address
| databaseAd | database address |
| cred | credentials |
| dbName | name of the database |
| void RepoManipulator::insertBinaryFileToDatabase | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | collection, | ||
| const std::string & | name, | ||
| const std::vector< uint8_t > & | rawData, | ||
| const std::string & | mimeType = "" |
||
| ) |
Insert a binary file into the database (GridFS)
| databaseAd | database address:portdatabase |
| cred | user credentials in bson form |
| database | name of the database |
| collection | name of the collection (it'll be saved into *.files, *.chunks) |
| rawData | data in the form of byte vector |
| mimeType | the MIME type of the data (optional) |
| void RepoManipulator::insertRole | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const repo::core::model::RepoRole & | role | ||
| ) |
Insert a new role into the database
| databaseAd | database address:portdatabase |
| cred | user credentials in bson form |
| role | role info to insert |
| void RepoManipulator::insertUser | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const repo::core::model::RepoUser & | user | ||
| ) |
Insert a new user into the database
| databaseAd | database address:portdatabase |
| cred | user credentials in bson form |
| user | user info to insert |
| repo::core::model::RepoNodeSet RepoManipulator::loadMetadataFromFile | ( | const std::string & | filePath, |
| const char & | delimiter = ',' |
||
| ) |
Load metadata from a file
| filePath | path to file |
| delimiter |
| repo::core::model::RepoScene * RepoManipulator::loadSceneFromFile | ( | const std::string & | filePath, |
| std::string & | msg, | ||
| const bool & | applyReduction = true, |
||
| const bool & | rotateModel = false, |
||
| const repo::manipulator::modelconvertor::ModelImportConfig * | config = nullptr |
||
| ) |
Load a Repo Scene from a file
| filePath | path to file |
| msg | error message if it fails |
| apply | transformation reduction optimizer (default = true) |
| rotateModel | rotate model by 270degrees on x (default: false) |
| config | import config (optional) |
| void RepoManipulator::reduceTransformations | ( | repo::core::model::RepoScene * | scene, |
| const repo::core::model::RepoScene::GraphType & | gType = repo::core::model::RepoScene::GraphType::DEFAULT |
||
| ) |
Reduce redundant transformations from the scene to optimise the graph
| scene | RepoScene to optimize |
| gType | graph type to diff (default: unoptimised) |
| void RepoManipulator::removeDocument | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | databaseName, | ||
| const std::string & | collectionName, | ||
| const repo::core::model::RepoBSON & | bson | ||
| ) |
remove a document from the database NOTE: this should never be called for a RepoNode family as you should never remove a node from a scene graph like this.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | the database the collection resides in |
| collection | name of the collection to drop |
| bson | document to remove |
| bool RepoManipulator::removeProject | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | databaseName, | ||
| const std::string & | projectName, | ||
| std::string & | errMsg | ||
| ) |
Remove a project from the database This removes:
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | name of the datbase |
| name | of the project |
| errMsg | error message if the operation fails |
| void RepoManipulator::removeRole | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const repo::core::model::RepoRole & | role | ||
| ) |
remove a role from the database
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| role | role info to remove |
| bool RepoManipulator::removeStashGraphFromDatabase | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| repo::core::model::RepoScene * | scene | ||
| ) |
Remove stash graph entry for this particular revision from the database
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| scene | scene reference to remove stash graph from |
| void RepoManipulator::removeUser | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const repo::core::model::RepoUser & | user | ||
| ) |
remove a user from the database
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| user | user info to remove |
| void RepoManipulator::saveOriginalFiles | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const repo::core::model::RepoScene * | scene, | ||
| const std::string & | directory | ||
| ) |
Save the files of the original model to a specified directory
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| scene | Repo Scene to save |
| directory | directory to save into |
| void RepoManipulator::saveOriginalFiles | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | database, | ||
| const std::string & | project, | ||
| const std::string & | directory | ||
| ) |
Save the files of the original model to a specified directory
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | name of database |
| project | name of project |
| directory | directory to save into |
| bool RepoManipulator::saveSceneToFile | ( | const std::string & | filePath, |
| const repo::core::model::RepoScene * | scene | ||
| ) |
Save a Repo Scene to file
| filePath | path to file |
| scene | scene to export |
| void RepoManipulator::updateRole | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const repo::core::model::RepoRole & | role | ||
| ) |
Update a role on the database
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| role | role info to modify |
| void RepoManipulator::updateUser | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const repo::core::model::RepoUser & | user | ||
| ) |
Update a user on the database
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| user | user info to modify |
| void RepoManipulator::upsertDocument | ( | const std::string & | databaseAd, |
| const repo::core::model::RepoBSON * | cred, | ||
| const std::string & | databaseName, | ||
| const std::string & | collectionName, | ||
| const repo::core::model::RepoBSON & | bson | ||
| ) |
upsert a document in the database NOTE: this should never be called for a bson from RepoNode family as you should never update a node from a scene graph like this.
| databaseAd | mongo database address:port |
| cred | user credentials in bson form |
| database | the database the collection resides in |
| collection | name of the collection |
| bson | document to update/insert |
1.8.9.1