#include <idmapc.h>
Inheritance diagram for IDMapC< Typ >:


Public Methods | |
| IDMapC () | |
| IDMapC (const IDMapC< Typ > &a) | |
| long | size () const |
| long | add (const Typ &t) |
| const Typ & | get (long i) const |
| void | set (long i, const Typ &t) |
| long | GetID (const Typ &t) const |
| void | Remove (long ix) |
| const IDMapC< Typ > & | operator= (const IDMapC< Typ > &a) |
| void | SetBlanc (const Typ &t) |
Protected Attributes | |
| ArrayC< long > | m_freeIndexes |
| ArrayC< short > | m_occupied |
| ArrayC< Typ > | m_type |
| Typ | m_blanc |
|
|||||||||
|
Definition at line 42 of file idmapc.h.
00042 {
00043 m_occupied.SetBlankAndClear(0);
00044 }
|
|
||||||||||
|
Definition at line 46 of file idmapc.h.
00047 {
00048 m_freeIndexes = a.m_freeIndexes;
00049 m_occupied=a.m_occupied;
00050 m_type = a.m_type;
00051 }
|
|
||||||||||
|
Definition at line 55 of file idmapc.h.
00055 {
00056 long ix;
00057 if(m_freeIndexes.size()>0){
00058 m_freeIndexes.pop_back(ix);
00059 m_type[ix]=t;
00060 m_occupied[ix]=1;
00061 }else{
00062 ix=m_type.size();
00063 m_type.push_back(t);
00064 m_occupied.push_back(1);
00065 }
00066 return ix;
00067 }
|
|
||||||||||
|
Definition at line 69 of file idmapc.h. Referenced by CybProtoC::GetNodeToIDProto().
00069 {
00070 if((i>=0)&&(i<m_occupied.size())){
00071 if(m_occupied.get(i)){return m_type.get(i);}
00072 }
00073 return m_blanc;
00074 }
|
|
||||||||||
|
Definition at line 93 of file idmapc.h.
00093 {
00094 return m_type.GetIndexOf(t);
00095 }
|
|
||||||||||
|
Definition at line 104 of file idmapc.h.
00104 {
00105 if (this == &a) return *this;
00106 m_occupied.push_back(1);
00107 m_occupied.push_back(1);
00108 m_occupied=a.m_occupied;
00109 m_type = a.m_type;
00110 m_freeIndexes = a.m_freeIndexes;
00111 return *this;
00112 }
|
|
||||||||||
|
Definition at line 97 of file idmapc.h.
00097 {
00098 if(ix>=m_occupied.size()){return;}
00099 m_occupied[ix]=0;
00100 m_type[ix]=m_blanc;
00101 m_freeIndexes.push_back(ix);
00102 }
|
|
||||||||||||||||
|
Definition at line 77 of file idmapc.h.
00077 {
00078 if(i<m_occupied.size()){
00079 m_occupied[i]=1;
00080 m_type[i]=t;
00081 m_freeIndexes.RemoveElement(i);
00082 }else{
00083 long l = m_occupied.size();
00084 m_occupied.set(i,1);
00085 m_type.set(i,t);
00086 long j;
00087 for(j=l;j<m_occupied.size()-1;j++){
00088 m_freeIndexes.push_back(j);
00089 }
00090 }
00091 }
|
|
||||||||||
|
Definition at line 115 of file idmapc.h.
|
|
|||||||||
|
Definition at line 53 of file idmapc.h.
00053 {return m_type.size();}
|
|
|||||
|
Definition at line 124 of file idmapc.h. Referenced by IDMapC< CybNodeC * >::get(), IDMapC< CybNodeC * >::Remove(), and IDMapC< CybNodeC * >::SetBlanc(). |
|
|||||
|
Definition at line 121 of file idmapc.h. Referenced by IDMapC< CybNodeC * >::add(), IDMapC< CybNodeC * >::IDMapC(), IDMapC< CybNodeC * >::operator=(), IDMapC< CybNodeC * >::Remove(), and IDMapC< CybNodeC * >::set(). |
|
|||||
|
Definition at line 122 of file idmapc.h. Referenced by IDMapC< CybNodeC * >::add(), IDMapC< CybNodeC * >::get(), IDMapC< CybNodeC * >::IDMapC(), IDMapC< CybNodeC * >::operator=(), IDMapC< CybNodeC * >::Remove(), and IDMapC< CybNodeC * >::set(). |
|
|||||
1.3-rc2