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

#include <BFGTLUtilities.hpp>

Inheritance diagram for BFGTLUtilities::PRIVATE_IMP::StringNodeBase:
BFGTLUtilities::PRIVATE_IMP::ValueNodeBase BFGTLUtilities::BaseNode BFGTLUtilities::StringNode

Public Types

typedef std::string Value
 

Public Member Functions

Value value (BFVOID) const
 
bool getValue (BFCHAR *const hBuf, BFSIZET *const pSize) const
 
BFS64 max_length (BFVOID) const
 
BFVOID setValue (Value const &val)
 
BFVOID setValue (const BFCHAR *const val)
 
- Public Member Functions inherited from BFGTLUtilities::PRIVATE_IMP::ValueNodeBase
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 Typedef Documentation

Member Function Documentation

bool PRIVATE_IMP::StringNodeBase::getValue ( BFCHAR *const  hBuf,
BFSIZET *const  pSize 
) const

Get the string node value.

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 value cannot be retrieved.
977 {
978  return BufInHelpers::set_str(value(), hBuf, pSize);
979 }
Value value(BFVOID) const
Definition: BFGTLUtilities.cpp:955
BFS64 PRIVATE_IMP::StringNodeBase::max_length ( BFVOID  ) const

Get the maximum string length in characters that this string node may represent.

Returns
The maximum string length in characters that this string node may represent.
Exceptions
BFCiException- Thrown if the node's max_length value couldn't be retrieved.

References BFCiException::check().

989 {
990  BFS64 iVal;
991  size_t iSize = sizeof(iVal);
992  BFCiException::check((*m_pd)->m_hBoard, BFGTLNodeRead(*m_pd->m_nodePtr, BFGTL_NODE_MAX_LENGTH, &iVal, &iSize) );
993  return iVal;
994 }
PrivateData * m_pd
Definition: BFGTLUtilities.hpp:304
static void check(Bd hBoard, const BFU32 error)
Definition: BFException.cpp:212
long long BFS64
Definition: BFTypeNT.h:54
BFVOID PRIVATE_IMP::StringNodeBase::setValue ( Value const &  val)

Set the value of the string node. The input string value length in characters may not exceed max_length.

Exceptions
BFCiException- Thrown if the node's value couldn't be set.

References BFCiException::check().

1003 {
1004  BFCiException::check((*m_pd)->m_hBoard, BFGTLNodeWrite(*m_pd->m_nodePtr, BFGTL_NODE_VALUE, val.c_str(), val.length()) );
1005 }
PrivateData * m_pd
Definition: BFGTLUtilities.hpp:304
static void check(Bd hBoard, const BFU32 error)
Definition: BFException.cpp:212
BFVOID PRIVATE_IMP::StringNodeBase::setValue ( const BFCHAR *const  val)

Set the value of the string node. The input string value length in characters may not exceed max_length.

Exceptions
BFCiException- Thrown if the node's value couldn't be set.
1014 {
1015  const std::string cppVal (val);
1016  setValue(cppVal);
1017 }
BFVOID setValue(Value const &val)
Definition: BFGTLUtilities.cpp:1002
PRIVATE_IMP::StringNodeBase::Value PRIVATE_IMP::StringNodeBase::value ( BFVOID  ) const

Get the string node value.

Returns
The string value of the node.
Exceptions
BFCiException- Thrown if the node value cannot be read.

References BFCiException::check().

956 {
957  size_t iSize;
958  BFCiException::check((*m_pd)->m_hBoard, BFGTLNodeRead(*m_pd->m_nodePtr, BFGTL_NODE_VALUE, nullptr, &iSize) );
959 
960  std::vector<char> iVal (iSize);
961  BFCiException::check((*m_pd)->m_hBoard, BFGTLNodeRead(*m_pd->m_nodePtr, BFGTL_NODE_VALUE, iVal.data(), &iSize) );
962 
963  return iVal.data();
964 }
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: