FluidManipulationClient:
Filter:
FluCoMa/Classes (extension) | Libraries > FluidCorpusManipulation

FluidManipulationClient
ExtensionExtension

A base case for Libraries>FluidCorpusManipulation classes

Description

A utility base class for Libraries>FluidCorpusManipulation classes, that deals with common functionality (wrapping a Synth in the instance, etc.)

Not intended to be used directly.

Class Methods

.new

Language-side constructor. Internally, this creates a new synth around an instance of the sub-class being constructed, and maintains a variable pointing to the synth, so that it can be communicated with.

Arguments:

server

The Server this instance is running on

... args

Arguments specific to the sub-class at hand

Returns:

A new instance

Instance Methods

.synth

Fluid Manipulation client objects are server-side entities, wrapped in a Node to manage communication between language and object. For this, a Synth is needed, as the representation of a server node.

Returns:

the instance's Synth

.server

The Server that our instance's object is running on

Returns:

.read

Read the object's data from a JSON file on disk, replacing the current contents. ​

.write

Write the object's data to disk as a JSON file.

.size

Report the number of items currently in the object's data.

.cols

Report the dimensionality of the object's data. If action is nil, will default to posting result.

.dump

Get the contents of the object's data as a Dictionary (note: uses a temporary file under the hood);

.load

Fill the object with the contents of a dictionary, replacing its current contents (note: uses a temporary file under the hood).