85uint32_t CDFootPrint::m_numberIssued = 0 ;
86uint32_t CDFootPrint::m_numberFootprints = 0 ;
90 os <<
"0x" << std::hex;
91 for (
int i = obj.m_size-1; i >= 0; i-- ) {
110 ++m_numberFootprints;
122 resize( aOtherPrint.m_size );
123 for ( uint32_t index = 0 ;
126 m_array[ index ] = aOtherPrint.m_array[ index ] ;
128 ++m_numberFootprints;
139 if( 0 == --m_numberFootprints ) {
150 if (
this == &aOtherPrint ) {
159 resize( aOtherPrint.m_size ) ;
160 for ( uint32_t index = 0 ;
163 m_array[ index ] = aOtherPrint.m_array[ index ] ;
170 if (
this == &aOtherPrint ) {
176 if ( m_size >= aOtherPrint.m_size ) {
181 for ( uint32_t index = 0 ;
182 index != aOtherPrint.m_size ;
184 m_array[ index ] |= aOtherPrint.m_array[ index ] ;
192 uint32_t* tmp_ptr =
new uint32_t[ aOtherPrint.m_size ];
193 if ( 0 == tmp_ptr ) {
194 std::cerr <<
"No memory to allocate another kinematicData" << std::endl ;
201 for ( uint32_t index_1 = 0 ;
204 tmp_ptr[ index_1 ] = m_array[ index_1 ] | aOtherPrint.m_array[ index_1 ] ;
209 for ( uint32_t index_2 = m_size ;
210 index_2 != aOtherPrint.m_size ;
212 tmp_ptr[ index_2 ] = aOtherPrint.m_array[ index_2 ] ;
221 m_size = aOtherPrint.m_size;
243 const uint32_t kBitsInByte = 8 ;
247 uint32_t freshNumber = m_numberIssued++ ;
251 uint32_t element = freshNumber / ( kBitsInByte *
sizeof( uint32_t ) ) ;
252 uint32_t offsetInElement = freshNumber % ( kBitsInByte *
sizeof( uint32_t ) ) ;
256 resize( element + 1 ) ;
260 for ( uint32_t index = 0 ;
263 m_array[ index ] = uint32_t( 0 );
268 m_array[ element ] = uint32_t(1) << offsetInElement ;
277void CDFootPrint::resize(
const uint32_t aNewSize )
279 if ( aNewSize == m_size ) {
288 uint32_t* tmp_ptr =
new uint32_t[ aNewSize ] ;
289 if ( 0 == tmp_ptr ) {
290 std::cerr <<
"No memory to allocate another kinematicData" << std::endl ;
312 if (
this == &aOtherPrint ) {
321 uint32_t shorterSize ;
322 if ( m_size > aOtherPrint.m_size ) {
323 shorterSize = aOtherPrint.m_size ;
326 shorterSize = m_size ;
332 while ( ( index != shorterSize ) &&
333 ( m_array[ index ] == aOtherPrint.m_array[ index ] ) ) {
340 if ( index != shorterSize ) {
346 if ( m_size >= aOtherPrint.m_size ) {
347 while ( ( index != m_size ) &&
348 ( m_array[ index ] == uint32_t( 0 ) ) ) {
351 return ( m_size == index );
354 while( ( index != aOtherPrint.m_size ) &&
355 (aOtherPrint.m_array[ index ] == uint32_t( 0 ) ) ) {
358 return ( aOtherPrint.m_size == index );
367 return ( !
operator == ( aOtherPrint ) ) ;
376 result += aOtherPrint ;
386 if (
this == & aOtherPrint) {
395 uint32_t shorterSize ;
396 if ( m_size > aOtherPrint.m_size ) {
397 shorterSize = aOtherPrint.m_size ;
400 shorterSize = m_size ;
406 while ( ( index != shorterSize ) &&
407 ( 0 == ( m_array[ index ] & aOtherPrint.m_array[ index ] ) ) ) {
414 return ( index != shorterSize ) ;
422 if (
this == & aOtherPrint) {
431 uint32_t shorterSize ;
432 if ( m_size > aOtherPrint.m_size ) {
433 shorterSize = aOtherPrint.m_size ;
436 shorterSize = m_size ;
443 while ( ( index != shorterSize ) &&
444 ( m_array[ index ] ==( m_array[index] | aOtherPrint.m_array[index] ) ) ) {
451 if ( index != shorterSize ) {
457 if ( m_size > aOtherPrint.m_size ) {
463 while( ( index != aOtherPrint.m_size ) &&
464 (aOtherPrint.m_array[ index ] == uint32_t( 0 ) ) ) {
471 return ( aOtherPrint.m_size == index ) ;