aboutsummaryrefslogtreecommitdiff
path: root/src/myriad.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/myriad.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/myriad.cpp b/src/myriad.cpp
index c3eb97e..b656b52 100644
--- a/src/myriad.cpp
+++ b/src/myriad.cpp
@@ -510,6 +510,36 @@ int Bu::Myriad::getNumUsedBlocks()
510 return iUsed; 510 return iUsed;
511} 511}
512 512
513int Bu::Myriad::getTotalUsedBytes()
514{
515 int iTotalSize = 0;
516 for( StreamArray::iterator i = aStreams.begin(); i; i++ )
517 {
518 iTotalSize += (*i)->iSize;
519 }
520 return iTotalSize;
521}
522
523int Bu::Myriad::getTotalUnusedBytes()
524{
525 int iTotalSize = (iBlocks-iUsed)*iBlockSize;
526 for( StreamArray::iterator i = aStreams.begin(); i; i++ )
527 {
528 iTotalSize += iBlockSize - ((*i)->iSize%iBlockSize);
529 }
530 return iTotalSize;
531}
532
533int Bu::Myriad::getTotalUnusedBytes( int iFakeBlockSize )
534{
535 int iTotalSize = (iBlocks-iUsed)*iFakeBlockSize;
536 for( StreamArray::iterator i = aStreams.begin(); i; i++ )
537 {
538 iTotalSize += iFakeBlockSize - ((*i)->iSize%iFakeBlockSize);
539 }
540 return iTotalSize;
541}
542
513Bu::Myriad::Stream *Bu::Myriad::findStream( int iId ) 543Bu::Myriad::Stream *Bu::Myriad::findStream( int iId )
514{ 544{
515 for( StreamArray::iterator i = aStreams.begin(); i; i++ ) 545 for( StreamArray::iterator i = aStreams.begin(); i; i++ )