Namespaces | Classes | Macros | Typedefs | Enumerations | Enumerator | Functions
Bentley Library

The Bentley Library contains typedefs, #defines, constants and code shared by ALL Bentley authored C++ source files. More...

Namespaces

 Bentley
 The Bentley namespace contains types defined by the Bentley Library.
 

Classes

struct  BeAssertFunctions
 
struct  BeConsole
 BeConsold Class provides a collection of functions for the Console. More...
 
struct  BeFile
 BeFile provides a way to open a file and methods to access its contents and attributes. More...
 
class  BeFileListIterator
 An iterator to walk through a semicolon delimited list of file paths. More...
 
struct  BeVirtualMemory
 Utility functions for managing virtual memory. More...
 
class  BentleyAllocator< _Ty >
 An STL-compliant allocator that calls bentleyAllocator_malloc and bentleyAllocator_free. More...
 
struct  BeNumerical
 Numerical utilities. More...
 
struct  BeStringUtilities
 BeStringUtilities is a number of useful static methods for working with strings. More...
 
struct  BeTextFile
 Reads and Writes Text Files regardless of whether they are encoded on disk as locale-encoded ASCII, UTF8, or UTF16. More...
 
struct  BeMutex
 A synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads. More...
 
struct  BeMutexHolder
 A BeMutex ownership wrapper. More...
 
struct  IConditionVariablePredicate
 Provides implementation of predicate for a BeConditionVariable. More...
 
struct  BeConditionVariable
 A synchronization primitive that can be used to block a thread, or multiple threads at the same time, until: 1) a notification is received from another thread, 2) a timeout expires, or 3) a spurious wakeup occurs. More...
 
struct  BeThreadUtilities
 Utilities for dealing with threads ! More...
 
struct  DateTime
 Represents an instant in time, typically expressed as a date and time of day. More...
 
class  NonCopyableClass
 Base class to make a class non-copyable. More...
 
struct  IRefCounted
 Interface to be adopted by a class the implements the reference-counting pattern. More...
 
class  RefCounted< Base >
 Template to simplify the task of writing a class that implements the reference-counting pattern. More...
 
class  RefCountedBase
 Concrete class that can be used to implement the reference-counting pattern. More...
 
class  RefCountedPtr< T >
 A shared pointer template for reference-counted objects. More...
 
struct  ScopedArray< T, THRESHOLD >
 Class to efficiently allocate a block of memory, freeing the memory when the function leaves the scope. More...
 
struct  AlignedArray< T, THRESHOLD, ALIGNMENT >
 AlignedArray ensures that a block of data is correctly aligned. More...
 
struct  IThumbnailPropertyValue
 A thumbnail property value. More...
 
struct  ThumbnailPropertyValue
 An implementation of IThumbnailPropertyValue. More...
 
struct  EmptyThumbnailPropertyValue
 
struct  DoubleFormatterBase
 NEED_DOCUMENTATION. More...
 
struct  DoubleFormatter
 Used to construct a string from a numerical value. More...
 
struct  VirtualCollectionIterator< IteratorImplementation >
 This template is used by iterators that hide their implementation from the published API. More...
 
struct  AString
 A string class that has many of the same capabilities as std::string, plus additional functions such as conversion from wchar_t*. More...
 
struct  WString
 A string class that has many of the same capabilities as std::string, plus additional functions such as conversion from UTF-8, UTF-16, and local-encoded strings, case-insensitive compare, trimming, padding, and others. More...
 
struct  WPrintfString
 Construct a WString by creating a formatted string. More...
 
struct  Utf8String
 Contains a UTF-8 encoded string. More...
 
struct  Utf8PrintfString
 Construct a Utf8String by creating a formatted string. More...
 

Macros

#define BENTLEY_WIN32
 
#define BENTLEYCONFIG_GRAPHICS_DIRECTX
 
#define DLLPUBLIC_ATTRIBUTE
 
#define DLLPUBLIC_ATTRIBUTE   /* DLLPUBLIC_ATTRIBUTE is a GCC concept. For MSVC, we let EXPORT_ATTRIBUTE identify the members that must be exported */
 
#define EXPORT_ATTRIBUTE   __declspec(dllexport)
 
#define IMPORT_ATTRIBUTE   __declspec(dllimport)
 
#define DLLLOCAL_ATTRIBUTE   /* For MSVC, a symbol is not visible outside of the DLL unless it is marked as EXPORT_ATTRIBUTE. */
 
#define EXPORT_VTABLE_ATTRIBUTE   /* This is a GCC concept. In MSVC, it appears that the vtable and typeinfo of a class are always exported if the class contains any exported methods. */
 
#define CDECL_ATTRIBUTE   __cdecl
 
#define STDCALL_ATTRIBUTE   __stdcall
 
#define ENUM_UNDERLYING_TYPE(T)   : T
 
#define INTPTR_MIN   _I32_MIN
 
#define INTPTR_MAX   _I32_MAX
 
#define UINTPTR_MAX   _UI32_MAX
 
