quick start:g++ [flags ...] sdb ... -l /isip/tools/lib/$ISIP_BINARY/lib_shell.a #include <Sdb.h> ~Sdb(); Sdb(); boolean gotoNext(); boolean gotoFirst; boolean getName(Filename& arg) const; boolean transformName(Filename& output_file, const Filename& input_file);
description:Sdb sdb; String line(L"run_me.exe file1.sof file2.sof file3.sof file4.sof file5.sof"); CommandLine cmdl(sdb); cmdl.parse(line); Filename tmp_name1; Filename tmp_name2; sdb.gotoFirst(); sdb.getName(tmp_name1); sdb.gotoNext(); sdb.gotoNext(); sdb.getName(tmp_name2);
static const String CLASS_NAME = L"Sdb";
static const String Sdb::DEF_OUT_DIR = L"";
static const String DEF_PARAM = L"files";
static const String LIST_FILE_MARKER = L"(list) ";
static const String LIST_FILE_OPTION = L"list";
static const long DEF_LOOKAHEAD = 10;
static const long DEF_DIR_PRES = Filename::DEF_DIR_PRES;
static const long ERR = 45300;
static const long ERR_NOTSDB = 45301;
DoubleLinkedList< Pair<Filename, Boolean> > files_d;
Queue<Filename> queue_d;
Stack<WSof> fps_d;
Stack<Long> tags_d;
Stack<Long> nums_d;
long lookahead_d;
boolean at_first_d;
String output_directory_d;
Long dir_pres_d;
String output_extension_d;
String output_basename_d;
String output_suffix_d;
static Integral::DEBUG debug_level_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
static setDebug(Integral::DEBUG level);
boolean debug(const unichar* message) const;
~Sdb();
Sdb();
the assign method is omitted since there is no need to copy the Sdb object
these methods are private
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false););
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const Sdb& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);
boolean append(const Filename& arg);
boolean append(const String& arg);
boolean append(const unichar* arg);
boolean gotoFirst();
boolean gotoNext();
boolean transformName(Filename& output_file, const Filename& input_file);
boolean getName(Filename& arg);
long length();
boolean setOutputDirectory(const String& new_dir);
const String& getOutputDirectory() const;
boolean setDirPresLevel(const String& new_pres_level);
const String& getDirPresLevel() const;
boolean setOutputExtension(const String& new_ext);
const String& getOutputExtension() const;
boolean setOutputBasename(const String& new_basename);
const String& getOutputBasename() const;
boolean setOutputSuffix(const String& new_suffix);
const String& getOutputSuffix() const;
static boolean isSdb(const Filename& arg, const String& obj_name = CLASS_NAME);
static boolean isSdb(Sof& arg, const String& obj_name = CLASS_NAME);
Sdb(const Sdb& arg);
Sdb& operator= (const Sdb& arg);
long iterate();
boolean parse(Filename& output, boolean& is_list, String& input);
boolean sameFiles(Sdb& arg);
friend class CommandLine;examples:
// isip include files // #include <CommandLine.h> #include <String.h> #include <Sdb.h> // main program starts here // int main(int argc, const char **argv) { // create an Sdb object and parse the commandline // to add the files to the doubleLinkedList // Sdb sdb; String line(L"run_me.exe file1.sof file2.sof"); CommandLine cmdl(sdb); cmdl.parse(line); // add another file to the doubleLinkedList // sdb.append(L"file3.sof"); // output the sdb doubleLinkedList with // the standard debug method // sdb.debug(L"sdb debug"); // exit gracefully // return true; }