6937 |
return bRequiresSave; |
return bRequiresSave; |
6938 |
} |
} |
6939 |
|
|
6940 |
|
/** |
6941 |
|
* Returns a pointer to the first <i>Group</i> object of the file, |
6942 |
|
* <i>NULL</i> otherwise. |
6943 |
|
* |
6944 |
|
* @deprecated This method is not reentrant-safe, use GetGroup() instead. |
6945 |
|
*/ |
6946 |
Group* File::GetFirstGroup() { |
Group* File::GetFirstGroup() { |
6947 |
if (!pGroups) LoadGroups(); |
if (!pGroups) LoadGroups(); |
6948 |
// there must always be at least one group |
// there must always be at least one group |
6950 |
return *GroupsIterator; |
return *GroupsIterator; |
6951 |
} |
} |
6952 |
|
|
6953 |
|
/** |
6954 |
|
* Returns a pointer to the next <i>Group</i> object of the file, |
6955 |
|
* <i>NULL</i> otherwise. |
6956 |
|
* |
6957 |
|
* @deprecated This method is not reentrant-safe, use GetGroup() instead. |
6958 |
|
*/ |
6959 |
Group* File::GetNextGroup() { |
Group* File::GetNextGroup() { |
6960 |
if (!pGroups) return NULL; |
if (!pGroups) return NULL; |
6961 |
++GroupsIterator; |
++GroupsIterator; |
6986 |
*/ |
*/ |
6987 |
Group* File::GetGroup(String name) { |
Group* File::GetGroup(String name) { |
6988 |
if (!pGroups) LoadGroups(); |
if (!pGroups) LoadGroups(); |
6989 |
GroupsIterator = pGroups->begin(); |
size_t i = 0; |
6990 |
for (uint i = 0; GroupsIterator != pGroups->end(); ++GroupsIterator, ++i) |
for (Group* pGroup = GetGroup(i); pGroup; pGroup = GetGroup(++i)) |
6991 |
if ((*GroupsIterator)->Name == name) return *GroupsIterator; |
if (pGroup->Name == name) return pGroup; |
6992 |
return NULL; |
return NULL; |
6993 |
} |
} |
6994 |
|
|