#define HAVE_TR1
 
#define STD_TR1   std::tr1
 
#define DECLARE_KEY_METHOD
 
#define INT32_MAX   INT_MAX
 
#define UINT32_MAX   UINT_MAX
 
#define INT64_MAX   LLONG_MAX
 
#define UINT64_MAX   ULLONG_MAX
 
#define INT32_MIN   INT_MIN
 
#define INT64_MIN   LLONG_MIN
 
#define USING_NAMESPACE_BENTLEY   using namespace BENTLEY_NAMESPACE_NAME;
 
#define DEFINE_POINTER_SUFFIX_TYPEDEFS(_structname_)
 
#define ADD_BENTLEY_TYPEDEFS1(_namespace_, _sourceName_, _name_, structclass)
 
#define ADD_BENTLEY_TYPEDEFS(_namespace_, _name_)   ADD_BENTLEY_TYPEDEFS1(_namespace_,_name_,_name_,struct)
 
#define ADD_BENTLEY_ENUM_TYPEDEF(_namespace_, _name_, _tEnum_)   namespace BENTLEY_NAMESPACE_NAME {typedef enum _namespace_ :: _name_ _tEnum_;}
 
#define BENTLEY_TYPEDEF(t, tP)   namespace BENTLEY_NAMESPACE_NAME {struct t; typedef struct BENTLEY_NAMESPACE_NAME::t* tP;}
 
#define BENTLEY_TYPEDEFS(_name_)   namespace BENTLEY_NAMESPACE_NAME {struct _name_;} ADD_BENTLEY_TYPEDEFS(BENTLEY_NAMESPACE_NAME,_name_)
 
#define BENTLEY_REF_COUNTED_PTR(_sname_)   namespace BENTLEY_NAMESPACE_NAME {struct _sname_; typedef RefCountedPtr<_sname_> _sname_##Ptr;}
 
#define NULL   0
 
#define Public
 
#define BEGIN_EXTERN_C   extern "C" {
 
#define END_EXTERN_C   }
 
#define ALLOW_NULL_OUTPUT(var, out)   _t_##var, &var(out?*out:_t_##var)
 
#define DEFINE_T_SUPER(B)   private: typedef B T_Super; public:
 
#define NOGDI
 NOTE: This is here because the Windows header file WinGDI.h defines ERROR to 0, which is a disaster for Bentley APIs where 0 means SUCCESS. More...
 
#define BENTLEYDLL_EXPORT   IMPORT_ATTRIBUTE
 
#define ENUM_IS_FLAGS(ENUMTYPE)
 
#define DEFINE_BENTLEY_REF_COUNTED_MEMBERS
 
#define DEFINE_BENTLEY_REF_COUNTED_MEMBER_INIT   m_refCount.store(0);
 
#define DEFINE_REF_COUNTED_POINTER(_sname_)   typedef RefCountedPtr<_sname_> _sname_##Ptr;
 

Typedefs

typedef __w64 unsigned long ULONG_PTR
 
typedef int StatusInt
 
typedef wchar_t WChar
 
typedef wchar_t const * WCharCP
 
typedef wchar_tWCharP
 
typedef char const * CharCP
 
typedef char * CharP
 
typedef Utf8CharUtf8P
 
typedef Utf8Char const * Utf8CP
 
typedef Utf16CharUtf16P
 
typedef Utf16Char const * Utf16CP
 
typedef void * UserDataP
 
typedef void const * UserDataCP
 
typedef void * CallbackArgP
 
typedef struct Bentley::WStringWStringP
 
typedef struct Bentley::WStringWStringR
 
typedef struct
Bentley::WString const * 
WStringCP
 
typedef struct
Bentley::WString const & 
WStringCR
 
typedef struct Bentley::AStringAStringP
 
typedef struct Bentley::AStringAStringR
 
typedef struct
Bentley::AString const * 
AStringCP
 
typedef struct
Bentley::AString const & 
AStringCR
 
typedef struct
Bentley::Utf8String
Utf8StringP
 
typedef struct
Bentley::Utf8String
Utf8StringR
 
typedef struct
Bentley::Utf8String const * 
Utf8StringCP
 
typedef struct
Bentley::Utf8String const & 
Utf8StringCR
 
typedef struct
Bentley::BeFileName * 
BeFileNameP
 
typedef struct
Bentley::BeFileName & 
BeFileNameR
 
typedef struct
Bentley::BeFileName const * 
BeFileNameCP
 
typedef struct
Bentley::BeFileName const & 
BeFileNameCR
 
typedef struct
Bentley::BeTextFile
BeTextFileP
 
typedef struct
Bentley::BeTextFile
BeTextFileR
 
typedef struct
Bentley::BeTextFile const * 
BeTextFileCP
 
typedef struct
Bentley::BeTextFile const & 
BeTextFileCR
 
typedef struct Bentley::BeIcon * BeIconP
 
typedef struct Bentley::BeIcon & BeIconR
 
typedef struct Bentley::BeIcon
const * 
BeIconCP
 
