> 文章列表 > OCAF——数据结构机制 Sample2

OCAF——数据结构机制 Sample2

OCAF——数据结构机制 Sample2

Email:dev_as@163.com

 Another example is the application for designing table lamps. The first label is allocated to the lamp unit.

 

  1. The tree definition of Lamp

    1. The root label cannot have brother labels. :[Root : (0)],根节点没有兄弟节点

    2. Consequently, various lamps (in the framework allocation) correspond to the sub-labels of the root label. This allows avoiding any confusion between table lamps in the data framework. [lamp 1:sub-label (0:1)]、[lamp 2:sub-label (0:2)],定义同样树结构但是不同的属性值的灯对象,因为灯的结构组成是可以复用的。

    3. Different lamp parts have different material, color and other attributes, so a child label (of the lamp with t