Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

DCFutility.cpp

Go to the documentation of this file.
00001 // DCFutility.cpp
00002 //////////////////////////////////////////////////////////////////////
00003 //          (c) Copyright 2001-2002 Brown Deer Technology, LLC.
00004 //                        All rights reserved.
00005 //////////////////////////////////////////////////////////////////////
00006 
00007 #ifdef USE_STD
00008 #include <string>
00009 using namespace std;
00010 #else
00011 #include <string.h>
00012 #endif
00013 
00014 #include "utility.h"
00015 
00016 #include "DCFutility.h"
00017 
00018 void dcfsbfilename( 
00019    int const superblocknum, 
00020    string& filenamebase, 
00021    string& filenamesb
00022 ) 
00023 {
00024    char *ctmp = new char[2*2+1]; 
00025    inttohex( superblocknum, ctmp, 2  );
00026    filenamesb = filenamebase + ".sb" + ctmp + ".dcf";
00027 };
00028 
00029 void dcfmbfilename( 
00030   const int blocknum,
00031   const int m,
00032   const string& filenamebase,
00033   string& mbfilename
00034 ) 
00035 {
00036    char *ctmp1 = new char[2*2+1];
00037    char *ctmp2 = new char[2*1+1];
00038    inttohex( blocknum, ctmp1, 2  );
00039    inttohex( m, ctmp2, 1  );
00040    mbfilename = filenamebase + ".mb" + ctmp1 + "." + ctmp2 + ".dcf";
00041 }; 
00042 
00043 void dcfdbfilename( 
00044   const int blocknum,
00045   const string& filenamebase,
00046   string& dbfilename
00047 ) 
00048 {
00049    char *ctmp = new char[2*2+1];
00050    inttohex( blocknum, ctmp, 2  );
00051    dbfilename = filenamebase + ".db" + ctmp + ".dcf";
00052 };
00053 
00054 
00055 void dcflogfilename( 
00056    const string& filenamebase, 
00057    string& filenamelog
00058 ) 
00059 {
00060    filenamelog = filenamebase + ".log.dcf";
00061 }
00062 

Generated on Mon May 31 21:38:44 2004 for SR2k4 Assembler by doxygen 1.3.6