Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockFactory ¶
type BlockFactory struct{}
BlockFactory product blocks
func (*BlockFactory) GetFactory ¶
func (f *BlockFactory) GetFactory(kind string) Factory
GetFactory return
func (*BlockFactory) ProductBlock ¶
func (f *BlockFactory) ProductBlock(kind string) Block
ProductBlock product block of specified kind
type CircleBlockFactory ¶
type CircleBlockFactory struct{ Factory }
CircleBlockFactory product circle blocks
func (*CircleBlockFactory) Product ¶
func (c *CircleBlockFactory) Product() Block
Product create circle blocks
type Factory ¶
type Factory interface {
Product() Block
}
Factory of block
func GetCircleBlockFactory ¶
func GetCircleBlockFactory() Factory
GetCircleBlockFactory return a singleton instance of CircleBlockFactory
func GetSquareBlockFactory ¶
func GetSquareBlockFactory() Factory
GetSquareBlockFactory return a singleton instance of SquareBlockFactory
type SquareBlockFactory ¶
type SquareBlockFactory struct{ Factory }
SquareBlockFactory product square blocks
func (*SquareBlockFactory) Product ¶
func (s *SquareBlockFactory) Product() Block
Product create square blocks
Click to show internal directories.
Click to hide internal directories.