GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TTY (3)

NAME

FBB::Tty - Controls echoing of characters entered at the terminal

CONTENTS

SYNOPSIS

#include <bobcat/tty>
Linking option: -lbobcat

DESCRIPTION

Tty(3bobcat) objects can be used to control the echoing of characters entered at the terminal (usually at /dev/tty). Directly reading from /dev/tty allows programs to read information (e.g., passwords or pass phrases) even if the standard input stream is redirected to a file. Unless redirected, std::cin is connected to /dev/tty.

Tty(3bobcat) objects may be used as stand-alone objects or (usually anonymous) Tty(3bobcat) objects may be inserted into or extracted from streams. When inserting or extracting objects the involved streams are not affected; only the echoing of characters entered at /dev/tty is manipulated.

Tty(3bobcat)\(cqs destructor does not reset the echo-state of /dev/tty to its original value. If that is required a Tty(3bobcat) object must be created first, calling its echo(Tty::RESET) member at the appropriate time.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

ENUM

The enum EchoType requests the type of echo-handling:
o RESET is used to reset /dev/tty\(cqs state to the actual state when a Tty(3bobcat) object was constructed
o ON is used to activate echoing of characters entered at /dev/tty.
o OFF is used to suppress echoing of characters entered at /dev/tty.

CONSTRUCTORS

o Tty():
The current state of /dev/tty is saved.
o Tty(EchoType type):
The current state of /dev/tty is saved, and the object\(cqs member echo(type) is called. Default copy and move constructors are available.

OVERLOADED OPERATORS

o std::istream &operator>>(std::istream &in, Tty const &tty):
The extraction operator does not affect in, but /dev/tty\(cqs state is set according to the way the tty object was constructed.
o std::ostream &operator<<(std::ostream &out, Tty const &tty):
The insertion operator does not affect out, but /dev/tty\(cqs state is set according to the way the tty object was constructed. Default copy and move assignment operators are available.

MEMBER FUNCTION

o echo(EchoType type):
/Dev/tty\(cqs state is set according to the EchoType value that is passed to this member.

EXAMPLE

#include <iostream>
#include <string>

#include <bobcat/tty>

using namespace std; using namespace FBB;

int main() { cout << \(dqEnter some text (not echoed): \(dq << Tty(Tty::OFF); string line; getline(cin, line); cout << \(dq\n\(dq \(dqYou entered: ‘\(dq << line << \(dq\(cq\n\(dq; cout << \(dqEnter some text (echoed): \(dq; getline(cin >> Tty(Tty::ON), line); cout << \(dqYou entered: ‘\(dq << line << \(dq\(cq\n\(dq; }

FILES

bobcat/tty - defines the class interface

SEE ALSO

bobcat(7), onekey(3bobcat)

BUGS

None Reported.

DISTRIBUTION FILES

o bobcat_3.25.01-x.dsc: detached signature;
o bobcat_3.25.01-x.tar.gz: source archive;
o bobcat_3.25.01-x_i386.changes: change log;
o libbobcat1_3.25.01-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.25.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\(cqs Own Base Classes And Templates\(cq.

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).

Search for    or go to Top of page |  Section 3 |  Main Index


libbobcat-dev_3&.25&.01-x&.tar&.gz FBB::TTY (3bobcat) 2005-2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.