diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2020-04-20 22:06:11 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2020-04-20 22:06:11 +0200 |
| commit | 830ee22b85f1e91c547354435af2b6a79578f7ce (patch) | |
| tree | 5eb5e9ba8c7d1e76dca5869d50a5b88fc54102a6 /src/cc4group.h | |
| parent | 4ded6e352ee0fb5d96d2e1b9f051aac1f07b4886 (diff) | |
| download | cc4group-830ee22b85f1e91c547354435af2b6a79578f7ce.tar.gz cc4group-830ee22b85f1e91c547354435af2b6a79578f7ce.zip | |
Add cc4group.isChild
Diffstat (limited to 'src/cc4group.h')
| -rw-r--r-- | src/cc4group.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cc4group.h b/src/cc4group.h index 8de4616..732aa0c 100644 --- a/src/cc4group.h +++ b/src/cc4group.h @@ -29,7 +29,7 @@ // the directory separator used for all entry paths in cc4group is "/" _regardless of the platform_. yes, you better watch out Windows users! // in contrast to paths names are only the the name of the entry itself, not the whole path // - to free all resources used by the group when it is not needed anymore, call cc4group.delete with the group pointer and discard it afterwards (i.e. don't use it anymore) -// - all functions, except cc4group.new, cc4group.setLazy, cc4group.openAsChild, cc4group.delete, cc4group.setWarningCallback and cc4group.setTmpMemoryStrategy (where the latter three can't fail) follow the same scheme +// - all functions, except cc4group.new, cc4group.setLazy, cc4group.openAsChild, cc4group.isChild, cc4group.delete, cc4group.setWarningCallback and cc4group.setTmpMemoryStrategy (where the latter three can't fail) follow the same scheme // all of them can fail, either caused by wrong arguments or by things outside of the applications control // they all return _true_ if everything went well and _false_ if any error occured // information about the error (incredibly useful for debugging or asking for help with problems) can be obtained by using one of the cc4group.getError* functions @@ -430,6 +430,10 @@ typedef struct { // cc4group.saveParent saves the top-most parent with cc4group.save in order to save the changes in the child to disk. this will also save modifications made inside the parent group... // ...outside of this children CC4Group* (*openAsChild)(CC4Group* const this, const char* const path); + + // returns wether this group has been opend with cc4group.openAsChild + // NOTE: this function can't fail, thus the return value is the result value, not the success indication + bool (*isChild)(const CC4Group* const this); } const CC4Group_API; |
