stlsoft/stlsoft.h File Reference


Detailed Description

[C, C++] The root header for the STLSoft project, and for all other projects.

#include <stddef.h>
#include <stdlib.h>

Go to the source code of this file.

Namespaces

namespace  stlsoft
namespace  stlsoft::internal_gcc

Defines

#define STLSOFT_INCL_H_STLSOFT
 Definition of previous include-guard symbol for stlsoft/stlsoft.h, for backwards compatibility.
#define _STLSOFT_VER_MAJOR   1
 The major version number of STLSoft.
#define _STLSOFT_VER_MINOR   9
 The minor version number of STLSoft.
#define _STLSOFT_VER_REVISION   98
 The revision version number of STLSoft.
#define _STLSOFT_VER   _STLSOFT_VER_1_9_98
 The current composite version number of STLSoft.
#define STLSOFT_COMPILER_LABEL_STRING   "Acme Compiler"
 A nul-terminated C-style string denoting the name of the compiler.
#define STLSOFT_COMPILER_VERSION_STRING   "Acme Compiler v1.0"
 A nul-terminated C-style string denoting the name and version of the compiler.
#define __STLSOFT_CF_EXCEPTION_SUPPORT
#define __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
#define STLSOFT_TEMPLATE_SPECIALISATION   template <>
 Resolves to template <> for compilers that support correct template specialisation syntax, and to nothing for those that do not.
#define STLSOFT_CF_CDECL_SUPPORTED
 When defined, indicates that the compiler supports the cdecl calling convention.
#define STLSOFT_CF_FASTCALL_SUPPORTED
 When defined, indicates that the compiler supports the fastcall calling convention.
#define STLSOFT_CF_STDCALL_SUPPORTED
 When defined, indicates that the compiler supports the stdcall calling convention.
#define STLSOFT_CDECL_VALUE   (1)
 A unique value indicating cdecl calling convention.
#define STLSOFT_FASTCALL_VALUE   (2)
 A unique value indicating fastcall calling convention.
#define STLSOFT_STDCALL_VALUE   (3)
 A unique value indicating stdcall calling convention.
#define STLSOFT_ASSERT(ex)   assert(ex)
 Defines an assertion construct for runtime verification.
#define stlsoft_assert(ex)   STLSOFT_ASSERT(ex)
 [DEPRECATED] Defines a runtime assertion
#define STLSOFT_MESSAGE_ASSERT(msg, ex)   STLSOFT_ASSERT((msg, ex))
 Defines a runtime assertion, with message.
#define stlsoft_message_assert(msg, ex)   STLSOFT_MESSAGE_ASSERT(msg, ex)
 [DEPRECATED] Defines a runtime assertion, with message
#define STLSOFT_STATIC_ASSERT(ex)   do { typedef int ai[(ex) ? 1 : 0]; } while(0)
 Defines an assertion construct for compile-time verification.
#define stlsoft_static_assert(ex)   STLSOFT_STATIC_ASSERT(ex)
 [DEPRECATED] Defines a compile-time assertion
#define stlsoft_ns_qual(x)   ::stlsoft::x
 Qualifies with stlsoft:: if STLSoft is using namespaces or, if not, does not qualify.
#define stlsoft_ns_using(x)   using ::stlsoft::x;
 Declares a using directive (with respect to stlsoft) if STLSoft is using namespaces or, if not, does nothing.
#define stlsoft_ns_qual_std(x)   ::std::x
 Qualifies with std:: if STLSoft is being translated in the context of the standard library being within the std namespace or, if not, does not qualify.
#define stlsoft_ns_qual_std_(x)   std::x
#define stlsoft_ns_using_std(x)   using ::std::x;
 Declares a using directive (with respect to std) if STLSoft is being translated in the context of the standard library being within the std namespace or, if not, does nothing.
#define STLSOFT_NS_GLOBAL(x)   ::x
 Qualifies X with :: if compiling C++, otherwise just resolves to X.
#define STLSOFT_OPEN_WORKER_NS_(ns)
#define STLSOFT_CLOSE_WORKER_NS_(ns)
#define STLSOFT_WORKER_NS_QUAL_(ns, x)   x
#define STLSOFT_WARN_64
#define ss_explicit_k   explicit
 Evaluates to explicit on translators that support the keyword, otherwise to nothing.
#define ss_mutable_k   mutable
 Evaluates to mutable on translators that support the keyword, otherwise to nothing.
#define ss_typename_param_k   typename
 Evaluates to typename on translators that support the keyword, otherwise to class.
#define ss_typename_type_k   typename
 Evaluates to typename on translators that support the keyword, otherwise to nothing.
#define ss_typename_type_def_k   typename
 Evaluates to typename on translators that support the keyword and its application in the context of default template arguments, otherwise to nothing.
#define ss_typename_type_mil_k   typename
 Evaluates to typename on translators that support the keyword and its application in the context of member initialisation lists, otherwise to nothing.
#define ss_typename_type_ret_k   typename
 Evaluates to typename on translators that support the keyword and its application in the context of member function/method return types, otherwise to nothing.
#define ss_template_qual_k   template
 Evaluates to template on translators that support its use for type qualification.
#define STLSOFT_THROW_X(x)   stlsoft_ns_qual(throw_x)(x)
#define stlsoft_throw_0()
 Indicates that the given function/method does not throw any exceptions.
#define stlsoft_throw_1(x1)
 Indicates that the given function/method throws the named type.
#define stlsoft_throw_2(x1, x2)
 Indicates that the given function/method throws the two named types.
#define stlsoft_throw_3(x1, x2, x3)
 Indicates that the given function/method throws the three named types.
#define stlsoft_throw_4(x1, x2, x3, x4)
 Indicates that the given function/method throws the four named types.
#define stlsoft_throw_5(x1, x2, x3, x4, x5)
 Indicates that the given function/method throws the five named types.
#define stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
 Indicates that the given function/method throws the six named types.
#define stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
 Indicates that the given function/method throws the seven named types.
#define stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
 Indicates that the given function/method throws the eight named types.
#define STLSOFT_NUM_ELEMENTS(ar)
 Evaluates, at compile time, to the number of elements within the given vector entity.
#define stlsoft_num_elements(ar)   STLSOFT_NUM_ELEMENTS(ar)
 Evaluates, at compile time, to the number of elements within the given vector entity.
#define STLSOFT_RAW_OFFSETOF(S, M)   stlsoft_reinterpret_cast(stlsoft_ns_qual(ss_size_t), &stlsoft_static_cast(S*, 0)->M)
 Evaluates, at compile time, the offset of the member m in the structure s.
#define stlsoft_raw_offsetof(s, m)   STLSOFT_RAW_OFFSETOF(s, m)
 Evaluates, at compile time, the offset of a structure/class member.
#define STLSOFT_DESTROY_INSTANCE(T1, T2, P)   do { (P)->~T1(); } while(0)
#define stlsoft_destroy_instance(T1, T2, P)   STLSOFT_DESTROY_INSTANCE(T1, T2, P)
 Explicitly destroys an instance.
#define STLSOFT_GEN_OPAQUE(type)   typedef struct __stlsoft_htype##type{ int i;} const* type;
 Generates an opaque type with the name type.
#define stlsoft_gen_opaque(Type)   STLSOFT_GEN_OPAQUE(Type)
 Generates an opaque type with the name Type.
#define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T)   friend T
 Declares a template (class) parameter to be a friend of the template.
#define STLSOFT_SUPPRESS_UNUSED(x)   (static_cast<void>(x))
 Used to suppress unused variable warnings.
#define STLSOFT_UNNAMED_PARAM(p)   p
 Used to define an unused parameter for C compilation and/or documentation processing, but not for C++ compilation.
#define STLSOFT_SUPPRESS_UNNAMED_PARAM(p)   ((void)p);
 Used to suppress unused parameter warnings (in C compilation) for parameters defined by STLSOFT_UNNAMED_PARAM().
#define stlsoft_c_cast(T, E)   ((T)(E))
 C-cast macro; equivalent to ((T)(E)), but more searchable.
#define stlsoft_static_cast(T, E)   static_cast< T>(E)
 C-cast macro; equivalent to static_cast<T, E> in C++, and stlsoft_c_cast(T, E) in C.
#define stlsoft_const_cast(T, E)   const_cast< T>(E)
 C-cast macro; equivalent to const_cast<T, E> in C++, and stlsoft_c_cast(T, E) in C.
#define stlsoft_volatile_cast(T, E)   const_cast< T>(E)
 C-cast macro; equivalent to const_cast<T, E> in C++, and stlsoft_c_cast(T, E) in C.
#define stlsoft_reinterpret_cast(T, E)   reinterpret_cast< T>(E)
 C-cast macro; equivalent to reinterpret_cast<T, E> in C++, and stlsoft_c_cast(T, E) in C.
#define stlsoft_dynamic_cast(T, E)   dynamic_cast< T>(E)
 C-cast macro; equivalent to dynamic_cast<T, E> in C++, and stlsoft_c_cast(T, E) in C.
