PCMContainer_impl.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00027
00028
00029
00030
00031
00032 template < class ElementType, class LockType > inline Container < ElementType, LockType >::Container()
00033
00034
00035 {
00036
00037 }
00038
00039
00040
00041 template < class ElementType, class LockType > inline Container < ElementType, LockType >::~Container()
00042 {
00043
00044 }
00045
00046
00047
00048
00049
00050
00051
00052 template < class ElementType, class LockType > void Container < ElementType,
00053 LockType >::add(std::string name, ElementPointer element)
00054 {
00055 Assert(!has(name), INVALID_NAME_ERROR, "Container::add");
00056 mElements[name] = element;
00057 }
00058
00059
00060
00061 template < class ElementType, class LockType > typename ElementType::Pointer Container < ElementType,
00062 LockType >::get(const std::string & name)
00063 {
00064 Assert(has(name), INVALID_NAME_ERROR, "Container::get");
00065 return mElements[name];
00066 }
00067
00068
00069
00070 template < class ElementType, class LockType > bool Container < ElementType,
00071 LockType >::has(const std::string & name)
00072 {
00073 return mElements.find(name) != mElements.end();
00074 }
00075
00076
00077
00078 template < class ElementType, class LockType > void Container < ElementType,
00079 LockType >::remove(const std::string & name)
00080 {
00081 Assert(has(name), INVALID_NAME_ERROR, "Container::remove");
00082 mElements.erase(name);
00083 }
00084
00085
00086
00087 template < class ElementType, class LockType > u32 Container < ElementType, LockType >::getSize()
00088 {
00089 return mElements.size();
00090 }
00091
00092
00093
00094 template < class ElementType, class LockType > bool Container < ElementType, LockType >::isEmpty()
00095 {
00096 return !getSize();
00097 }
00098
00099
00100
00101 template < class ElementType, class LockType > typename std::map < std::string,
00102 typename ElementType::Pointer >::iterator Container < ElementType, LockType >::begin()
00103 {
00104 return mElements.begin();
00105 }
00106
00107
00108
00109 template < class ElementType, class LockType > typename std::map < std::string,
00110 typename ElementType::Pointer >::iterator Container < ElementType, LockType >::end()
00111 {
00112 return mElements.end();
00113 }
00114
00115