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

  man pages->IRIX man pages -> dmedia/dmParamsScan (3d)              
Title
Content
Arch
Section
 

Contents


dmParamsScan(3dm)					     dmParamsScan(3dm)


NAME    [Toc]    [Back]

     dmParamsScan - scan all entries of	a digital media	parameter/value	list

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/dm_params.h>

     DMstatus dmParamsScan    [Toc]    [Back]
	    ( const DMparams* params,
	     DMstatus (*scanFunc)
	     ( const DMparams* params,
	       const char* paramName,
	       void* scanArg,
	       DMboolean* stopScan ),
	      void* scanArg )

DESCRIPTION    [Toc]    [Back]

     dmParamsScan scans	all of the elements present in a parameter/value list,
     calling the provided operator function on each entry.  This can be	used
     in	a program that wants to	loop through the contents of a parameter/value
     list.

     dmParamsScan applies scanFunc to each element in a	parameter/value	list,
     passing the name of the list entry	and scanArg as parameters to scanFunc.
     If	scanFunc sets the value	of the variable	stopScan to DM_TRUE, the
     parameter/value list scan will be stopped,	and the	return value from
     scanFunc will be returned by dmParamsScan.	 Otherwise, dmParamsScan will
     process all elements in the list and return DM_SUCCESS.

     The following example will	print the contents of a	parameter/value	list:

EXAMPLE    [Toc]    [Back]

	  DMstatus
	  PrintParam(const DMparams *params, const char	*paramName,
	       void *arg, DMboolean *pstop)
	  {
	      printf ("%s=", paramName);

	      switch(dmParamsGetType(params, paramName)) {
	      case DM_TYPE_INT:
	       printf ("%d(int)0, dmParamsGetInt(params, paramName));
	       break;
	      case DM_TYPE_LONG_LONG:
	       printf ("%lld(longlong)0, dmParamsGetLongLong(params, paramName));
	       break;
	      case DM_TYPE_FLOAT:
	       printf ("%3.3f(float)0, dmParamsGetFloat(params,	paramName));
	       break;
	      default:
	       printf ("type(%d)0, dmParamsGetType(params, paramName));
	       break;
	      }
	      return DM_SUCCESS;



									Page 1






dmParamsScan(3dm)					     dmParamsScan(3dm)



	  }

	  void
	  PrintParams(DMparams *params)
	  {
	      printf ("Contents	of Parameter/Value List:0);

	      (void)dmParamsScan(params, PrintParam, 0);
	  }

SEE ALSO    [Toc]    [Back]

      
      
     dmParams(3dm).


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
dmParamsGetNumElems IRIX manipulate the contents of a digital media parameter/value list
dmParamsGetElem IRIX obsolete functions to get indexed elements in a digital media parameter/value list
dmParamsGetInt IRIX get values from digital media parameter/value lists
dmParamsSetInt IRIX set values in digital media parameter/value lists
dmParamsSetIntRange IRIX set range values in digital media parameter/value lists
dmParamsSetIntArray IRIX set array values in digital media parameter/value lists
dmParamsGetIntRange IRIX get ranges of values from digital media parameter/value lists
dmParamsGetIntArray IRIX get arrays of values from digital media parameter/value lists
dmParamsCreate IRIX create and destroy digital media parameter/value lists
dmParamsFlatten IRIX convert digital media parameter lists to and from byte strings
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service