Appendix A Entity and Reference Kinds |
This section lists the general categories of C entity kinds and the specific kind literal names associated with them.
Use "c class" to match all C Class entity kinds.
An ordinary class is a class that is not a member in another class, and is not unnamed or unresolved.
class A { // Udb_cClassType ... };
An abstract class is a class with at least one pure virtual member function.
class c { // Udb_cAbstractClassType int virtual func1()=0; };
A class may itself be a member of another class. In this case it may be private, protected, or public.
class c { private: class c_private {}; //Udb_cPrivateMemberClassType };
A member class may be unnamed.
class A { class { // Udb_cUnnamedClassType int a; } b; };
An unresolved class is a class that is known to exist but who's definition is unknown. An unknown class is an unresolved class, but is also lacking any formal declaration.
class c_unresolved; class c_unresolved var_1; // Udb_cUnresolvedClass class c_unknown var_2; // Udb_cUnknownClass
See Also: Enum Kinds, Function Kinds, Object Kinds, Struct Kinds, Typedef Kinds, and Union Kinds for entity kinds of Class Members.
Use "c enum" to match all C Enum Type kinds
An ordinary enum type is an enumerated data type which is not a member of a class.
enum etype1 { val1, val2 }; // Udb_cEnumType
An enum type may be a member of a class. In this case it may be private, protected, or public.
class c { protected: enum etype1 {val1, val2}; //Udb_cProtectedMemberEnumType };
A member or non-member enum type may be unnamed.
enum { val1, val2 } var_1; // Udb_cUnnamedEnumType
An unresolved enum type is an enumerator type that is that is referenced but for which no definition has been found. This can happen when an include file isn't found. An unknown enum type had neither a definition nor a declaration.
enum etype1; etype1 var_1; // Udb_cUnresolvedEnumType unk_type var_2; // Udb_cUnknownEnumType
See Also: Enumerator Kinds for the enumerator values of enumerated data types.
Use "c enumerator" to match all C Enumerator kinds
C Enumerator
Udb_cEnumerator
C Unresolved Enumerator
Udb_cUnresolvedEnumerator
An enumerator is the identifier assigned a value in an enum type.
enum etype { e_val_1, e_val_2, e_val_3 // Udb_cEnumerator };
An unresolved enumerator is an enumerator identifier that belongs to an enum type that is declared in an included file which is not part of the project.
include enumTypes.h // Udb_cUnknownHeaderFile ... etype1 var_1; var_1 = e_val_2; // Udb_cUnresolvedEnumerator
See Also: Enum Kinds for enumerator type kinds.
Use "c file" to match all C File kinds
C Code File
Udb_cCodeFile
C Header File
Udb_cHeaderFile
C Unknown Header File
Udb_cUnknownFile
C Unresolved Header File
Udb_cUnresolvedHeaderFile
Code files are project files which are not included by any other files (typically *.c, *.cpp). Header files are project files which are included by at least one other file (typcially *.h, *.hpp).
An unknown header file is a header file that has been included by another file but cannot be located.
#include "unk_file.h" // Udb_cUnknownHeaderFile
An unresolved header file is an intermediate entity kind used by the parser and should never be visible at the API level. Any unresolved header file will either become a known header file (if the file can be located and parsed) or an unknown header file (if the file cannot be located) before the completion of the analysis run.
Use "c function" to match all C Function kinds
A function may be an ordinary function that is not a static function and not a member of a class.
int func1(void); // Udb_cFunction
A non-member function that is declared static can only be referenced from within the same file that contains the function.
static int func1 (void) { } // Udb_cFunctionStatic
A function may be a member of a class. In this case the member function may be private, protected, or public.
class c { public: void func1 (void) {...}; // Udb_cPublicMemberFunction };
A member function declared as static exists once for the whole class, not in each class instance.
class c { private: static void func1 () {...}; //Udb_cPrivateMemberFunctionStatic };
A member function may also be declared const, which indicates that it will not alter the state of the object on which it is invoked.
class c { protected: int func1 () const; //Udb_cProtectedMemberConstFunction };
A pure virtual member function is a virtual member function that does not have an implementation. A pure virtual function cannot be called. It must be overriden in a derived class in order to be used.
class c { public: virtual int foobar() = 0; //Udb_cPublicMemberFunctionPure };
An unresolved function or unresolved member function is a function that is known to exist but who's definition is unknown. Typically this occurs when the function is defined in a file that is not part of the project. An unknown function is an unresolved function that is also lacking any formal declaration.
void func1(int); int func() { func1(1); // Udb_cUnresolvedFunction func2(1); // Udb_cUnknownFunction }
Use "c macro" to match all C Macro kinds
C Inactive Macro
Udb_cInactiveMacro
C Macro
Udb_cMacro
C Unknown Macro
Udb_cUnknownMacro
C Unresolved Macro
Udb_cUnresolvedMacro
A macro which is defined in and used in an active region of code is Udb_cMacro. For example:
#define MACRO_ACTIVE
An inactive macro appears in an inactive region of code.
#if 0 #ifdef MACRO_INACTIVE #endif #endif
An unresolved macro is one that is known to exist but who's definition is not available in the current scope. An unknown macro is a macro whose definition is not known. Typically this occurs when the macro is defined in an included file that is not part of the project.
#include "my_macros.h" // Udb_cUnknownHeaderFile #ifdef MY_MACRO // Udb_cUnknownMacro ... #endif
Use "c object" to match all C Object kinds
A global object is a variable which is not a member of a class, is not declared within a function, and is not declared as static.
int global_var; // Udb_cObjectGlobal
A global static object is a variable which is not a member of a class and is not declared within a function, but is declared static, and is therefore only accessible from the file in which it is defined.
static int static_global_var; // Udb_cObjectGlobalStatic
A local object is a variable which is not a member of a class and is defined within a (non-member) function.
void func1() { int local_var_1; // Udb_cObjectLocal static int local_var_2; // Udb_cObjectLocal }
An object may be a member of a class. In this case the object may be private, protected, or public.
class A { public: int obj1; // Udb_cPublicMemberObject };
An unresolved object is a variable which is known to exist, but who's definition is unknown. This typically occurs when a header file is not part of the project. An unknown object is a variable with no known definition or declaration.
extern var_1; int func() { var_2 = var_1; // var_1 is Udb_cUnresolvedObject // var_2 is Udb_cUnknownObject }
Use "c parameter" to match all C Parameter kinds
C Parameter
Udb_cParameter
A parameter is a formal parameter to any function or member function.
extern int func_ext(int param_ext); //not a parameter entity void func (int param_1) {}; // Udb_cParameter
Use "c struct" to match all C Struct kinds
A struct type may be an ordinary struct, that is, not a member of a class.
struct mystruct { // Udb_cStructType int field1; int field2; };
A struct may be unnamed. The following example shows an array of 10 elements containing a structure consisting of two int members
struct { //Udb_cUnnamedStructType int field1; int field2; }myarray[10];
A struct may be a member of a class. In this case the struct may be private, protected, or public.
class A { public: struct mystruct{ // Udb_cPublicMemberStructType int field1; int field2; }; }
A struct may be an abstract struct, which is a struct with at least one pure virtual member function.
struct struct_abstract { // Udb_cAbstractStructType int virtual mem1() = 0; };
An unresolved struct is a struct that is known to exist but who's definition is unknown. An unknown struct is an unresolved struct, but is also lacking any formal declaration.
extern struct a_struct; // Udb_cUnresolvedStructType typedef struct b_struct T; // Udb_cUnknownStruct
Use "c typedef" to match all C Typedef kinds.
A typedef is used to assign an alternate name to a data type.
typedef int COUNTER; // Udb_cTypedefType
A typedef may be a member of a class. In this case the typedef may be private, protected, or public.
class A { public: typedef int COUNTER; // Udb_cPublicMemberTypedefType };
An unresolved typedef is a typedef which is known to exist, but who's definition is unknown. This typically occurs when a header file is not part of the project. An unknown type is some type (typedef, class, etc) whose definition and declaration is not found.
#include "my_type2.h" // Udb_cUnresolvedHeaderFile; mytype2 var; // Udb_cUnresolvedTypedefType; // mytype2 is defined in unresolved header file int func (mytype1 tvar) { //mytype1 is Udb_cUnknownType ... }
Use "c union" to match all C Union kinds.
A union allows storage of different types of data into the same storage area.
union anyNumber{ // Udb_cUnionType int i; float f; };
A union may be a member of a class. In this case the union may be private, protected, or public.
class A { public: union anyNumber{ // Udb_cPublicMemberUnionType int i; float f; }; }
A union or member union may be unnamed.
union { // Udb_cUnnamedUnionType int i; float f; } mydata;
An unresolved union is a union which is known to exist, but who's definition is unknown. This typically occurs when a header file is not part of the project. An unknown union is a union whose definition and declaration is not found.
#include "my_unions.h" // Udb_cUnresolvedHeaderFile; union my_union data; // Udb_cUnresolvedUnionType // my_union is defined in unresolved header file union unknown_union more_data; //unknown_union is not // defined and is Udb_cUnknownType
Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com |