Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / lib / smi_class.3.in
1 .\" 
2 .TH "smi_class" "3" "February 10, 2007" "" "SMI Management Information Library"
3 .SH "NAME"
4 .\" START OF MAN PAGE COPIES
5 smiGetClass
6 smiGetFirstClass,
7 smiGetNextClass,
8 smiGetClassModule,
9 smiGetParentClass,
10 smiIsClassScalar
11 .\" END OF MAN PAGE COPIES
12 \- SMI class
13 information routines
14 .SH "SYNOPSIS"
15 .nf 
16 .B #include <smi.h>
17 .RS
18 .RE
19 .sp
20 .BI "SmiClass *smiGetClass(SmiModule *" smiModulePtr ", char *" name );
21 .RE
22 .sp
23 .BI "SmiClass *smiGetFirstClass(SmiModule *" smiModulePtr );
24 .RE
25 .sp
26 .BI "SmiClass *smiGetNextClass(SmiClass *" smiClassPtr );
27 .RE
28 .sp
29 .BI "SmiClass *smiGetParentClass(SmiClass *" smiClassPtr );
30 .RE
31 .sp
32 .BI "SmiModule *smiGetClassModule(SmiClass *" smiClassPtr );
33 .RE
34 .sp
35 .BI "int smiIsClassScalar(SmiClass *" smiClassPtr );
36 .RE
37
38 typedef struct SmiClass {
39     SmiIdentifier       name;
40     SmiDecl             decl;
41     SmiStatus           status;
42     char                *description;
43     char                *reference;
44 } SmiClass;
45
46 .fi 
47 .SH "DESCRIPTION"
48 These functions retrieve information on a SMIng class definition (SMIng).
49 .PP 
50 \fBsmiGetClass(SmiModule *smiModulePtr,char *name)\fP returns a
51 pointer to \fBstruct SmiClass\fP that represents the class with the
52 given \fIname\fP in the given module(\fIsmiModulePtr\fP ), or NULL if
53 the class with the given name does not exist.
54 .PP 
55 \fBsmiGetFirstClass(SmiModule *smiModulePtr)\fP and
56 \fBsmiGetNextClass(SmiClass *smiClassPtr)\fP are used to iterate
57 through the classes of the module given by \fIsmiModulePtr\fP. They
58 return a pointer to \fBstruct SmiClass\fP that represents a class or
59 NULL if there are no classes left in the module, or error has
60 occurred.
61 .PP 
62 \fBsmiGetClassModule(SmiClass *smiClassPtr)\fP returns a pointer to
63 \fBstruct SmiModule\fP, of the module containing the given class.
64 .PP 
65 \fBsmiGetParentClass(SmiClass *smiClassPtr)\fP returns a pointer to
66 \fBstruct SmiClass\fP pointing to the parent of the given
67 \fIsmiClassPtr\fP, or NULL if the class is not derived.
68 .PP 
69 \fBsmiIsClassScalar(SmiClass *smiClassPtr)\fP returns \fBint\fP
70 \fI1\fP if the class is scalar(its unique statement contains an empty
71 list) or \fI0\fP otherwise. This method can be used in conjunction
72 with \fBsmiGetFirstUniqueAttribute()\fP to determine whether the class
73 is meant to be instantiated separately (has unique statement with
74 nonempty list), or if it is meant to be used as part of another class
75 (has no unique statement).
76 .SH "FILES"
77 .nf 
78 @includedir@/smi.h    SMI library header file
79 .fi 
80 .SH "SEE ALSO"
81 .BR libsmi "(3), "
82 .BR smi_module "(3), "
83 .BR smi.h
84 .SH "AUTHOR"
85 (C) 2007 Kaloyan Kanev, Jacobs University, Germany <k.kanev@jacobs-university.de>
86 .br