2022-02-04 11:14:53 +00:00
|
|
|
package hyphae
|
|
|
|
|
|
|
|
import "sync"
|
|
|
|
|
|
|
|
type EmptyHypha struct {
|
|
|
|
sync.RWMutex
|
|
|
|
|
|
|
|
canonicalName string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *EmptyHypha) CanonicalName() string {
|
|
|
|
return e.canonicalName
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *EmptyHypha) HasTextPart() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *EmptyHypha) TextPartPath() string {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewEmptyHypha returns an empty hypha struct with given name.
|
|
|
|
func NewEmptyHypha(hyphaName string) *EmptyHypha {
|
|
|
|
return &EmptyHypha{
|
|
|
|
canonicalName: hyphaName,
|
|
|
|
}
|
|
|
|
}
|
2022-02-04 14:56:28 +00:00
|
|
|
|
2022-02-04 17:06:37 +00:00
|
|
|
func FillEmptyHyphaUpToTextualHypha(e *EmptyHypha, textPath string) *NonEmptyHypha { // sic!
|
|
|
|
return &NonEmptyHypha{
|
2022-02-04 17:04:39 +00:00
|
|
|
name: e.CanonicalName(),
|
|
|
|
TextPath: textPath,
|
2022-02-04 14:56:28 +00:00
|
|
|
}
|
|
|
|
}
|
2022-02-06 13:09:56 +00:00
|
|
|
|
|
|
|
func FillEmptyHyphaUpToMediaHypha(e *EmptyHypha, binaryPath string) *NonEmptyHypha { // sic!
|
|
|
|
return &NonEmptyHypha{
|
|
|
|
name: e.CanonicalName(),
|
|
|
|
binaryPath: binaryPath,
|
|
|
|
}
|
|
|
|
}
|