# PetscClassId
A unique id used to identify each PETSc class. 
## Notes
Use `PetscClassIdRegister()` to obtain a new value for a new class being created. Usually
XXXInitializePackage() calls it for each class it defines.


## Developer Notes
Internal integer stored in the `_p_PetscObject` data structure.
These are all computed by an offset from the lowest one, `PETSC_SMALLEST_CLASSID`.




## See Also
 `PetscClassIdRegister()`, `PetscLogEventRegister()`, `PetscHeaderCreate()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscsystypes.h.html#PetscClassId">include/petscsystypes.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsystypes.h)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
