---
name: "bobcatlcgen"
section: "1"
platform: "linux"
package: "libbobcat-dev"
version: "2.08.01-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/bobcatlcgen"
---

# bobcatlcgen(1)

Generator for the FBB::LC template class

## NAME

bobcatlcgen - Generator for the FBB::LC template class

## SYNOPSIS

**bobcatlcgen** nTypes \[class-file\]

## DESCRIPTION

In the Bobcat header file *\<bobcat/lc\>* a template class is defined  that can be used to define and declare a local context struct to be used with the unary and binary argument context wrappers *FBB::FnWrap1c* and *FBB::FnWrap2c*. The *\<bobcat/lc\>* header file provides for local context structs up to 10 template type parameters.

**bobcatlcgen** can be used locally to enlarge this default number (reducing the maximum is also possible but in practice probably pointless). It expects the maximum number of template type parameters for the *FBB::LC* template class as defined in the newly generated header file.

The header file generated by **bobcatlcgen** can be used *in lieu of* the header file provided by the bobcat archive or (-dev) distribution.

## EXAMPLE

Assume the following command was specified:

```
    bobcatlcgen 5 local-lc
```

This generates the file \`local-lc’ in the current directory defining *FBB::LC* for at most 5 template type parameters. The following file (e.g., main.cc) in the current directory will use *local-lc* rather than *\<bobcat/lc\>*:

```
    #include <iostream>
    #include <vector>
    #include <string>
    #include <algorithm>
    #include <bobcat/fnwrap1c>
    #include "local-lc"
    using namespace std;
    using namespace FBB;
    class Strings
    {
        typedef LC<size_t, ostream &> lc;
        vector<string> d_vs;
        public:
            Strings()
            {
                d_vs.push_back("one");
                d_vs.push_back("two");
                d_vs.push_back("");
                d_vs.push_back("three");
            }
            void display(ostream &out) const
            {
                lc c(1, out);
                find_if(d_vs.begin(), d_vs.end(),
                    FnWrap1c<string const &, lc &, bool>
                         (&Strings::untilEmpty, c));
            }
        private:
            static bool untilEmpty(string const &str, lc &c)
            {
                if (str.empty())
                    return true;        // stop
                c.f2 << c.f1++ << " " << str << endl;
                return false;           // don’t stop
            }
    };
    int main()
    {
        Strings s;
        s.display(cout);
    }
```

When comparing the above example to the example provided in the [**lc**(3bobcat)](/lc/3bobcat.md) man page note that the only difference is that here the header file *local-lc* rather than *\<bobcat/lc\>* is included.

## SEE ALSO

[**bobcat**(7)](/bobcat/7.md), [**fnwrap1c**(3bobcat)](/fnwrap1c/3bobcat.md), [**fnwrap2c**(3bobcat)](/fnwrap2c/3bobcat.md),  [**lc**(3bobcat)](/lc/3bobcat.md)

## BUGS

None Reported.

## DISTRIBUTION FILES

- o

  *bobcat\_2.08.01-x.dsc*: detached signature;

- o

  *bobcat\_2.08.01-x.tar.gz*: source archive;

- o

  *bobcat\_2.08.01-x\_i386.changes*: change log;

- o

  *libbobcat1\_2.08.01-x\_\*.deb*: debian package holding the libraries;

- o

  *libbobcat1-dev\_2.08.01-x\_\*.deb*: debian package holding the libraries, headers and manual pages;

- o

  *http://sourceforge.net/projects/bobcat*: public archive location;

## BOBCAT

Bobcat is an acronym of \`Brokken’s Own Base Classes And Templates’.

## COPYRIGHT

This is free software, distributed under the terms of the  GNU General Public License (GPL).

## AUTHOR

Frank B. Brokken (**f.b.brokken@rug.nl**).
