sc_PrefixKeyVal man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

sc::PrefixKeyVal(3)		     MPQC		   sc::PrefixKeyVal(3)

NAME
       sc::PrefixKeyVal - PrefixKeyVal is a KeyVal that searches a different
       KeyVal using modified keys.

SYNOPSIS
       #include <keyval.h>

       Inherits sc::KeyVal.

   Public Member Functions
       void errortrace (std::ostream &fp=ExEnv::err0())
	   Write a message to fp describing the error.
       void dump (std::ostream &fp=ExEnv::err0())
	   Write a message to fp describing the error.

       Constructors.
       Construct a PrefixKeyVal, using the given prefix and indices.

	   PrefixKeyVal (const Ref< KeyVal > &, int i)
	   PrefixKeyVal (const Ref< KeyVal > &, int i, int j)
	   PrefixKeyVal (const Ref< KeyVal > &, int i, int j, int k)
	   PrefixKeyVal (const Ref< KeyVal > &, int i, int j, int k, int l)
	   PrefixKeyVal (const Ref< KeyVal > &, const char *prefix)
	   PrefixKeyVal (const Ref< KeyVal > &, const char *prefix, int i)
	   PrefixKeyVal (const Ref< KeyVal > &, const char *prefix, int i, int
	       j)
	   PrefixKeyVal (const Ref< KeyVal > &, const char *prefix, int i, int
	       j, int k)
	   PrefixKeyVal (const Ref< KeyVal > &, const char *prefix, int i, int
	       j, int k, int l)

   Additional Inherited Members
Detailed Description
       PrefixKeyVal is a KeyVal that searches a different KeyVal using
       modified keys.

       This is convenient for reading keys grouped together with a common
       prefix. Consider the following code:

       sc::Ref<sc::KeyVal> keyval = new sc::PrefixKeyVal('A',original_keyval);
       int r = keyval->intvalue('x');

	This code will assign to r the value associated with 'x' in keyval.
       keyval will search for 'x' by searching for 'A::x' in original_keyval.

       This class is important for implementing constructors that take KeyVal
       arguments. When an object is being constructed from a KeyVal, it may
       contain another object that must be constructed from a KeyVal. In order
       to let the sub-object read the correct keywords from the KeyVal,
       without knowledge of the containing objects keyword prefix, a
       PrefixKeyVal can be constructed. For example, the code

       class A: public DescribedClass {
	  double f0_;
	 public:
	  A(const Ref<KeyVal> &keyval): f0_(keyval->doublevalue("f0")) {}
       }
       class B: public DescribedClass {
	  double f1_;
	  Ref<A> a_;
	 public:
	  B(const Ref<KeyVal> &keyval):
	    f1_(keyval->doublevalue("f1")),
	    a_(new PrefixKeyVal(keyval,"a"))
	  {}
       };

	can be used to read ParsedKeyVal input that looks like

       b<B>: (
	 f1 = 1.0
	 a<A>: (
	   f0 = 2.0
	 )
       )

Author
       Generated automatically by Doxygen for MPQC from the source code.

Version 2.3.1			Fri Feb 19 2016		   sc::PrefixKeyVal(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net