This is Unofficial EPICS BASE Doxygen Site
GroupConfig Struct Reference

#include "pdbgroup.h"

+ Collaboration diagram for GroupConfig:

Classes

struct  Field
 
struct  Group
 

Public Types

typedef std::map< std::string, Groupgroups_t
 

Public Member Functions

void swap (GroupConfig &o)
 

Static Public Member Functions

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

Public Attributes

groups_t groups
 
std::string warning
 

Detailed Description

Definition at line 22 of file pdbgroup.h.

Member Typedef Documentation

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

Definition at line 55 of file pdbgroup.h.

Member Function Documentation

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

Definition at line 219 of file configparse.cpp.

221 {
222 #ifndef EPICS_YAJL_VERSION
223  yajl_parser_config conf;
224  memset(&conf, 0, sizeof(conf));
225  conf.allowComments = 1;
226  conf.checkUTF8 = 1;
227 #endif
228 
229  std::istringstream strm(txt);
230 
231  context ctxt;
232 
233 #ifndef EPICS_YAJL_VERSION
234  handler handle(yajl_alloc(&conf_cbs, &conf, NULL, &ctxt));
235 #else
236  handler handle(yajl_alloc(&conf_cbs, NULL, &ctxt));
237 
238  yajl_config(handle, yajl_allow_comments, 1);
239 #endif
240 
241  if(!pvd::yajl_parse_helper(strm, handle))
242  throw std::runtime_error(ctxt.msg);
243 
244  ctxt.conf.swap(result);
245 }
int yajl_config(yajl_handle h, yajl_option opt,...)
Definition: yajl.c:85
#define NULL
Definition: catime.c:38
yajl_handle yajl_alloc(const yajl_callbacks *callbacks, yajl_alloc_funcs *afs, void *ctx)
Definition: yajl.c:46
bool yajl_parse_helper(std::istream &src, yajl_handle handle)
Definition: parsehelper.cpp:29
void GroupConfig::swap ( GroupConfig o)
inline

Definition at line 59 of file pdbgroup.h.

59  {
62  }
std::string warning
Definition: pdbgroup.h:57
groups_t groups
Definition: pdbgroup.h:56
void swap(shared_ptr< T > &a, shared_ptr< T > &b) BOOST_NOEXCEPT
Definition: shared_ptr.hpp:783

Member Data Documentation

groups_t GroupConfig::groups

Definition at line 56 of file pdbgroup.h.

std::string GroupConfig::warning

Definition at line 57 of file pdbgroup.h.


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