typedef struct Bentley::BeIcon
const & 
BeIconCR
 
typedef char int8_t
 
typedef unsigned char uint8_t
 
typedef short int16_t
 
typedef unsigned short uint16_t
 
typedef int int32_t
 
typedef unsigned int uint32_t
 
typedef long long int64_t
 
typedef unsigned long long uint64_t
 
typedef int8_t Int8
 
typedef uint8_t UInt8
 
typedef int16_t Int16
 
typedef uint16_t UInt16
 
typedef int32_t Int32
 
typedef uint32_t UInt32
 
typedef int64_t Int64
 
typedef uint64_t UInt64
 
typedef unsigned short UShort
 
typedef unsigned long ULong
 
typedef short Short
 
typedef unsigned int UInt
 
typedef unsigned char UChar
 
typedef unsigned char Byte
 
typedef unsigned char byte
 
typedef long Long32
 
typedef unsigned long ULong32
 
typedef uint16_t Utf16Char
 
typedef char Utf8Char
 
typedef bvector< Utf16CharUtf16Buffer
 
typedef Utf16Buffer const * Utf16BufferCP
 
typedef Utf16Buffer const & Utf16BufferCR
 
typedef Utf16BufferUtf16BufferP
 
typedef Utf16BufferUtf16BufferR
 
typedef RefCountedPtr< struct
BeTextFile > 
BeTextFilePtr
 A reference counted pointer to a BeTextFile instance. More...
 
typedef DateTimeDateTimeR
 
typedef DateTime const & DateTimeCR
 
typedef DateTimeDateTimeP
 
typedef DateTime const * DateTimeCP
 
typedef RefCountedPtr
< DoubleFormatter
DoubleFormatterPtr
 
typedef Bstdcxx::basic_string
< char, std::char_traits< char >
, BentleyAllocator< char > > 
bastring
 
typedef Bstdcxx::basic_string
< wchar_t, std::char_traits
< wchar_t >, BentleyAllocator
< wchar_t > > 
bwstring
 
typedef bvector< WStringT_WStringVector
 A bvector of WString objects, with allocations handled by the Bentley allocator (so it can be passed across DLLs targetting different C runtimes). More...
 
typedef T_WStringVectorT_WStringVectorP
 
typedef T_WStringVectorT_WStringVectorR
 
typedef T_WStringVector const * T_WStringVectorCP
 
typedef T_WStringVector const & T_WStringVectorCR
 
typedef bvector< Utf8StringT_Utf8StringVector
 A bvector of WString objects, with allocations handled by the Bentley allocator (so it can be passed across DLLs targetting different C runtimes). More...
 
typedef T_Utf8StringVectorT_Utf8StringVectorP
 
typedef T_Utf8StringVectorT_Utf8StringVectorR
 
typedef T_Utf8StringVector const * T_Utf8StringVectorCP
 
typedef T_Utf8StringVector const & T_Utf8StringVectorCR
 

Enumerations

enum  BeFileStatus {
  Success = SUCCESS, FileNotFoundError, AccessViolationError, SharingViolationError,
  TooManyOpenFilesError, FileNotOpenError, NotLockedError, ReadError,
  UnknownError = ERROR
}
 The possible status returns for the BeFile methods. More...
 
enum  BeFileAccess { Read = 1, Write = 2, ReadWrite = 3 }
 The possible file access values for the Open method. More...
 
enum  BeFileSharing { None = 0, Read = 1, Write = 2, ReadWrite = 3 }
 The possible file sharing modes for the Create and Open methods. More...
 
enum  BeFileAttributes { Normal = 0, RandomIO = 1, DeleteOnClose = 2 }
 Possible file attributes for the Create and Open methods. More...
 
enum  BeFileSeekOrigin { Begin = 0, Current = 1, End = 2 }
 Possible origin modes for the SetPosition method. More...
 
enum  BentleyTrueFalse { TRUE = 1, FALSE = 0 }
 
enum  BentleyStatus { SUCCESS = 0, BSISUCCESS = 0, ERROR = 0x8000, BSIERROR = 0x8000 }
 
enum  BentleyCharEncoding { Locale = 0, Utf8 = 1 }
 
enum  HexFormatOptions {
  None = 0, LeftJustify = 1 << 0, IncludePrefix = 1 << 1, Uppercase = 1 << 2,
  LeadingZeros = 1 << 3, UsePrecision = 1 << 4
}
 
enum  TextFileOpenType { Read = 0, Write = 1, Append = 2 }
 The possible BeTextFile open modes. More...
 
enum  TextFileEncoding { CurrentLocale = 0, Utf8 = 1, Utf16 = 2 }
 The possible BeTextFile open modes. More...
 
enum  TextFileOptions { None = 0, KeepNewLine = 0x1, NewLinesToSpace = 0x5 }
 The possible options for text file reading. More...
 
enum  TextFileReadStatus { Success = 0, Eof, BadParameter }
 The possible return values for text file reads. More...
 
