pva2pva 1.4.2
Loading...
Searching...
No Matches
GroupConfig Struct Reference

Classes

struct  Field
struct  Group

Public Types

typedef std::map< std::string, Group > groups_t

Public Member Functions

void swap (GroupConfig &o)

Static Public Member Functions

static void parse (const char *txt, const char *recname, GroupConfig &result)

Public Attributes

groups_t groups
std::string warning

Detailed Description

Definition at line 20 of file pdbgroup.h.

Member Typedef Documentation

◆ groups_t

typedef std::map<std::string, Group> GroupConfig::groups_t

Definition at line 53 of file pdbgroup.h.

Member Function Documentation

◆ parse()

void GroupConfig::parse ( const char * txt,
const char * recname,
GroupConfig & result )
static

Definition at line 224 of file configparse.cpp.

227{
228#ifndef EPICS_YAJL_VERSION
229 yajl_parser_config conf;
230 memset(&conf, 0, sizeof(conf));
231 conf.allowComments = 1;
232 conf.checkUTF8 = 1;
233#endif
234
235 std::istringstream strm(txt);
236
237 std::string chanprefix;
238 if(recname) {
239 chanprefix = recname;
240 chanprefix += '.';
241 }
242 context ctxt(chanprefix, result);
243
244#ifndef EPICS_YAJL_VERSION
245 handler handle(yajl_alloc(&conf_cbs, &conf, NULL, &ctxt));
246#else
247 handler handle(yajl_alloc(&conf_cbs, NULL, &ctxt));
248
249 yajl_config(handle, yajl_allow_comments, 1);
250#endif
251
252 if(!pvd::yajl_parse_helper(strm, handle))
253 throw std::runtime_error(ctxt.msg);
254}

◆ swap()

void GroupConfig::swap ( GroupConfig & o)
inline

Definition at line 57 of file pdbgroup.h.

57 {
58 std::swap(groups, o.groups);
59 std::swap(warning, o.warning);
60 }

Member Data Documentation

◆ groups

groups_t GroupConfig::groups

Definition at line 54 of file pdbgroup.h.

◆ warning

std::string GroupConfig::warning

Definition at line 55 of file pdbgroup.h.


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