Web Analytics Made Easy - Statcounter
Skip to content

Class SBDAssistantAnswer#

ClassList > SBDAssistantAnswer

This class is the base class for assistant answers. More...

  • #include <SBDAssistantAnswer.hpp>

Inherits the following classes: SBCReferenceTarget

Public Types#

Type Name
enum Status
The answer status.

Public Functions#

Type Name
SBDAssistantAnswer ()
Constructs an assistant answer.
SBDAssistantAnswer (const std::wstring & answer, Status status=Status::Success)
Constructs an assistant answer.
const std::wstring & getAnswer () const
Returns the answer.
const Status getStatus () const
Returns the status.
void setAnswer (const std::wstring & answer)
Sets the answer.
void setStatus (Status status)
Sets the status.
virtual ~SBDAssistantAnswer ()
Destructs the assistant answer.

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
Builds the reference target.
unsigned int getMemoryFootprint () const
Returns the memory footprint.
void printReferencesToOwners () const
Prints the references to the owners of this reference target.
virtual ~SBCReferenceTarget ()
Destructor.

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer
A pointer to the private data.

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
Protected constructor.
void removeAllReferenceOwners ()
Stops all the reference owners from referencing this reference target.

Detailed Description#

Short name: SBAssistantAnswer

Public Types Documentation#

enum Status#

The answer status.

enum SBDAssistantAnswer::Status {
    Error = 0,
    Success = 1
};


Public Functions Documentation#

function SBDAssistantAnswer [1/2]#

Constructs an assistant answer.

SBDAssistantAnswer::SBDAssistantAnswer () 

Constructs a default assistant answer.

Initializes a new SBDAssistantAnswer object with default values.


function SBDAssistantAnswer [2/2]#

Constructs an assistant answer.

SBDAssistantAnswer::SBDAssistantAnswer (
    const std::wstring & answer,
    Status status=Status::Success
) 

Constructs an assistant answer with the specified answer and status.

Parameters:

  • answer The answer text.
  • status The status indicating success or error of the answer.

function getAnswer#

Returns the answer.

const std::wstring & SBDAssistantAnswer::getAnswer () const

Retrieves the answer text.

Returns:

A constant reference to the answer string.


function getStatus#

Returns the status.

const Status SBDAssistantAnswer::getStatus () const

Retrieves the status of the answer.

Returns:

The current status of the answer.


function setAnswer#

Sets the answer.

void SBDAssistantAnswer::setAnswer (
    const std::wstring & answer
) 

Sets the answer text.

Parameters:

  • answer The new answer string.

function setStatus#

Sets the status.

void SBDAssistantAnswer::setStatus (
    Status status
) 

Sets the status of the answer.

Parameters:

  • status The new status to set.

function ~SBDAssistantAnswer#

Destructs the assistant answer.

virtual SBDAssistantAnswer::~SBDAssistantAnswer () 

Destroys the assistant answer.

Releases resources associated with the SBDAssistantAnswer object.