Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Enumerations | Functions | Variables
27.ostream.cpp File Reference
#include <exception>
#include <ostream>
#include <climits>
#include <cstddef>
#include <cstring>
#include <rw_any.h>
#include <rw_driver.h>
Include dependency graph for 27.ostream.cpp:

Go to the source code of this file.

Data Structures

struct  test_streambuf< charT >
 
struct  test_num_put< charT >
 
struct  DtorChek< charT >
 

Macros

#define TEST(it, val)   test (it, select_overload (val))
 
#define Boolalpha   std::ios_base::boolalpha
 
#define Dec   std::ios_base::dec
 
#define Fixed   std::ios_base::fixed
 
#define Hex   std::ios_base::hex
 
#define Internal   std::ios_base::internal
 
#define Left   std::ios_base::left
 
#define Oct   std::ios_base::oct
 
#define Right   std::ios_base::right
 
#define Scientific   std::ios_base::scientific
 
#define Showbase   std::ios_base::showbase
 
#define Showpoint   std::ios_base::showpoint
 
#define Showpos   std::ios_base::showpos
 
#define Skipws   std::ios_base::skipws
 
#define Unitbuf   std::ios_base::unitbuf
 
#define Uppercase   std::ios_base::uppercase
 
#define Bin   std::ios_base::bin
 
#define Adjustfield   std::ios_base::adjustfield
 
#define Basefield   std::ios_base::basefield
 
#define Floatfield   std::ios_base::floatfield
 
#define Nolock   std::ios_base::nolock
 
#define Nolockbuf   std::ios_base::nolockbuf
 
#define Bad   std::ios_base::badbit
 
#define Eof   std::ios_base::eofbit
 
#define Fail   std::ios_base::failbit
 
#define Good   std::ios_base::goodbit
 
#define T   charT (), line, __LINE__
 
#define TEST   test_formatted
 
#define T(val)   charT (), __LINE__, val
 
#define TEST   test_formatted
 
#define SCH(val)   charT (), __LINE__, (const signed char*)val
 
#define UCH(val)   charT (), __LINE__, (const unsigned char*)val
 

Enumerations

enum  streambuf_failure {
  Setbuf = 1 , Seekoff , Seekpos , Shwomanyc ,
  Xsgetn , Underflow , Uflow , Overflow ,
  Pbackfail , Xsputn , Sync
}
 
enum  num_put_overload {
  Bool = Sync + 1 , Long , ULong , Dbl ,
  LDbl , PVoid , LLong , ULLong
}
 

Functions

num_put_overload select_overload (bool)
 
template<class T >
num_put_overload select_overload (T)
 
num_put_overload select_overload (short)
 
num_put_overload select_overload (unsigned short)
 
num_put_overload select_overload (int)
 
num_put_overload select_overload (unsigned int)
 
num_put_overload select_overload (long)
 
num_put_overload select_overload (unsigned long)
 
num_put_overload select_overload (float)
 
num_put_overload select_overload (double)
 
num_put_overload select_overload (long double)
 
num_put_overload select_overload (const void *)
 
template<class charT >
void test_sentry (charT)
 
template<class charT , class T >
void test_formatted (charT, int line1, int line2, T val, const char *str, int fmtflags, int width, int fill, int rdstate, int exceptions, int failure=0, int fail_when=1)
 
template<class charT >
bool is_char (charT)
 
bool is_char (char)
 
bool is_char (signed char)
 
bool is_char (unsigned char)
 
bool is_char (const char *)
 
bool is_char (const signed char *)
 
bool is_char (const unsigned char *)
 
template<class charT >
bool is_wchar_t (charT)
 
bool is_wchar_t (wchar_t)
 
bool is_wchar_t (const wchar_t *)
 
template<class charT , class T >
void test_formatted (charT, int line, T val, int flags, int width, const char *str, int fill=-1)
 
template<class charT >
void test_formatted (charT)
 
template<class charT >
void test_flush (charT)
 
template<class charT >
void run_test (charT)
 
int main (int argc, char *argv[])
 

Variables

int rw_opt_sentry
 
int rw_opt_formatted
 
int rw_opt_unformatted
 
int rw_opt_flush
 
int rw_opt_exceptions
 
bool uncaught = false
 
const int Throw = 1 << 16
 

Macro Definition Documentation

◆ Adjustfield

#define Adjustfield   std::ios_base::adjustfield

Definition at line 666 of file 27.ostream.cpp.

◆ Bad

#define Bad   std::ios_base::badbit

Definition at line 672 of file 27.ostream.cpp.

