1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

more review fixes

This commit is contained in:
petr@mysql.com
2004-10-27 10:21:48 +04:00
parent 73aeeaf4ed
commit 3c33df381f
6 changed files with 41 additions and 50 deletions

View File

@ -38,6 +38,22 @@ extern void free_groups(char **groups);
class Instance_map
{
friend class Iterator;
public:
/* Instance_map iterator */
class Iterator
{
private:
uint current_instance;
Instance_map *instance_map;
public:
Iterator(Instance_map *instance_map_arg) :
instance_map(instance_map_arg), current_instance(0)
{}
void go_to_first();
Instance *next();
};
public:
/* returns a pointer to the instance or NULL, if there is no such instance */
Instance *find(const char *name, uint name_len);
@ -47,7 +63,6 @@ public:
int cleanup();
int lock();
int unlock();
Instance *get_instance(uint instance_number);
Instance_map();
~Instance_map();
@ -72,22 +87,4 @@ private:
HASH hash;
};
/* Instance_map iterator */
class Imap_iterator
{
private:
uint current_instance;
Instance_map *instance_map;
public:
Imap_iterator(Instance_map *instance_map_arg) :
instance_map(instance_map_arg), current_instance(0)
{}
void go_to_first();
Instance *next();
};
#endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_INSTANCE_MAP_H */