Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Typedefs | Functions | Variables
22.locale.codecvt.out.cpp File Reference
#include <locale>
#include <climits>
#include <clocale>
#include <cstdlib>
#include <cstring>
#include <cwchar>
#include <rw_driver.h>
#include <rw_file.h>
#include <rw_locale.h>
#include <rw_printf.h>
#include <rw_valcmp.h>
Include dependency graph for 22.locale.codecvt.out.cpp:

Go to the source code of this file.

Data Structures

struct  WideCode
 

Macros

#define TEST(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)
 
#define TEST(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)
 
#define STRICT(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)
 
#define RELAXD(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)
 
#define TEST(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)
 
#define TEST(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)
 
#define TEST(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)
 
#define TEST(pat, from_end_off, from_next_off, res_end_off, res_next_off, result)
 

Typedefs

typedef WideCode mb_char_array_t[MB_LEN_MAX]
 
typedef std::codecvt< char, char, std::mbstate_t > Codecvt
 
typedef std::codecvt_byname< char, char, std::mbstate_t > CodecvtByname
 
typedef std::codecvt< wchar_t, char, std::mbstate_t > WCodecvt
 
typedef std::codecvt_byname< wchar_t, char, std::mbstate_t > WCodecvtByname
 

Functions

const char * codecvt_result (std::codecvt_base::result res)
 
template<class internT >
void test_out (int line, const char *tname, const std::mbstate_t *pstate, const std::codecvt< internT, char, std::mbstate_t > &cvt, const internT *src, std::size_t src_len, std::size_t src_off, const char *res, std::size_t res_len, std::size_t res_off, std::codecvt_base::result result)
 
int main (int argc, char *argv[])
 

Variables

const char * locale_root
 

Macro Definition Documentation

◆ RELAXD

#define RELAXD (   from,
  from_end_off,
  from_next_off,
  res,
  res_end_off,
  res_next_off,
  result 
)
Value:
test_out (__LINE__, "wchar_t", 0, cvt_relaxd, \
from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, \
std::codecvt_base::result)
#define res
Definition 17.names.cpp:531
void test_out(int line, const char *tname, const std::mbstate_t *pstate, const std::codecvt< internT, char, std::mbstate_t > &cvt, const internT *src, std::size_t src_len, std::size_t src_off, const char *res, std::size_t res_len, std::size_t res_off, std::codecvt_base::result result)

◆ STRICT

#define STRICT (   from,
  from_end_off,
  from_next_off,
  res,
  res_end_off,
  res_next_off,
  result 
)
Value:
test_out (__LINE__, "wchar_t", 0, cvt_strict, \
from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, \
std::codecvt_base::result)

◆ TEST [1/6]

#define TEST (   from,
  from_end_off,
  from_next_off,
  res,
  res_end_off,
  res_next_off,
  result 
)
Value:
test_out (__LINE__, "char", 0, cvt, \
from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, \
std::codecvt_base::result)

◆ TEST [2/6]

#define TEST (   from,
  from_end_off,
  from_next_off,
  res,
  res_end_off,
  res_next_off,
  result 
)
Value:
test_out (__LINE__, "wchar_t", 0, cvt, \
from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, \
std::codecvt_base::result)

◆ TEST [3/6]

#define TEST (   from,
  from_end_off,
  from_next_off,
  res,
  res_end_off,
  res_next_off,
  result 
)
Value:
STRICT (from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, result); \
RELAXD (from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, result)
volatile int result
#define STRICT(from, from_end_off, from_next_off, res, res_end_off, res_next_off, result)

◆ TEST [4/6]

#define TEST (   from,
  from_end_off,
  from_next_off,
  res,
  res_end_off,
  res_next_off,
  result 
)
Value:
test_out (__LINE__, "wchar_t", 0, cvt_table, \
from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, \
std::codecvt_base::result)

◆ TEST [5/6]

#define TEST (   from,
  from_end_off,
  from_next_off,
  res,
  res_end_off,
  res_next_off,
  result 
)
Value:
test_out (__LINE__, "wchar_t", 0, cvt_libc, \
from, from_end_off, from_next_off, \
res, res_end_off, res_next_off, \
std::codecvt_base::result)

◆ TEST [6/6]

#define TEST (   pat,
  from_end_off,
  from_next_off,
  res_end_off,
  res_next_off,
  result 
)
Value:
make_strings (pat, sizeof pat - 1, \
wstr, mbstr, mb_chars); \
test_out (__LINE__, "wchar_t", 0, cvt_libc, \
wstr, from_end_off, from_next_off, \
mbstr, res_end_off, res_next_off, \
std::codecvt_base::result)

Typedef Documentation

◆ Codecvt

typedef std::codecvt<char, char, std::mbstate_t> Codecvt

Definition at line 428 of file 22.locale.codecvt.out.cpp.

◆ CodecvtByname

typedef std::codecvt_byname<char, char, std::mbstate_t> CodecvtByname

Definition at line 429 of file 22.locale.codecvt.out.cpp.

◆ mb_char_array_t

typedef WideCode mb_char_array_t[MB_LEN_MAX]

Definition at line 203 of file 22.locale.codecvt.out.cpp.

◆ WCodecvt

typedef std::codecvt<wchar_t, char, std::mbstate_t> WCodecvt

Definition at line 494 of file 22.locale.codecvt.out.cpp.

◆ WCodecvtByname

typedef std::codecvt_byname<wchar_t, char, std::mbstate_t> WCodecvtByname

Definition at line 495 of file 22.locale.codecvt.out.cpp.

Function Documentation

◆ codecvt_result()

const char * codecvt_result ( std::codecvt_base::result  res)
inline

Definition at line 324 of file 22.locale.codecvt.out.cpp.

◆ main()

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

Definition at line 1116 of file 22.locale.codecvt.out.cpp.

◆ test_out()

template<class internT >
void test_out ( int  line,
const char *  tname,
const std::mbstate_t *  pstate,
const std::codecvt< internT, char, std::mbstate_t > &  cvt,
const internT *  src,
std::size_t  src_len,
std::size_t  src_off,
const char *  res,
std::size_t  res_len,
std::size_t  res_off,
std::codecvt_base::result  result 
)

Definition at line 334 of file 22.locale.codecvt.out.cpp.

Variable Documentation

◆ locale_root

const char* locale_root

22.codecvt.out.cpp - test exercising the std::codecvt::out()

$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 2005-2008 Rogue Wave Software, Inc.

Definition at line 52 of file 22.locale.codecvt.out.cpp.