From 830ee22b85f1e91c547354435af2b6a79578f7ce Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Mon, 20 Apr 2020 22:06:11 +0200 Subject: Add cc4group.isChild --- src/cc4group.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/cc4group.h') 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; -- cgit v1.2.3-54-g00ecf