MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
TBufCastHToN< T > Class Template Reference

#include <bufmod.h>

Inheritance diagram for TBufCastHToN< T >:
Collaboration diagram for TBufCastHToN< T >:

Public Member Functions

 TBufCastHToN (size_t offset)
 
doublereal cast (const void *pFrom) const
 
void uncast (void *pTo, doublereal d) const
 
BufCastcopy (size_t offset) const
 
- Public Member Functions inherited from TBufCast< T >
 TBufCast (size_t offset)
 
size_t size (void) const
 
size_t offset (void) const
 
- Public Member Functions inherited from BufCast
 BufCast (size_t offset)
 
virtual ~BufCast (void)
 

Additional Inherited Members

- Protected Attributes inherited from BufCast
size_t m_offset
 

Detailed Description

template<class T>
class TBufCastHToN< T >

Definition at line 120 of file bufmod.h.

Constructor & Destructor Documentation

template<class T >
TBufCastHToN< T >::TBufCastHToN ( size_t  offset)
inline

Definition at line 122 of file bufmod.h.

122 : TBufCast<T>(offset) {};
size_t offset(void) const
Definition: bufmod.h:66

Member Function Documentation

template<class T >
doublereal TBufCastHToN< T >::cast ( const void *  pFrom) const
inlinevirtual

Reimplemented from TBufCast< T >.

Definition at line 126 of file bufmod.h.

126  {
127  const char *p = &((const char *)pFrom)[TBufCast<T>::m_offset];
128  return mbswap<T>(*((T *)p));
129  };
template<class T >
BufCast* TBufCastHToN< T >::copy ( size_t  offset) const
inlinevirtual

Reimplemented from TBufCast< T >.

Definition at line 138 of file bufmod.h.

References TBufCast< T >::offset().

138  {
139  return new TBufCastHToN<T>(offset);
140  };
size_t offset(void) const
Definition: bufmod.h:66

Here is the call graph for this function:

template<class T >
void TBufCastHToN< T >::uncast ( void *  pTo,
doublereal  d 
) const
inlinevirtual

Reimplemented from TBufCast< T >.

Definition at line 133 of file bufmod.h.

133  {
134  char *p = &((char *)pTo)[TBufCast<T>::m_offset];
135  ((T *)p)[0] = mbswap<T>(T(d));
136  };

The documentation for this class was generated from the following file: