-/*] Copyright (c) 2009-2010, Charles McGarvey [**************************
+/*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
**] All rights reserved.
*
-* vi:ts=4 sw=4 tw=75
-*
* Distributable under the terms and conditions of the 2-clause BSD license;
* see the file COPYING for a complete text of the license.
*
-**************************************************************************/
+*****************************************************************************/
#ifndef _MOOF_MANAGER_HH_
#define _MOOF_MANAGER_HH_
+#include <string>
+#include <boost/shared_ptr.hpp>
+
+#include <moof/hash.hh>
+
+
/**
* \file manager.hh
* A manager is a collection of named objects of the same type. Libraries
* have any interested code.
*/
-#include <string>
-
-#include <boost/shared_ptr.hpp>
-
-#include <moof/hash.hh>
-
-
namespace moof {
return boost::shared_ptr<T>(retain(name), &release);
}
-
private:
typedef stlplus::hash<std::string,T*,hash_function> ptr_lookup;
{
new_object->name_ = name;
new_object->init(name);
- ptr_lookup_.insert(std::make_pair(name, new_object));
+ ptr_lookup_.insert(std::make_pair(name,
+ new_object));
}
return new_object;
}
static ptr_lookup ptr_lookup_;
- std::string name_;
- unsigned retain_count_;
+ std::string name_;
+ unsigned retain_count_;
};
template <class T>