#define STLSOFT_INLINE   inline
 inline pseudo-keyword

Typedefs

typedef char char
typedef STLSOFT_WCHAR_T_BASE_TYPE_ wchar_t
typedef STLSOFT_I_08_T_BASE_TYPE_ ss_int8_t
typedef STLSOFT_SI08_T_BASE_TYPE_ ss_sint8_t
typedef STLSOFT_UI08_T_BASE_TYPE_ ss_uint8_t
typedef STLSOFT_I_16_T_BASE_TYPE_ ss_int16_t
typedef STLSOFT_SI16_T_BASE_TYPE_ ss_sint16_t
typedef STLSOFT_UI16_T_BASE_TYPE_ ss_uint16_t
typedef STLSOFT_I_32_T_BASE_TYPE_ ss_int32_t
typedef STLSOFT_SI32_T_BASE_TYPE_ ss_sint32_t
typedef STLSOFT_UI32_T_BASE_TYPE_ ss_uint32_t
typedef short ss_short_t
typedef int STLSOFT_WARN_64 int
typedef signed int STLSOFT_WARN_64 ss_sint_t
typedef unsigned int
STLSOFT_WARN_64 
ss_uint_t
typedef long STLSOFT_WARN_64 ss_long_t
typedef unsigned long
STLSOFT_WARN_64 
ss_ulong_t
typedef ss_uint8_t ss_byte_t
typedef bool bool
typedef ptrdiff_t ss_ptrdiff_t
typedef size_t STLSOFT_WARN_64 size_t
typedef long ss_streampos_t
typedef long ss_streamoff_t
typedef char char_a_t
typedef wchar_t char_w_t
typedef ss_int8_t int8_t
typedef ss_sint8_t sint8_t
typedef ss_uint8_t uint8_t
typedef ss_int16_t int16_t
typedef ss_sint16_t sint16_t
typedef ss_uint16_t uint16_t
typedef ss_int32_t int32_t
typedef ss_sint32_t sint32_t
typedef ss_uint32_t uint32_t
typedef ss_short_t short_t
typedef int STLSOFT_WARN_64 int_t
typedef ss_sint_t STLSOFT_WARN_64 sint_t
typedef ss_uint_t STLSOFT_WARN_64 uint_t
typedef ss_long_t STLSOFT_WARN_64 long_t
typedef ss_byte_t byte_t
typedef bool bool_t
typedef ss_streampos_t streampos_t
typedef ss_streamoff_t streamoff_t

Functions

template<typename X>
void throw_x (X const &x)
 Throws the given exception.
STLSOFT_INLINE void _stlsoft_internal_verify_integral_type_sizes (void)
template<typename T>
void const * ptr_byte_offset (T const p, ss_ptrdiff_t n)
 Offsets a pointer by a number of bytes.
template<typename T>
T const * ptr_offset (T const *p, ss_ptrdiff_t n)
 Offsets a pointer by a number of elements.
template<typename T1, typename T2>
ss_ptrdiff_t ptr_byte_diff (T1 const *p1, T2 const *p2)
 Get the difference in bytes between two pointers.
template<typename T1, typename T2>
ss_ptrdiff_t ptr_diff (T1 const *p1, T2 const *p2)
 Get the difference in elements between two pointers.
template<typename T>
T & remove_const (T const &t)
 Remove const-qualifier from an instance.
template<typename T>
T const & apply_const (T &t)
 Adds const-qualifier to an instance.
template<typename T>
T const * address (T const &t)
 Takes the address of a variable.


Define Documentation

#define _STLSOFT_VER   _STLSOFT_VER_1_9_98

The current composite version number of STLSoft.

In addition to the individual version symbols - _STLSOFT_VER_MAJOR, _STLSOFT_VER_MINOR and _STLSOFT_VER_REVISION - a composite symbol _STLSOFT_VER is defined, where:

  • bits 24-31: the major version
  • bits 16-23: the minor version
  • bits 8-15: the revision version
  • bits 0-7: the beta number; if not a beta, it is 0xFF

#define _STLSOFT_VER_MAJOR   1

The major version number of STLSoft.

A change to the major version component implies that a dramatic change has occurred in the libraries, such that considerable changes to source dependent on previous versions would need to be effected.

#define _STLSOFT_VER_MINOR   9

The minor version number of STLSoft.

A change to the minor version component imply that a significant change has occurred to the libraries, either in the addition of new functionality or in the destructive change to one or more components such that recompilation and code change may be necessitated.

