Buffer Interface
Public Member Functions | List of all members
BFGTLUtilities::PRIVATE_IMP::ValueNodeBase Struct Reference

#include <BFGTLUtilities.hpp>

Inheritance diagram for BFGTLUtilities::PRIVATE_IMP::ValueNodeBase:
BFGTLUtilities::BaseNode BFGTLUtilities::PRIVATE_IMP::BooleanNodeBase BFGTLUtilities::PRIVATE_IMP::CategoryNodeBase BFGTLUtilities::PRIVATE_IMP::CommandNodeBase BFGTLUtilities::PRIVATE_IMP::EnumEntryNodeBase BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase BFGTLUtilities::PRIVATE_IMP::FloatNodeBase BFGTLUtilities::PRIVATE_IMP::IntegerNodeBase BFGTLUtilities::PRIVATE_IMP::RegisterNodeBase BFGTLUtilities::PRIVATE_IMP::StringNodeBase BFGTLUtilities::ValueNode

Public Member Functions

std::string toString (BFVOID) const
 
bool getToString (BFCHAR *const hBuf, BFSIZET *const pSize) const
 
BFVOID fromString (std::string const &strVal)
 
BFVOID fromString (const BFCHAR *const strVal)
 
- Public Member Functions inherited from BFGTLUtilities::BaseNode
 BaseNode (BFVOID)
 
 BaseNode (BaseNode const &to_alias)
 
 BaseNode (BaseNode &&to_take)
 
virtual ~BaseNode (BFVOID)
 
BaseNodeoperator= (BaseNode const &to_alias)
 
BaseNodeoperator= (BaseNode &&to_take)
 
bool isValid (BFVOID) const
 
 operator bool (BFVOID) const
 
bool isNull (BFVOID) const
 
bool operator! (BFVOID) const
 
bool operator== (BaseNode const &other) const
 
bool operator!= (BaseNode const &other) const
 
std::string name (BFVOID) const
 
bool getName (BFCHAR *const hBuf, BFSIZET *const pSize) const
 
std::string displayName (BFVOID) const
 
bool getDisplayName (BFCHAR *const hBuf, BFSIZET *const pSize) const
 
std::string toolTip (BFVOID) const
 
bool getToolTip (BFCHAR *const hBuf, BFSIZET *const pSize) const
 
std::string description (BFVOID) const
 
bool getDescription (BFCHAR *const hBuf, BFSIZET *const pSize) const
 
NodeType type (BFVOID) const
 
Access access (BFVOID) const
 
bool ignoreCache (BFVOID) const
 
BFVOID setIgnoreCache (const bool ignore)
 

Additional Inherited Members

- Static Public Attributes inherited from BFGTLUtilities::BaseNode
static const NodeType Type = NodeType::Base
 
- Protected Member Functions inherited from BFGTLUtilities::BaseNode
virtual void copy (BaseNode const &to_alias)
 
virtual void copy (BaseNode &&to_take)
 
- Protected Attributes inherited from BFGTLUtilities::BaseNode
PrivateData * m_pd
 

Member Function Documentation

BFVOID PRIVATE_IMP::ValueNodeBase::fromString ( std::string const &  strVal)

Set the node value as a string.

Exceptions
BFCiException- Thrown if the node value cannot be set from the given string.

References BFCiException::check().

730 {
731  BFCiException::check((*m_pd)->m_hBoard, BFGTLNodeWrite(*m_pd->m_nodePtr, BFGTL_NODE_VALUE_STR, strVal.c_str(), strVal.length()) );
732 }
PrivateData * m_pd
Definition: BFGTLUtilities.hpp:304
static void check(Bd hBoard, const BFU32 error)
Definition: BFException.cpp:212
BFVOID PRIVATE_IMP::ValueNodeBase::fromString ( const BFCHAR *const  strVal)

Set the node value as a string.

Exceptions
BFCiException- Thrown if the node value cannot be set from the given string.
740 {
741  const std::string cppStrVal (strVal);
742  fromString(cppStrVal);
743 }
BFVOID fromString(std::string const &strVal)
Definition: BFGTLUtilities.cpp:729
bool PRIVATE_IMP::ValueNodeBase::getToString ( BFCHAR *const  hBuf,
BFSIZET *const  pSize 
) const

Get the node value as a string.

Parameters
[out]hBuf- The string buffer pointer, filled with as much data as is possible. May be nullptr.
[in,out]pSize- As input, the size of hBuf. As output, the buffer size requried.
Returns
True on success, false otherwise.
Exceptions
BFCiException- Thrown if the node name cannot be retrieved.
720 {
721  return BufInHelpers::set_str(toString(), hBuf, pSize);
722 }
std::string toString(BFVOID) const
Definition: BFGTLUtilities.cpp:697
std::string PRIVATE_IMP::ValueNodeBase::toString ( BFVOID  ) const

Get the node value as a string.

Returns
A string representation of the node value.
Exceptions
BFCiException- Thrown if the node value string cannot be determined.

References BFCiException::check(), and BFGTLUtilities::BaseNode::m_pd.

698 {
699  size_t iSize;
700  BFCiException::check((*m_pd)->m_hBoard, BFGTLNodeRead(*m_pd->m_nodePtr, BFGTL_NODE_VALUE_STR, nullptr, &iSize) );
701 
702  std::vector<char> cData (iSize);
703  BFCiException::check((*m_pd)->m_hBoard, BFGTLNodeRead(*m_pd->m_nodePtr, BFGTL_NODE_VALUE_STR, cData.data(), &iSize) );
704  cData.back() = 0;
705 
706  return cData.data();
707 }
PrivateData * m_pd
Definition: BFGTLUtilities.hpp:304
static void check(Bd hBoard, const BFU32 error)
Definition: BFException.cpp:212

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