◆ Basefield

#define Basefield   std::ios_base::basefield

Definition at line 667 of file 27.ostream.cpp.

◆ Bin

#define Bin   std::ios_base::bin

Definition at line 665 of file 27.ostream.cpp.

◆ Boolalpha

#define Boolalpha   std::ios_base::boolalpha

Definition at line 650 of file 27.ostream.cpp.

◆ Dec

#define Dec   std::ios_base::dec

Definition at line 651 of file 27.ostream.cpp.

◆ Eof

#define Eof   std::ios_base::eofbit

Definition at line 673 of file 27.ostream.cpp.

◆ Fail

#define Fail   std::ios_base::failbit

Definition at line 674 of file 27.ostream.cpp.

◆ Fixed

#define Fixed   std::ios_base::fixed

Definition at line 652 of file 27.ostream.cpp.

◆ Floatfield

#define Floatfield   std::ios_base::floatfield

Definition at line 668 of file 27.ostream.cpp.

◆ Good

#define Good   std::ios_base::goodbit

Definition at line 675 of file 27.ostream.cpp.

◆ Hex

#define Hex   std::ios_base::hex

Definition at line 653 of file 27.ostream.cpp.

◆ Internal

#define Internal   std::ios_base::internal

Definition at line 654 of file 27.ostream.cpp.

◆ Left

#define Left   std::ios_base::left

Definition at line 655 of file 27.ostream.cpp.

◆ Nolock

Definition at line 669 of file 27.ostream.cpp.

◆ Nolockbuf

#define Nolockbuf   std::ios_base::nolockbuf

Definition at line 670 of file 27.ostream.cpp.

◆ Oct

#define Oct   std::ios_base::oct

Definition at line 656 of file 27.ostream.cpp.

◆ Right

#define Right   std::ios_base::right

Definition at line 657 of file 27.ostream.cpp.

◆ SCH

#define SCH (   val)    charT (), __LINE__, (const signed char*)val

◆ Scientific

#define Scientific   std::ios_base::scientific

Definition at line 658 of file 27.ostream.cpp.

◆ Showbase

#define Showbase   std::ios_base::showbase

Definition at line 659 of file 27.ostream.cpp.

◆ Showpoint

#define Showpoint   std::ios_base::showpoint

Definition at line 660 of file 27.ostream.cpp.

◆ Showpos

#define Showpos   std::ios_base::showpos

Definition at line 661 of file 27.ostream.cpp.

◆ Skipws

#define Skipws   std::ios_base::skipws

Definition at line 662 of file 27.ostream.cpp.

◆ T [1/2]

#define T   charT (), line, __LINE__

◆ T [2/2]

#define T (   val)    charT (), __LINE__, val

◆ TEST [1/3]

#define TEST (   it,
  val 
)    test (it, select_overload (val))

Definition at line 257 of file 27.ostream.cpp.

◆ TEST [2/3]

#define TEST   test_formatted

Definition at line 257 of file 27.ostream.cpp.

◆ TEST [3/3]

#define TEST   test_formatted

Definition at line 257 of file 27.ostream.cpp.

◆ UCH

#define UCH (   val)    charT (), __LINE__, (const unsigned char*)val

◆ Unitbuf

#define Unitbuf   std::ios_base::unitbuf

Definition at line 663 of file 27.ostream.cpp.

◆ Uppercase

#define Uppercase   std::ios_base::uppercase

Definition at line 664 of file 27.ostream.cpp.

Enumeration Type Documentation

◆ num_put_overload

Enumerator
Bool 
Long 
ULong 
Dbl 
LDbl 
PVoid 
LLong 
ULLong 

Definition at line 200 of file 27.ostream.cpp.

◆ streambuf_failure

Enumerator
Setbuf 
Seekoff 
Seekpos 
Shwomanyc 
Xsgetn 
Underflow 
Uflow 
Overflow 
Pbackfail 
Xsputn 
Sync 

Definition at line 49 of file 27.ostream.cpp.

Function Documentation

◆ is_char() [1/7]

bool is_char ( char  )

Definition at line 856 of file 27.ostream.cpp.

◆ is_char() [2/7]

template<class charT >
bool is_char ( charT  )

Definition at line 854 of file 27.ostream.cpp.

◆ is_char() [3/7]

bool is_char ( const char *  )

Definition at line 860 of file 27.ostream.cpp.

◆ is_char() [4/7]

bool is_char ( const signed char *  )

Definition at line 861 of file 27.ostream.cpp.

◆ is_char() [5/7]

