![]() |
appkit
1.5.1
RoadNarrows Robotics Application Kit
|
Command line interface data section class. More...
#include <CommandLine.h>
Public Types | |
| typedef void(* | DeallocFunc) (void *) |
Public Member Functions | |
| DataSect () | |
| Default constructor. | |
| DataSect (const std::string &ns, void *pData, DeallocFunc fn=NULL) | |
| Initialization constructor. More... | |
| ~DataSect () | |
| Destructor. | |
| void | set (const std::string &ns, void *pData, DeallocFunc fn=NULL) |
| const std::string & | ns () const |
| Return namespace. More... | |
| void * | data () |
| Return section data. More... | |
| const void * | data () const |
| Return section data. More... | |
| DeallocFunc | deallocator () |
| Return deallocator. More... | |
| const DeallocFunc | deallocator () const |
| Return deallocator. More... | |
Public Attributes | |
| std::string | m_strNs |
| data section namespace | |
| void * | m_pData |
| pointer to section data | |
| DeallocFunc | m_fnDealloc |
| data deallocator function | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const DataSect &obj) |
| Insert object into output stream. More... | |
Command line interface data section class.
The cli can support multiple data sections, each delineated by a unique namespace.
If a data deallocator function is specifed, the section data will be automatically deleted when the command line data section is is deleted.
Definition at line 315 of file CommandLine.h.
| typedef void(* rnr::cmd::DataSect::DeallocFunc) (void *) |
data section data deallocator function type.
Definition at line 319 of file CommandLine.h.
| rnr::cmd::DataSect::DataSect | ( | const std::string & | ns, |
| void * | pData, | ||
| DeallocFunc | fn = NULL |
||
| ) |
Initialization constructor.
| ns | ///< data section namespace |
| pData | ///< pointer to section data |
| fn | ///< data deallocator function |
|
inline |
|
inline |
|
inline |
Return deallocator.
Definition at line 381 of file CommandLine.h.
|
inline |
Return deallocator.
Definition at line 391 of file CommandLine.h.
References rnr::cmd::CmdExec::operator<<.
|
inline |
|
friend |
Insert object into output stream.
| os | Output stream. |
| obj | Object to insert. |