2015-01-28 14:19:50 +01:00
|
|
|
/**
|
|
|
|
|
* Copyright (C) 2015 Typesafe Inc. <http://www.typesafe.com>
|
|
|
|
|
*/
|
|
|
|
|
package akka.stream
|
|
|
|
|
|
|
|
|
|
import akka.stream.impl.StreamLayout
|
2015-02-27 16:33:25 +01:00
|
|
|
import scala.annotation.unchecked.uncheckedVariance
|
2015-01-28 14:19:50 +01:00
|
|
|
|
|
|
|
|
trait Graph[+S <: Shape, +M] {
|
|
|
|
|
/**
|
|
|
|
|
* Type-level accessor for the shape parameter of this graph.
|
|
|
|
|
*/
|
2015-02-27 16:33:25 +01:00
|
|
|
type Shape = S @uncheckedVariance
|
2015-01-28 14:19:50 +01:00
|
|
|
/**
|
|
|
|
|
* The shape of a graph is all that is externally visible: its inlets and outlets.
|
|
|
|
|
*/
|
|
|
|
|
def shape: S
|
|
|
|
|
/**
|
|
|
|
|
* INTERNAL API.
|
|
|
|
|
*
|
|
|
|
|
* Every materializable element must be backed by a stream layout module
|
|
|
|
|
*/
|
|
|
|
|
private[stream] def module: StreamLayout.Module
|
2015-04-14 08:59:37 +02:00
|
|
|
|
|
|
|
|
def withAttributes(attr: OperationAttributes): Graph[S, M]
|
|
|
|
|
|
|
|
|
|
def named(name: String): Graph[S, M] = withAttributes(OperationAttributes.name(name))
|
2015-01-28 14:19:50 +01:00
|
|
|
}
|