logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

smiGetClass smiGetFirstClass, smiGetNextClass, smiGetClassModule, smiGetParentClass, smiIsClassScalar -

Author

       (C) 2007 Kaloyan Kanev, Jacobs University, Germany <k.kanev@jacobs-university.de>

                                                February 10, 2007                                   smi_class(3)

Description

       These functions retrieve information on a SMIng class definition (SMIng).

       smiGetClass(SmiModule*smiModulePtr,char*name) returns a pointer to structSmiClass that represents  the
       class  with  the  given name in the given module(smiModulePtr ), or NULL if the class with the given name
       does not exist.

       smiGetFirstClass(SmiModule*smiModulePtr) and smiGetNextClass(SmiClass*smiClassPtr) are used to  iterate
       through  the  classes  of the module given by smiModulePtr. They return a pointer to structSmiClass that
       represents a class or NULL if there are no classes left in the module, or error has occurred.

       smiGetClassModule(SmiClass*smiClassPtr) returns a pointer to structSmiModule, of the module  containing
       the given class.

       smiGetParentClass(SmiClass*smiClassPtr)  returns a pointer to structSmiClass pointing to the parent of
       the given smiClassPtr, or NULL if the class is not derived.

       smiIsClassScalar(SmiClass*smiClassPtr) returns int1  if  the  class  is  scalar(its  unique  statement
       contains   an   empty   list)   or   0   otherwise.   This   method  can  be  used  in  conjunction  with
       smiGetFirstUniqueAttribute() to determine whether the class is meant to be instantiated  separately  (has
       unique  statement  with  nonempty  list),  or  if it is meant to be used as part of another class (has no
       unique statement).

Files

       ${prefix}/include/smi.h    SMI library header file

Name

       smiGetClass  smiGetFirstClass,  smiGetNextClass, smiGetClassModule, smiGetParentClass, smiIsClassScalar -
       SMI class information routines

See Also

libsmi(3), smi_module(3), smi.h

Synopsis

#include<smi.h>SmiClass*smiGetClass(SmiModule*smiModulePtr,char*name);SmiClass*smiGetFirstClass(SmiModule*smiModulePtr);SmiClass*smiGetNextClass(SmiClass*smiClassPtr);SmiClass*smiGetParentClass(SmiClass*smiClassPtr);SmiModule*smiGetClassModule(SmiClass*smiClassPtr);intsmiIsClassScalar(SmiClass*smiClassPtr);

       typedef struct SmiClass {
           SmiIdentifier       name;
           SmiDecl             decl;
           SmiStatus           status;
           char                *description;
           char                *reference;
       } SmiClass;

See Also