enum  TextFileWriteStatus { Success = 0, Error, BadParameter }
 The possible return values for text file writes. More...
 
enum  LangCodePage {
  Unknown = -1, None = 0, OEM_US = 437, Transparent_ASMO = 720,
  OEM_Greek = 737, OEM_Baltic = 775, OEM_Multilingual = 850, OEM_LatinII = 852,
  OEM_Cryllic = 855, OEM_Turkish = 857, OEM_LatinI = 858, OEM_Hebrew = 862,
  OEM_Russian = 866, OEM_Thai = 874, Japanese = 932, Simplified_Chinese = 936,
  Korean = 949, Traditional_Chinese = 950, Unicode = 1200, UNICODE_UCS2_Little_Endian = 1200,
  UNICODE_UCS2_Big_Endian = 1201, Central_European = 1250, Cyrillic = 1251, LatinI = 1252,
  Greek = 1253, Turkish = 1254, Hebrew = 1255, Arabic = 1256,
  Baltic = 1257, Vietnamese = 1258, Johab = 1361, ISO_8859_1 = 28591,
  ISO_8859_2 = 28592, ISO_8859_3 = 28593, ISO_8859_4 = 28594, ISO_8859_5 = 28595,
  ISO_8859_6 = 28596, ISO_8859_7 = 28597, ISO_8859_8 = 28598, ISO_8859_9 = 28599,
  ISO_8859_15 = 28605, ISCII_UNICODE_UTF_7 = 65000, ISCII_UNICODE_UTF_8 = 65001
}
 

Functions

Long32 TranslateBeFileStatusToHresult (BeFileStatus status)
 Translates a BeFileStatus value to an HRESULT. More...
 
BeFileStatus TranslateHResultToBeFileStatus (Long32 status)
 Translates an HRESULT to a BeFileStatus value. More...
 
typedef ALIGNMENT_ATTRIBUTE (8) double T_Adouble
 
template<class _Ty , class _Other >
bool operator== (const BentleyAllocator< _Ty > &, const BentleyAllocator< _Other > &)
 
template<class _Ty , class _Other >
bool operator!= (const BentleyAllocator< _Ty > &, const BentleyAllocator< _Other > &)
 
BentleyStatus BeGetUserName (WStringR s)
 Get the current user name. More...
 
BentleyStatus BeGetUserNameA (AStringR s)
 Get the current user name. More...
 
BentleyStatus BeGetComputerName (WStringR s)
 Get the current computer name. More...
 
BentleyStatus BeGetComputerNameA (AStringR s)
 Get the current computer name. More...
 

Detailed Description

The Bentley Library contains typedefs, #defines, constants and code shared by ALL Bentley authored C++ source files.

The Bentley Library defines the "Bentley" namespace that contains Bentley-specific implementations of the basic STL collection and string template classes in the std namespace. These template classes have Bentley-unique names, so they do not collide with the std namespace classes, and are purposely NOT assignment compatible with the std namespace classes. The primary use of these Bentley-specific implementations is to eliminate dependency on compiler-specific implementations, and avoid compiler version incompatibilities for memory allocation as well as compiler option idiosyncrasies.

It is illegal to use a std:: collection or string template in a public Bentley api.

The file BentleyAllocator.h exists to avoid the issues (on Windows) of allocating memory in one dll and attempting to free it in another dll built with a different version of the compiler. Since the essence of the class is to supply a single, unversioned, implementation of the Bentley-specific alloc/free functions, this means that any program that uses any Bentley dlls must link with the unversioned BentleyAllocator.dll/lib. [Note: static linked executables do not have this problem.]

There are a few other header files in the Bentley library that provide implementations for:

These classes exist to facilitate passing these fundamental concepts between versioned apis. Some of these classes are templates, so there is no run-time dependencies. Others have implementations that are supplied either in a static library (preferred) or a versioned BentleyXXX.dll. The guarantee is that the class layouts can never change, so each side is free to use its own implementation of its methods. Since this is a very hard guarantee to make, it is almost never a good idea to add, modify, or remove code in the Bentley namespace. Instead, use the versioned, BentleyApi repository and namespace.

Macro Definition Documentation

