CellSync constructor
CellSync({})
Creates a new CellSync with optional binding and configuration
Parameters:
bind
: Optional Cell to bind to (creates observing/chaining)receptor
: How this cell processes incoming signals (default: Receptor.unchanged)test
: TestObject that validates operations (default: TestObject.passed)synapses
: Whether this cell can be linked to others (default: Linkable.enabled)
Returns a new CellSync instance
Example:
final cell = CellSync(
receptor: Receptor.unchanged,
bind: parentCell,
test: TestObject.passed,
synapses: Synapses.enabled
);
Note:
This class is not intended for direct instantiation. Instead, use the factory constructor Cell to create instances.
Architecture Notes:
- Implements Cell interface for core functionality
- Uses Properties for configuration
- Supports TestObject for validation
- Integrates with Synapses for linking
- Provides Receptor for signal processing
Example:
final cell = CellSync(
receptor: Receptor.unchanged,
bind: parentCell,
test: TestObject.passed,
synapses: Synapses.enabled
);
// Create a deputy cell
final deputy = cell.deputy(
test: TestObject.passed,
mapObject: MapObject.from(cell)
);
// Apply a function
final result = cell.apply(someFunction, [arg1, arg2]);
Implementation
CellSync({
Cell? bind,
Receptor receptor = Receptor.unchanged,
TestObject test = TestObject.passed,
Synapses synapses = Synapses.enabled
}) : this.fromProperties(Properties(
receptor: receptor, bind: bind, test: test,
synapses: synapses == Synapses.enabled ? Synapses() : synapses,
));