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

# sc\_StringKeyVal(3)

StringKeyVal is a base class for KeyVal implementations that store all values in a string format.

## NAME

sc::StringKeyVal - **StringKeyVal** is a base class for **KeyVal** implementations that store all values in a string format.

## SYNOPSIS

`#include <keyval.h>`

Inherits **sc::KeyVal**.

Inherited by **sc::ParsedKeyVal**.

### Public Member Functions

virtual const char \* **stringrep** (const char \*key)=0\
 Returns the string representation of the value assigned to key.  virtual const char \* **classname** (const char \*)\
 Returns the name of the exact class of the object at the keyword.  virtual const char \* **truekeyword** (const char \*)\
 Returns a string which is the actual keyword if some sort of variable substitution takes place (needed to make multiple references to the same object work in input files).

**Debugging.**\
 See the parent class documentation for descriptions of these functions.

virtual void **errortrace** (std::ostream &fp=**ExEnv::err0**())\
 Write a message to fp describing the error.  virtual 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

**StringKeyVal** is a base class for **KeyVal** implementations that store all values in a string format.

These are converted to other data types through **KeyValValue**.

## Member Function Documentation

### virtual const char \* sc::StringKeyVal::classname (const char \*)` [virtual]`

Returns the name of the exact class of the object at the keyword. If no classname is assigned then 0 is returned.

Reimplemented in **sc::ParsedKeyVal**.

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

Write a message to fp describing the error.

Reimplemented from **sc::KeyVal**.

Reimplemented in **sc::ParsedKeyVal**.

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

Write a message to fp describing the error.

Reimplemented from **sc::KeyVal**.

Reimplemented in **sc::ParsedKeyVal**.

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

Ultimately called by exists.

Implements **sc::KeyVal**.

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

Ultimately called by value.

Implements **sc::KeyVal**.

### virtual const char \* sc::StringKeyVal::stringrep (const char \* key)` [pure virtual]`

Returns the string representation of the value assigned to key.

Implemented in **sc::ParsedKeyVal**.

### virtual const char \* sc::StringKeyVal::truekeyword (const char \*)` [virtual]`

Returns a string which is the actual keyword if some sort of variable substitution takes place (needed to make multiple references to the same object work in input files).

Reimplemented in **sc::ParsedKeyVal**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
