mrfioc2  2.3.0
Classes | Typedefs | Functions
object.cpp File Reference
#include <sstream>
#include <iostream>
#include <errlog.h>
#include <epicsMutex.h>
#include <epicsGuard.h>
#include <epicsExport.h>
#include "mrf/object.h"
#include <iocsh.h>
Include dependency graph for object.cpp:

Go to the source code of this file.

Classes

struct  propArgs
 

Typedefs

typedef std::map< const std::string, Object * > objects_t
 
typedef std::map< const std::string, Object::create_factory_t > factories_t
 

Functions

void dol (int lvl, const char *obj)
 
void dor (int lvl, const char *obj)
 
 epicsExportRegistrar (objectsreg)
 

Typedef Documentation

◆ factories_t

typedef std::map<const std::string, Object::create_factory_t> factories_t

Definition at line 14 of file object.cpp.

◆ objects_t

typedef std::map<const std::string, Object*> objects_t

Definition at line 12 of file object.cpp.

Function Documentation

◆ dol()

void dol ( int  lvl,
const char *  obj 
)

Definition at line 199 of file object.cpp.

200 {
201 try{
202  initObjectsOnce();
203  epicsGuard<epicsMutex> g(*objectsLock);
204 
205  std::cout <<objects->size() <<" Device Objects\n";
206 
207  if(!obj) {
208  for(objects_t::const_iterator it=objects->begin();
209  it!=objects->end(); ++it)
210  {
211  if(it->second->parent())
212  continue;
213  showObject(std::cout, *it->second, "", 0, lvl+1, false);
214  }
215 
216  } else {
217  objects_t::const_iterator it=objects->find(obj);
218  if(it==objects->end()) {
219  std::cout<<"Object '"<<obj<<"' does not exist\n";
220  return;
221  }
222  showObject(std::cout, *it->second, "", 0, lvl+1, false);
223  }
224 }catch(std::exception& e){
225  epicsPrintf("Error: %s\n", e.what());
226 }
227 }

◆ dor()

void dor ( int  lvl,
const char *  obj 
)

Definition at line 230 of file object.cpp.

231 {
232 try{
233  initObjectsOnce();
234  epicsGuard<epicsMutex> g(*objectsLock);
235 
236  std::cout <<objects->size() <<" Device Objects\n";
237 
238  if(!obj) {
239  for(objects_t::const_iterator it=objects->begin();
240  it!=objects->end(); ++it)
241  {
242  if(it->second->parent())
243  continue;
244  showObject(std::cout, *it->second, "", 0, lvl+1, true);
245  }
246 
247  } else {
248  objects_t::const_iterator it=objects->find(obj);
249  if(it==objects->end()) {
250  std::cout<<"Object '"<<obj<<"' does not exist\n";
251  return;
252  }
253  showObject(std::cout, *it->second, "", 0, lvl+1, true);
254  }
255 }catch(std::exception& e){
256  epicsPrintf("Error: %s\n", e.what());
257 }
258 }

◆ epicsExportRegistrar()

epicsExportRegistrar ( objectsreg  )