---
name: "sc_AggregateKeyVal"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_AggregateKeyVal"
---

# sc\_AggregateKeyVal(3)

This takes several KeyVal objects and makes them look like one KeyVal object.

## NAME

sc::AggregateKeyVal - This takes several **KeyVal** objects and makes them look like one **KeyVal** object.

## SYNOPSIS

`#include <keyval.h>`

Inherits **sc::KeyVal**.

### Public Member Functions

**Constructors.**\
 These contructors create an **AggregateKeyVal** that is formed from several other **KeyVal** objects.

The search order is keyval1, keyval2, and so on. All **KeyVal** objects including and after the first null **KeyVal** will be ignored.

**AggregateKeyVal** (const **Ref**\< **KeyVal** \> &keyval1)\
 **AggregateKeyVal** (const **Ref**\< **KeyVal** \> &keyval1, const **Ref**\< **KeyVal** \> &keyval2)\
 **AggregateKeyVal** (const **Ref**\< **KeyVal** \> &keyval1, const **Ref**\< **KeyVal** \> &keyval2, const **Ref**\< **KeyVal** \> &keyval3)\
 **AggregateKeyVal** (const **Ref**\< **KeyVal** \> &keyval1, const **Ref**\< **KeyVal** \> &keyval2, const **Ref**\< **KeyVal** \> &keyval3, const **Ref**\< **KeyVal** \> &keyval4)\
 **~AggregateKeyVal** ()\
 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.

### Protected Member Functions

int **key\_exists** (const char \*)\
 Ultimately called by exists.  **Ref**\< **KeyValValue** \> **key\_value** (const char \*, const **KeyValValue** &def)\
 Ultimately called by value.

### Additional Inherited Members

## Detailed Description

This takes several **KeyVal** objects and makes them look like one **KeyVal** object.

When a key is sought first **KeyVal**, then the next, and so on is searched until the keyword is found.

## Member Function Documentation

### void sc::AggregateKeyVal::dump (std::ostream & fp = ExEnv::err0`()`)` [virtual]`

Write a message to fp describing the error.

Reimplemented from **sc::KeyVal**.

### void sc::AggregateKeyVal::errortrace (std::ostream & fp = ExEnv::err0`()`)` [virtual]`

Write a message to fp describing the error.

Reimplemented from **sc::KeyVal**.

### int sc::AggregateKeyVal::key\_exists (const char \*)` [protected]`, ` [virtual]`

Ultimately called by exists.

Implements **sc::KeyVal**.

### Ref\< KeyValValue \> sc::AggregateKeyVal::key\_value (const char \*, const KeyValValue & def)` [protected]`, ` [virtual]`

Ultimately called by value.

Implements **sc::KeyVal**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
