LibreOffice Module sc (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XclExpValueRecord< Type > Class Template Reference

A record with a single value of type Type. More...

#include <xerecord.hxx>

Inheritance diagram for XclExpValueRecord< Type >:
[legend]
Collaboration diagram for XclExpValueRecord< Type >:
[legend]

Public Member Functions

 XclExpValueRecord (sal_uInt16 nRecId, const Type &rValue, std::size_t nSize=sizeof(Type))
 
const TypeGetValue () const
 Returns the value of the record. More...
 
void SetValue (const Type &rValue)
 Sets a new record value. More...
 
XclExpValueRecordSetAttribute (sal_Int32 nId)
 Sets the OOXML attribute this record corresponds to. More...
 
void SaveXml (XclExpXmlStream &rStrm) override
 Write the OOXML attribute and its value. More...
 
template<>
void SaveXml (XclExpXmlStream &rStrm)
 
template<>
void SaveXml (XclExpXmlStream &rStrm)
 
- Public Member Functions inherited from XclExpRecord
 XclExpRecord (sal_uInt16 nRecId=EXC_ID_UNKNOWN, std::size_t nRecSize=0)
 
 XclExpRecord (XclExpRecord const &)=default
 
virtual ~XclExpRecord () override
 
sal_uInt16 GetRecId () const
 Returns the current record ID. More...
 
std::size_t GetRecSize () const
 Returns the current record size prediction. More...
 
void SetRecId (sal_uInt16 nRecId)
 Sets a new record ID. More...
 
void SetRecSize (std::size_t nRecSize)
 Sets a new record size prediction. More...
 
void AddRecSize (std::size_t nRecSize)
 Adds a size value to the record size prediction. More...
 
void SetRecHeader (sal_uInt16 nRecId, std::size_t nRecSize)
 Sets record ID and size with one call. More...
 
virtual void Save (XclExpStream &rStrm) override
 Writes the record header and calls WriteBody(). More...
 
- Public Member Functions inherited from XclExpRecordBase
 XclExpRecordBase ()
 
 XclExpRecordBase (XclExpRecordBase const &)
 
 XclExpRecordBase (XclExpRecordBase &&)
 
XclExpRecordBaseoperator= (XclExpRecordBase const &)
 
XclExpRecordBaseoperator= (XclExpRecordBase &&) noexcept
 
virtual ~XclExpRecordBase ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

virtual void WriteBody (XclExpStream &rStrm) override
 Writes the body of the record. More...
 

Private Attributes

Type maValue
 
sal_Int32 mnAttribute
 The record data. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static voidoperator new (std::size_t nSize)
 
static voidoperator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

template<typename Type>
class XclExpValueRecord< Type >

A record with a single value of type Type.

Requires operator<<( XclExpStream&, const Type& ).

Definition at line 199 of file xerecord.hxx.

Constructor & Destructor Documentation

template<typename Type>
XclExpValueRecord< Type >::XclExpValueRecord ( sal_uInt16  nRecId,
const Type rValue,
std::size_t  nSize = sizeof( Type ) 
)
inlineexplicit
Parameters
nRecIdThe record ID of this record.
rValueThe value for the record body.
nSizeRecord size. Uses sizeof( Type ), if this parameter is omitted.

Definition at line 205 of file xerecord.hxx.

Member Function Documentation

template<typename Type>
const Type& XclExpValueRecord< Type >::GetValue ( ) const
inline
template<>
void XclExpValueRecord< double >::SaveXml ( XclExpXmlStream rStrm)
virtual

Reimplemented from XclExpRecordBase.

Definition at line 159 of file xerecord.cxx.

References maValue, and XclExpXmlStream::WriteAttributes().

template<typename Type >
void XclExpValueRecord< Type >::SaveXml ( XclExpXmlStream rStrm)
overridevirtual

Write the OOXML attribute and its value.

Reimplemented from XclExpRecordBase.

Definition at line 230 of file xerecord.hxx.

References maValue, and XclExpXmlStream::WriteAttributes().

template<>
void XclExpValueRecord< double >::SaveXml ( XclExpXmlStream rStrm)
virtual

Reimplemented from XclExpRecordBase.

template<typename Type >
XclExpValueRecord< Type > * XclExpValueRecord< Type >::SetAttribute ( sal_Int32  nId)

Sets the OOXML attribute this record corresponds to.

Definition at line 241 of file xerecord.hxx.

template<typename Type>
void XclExpValueRecord< Type >::SetValue ( const Type rValue)
inline

Sets a new record value.

Definition at line 211 of file xerecord.hxx.

References XclExpValueRecord< Type >::maValue.

Referenced by XclExpChPieFormat::Convert(), XclExpDefcolwidth::SetDefWidth(), and XclExpWsbool::XclExpWsbool().

template<typename Type>
virtual void XclExpValueRecord< Type >::WriteBody ( XclExpStream rStrm)
inlineoverrideprivatevirtual

Writes the body of the record.

Reimplemented from XclExpRecord.

Reimplemented in XclExpInterfaceHdr.

Definition at line 221 of file xerecord.hxx.

References XclExpValueRecord< Type >::maValue.

Member Data Documentation

template<typename Type>
Type XclExpValueRecord< Type >::maValue
private
template<typename Type>
sal_Int32 XclExpValueRecord< Type >::mnAttribute
private

The record data.

Definition at line 226 of file xerecord.hxx.


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