*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> ifl/iflDatabase (3)              
Title
Content
Arch
Section
 

Contents


iflDatabase(3)	  Image	Format Library C++ Reference Manual	iflDatabase(3)


NAME    [Toc]    [Back]

     iflDatabase - access to image file	format database

INHERITS FROM    [Toc]    [Back]

     This is a base class with no inheritance.

HEADER FILE    [Toc]    [Back]

     #include <il/iflDatabase.h>

CLASS DESCRIPTION    [Toc]    [Back]

     iflDatabase is a lightweight version of the iflFormat class, with
     abbreviated functionality.	 Basically, the	information here is what can
     be	obtained from variables	in the file format database without opening
     the specific DSO.	Looking	up an object of	this class will	never cause a
     DSO to be opened.	The intended use is by apps who	know they only need
     the restricted methods provided here.

     Refer to the iflFormat(3) man page	for more detail	on iflFormat
     functionality.

CLASS MEMBER FUNCTION SUMMARY    [Toc]    [Back]

   Format lookup
	  static iflDatabase* findNext(int& index)
	  static iflDatabase* findByMagic(int fd)
	  static iflDatabase* findByFormatName(const char* formatName)
	  static iflDatabase* findByFileName(const char* fileName,
					     int noMatchRule=TRUE)


   Attribute queries    [Toc]    [Back]
	  const	char* getName()
	  const	char* getDefaultSuffix()
	  const	char* getDescription()
	  int accessModeIsSupported(int	mode)
	  const	char* getDSOName()
	  const	char* getInstSubSystem()


   Conversion to iflFormat    [Toc]    [Back]
	  iflFormat* getFormat(int openDSOifNecessary =	TRUE)


FUNCTION DESCRIPTIONS    [Toc]    [Back]

     accessModeIsSupported()

	  int accessModeIsSupported(int	mode)






									Page 1






iflDatabase(3)	  Image	Format Library C++ Reference Manual	iflDatabase(3)



	  This member function tells whether the given access mode (which must
	  be one of O_RDONLY, O_WRONLY,	or O_RDWR) is supported	by the
	  subclass.

     findByFileName()

	  static iflDatabase* findByFileName(const char* fileName,
					     int noMatchRule=TRUE)


	  This static class member function is used to look up an image	file
	  format by file name, where the file name is given by the fileName
	  argument.  This is accomplished by matching the tail end of fileName
	  against each value of	the suffixes variable given for	each image
	  file format in the FTR database.  The	noMatchRule argument can be
	  used to limit	searching to those formats that	have no	match rule.

     findByFormatName()

	  static iflDatabase* findByFormatName(const char* formatName)


	  This static class member function is used to look up an image	file
	  format by name, where	the name is given by the formatName argument.

     findByMagic()

	  static iflDatabase* findByMagic(int fd)


	  This static class member function is used to look up an image	file
	  format by magic number of a given file that is open for reading with
	  the file descriptor, fd.

     findNext()

	  static iflDatabase* findNext(int& index)


	  This static class member function is used to step through the
	  (static, lazily created) list	of supported file formats.

     To	start searching	initialize the index paramter to zero.	It will	be
     automatically updated by each call	so that	successive calls will iterate
     through all available formats.  If	there are no more formats, the
     function returns NULL.

	  The following	example	prints the names of all	supported formats:

	      iflDatabase *db;
	      int index	= 0;
	      while ((db = iflDatabase::findNext(index)) != NULL)



									Page 2






iflDatabase(3)	  Image	Format Library C++ Reference Manual	iflDatabase(3)



		  printf("%s0, db->getName());


     getDSOName()

	  const	char* getDSOName()


	  This member function returns the 'soname' for	the DSO	that
	  implements this format (used internally to pass to dlopen()).

     getDefaultSuffix()

	  const	char* getDefaultSuffix()


	  This member function returns the default filename suffix (the	first
	  suffix listed	in the "suffixes" declaration for a format in the IFL
	  format database). The	returned value is a pointer to a static	string
	  that is valid	forever. Note that the returned	value may be NULL.

     getDescription()

	  const	char* getDescription()


	  This member function returns the format description, or NULL if
	  there	is none.

     getFormat()

	  iflFormat* getFormat(int openDSOifNecessary =	TRUE)


	  This method returns the full iflFormat correspnding to this
	  iflDatabase object.  This may	involve	some overhead the first	time a
	  particular format is accessed	(opening the DSO and such).

     getInstSubSystem()

	  const	char* getInstSubSystem()


	  This member function returns the inst	sub-system that	must be
	  installed to use this	format.	 This is used internally to format
	  error	messages.

     getName()

	  const	char* getName()





									Page 3






iflDatabase(3)	  Image	Format Library C++ Reference Manual	iflDatabase(3)



	  This member function returns the format name,	which is a pointer to
	  a static string that is valid	forever.

SEE ALSO    [Toc]    [Back]

      
      
     iflFormat


									PPPPaaaaggggeeee 4444
[ Back ]
 Similar pages
Name OS Title
iflRaw IRIX raw image file format
iflXBM IRIX XBM format image file
iflXPM IRIX XPM format image file
iflYUV IRIX YUV format image file
iflSGI IRIX SGI format image file
iflGIF IRIX GIF format image file
iflAlias IRIX Alias format image file
iflSOFTIMAGE IRIX SOFTIMAGE format image file
core OpenBSD memory image file format
core HP-UX format of core image file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service