#define ADD_BENTLEY_ENUM_TYPEDEF (   _namespace_,
  _name_,
  _tEnum_ 
)    namespace BENTLEY_NAMESPACE_NAME {typedef enum _namespace_ :: _name_ _tEnum_;}
#define ADD_BENTLEY_TYPEDEFS (   _namespace_,
  _name_ 
)    ADD_BENTLEY_TYPEDEFS1(_namespace_,_name_,_name_,struct)
#define ADD_BENTLEY_TYPEDEFS1 (   _namespace_,
  _sourceName_,
  _name_,
  structclass 
)
Value:
typedef structclass _namespace_ :: _sourceName_* _name_##P, &_name_##R; \
typedef structclass _namespace_ :: _sourceName_ const* _name_##CP; \
typedef structclass _namespace_ :: _sourceName_ const& _name_##CR; }
#define BENTLEY_NAMESPACE_NAME
Definition: Bentley.r.h:23
#define ALLOW_NULL_OUTPUT (   var,
  out 
)    _t_##var, &var(out?*out:_t_##var)
#define BEGIN_EXTERN_C   extern "C" {
#define BENTLEY_REF_COUNTED_PTR (   _sname_)    namespace BENTLEY_NAMESPACE_NAME {struct _sname_; typedef RefCountedPtr<_sname_> _sname_##Ptr;}
#define BENTLEY_TYPEDEF (   t,
  tP 
)    namespace BENTLEY_NAMESPACE_NAME {struct t; typedef struct BENTLEY_NAMESPACE_NAME::t* tP;}
#define BENTLEY_TYPEDEFS (   _name_)    namespace BENTLEY_NAMESPACE_NAME {struct _name_;} ADD_BENTLEY_TYPEDEFS(BENTLEY_NAMESPACE_NAME,_name_)
#define BENTLEY_WIN32
#define BENTLEYCONFIG_GRAPHICS_DIRECTX
#define BENTLEYDLL_EXPORT   IMPORT_ATTRIBUTE
#define CDECL_ATTRIBUTE   __cdecl
#define DECLARE_KEY_METHOD
#define DEFINE_BENTLEY_REF_COUNTED_MEMBER_INIT   m_refCount.store(0);
#define DEFINE_BENTLEY_REF_COUNTED_MEMBERS
Value:
private: \
mutable BeAtomic<UInt32> m_refCount; \
public: \
void* operator new(size_t size) { return bentleyAllocator_allocateRefCounted (size); } \
void operator delete(void *rawMemory, size_t size) { bentleyAllocator_deleteRefCounted (rawMemory, size); } \
UInt32 AddRef() const {return ++m_refCount;} \
UInt32 Release() const \
{ \
::UInt32 refCount = m_refCount--; \
if (1 < refCount) \
return refCount - 1; \
delete this; \
return 0; \
}
uint32_t UInt32
Definition: Bentley.r.h:128
Definition: BeAtomic.h:68
size_type size() const
Definition: stdcxx/bstdmap.h:214
#define DEFINE_POINTER_SUFFIX_TYPEDEFS (   _structname_)
Value:
struct _structname_; \
typedef _structname_* _structname_##P, &_structname_##R; \
typedef _structname_ const* _structname_##CP; \
typedef _structname_ const& _structname_##CR;
#define DEFINE_REF_COUNTED_POINTER (   _sname_)    typedef RefCountedPtr<_sname_> _sname_##Ptr;
#define DEFINE_T_SUPER (   B)    private: typedef B T_Super; public:
#define DLLLOCAL_ATTRIBUTE   /* For MSVC, a symbol is not visible outside of the DLL unless it is marked as EXPORT_ATTRIBUTE. */
#define DLLPUBLIC_ATTRIBUTE
#define DLLPUBLIC_ATTRIBUTE   /* DLLPUBLIC_ATTRIBUTE is a GCC concept. For MSVC, we let EXPORT_ATTRIBUTE identify the members that must be exported */
#define END_EXTERN_C   }
#define ENUM_IS_FLAGS (   ENUMTYPE)
Value:
inline ENUMTYPE operator| (ENUMTYPE a, ENUMTYPE b) { return static_cast<ENUMTYPE>(static_cast<std::underlying_type<ENUMTYPE>::type>(a) | static_cast<std::underlying_type<ENUMTYPE>::type>(b)); } \
inline ENUMTYPE operator& (ENUMTYPE a, ENUMTYPE b) { return static_cast<ENUMTYPE>(static_cast<std::underlying_type<ENUMTYPE>::type>(a) & static_cast<std::underlying_type<ENUMTYPE>::type>(b)); } \
inline ENUMTYPE operator~ (ENUMTYPE a) { return static_cast<ENUMTYPE>(~(static_cast<std::underlying_type<ENUMTYPE>::type>(a))); } \
inline bool operator! (ENUMTYPE a) { return 0 == static_cast<std::underlying_type<ENUMTYPE>::type>(a); }
bool operator!(DgnECHostType a)
Definition: DgnECInstance.h:92
DgnECHostType operator|(DgnECHostType a, DgnECHostType b)
Definition: DgnECInstance.h:92
DgnECHostType operator~(DgnECHostType a)
Definition: DgnECInstance.h:92
DgnECHostType operator&(DgnECHostType a, DgnECHostType b)
Definition: DgnECInstance.h:92
#define ENUM_UNDERLYING_TYPE (   T)    : T
#define EXPORT_ATTRIBUTE   __declspec(dllexport)
#define EXPORT_VTABLE_ATTRIBUTE   /* This is a GCC concept. In MSVC, it appears that the vtable and typeinfo of a class are always exported if the class contains any exported methods. */
#define HAVE_TR1
#define IMPORT_ATTRIBUTE   __declspec(dllimport)
#define INT32_MAX   INT_MAX
#define INT32_MIN   INT_MIN
#define INT64_MAX   LLONG_MAX
#define INT64_MIN   LLONG_MIN
#define INTPTR_MAX   _I32_MAX
#define INTPTR_MIN   _I32_MIN
#define NOGDI