bool is_char ( const unsigned char *  )

Definition at line 862 of file 27.ostream.cpp.

◆ is_char() [6/7]

bool is_char ( signed char  )

Definition at line 857 of file 27.ostream.cpp.

◆ is_char() [7/7]

bool is_char ( unsigned char  )

Definition at line 858 of file 27.ostream.cpp.

◆ is_wchar_t() [1/3]

template<class charT >
bool is_wchar_t ( charT  )

Definition at line 865 of file 27.ostream.cpp.

◆ is_wchar_t() [2/3]

bool is_wchar_t ( const wchar_t *  )

Definition at line 870 of file 27.ostream.cpp.

◆ is_wchar_t() [3/3]

bool is_wchar_t ( wchar_t  )

Definition at line 869 of file 27.ostream.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 1489 of file 27.ostream.cpp.

◆ run_test()

template<class charT >
void run_test ( charT  )

Definition at line 1442 of file 27.ostream.cpp.

◆ select_overload() [1/12]

num_put_overload select_overload ( bool  )

Definition at line 207 of file 27.ostream.cpp.

◆ select_overload() [2/12]

num_put_overload select_overload ( const void *  )

Definition at line 237 of file 27.ostream.cpp.

◆ select_overload() [3/12]

num_put_overload select_overload ( double  )

Definition at line 229 of file 27.ostream.cpp.

◆ select_overload() [4/12]

num_put_overload select_overload ( float  )

Definition at line 228 of file 27.ostream.cpp.

◆ select_overload() [5/12]

num_put_overload select_overload ( int  )

Definition at line 216 of file 27.ostream.cpp.

◆ select_overload() [6/12]

num_put_overload select_overload ( long double  )

Definition at line 233 of file 27.ostream.cpp.

◆ select_overload() [7/12]

num_put_overload select_overload ( long  )

Definition at line 218 of file 27.ostream.cpp.

◆ select_overload() [8/12]

num_put_overload select_overload ( short  )

Definition at line 214 of file 27.ostream.cpp.

◆ select_overload() [9/12]

template<class T >
num_put_overload select_overload ( T  )

Definition at line 212 of file 27.ostream.cpp.

◆ select_overload() [10/12]

num_put_overload select_overload ( unsigned int  )

Definition at line 217 of file 27.ostream.cpp.

◆ select_overload() [11/12]

num_put_overload select_overload ( unsigned long  )

Definition at line 219 of file 27.ostream.cpp.

◆ select_overload() [12/12]

num_put_overload select_overload ( unsigned short  )

Definition at line 215 of file 27.ostream.cpp.

◆ test_flush()

template<class charT >
void test_flush ( charT  )

Definition at line 1368 of file 27.ostream.cpp.

◆ test_formatted() [1/3]

template<class charT >
void test_formatted ( charT  )

Definition at line 957 of file 27.ostream.cpp.

◆ test_formatted() [2/3]

template<class charT , class T >
void test_formatted ( charT  ,
int  line,
T  val,
int  flags,
int  width,
const char *  str,
int  fill = -1 
)

Definition at line 876 of file 27.ostream.cpp.

◆ test_formatted() [3/3]

template<class charT , class T >
void test_formatted ( charT  ,
int  line1,
int  line2,
T  val,
const char *  str,
int  fmtflags,
int  width,
int  fill,
int  rdstate,
int  exceptions,
int  failure = 0,
int  fail_when = 1 
)

Definition at line 682 of file 27.ostream.cpp.

◆ test_sentry()

template<class charT >
void test_sentry ( charT  )

Definition at line 369 of file 27.ostream.cpp.

Variable Documentation

◆ rw_opt_exceptions

int rw_opt_exceptions

Definition at line 45 of file 27.ostream.cpp.

◆ rw_opt_flush

int rw_opt_flush

Definition at line 44 of file 27.ostream.cpp.

◆ rw_opt_formatted

int rw_opt_formatted

Definition at line 42 of file 27.ostream.cpp.

◆ rw_opt_sentry

int rw_opt_sentry

27.ostream.cpp - test exercising class template basic_ostream

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2002-2006 Rogue Wave Software.

Definition at line 41 of file 27.ostream.cpp.

◆ rw_opt_unformatted

int rw_opt_unformatted

Definition at line 43 of file 27.ostream.cpp.

◆ Throw

const int Throw = 1 << 16

Definition at line 678 of file 27.ostream.cpp.

◆ uncaught

bool uncaught = false

Definition at line 344 of file 27.ostream.cpp.