Remoto - VFS: objectLoader Class Reference
Remoto - VFS

#include "remoto!stdlib:js/include/objectRegistry.js"

Public Member Functions

 objectLoader (basePath, strict)
 
 applyDefinition (path, data)
 
 applyValues (values, definition)
 
 destroy ()
 
 fetchDefinition (path, data, callback)
 Read data from a VFS path, and apply the loaded contents to a JSON object as a diff. More...
 
 loadDefinition (path, data, callback)
 Create an objectLoaderLoader for a requested path. More...
 
 loadedDefinition (path, data)
 

Detailed Description

DOCME

Constructor & Destructor Documentation

◆ objectLoader()

objectLoader (   basePath,
  strict 
)
Parameters
basePath
strict

DOCME

Member Function Documentation

◆ applyDefinition()

applyDefinition (   path,
  data 
)
Parameters
path
data
Returns

DOCME

◆ applyValues()

applyValues (   values,
  definition 
)
Parameters
values
definition
Returns

DOCME

◆ destroy()

destroy ( )

DOCME

◆ fetchDefinition()

fetchDefinition (   path,
  data,
  callback 
)

Read data from a VFS path, and apply the loaded contents to a JSON object as a diff.

Parameters
pathThe VFS path to load
dataThe data to be diffed by the contents of the loaded file
callbackThe callback to apply once this has completed.

This is a mechanism for recursively loading json objects as classes and diffing them against each other. Using this, we can create something like an inheritance chain for json data.

◆ loadDefinition()

loadDefinition (   path,
  data,
  callback 
)

Create an objectLoaderLoader for a requested path.

Parameters
pathThe path to laod
dataThe data that will be diffed
callbackThe callback to execute once the request is complete.

If an objectLoaderLoader already exists for a given path, this callback and data will be enqueued in that loader.

◆ loadedDefinition()

loadedDefinition (   path,
  data 
)
Parameters
path
data

DOCME


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