NOTE: This is here because the Windows header file WinGDI.h defines ERROR to 0, which is a disaster for Bentley APIs where 0 means SUCCESS.

If you want to use Bentley header files and you need to use anything from wingdi.h, you MUST include that file BEFORE Bentley.h (and of course be aware that Bentley.h will undef ERROR and you'll get the enum ERROR=0x8000 below).

If you really need types from WinGDI.h, usually the easiest thing to do is to put:

#include <wtypes.h>

as the first line in your source file.

#define NULL   0

Referenced by MstnEditAction::_AddToMenu(), GeometryId::_CreateSolverGeometry(), IECInstance::_GetAsDgnECInstance(), IElementTemplateExtender::_GetAsITemplatePropertiesChecker(), MstnEditAction::_GetCmdNumber(), DgnPrimitiveTool::_GetDrawDynamicsTxnChanges(), GeometryId::_GetEdgeId(), GeometryId::_GetFaceId(), IElementGraphicsProcessor::_GetFacetOptionsP(), ElementRefAppData::_GetName(), DgnTool::_GetToolName(), GeometryId::_GetVertexId(), WString::AssignOrClear(), Utf8String::AssignOrClear(), BitMaskRef< defaultVal >::BitMaskRef(), ChildEditElemIter::ChildEditElemIter(), ChildElemIter::ChildElemIter(), BitMaskRef< defaultVal >::Clear(), PlotFileSpec::ClearHandle(), DgnAttachmentBuilder::DgnAttachmentBuilder(), ElementHandle::ElementHandle(), ElemModelPair::ElemModelPair(), XAttributeCollection::end(), GPArraySmartP::ExtractFrom(), FitViewParams::FitViewParams(), IndexedViewSet::FullUpdateInfo::FullUpdateInfo(), BitMaskRef< defaultVal >::GetBitMask(), IAUIDataContext::GetCustomData(), ElementHandle::GetDgnFileP(), DgnECUnit::GetECUnitName(), EditElementHandle::GetElementP(), ElemHandleArray< T_ElemHandle >::GetEntry(), ElemHandleArray< T_ElemHandle >::GetEntryP(), ElemHandleArray< T_ElemHandle >::GetFirst(), ElemHandleArray< T_ElemHandle >::GetFirstP(), IAUIDataContext::GetInstanceInterface(), IAUIDataContext::GetInstanceIterable(), MSDialog::GetItemPtrByTypeAndId(), ElemHandleArray< T_ElemHandle >::GetLast(), ElemHandleArray< T_ElemHandle >::GetLastP(), TransformInfo::GetMirrorPlane(), IAUIDataContext::GetMoniker(), PlotPropValue::GetString(), DialogItem::GetTypePtr(), DItem_PulldownMenu::Init(), DItem_PulldownMenuItem::Init(), DgnButtonEvent::Invalidate(), SpriteLocation::IsActive(), PlotFileSpec::IsHandleDefined(), WString::IsNullOrEmpty(), Utf8String::IsNullOrEmpty(), TextString::IsUnicodeFont(), DgnButtonEvent::IsValid(), ElementHandle::IsValid(), BitMaskRef< defaultVal >::IsValid(), LineStyleReportingData::LineStyleReportingData(), ElementIdMap< _ForeignId, _Compare, _ForeignIdIO >::Load(), ModifyOp::ModifyOp(), PersistentElementRefListIterator::PersistentElementRefListIterator(), RedrawElems::RedrawElems(), BitMaskHolder::SetBitMask(), EditElementHandle::SetNonPersistent(), BeStringUtilities::Split(), ElementIdMap< _ForeignId, _Compare, _ForeignIdIO >::Store(), Bentley::MstnPlatform::Relationship::tokenOperand_checkType(), XAttributeChange::XAttributeChange(), and GPArraySmartP::~GPArraySmartP().

#define Public
#define STD_TR1   std::tr1
#define STDCALL_ATTRIBUTE   __stdcall
#define UINT32_MAX   UINT_MAX
#define UINT64_MAX   ULLONG_MAX
#define UINTPTR_MAX   _UI32_MAX
#define USING_NAMESPACE_BENTLEY   using namespace BENTLEY_NAMESPACE_NAME;

Typedef Documentation

typedef struct Bentley :: AString const* AStringCP
typedef struct Bentley :: AString const& AStringCR
typedef struct Bentley :: AString* AStringP
typedef struct Bentley :: AString & AStringR
typedef Bstdcxx::basic_string<char, std::char_traits<char>, BentleyAllocator<char> > bastring
typedef struct Bentley :: BeFileName const* BeFileNameCP
typedef struct Bentley :: BeFileName const& BeFileNameCR
typedef struct Bentley :: BeFileName* BeFileNameP
typedef struct Bentley :: BeFileName & BeFileNameR
typedef struct Bentley :: BeIcon const* BeIconCP
typedef struct Bentley :: BeIcon const& BeIconCR
typedef struct Bentley :: BeIcon* BeIconP
typedef struct Bentley :: BeIcon & BeIconR
typedef struct Bentley :: BeTextFile const* BeTextFileCP
typedef struct Bentley :: BeTextFile const& BeTextFileCR
typedef struct Bentley :: BeTextFile* BeTextFileP
typedef RefCountedPtr<struct BeTextFile> BeTextFilePtr

A reference counted pointer to a BeTextFile instance.

typedef struct Bentley :: BeTextFile & BeTextFileR
typedef Bstdcxx::basic_string<wchar_t, std::char_traits<wchar_t>, BentleyAllocator<wchar_t> > bwstring
typedef unsigned char Byte
typedef unsigned char byte
typedef void* CallbackArgP
typedef char const* CharCP
typedef char* CharP
typedef DateTime const* DateTimeCP
typedef DateTime const& DateTimeCR
typedef DateTime* DateTimeP
typedef DateTime& DateTimeR
typedef int16_t Int16
typedef short int16_t
typedef int32_t Int32
typedef int int32_t
typedef int64_t Int64
typedef long long int64_t
typedef int8_t Int8
typedef char int8_t
typedef long Long32
typedef short Short
typedef int StatusInt

A bvector of WString objects, with allocations handled by the Bentley allocator (so it can be passed across DLLs targetting different C runtimes).

A bvector of WString objects, with allocations handled by the Bentley allocator (so it can be passed across DLLs targetting different C runtimes).

typedef unsigned char UChar
typedef unsigned int UInt
typedef uint16_t UInt16
typedef unsigned short uint16_t
typedef uint32_t UInt32
typedef unsigned int uint32_t
typedef uint64_t UInt64
typedef unsigned long long uint64_t
typedef uint8_t UInt8
typedef unsigned char uint8_t
typedef unsigned long ULong
typedef unsigned long ULong32
typedef __w64 unsigned long ULONG_PTR
typedef void const* UserDataCP
typedef void* UserDataP
typedef unsigned short UShort
typedef Utf16Buffer const* Utf16BufferCP
typedef Utf16Buffer const& Utf16BufferCR
typedef Utf16Char const* Utf16CP
typedef Utf16Char* Utf16P
typedef char Utf8Char
typedef Utf8Char const* Utf8CP
typedef Utf8Char* Utf8P
typedef struct Bentley :: Utf8String const* Utf8StringCP
typedef struct Bentley :: Utf8String const& Utf8StringCR
typedef struct Bentley :: Utf8String* Utf8StringP
typedef struct Bentley :: Utf8String & Utf8StringR
typedef wchar_t WChar
typedef wchar_t const* WCharCP
typedef wchar_t* WCharP
typedef struct Bentley :: WString const* WStringCP
typedef struct Bentley :: WString const& WStringCR
typedef struct Bentley :: WString* WStringP
typedef struct Bentley :: WString & WStringR

Enumeration Type Documentation

enum BeFileAccess
strong

The possible file access values for the Open method.

Enumerator
Read 

Open for read access.

Write 

Open for write access.

ReadWrite 

Open for both read and write.

enum BeFileAttributes
strong

Possible file attributes for the Create and Open methods.

Enumerator
Normal 

The default file attribute.

RandomIO 

Optimize the file for random input and output operations.

DeleteOnClose 

Delete this file when closed. Used for temporary files.

enum BeFileSeekOrigin
strong

Possible origin modes for the SetPosition method.

Enumerator
Begin 

The specified position is relative to the beginning of the file.

Current 

The specified position is relative to the current read/write position of the file.

End 

The specified position is relative to the end of the file.

enum BeFileSharing
strong

The possible file sharing modes for the Create and Open methods.

Enumerator
None 

Does not allow a second call to BeFile::Open to access the file at all.

Read 

Allow a second call to BeFile::Open to request read access.

Write 

Allow a second call to BeFile::Open to request write access.

ReadWrite 

Allow a second call to BeFile::Open to request read and write access.

enum BeFileStatus
strong

The possible status returns for the BeFile methods.

Enumerator
Success 

The file operation was successful.

FileNotFoundError 

Unable to open the file because there is no file of the specified name.

AccessViolationError 

The file exists, but is either already open or protected from an open of the type specified.

SharingViolationError 

The file exists, but is already open in a sharing mode that does not allow this open.

TooManyOpenFilesError 

There are too many files already open.

FileNotOpenError 

An operation was attempted on a file that has already been closed.

NotLockedError 

The file is not locked.

ReadError 

An error during read.

UnknownError 

An unknown file I/O error occurred.

enum BentleyCharEncoding
strong
Enumerator
Locale 
Utf8 
Enumerator
SUCCESS 
BSISUCCESS 
ERROR 
BSIERROR 
Enumerator
TRUE 
FALSE 
enum HexFormatOptions
strong
Enumerator
None 
LeftJustify 
IncludePrefix 
Uppercase 
LeadingZeros 
UsePrecision 
enum LangCodePage
strong
Enumerator
Unknown 

unknown code page

None 
OEM_US 

OEM - United States.

Transparent_ASMO 

Arabic - Transparent ASMO.

OEM_Greek 

OEM - Greek (formerly 437G)

OEM_Baltic 

OEM - Baltic.

OEM_Multilingual 

OEM - Multilingual Latin I.

OEM_LatinII 

OEM - Latin II.

OEM_Cryllic 

OEM - Cyrillic (primarily Russian)

OEM_Turkish 

OEM - Turkish.

OEM_LatinI 

OEM - Multlingual Latin I + Euro symbol.

OEM_Hebrew 

OEM - Hebrew.

OEM_Russian 

OEM - Russian.

OEM_Thai 

ANSI/OEM - Thai (same as 28605, ISO 8859-15)

Japanese 

ANSI/OEM - Japanese, Shift-JIS.

Simplified_Chinese 

ANSI/OEM - Simplified Chinese (PRC, Singapore)

Korean 

ANSI/OEM - Korean (Unified Hangeul Code)

Traditional_Chinese 

ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)

