# PetscObjectComposedDataRegister
Get an available id for composing data with a `PetscObject` 
## Synopsis
```
#include "petscsys.h"    
PetscErrorCode PetscObjectComposedDataRegister(PetscInt *id)
```
Not Collective


## Output parameter

- ***id -*** an identifier under which data can be stored





## Notes
You must keep this value (for example in a global variable) in order to attach the data to an object or access in an object.

`PetscObjectCompose()` and  `PetscObjectQuery()` provide a way to attach any data to an object


## See Also
 `PetscObjectComposedDataSetInt()`, `PetscObjectComposedDataSetReal()`, `PetscObjectComposedDataGetReal()`, `PetscObjectComposedDataSetIntstar()`,
`PetscObjectComposedDataSetIntstar()`, `PetscObjectComposedDataGetInt()`, `PetscObject`,
`PetscObjectCompose()`, `PetscObjectQuery()`, `PetscObjectComposedDataSetRealstar()`, `PetscObjectComposedDataGetScalarstar()`,
`PetscObjectComposedDataSetScalarstar()`, `PetscObjectComposedDataSetScalarstar()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/state.c.html#PetscObjectComposedDataRegister">src/sys/objects/state.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/state.c)


[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)  
