LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
logicalaccess::NdefRecord Class Reference

#include <ndefrecord.hpp>

Inheritance diagram for logicalaccess::NdefRecord:
logicalaccess::XmlSerializable logicalaccess::TextRecord logicalaccess::UriRecord

Public Member Functions

 NdefRecord ()
 
virtual ~NdefRecord ()
 
size_t getEncodedSize () const
 
ByteVector encode (bool firstRecord, bool lastRecord)
 
virtual void init (TNF tnf, ByteVector type, ByteVector id, ByteVector payload)
 
void setTnf (TNF tnf)
 
TNF getTnf () const
 
void setType (ByteVector type)
 
ByteVectorgetType ()
 
void setPayload (ByteVector payload)
 
ByteVectorgetPayload ()
 
void setId (ByteVector id)
 
ByteVectorgetId ()
 
void serialize (boost::property_tree::ptree &parentNode) override
 Serialize object to Xml Node.
 
void unSerialize (boost::property_tree::ptree &node) override
 UnSerialize object from a Xml Node.
 
std::string getDefaultXmlNodeName () const override
 Get the default Xml Node name for this object.
 
- Public Member Functions inherited from logicalaccess::XmlSerializable
virtual ~XmlSerializable ()=default
 
virtual std::string serialize ()
 Serialize object to Xml Node string.
 
virtual std::string serializeWithHeaders ()
 Serialize object to Xml Node string, with xml headers.
 
virtual void serialize (boost::property_tree::ptree &parentNode)=0
 Serialize object to Xml Node.
 
virtual void serializeToFile (const std::string &filename)
 Serialize object to a Xml file.
 
virtual void unSerialize (boost::property_tree::ptree &node)=0
 UnSerialize object from a Xml Node.
 
virtual void unSerialize (const std::string &xmlstring, const std::string &rootNode)
 UnSerialize object from a Xml Node string.
 
virtual void unSerialize (std::istream &is, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
virtual void unSerialize (boost::property_tree::ptree &node, const std::string &rootNode)
 UnSerialize object from a Xml node.
 
virtual void unSerializeFromFile (const std::string &filename)
 UnSerialize object from a Xml file.
 
virtual std::string getDefaultXmlNodeName () const =0
 Get the default Xml Node name for this object.
 

Protected Member Functions

unsigned char getTnfByte (bool firstRecord, bool lastRecord) const
 

Protected Attributes

TNF m_tnf
 
ByteVector m_type
 
ByteVector m_payload
 
ByteVector m_id
 

Additional Inherited Members

- Static Public Member Functions inherited from logicalaccess::XmlSerializable
static std::string removeXmlDeclaration (const std::string &xmlstring)
 Remove Xml declaration from a xml string.
 
static ByteVector formatHexString (std::string hexstr)
 Format hex string to hex string with space.
 
- Static Protected Member Functions inherited from logicalaccess::XmlSerializable
static unsigned long long atoull (const std::string &str)
 

Constructor & Destructor Documentation

◆ NdefRecord()

logicalaccess::NdefRecord::NdefRecord ( )
inline

◆ ~NdefRecord()

virtual logicalaccess::NdefRecord::~NdefRecord ( )
inlinevirtual

Member Function Documentation

◆ encode()

ByteVector logicalaccess::NdefRecord::encode ( bool  firstRecord,
bool  lastRecord 
)

◆ getDefaultXmlNodeName()

std::string logicalaccess::NdefRecord::getDefaultXmlNodeName ( ) const
inlineoverridevirtual

Get the default Xml Node name for this object.

Returns
The Xml node name.

Implements logicalaccess::XmlSerializable.

◆ getEncodedSize()

size_t logicalaccess::NdefRecord::getEncodedSize ( ) const

◆ getId()

ByteVector & logicalaccess::NdefRecord::getId ( )
inline

◆ getPayload()

ByteVector & logicalaccess::NdefRecord::getPayload ( )
inline

◆ getTnf()

TNF logicalaccess::NdefRecord::getTnf ( ) const
inline

◆ getTnfByte()

unsigned char logicalaccess::NdefRecord::getTnfByte ( bool  firstRecord,
bool  lastRecord 
) const
protected

◆ getType()

ByteVector & logicalaccess::NdefRecord::getType ( )
inline

◆ init()

void logicalaccess::NdefRecord::init ( TNF  tnf,
ByteVector  type,
ByteVector  id,
ByteVector  payload 
)
virtual

◆ serialize()

void logicalaccess::NdefRecord::serialize ( boost::property_tree::ptree &  parentNode)
overridevirtual

Serialize object to Xml Node.

Parameters
osThe XML stream.

Implements logicalaccess::XmlSerializable.

◆ setId()

void logicalaccess::NdefRecord::setId ( ByteVector  id)
inline

◆ setPayload()

void logicalaccess::NdefRecord::setPayload ( ByteVector  payload)
inline

◆ setTnf()

void logicalaccess::NdefRecord::setTnf ( TNF  tnf)
inline

◆ setType()

void logicalaccess::NdefRecord::setType ( ByteVector  type)
inline

◆ unSerialize()

void logicalaccess::NdefRecord::unSerialize ( boost::property_tree::ptree &  node)
overridevirtual

UnSerialize object from a Xml Node.

Parameters
nodeThe Xml node.

Implements logicalaccess::XmlSerializable.

Member Data Documentation

◆ m_id

ByteVector logicalaccess::NdefRecord::m_id
protected

◆ m_payload

ByteVector logicalaccess::NdefRecord::m_payload
protected

◆ m_tnf

TNF logicalaccess::NdefRecord::m_tnf
protected

◆ m_type

ByteVector logicalaccess::NdefRecord::m_type
protected

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