Debian Codegraph @

doc/man/man3/ivm/fields/single.sh

raw
1 #!/bin/ksh
2
3 # Shell script to generate the stuff that is the same for all fields
4
5 if test $# -ne 2 ; then
6 echo "Usage: " $0 " className valueRef"
7 echo " e.g: " $0 " SoSFShort short"
8 echo " e.g: " $0 " SoSFColor 'const SbColor &'"
9 exit
10 fi
11
12 className=$1
13 valueRef=$2
14
15 cat <<EOF
16 METHOD "" static SoType getClassTypeId() {}
17 METHOD "" virtual void getTypeId() const {
18 Returns the type for this class or a particular object of this class.
19 }
20 METHOD Get $valueRef getValue() const {
21 Returns this field's value.
22 }
23 METHOD " " $valueRef operator =($valueRef newValue) {}
24 METHOD Set void setValue($valueRef newValue) {
25 Sets this field to newValue.
26 }
27 METHOD IsEq int operator ==(const $className &f) const {}
28 METHOD IsNEq int operator !=(const $className &f) const {
29 Returns TRUE if f is of the same type and has the same value as this
30 field.
31 }
32 EOF
33