#define _STLSOFT_VER_REVISION   98

The revision version number of STLSoft.

A change to the revision version component imply that a bug has been fixed. Dependent code should be recompiled in order to pick up the changes.

#define STLSOFT_CDECL_VALUE   (1)

A unique value indicating cdecl calling convention.

#define STLSOFT_CF_CDECL_SUPPORTED

When defined, indicates that the compiler supports the cdecl calling convention.

#define STLSOFT_CF_FASTCALL_SUPPORTED

When defined, indicates that the compiler supports the fastcall calling convention.

#define STLSOFT_CF_STDCALL_SUPPORTED

When defined, indicates that the compiler supports the stdcall calling convention.

#define STLSOFT_COMPILER_LABEL_STRING   "Acme Compiler"

A nul-terminated C-style string denoting the name of the compiler.

#define STLSOFT_COMPILER_VERSION_STRING   "Acme Compiler v1.0"

A nul-terminated C-style string denoting the name and version of the compiler.

#define STLSOFT_FASTCALL_VALUE   (2)

A unique value indicating fastcall calling convention.

#define STLSOFT_INCL_H_STLSOFT

Definition of previous include-guard symbol for stlsoft/stlsoft.h, for backwards compatibility.

#define STLSOFT_NS_GLOBAL (  )     ::x

#define stlsoft_ns_qual (  )     ::stlsoft::x

Qualifies with stlsoft:: if STLSoft is using namespaces or, if not, does not qualify.

Referenced by basic_current_directory_scope::basic_current_directory_scope(), basic_environment_variable::basic_environment_variable(), basic_error_desc::basic_error_desc(), basic_file_path_buffer< C >::basic_file_path_buffer(), basic_path::basic_path(), winstl::browse_for_folder(), comstl::c_str_data(), stlsoft::c_str_len(), winstl::c_str_len(), unixstl::c_str_len(), inetstl::c_str_len(), comstl::c_str_len(), unixstl::c_str_len_a(), comstl::c_str_len_a(), comstl::c_str_len_w(), comstl::c_str_ptr(), stlsoft::c_str_ptr_null(), unixstl::c_str_ptr_null(), winstl::c_str_ptr_null(), inetstl::c_str_ptr_null(), comstl::c_str_ptr_null(), comstl::co_create_instance(), comstl::CoInitSecurity(), winstl::combobox_addstring(), winstl::combobox_insertstring(), basic_file_path_buffer< C >::copy(), FORMATETC_policy::copy(), winstl::create_directory_recurse(), unixstl::create_directory_recurse(), basic_reg_key::create_key(), basic_reg_key::create_sub_key(), basic_reg_key::delete_sub_key(), basic_reg_key::delete_value(), basic_reg_key::get_value(), glob_sequence::glob_sequence(), basic_reg_key::has_sub_key(), basic_reg_key::has_value(), comstl::interface_cast(), winstl::listbox_addstring(), winstl::listbox_insertstring(), module::load(), process_mutex_lock_traits::lock(), memory_mapped_file::memory_mapped_file(), listview_inserter::operator()(), equal_ptr::operator()(), path_compare_env::operator()(), combobox_back_inserter::operator()(), combobox_add_inserter::operator()(), combobox_front_inserter::operator()(), listbox_back_inserter::operator()(), listbox_add_inserter::operator()(), listbox_front_inserter::operator()(), path_compare::operator()(), listbox_const_iterator::operator*(), basic_path::operator/=(), basic_path::operator=(), basic_file_path_buffer< C >::operator=(), basic_environment_block::push_back(), basic_reg_key::set_value(), stlsoft::strdup(), stlsoft::system(), stlsoft::to_uint64(), comstl::try_interface_cast(), and process_mutex_lock_traits::unlock().

#define stlsoft_ns_qual_std (  )     ::std::x

#define stlsoft_ns_using (  )     using ::stlsoft::x;

Declares a using directive (with respect to stlsoft) if STLSoft is using namespaces or, if not, does nothing.

#define stlsoft_ns_using_std (  )     using ::std::x;

Declares a using directive (with respect to std) if STLSoft is being translated in the context of the standard library being within the std namespace or, if not, does nothing.

#define STLSOFT_STDCALL_VALUE   (3)

A unique value indicating stdcall calling convention.

#define STLSOFT_TEMPLATE_SPECIALISATION   template <>

Resolves to template <> for compilers that support correct template specialisation syntax, and to nothing for those that do not.


Generated on Thu Jun 10 08:58:10 2010 for STLSoft by  doxygen 1.5.6