SpinalCoreQT API SDK offers three different methods to access and replicate objects with SpinalHub. Synchronize a specific model: Code Block |
---|
| ModelPointer myModel = myConnector->load( "__myApp__/myModel" ); |
Once an object has been saved in the hub using the JavaScript APISDK, this command is used to fetch it and start the synchronization process. The parameter accepted is a string which contains the path of the object in the virtual filesystem of the hub. Synchronize all the models of a specific type: Code Block |
---|
| myConnector->load_type( "MyModelClassName" ); |
This command is used for synchronizing all the models with the specified type MyModelClassName. The parameter accepted is a string corresponding to the name of the model class you want to synchronize. Synchronize a specific pointed model: Code Block |
---|
| ModelPointer myModel = myConnector->load_ptr( ptr_id ); |
In some cases big models need to be splited in different parts. SpinalCore offers a generic way to create weak links between these parts and the Ptr Model. Models linked with Ptr are not directly loaded in the connector. You have to explicitelly load them using the load_ptr method. Once a Ptr has been saved in the hub using the JavaScript APISDK, use this method to synchronize the associated model. The parameter accepted is an integer comming from the Ptr Model. |