Unicode 

UNICODE.

UNICODE_UCS2_Little_Endian 

Unicode UCS-2 Little-Endian (BMP of ISO 10646)

UNICODE_UCS2_Big_Endian 

Unicode UCS-2 Big-Endian.

Central_European 

ANSI - Central European.

Cyrillic 

ANSI - Cyrillic.

LatinI 

ANSI - Latin I.

Greek 

ANSI - Greek.

Turkish 

ANSI - Turkish.

Hebrew 

ANSI - Hebrew.

Arabic 

ANSI - Arabic.

Baltic 

ANSI - Baltic.

Vietnamese 

ANSI/OEM - Vietnamese.

Johab 

Korean (Johab)

ISO_8859_1 

ISO 8859-1 Latin I.

ISO_8859_2 

ISO 8859-2 Central Europe.

ISO_8859_3 

ISO 8859-3 Latin 3.

ISO_8859_4 

ISO 8859-4 Baltic.

ISO_8859_5 

ISO 8859-5 Cyrillic.

ISO_8859_6 

ISO 8859-6 Arabic.

ISO_8859_7 

ISO 8859-7 Greek.

ISO_8859_8 

ISO 8859-8 Hebrew.

ISO_8859_9 

ISO 8859-9 Latin 5.

ISO_8859_15 

