-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get* Interface Uniformity #1700
Comments
@jrwrigh continuing some of our discussions otherwhere. I think some of these make sense to leave without a |
Yeah, if we can reliably enforce a Which I guess we could've done with |
Note that returning |
Yeah, I don't think we want restore for all of those. I'm less worried about the strings because those are typically used for display. I'm also less worried about the I think on the whole taking an approach of refcounting any |
Ok, we're pretty inconsistent about when a
Get
interface needs aRestore
/Destroy
. Here's the list of ones that don't.I think an easy point of consistency would be to require a
Destroy
when theGet
returns aCeed*
object.ceed.h
CeedBasisGetQRef
CeedBasisGetQWeights
CeedBasisGetInterp
CeedBasisGetInterp1D
CeedBasisGetGrad
CeedBasisGetGrad1D
CeedBasisGetDiv
CeedBasisGetCurl
CeedQFunctionGetFields
CeedQFunctionContextGetAllFieldLabels
CeedContextFieldLabelGetDescription
CeedOperatorGetFields
CeedOperatorGetFieldByName
CeedCompositeOperatorGetSubList
CeedCompositeOperatorGetSubByName
CeedOperatorFieldGetName
backend.h
CeedBasisGetCollocatedGrad
CeedQFunctionContextGetFieldLabel
CeedOperatorGetQFunctionAssemblyData
CeedQFunctionAssemblyDataGetObjects
CeedOperatorAssemblyDataGet*
CeedOperatorGetFallback
CeedOperatorGetFallbackParent
String getters I think are fine
(I think they are unlikely to be kept by the user for a long time, and they are constantly, so the user has to mean to bypass that to edit them)
CeedGetResource
CeedGetErrorMessage
CeedGetResourceRoot
CeedGetOperatorFallbackResource
CeedQFunctionGetKernelName
CeedQFunctionGetSourcePath
CeedQFunctionFieldGetName
CeedQFunctionFieldGetData
Others I think are fine
(Backend use only, intended to be edited, and should not have multiple access at the same time)
Ceed*GetData
The text was updated successfully, but these errors were encountered: