Skip to content

Commit 0648d6c

Browse files
ntrelthewilsonator
authored andcommitted
[spec/class] Improve TOC
Add Overview, Declarations. Make Access Control, Super Class, Fields subheadings of Declarations. Group static ctor/dtors under a common heading.
1 parent 876f560 commit 0648d6c

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

spec/class.dd

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ $(SPEC_S Classes,
44

55
$(HEADERNAV_TOC)
66

7+
$(H2 $(LNAME2 overview, Overview))
8+
79
$(P The object-oriented features of D all come from classes. The class
810
hierarchy
911
has as its root the class Object. Object defines a minimum level of functionality
@@ -22,6 +24,8 @@ $(HEADERNAV_TOC)
2224
members are exposed externally to the DLL or EXE.
2325
)
2426

27+
$(H2 $(LNAME2 declaration, Class Declarations))
28+
2529
$(P A class declaration is defined:
2630
)
2731

@@ -94,15 +98,16 @@ Foo var;
9498
------
9599
)
96100

97-
$(H2 $(LNAME2 access_control, Access Control))
101+
$(H3 $(LNAME2 access_control, Access Control))
98102

99103
$(P Access to class members is controlled using
100104
$(DDSUBLINK spec/attribute, visibility_attributes,
101105
visibility attributes).
102106
The default visibility attribute is $(D public).
103107
)
104108

105-
$(H2 $(LNAME2 super_class, Super Class))
109+
110+
$(H3 $(LNAME2 super_class, Super Class))
106111

107112
$(P
108113
All classes inherit from a super class. If one is not specified,
@@ -121,7 +126,7 @@ class B : A { } // B inherits from A
121126
Commas are used to separate inherited types.)
122127

123128

124-
$(H2 $(LNAME2 fields, Fields))
129+
$(H3 $(LNAME2 fields, Fields))
125130

126131
$(P Class members are always accessed with the `.` operator.
127132
)
@@ -824,7 +829,9 @@ $(GNAME Destructor):
824829
by the GC.
825830
)
826831

827-
$(H2 $(LNAME2 static-constructor, Static Constructors))
832+
$(H2 $(LNAME2 static-ctor-dtor, Static Constructors and Destructors))
833+
834+
$(H3 $(LNAME2 static-constructor, Static Constructors))
828835

829836
$(GRAMMAR
830837
$(GNAME StaticConstructor):
@@ -920,7 +927,7 @@ class Foo
920927
}
921928
------
922929

923-
$(H2 $(LNAME2 static-destructor, Static Destructors))
930+
$(H3 $(LNAME2 static-destructor, Static Destructors))
924931

925932
$(GRAMMAR
926933
$(GNAME StaticDestructor):
@@ -967,7 +974,7 @@ class Foo
967974
}
968975
------
969976

970-
$(H2 $(LNAME2 shared_static_constructors, Shared Static Constructors))
977+
$(H3 $(LNAME2 shared_static_constructors, Shared Static Constructors))
971978

972979
$(GRAMMAR
973980
$(GNAME SharedStaticConstructor):
@@ -979,7 +986,7 @@ $(GNAME SharedStaticConstructor):
979986
and are intended for initializing any shared global data.
980987
)
981988

982-
$(H2 $(LNAME2 shared_static_destructors, Shared Static Destructors))
989+
$(H3 $(LNAME2 shared_static_destructors, Shared Static Destructors))
983990

984991
$(GRAMMAR
985992
$(GNAME SharedStaticDestructor):

0 commit comments

Comments
 (0)