ISO 8859-15 Latin 9.

ISCII_UNICODE_UTF_7 

Unicode UTF-7.

ISCII_UNICODE_UTF_8 

Unicode UTF-8.

enum TextFileEncoding
strong

The possible BeTextFile open modes.

Enumerator
CurrentLocale 

Write current locale multibyte output file.

Utf8 

Write UTF-8 encoded output file.

Utf16 

Write little-endian UTF-16 encoded output file.

enum TextFileOpenType
strong

The possible BeTextFile open modes.

Enumerator
Read 

Open for read access.

Write 

Open for write access.

Append 

Open for both read and write.

enum TextFileOptions
strong

The possible options for text file reading.

Enumerator
None 

Use the default newline handling.

KeepNewLine 

relevant only for getString, default behavior is to return the line without the newlines.

NewLinesToSpace 

relevant only for getString, also turns on KeepNewLine.

enum TextFileReadStatus
strong

The possible return values for text file reads.

Enumerator
Success 

Successful read.

Eof 

Encountered the end of the file.

BadParameter 

A bad argument was passed to the method.

enum TextFileWriteStatus
strong

The possible return values for text file writes.

Enumerator
Success 

Successful write.

Error 

An I/O error occurred while attempting to write.

BadParameter 

A bad argument was passed to the method.

Function Documentation

typedef ALIGNMENT_ATTRIBUTE ( )
BentleyStatus Bentley::BeGetComputerName ( WStringR  s)

Get the current computer name.

BentleyStatus Bentley::BeGetComputerNameA ( AStringR  s)

Get the current computer name.

BentleyStatus Bentley::BeGetUserName ( WStringR  s)

Get the current user name.

BentleyStatus Bentley::BeGetUserNameA ( AStringR  s)

Get the current user name.

bool Bentley::operator!= ( const BentleyAllocator< _Ty > &  ,
const BentleyAllocator< _Other > &   
)
bool Bentley::operator== ( const BentleyAllocator< _Ty > &  ,
const BentleyAllocator< _Other > &   
)
Long32 Bentley::TranslateBeFileStatusToHresult ( BeFileStatus  status)

Translates a BeFileStatus value to an HRESULT.

Parameters
[in]statusThe BeFileStatus to convert.
Returns
The HRESULT corresponding to status.
BeFileStatus Bentley::TranslateHResultToBeFileStatus ( Long32  status)

Translates an HRESULT to a BeFileStatus value.

Parameters
[in]statusThe HRESULT to convert.
Returns
The BeFileStatus corresponding to status.

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.