91 void CheckTerminated();
108 return CreateNode(
NodeAttr(name_,nodetype_));
120 template<
typename Function>
121 Key_t CreateFunctionNode(
const std::string &nodename, Function func);
122 template<
typename Function,
typename Argument1>
123 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1);
124 template<
typename Function,
typename Argument1,
typename Argument2>
125 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2);
126 template<
typename Function,
typename Argument1,
typename Argument2,
typename Argument3>
127 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2, Argument3 arg3);
128 template<
typename Function,
typename Argument1,
typename Argument2,
typename Argument3,
typename Argument4>
129 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2, Argument3 arg3, Argument4 arg4);
130 template<
typename Function,
typename Argument1,
typename Argument2,
typename Argument3,
typename Argument4,
typename Argument5>
131 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2, Argument3 arg3, Argument4 arg4, Argument5 arg5);
132 template<
typename Function,
typename Argument1,
typename Argument2,
typename Argument3,
typename Argument4,
typename Argument5,
typename Argument6>
133 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2, Argument3 arg3, Argument4 arg4, Argument5 arg5, Argument6 arg6);
134 template<
typename Function,
typename Argument1,
typename Argument2,
typename Argument3,
typename Argument4,
typename Argument5,
typename Argument6,
typename Argument7>
135 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2, Argument3 arg3, Argument4 arg4, Argument5 arg5, Argument6 arg6, Argument7 arg7);
136 template<
typename Function,
typename Argument1,
typename Argument2,
typename Argument3,
typename Argument4,
typename Argument5,
typename Argument6,
typename Argument7,
typename Argument8>
137 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2, Argument3 arg3, Argument4 arg4, Argument5 arg5, Argument6 arg6, Argument7 arg7, Argument8 arg8);
138 template<
typename Function,
typename Argument1,
typename Argument2,
typename Argument3,
typename Argument4,
typename Argument5,
typename Argument6,
typename Argument7,
typename Argument8,
typename Argument9>
139 Key_t CreateFunctionNode(
const std::string &nodename, Function func, Argument1 arg1, Argument2 arg2, Argument3 arg3, Argument4 arg4, Argument5 arg5, Argument6 arg6, Argument7 arg7, Argument8 arg8, Argument9 arg9);
161 void CreateExternalReader(
const std::string &name);
163 void CreateExternalWriter(
const std::string &name);
170 shared_ptr<QueueWriter> GetExternalOQueue(
const std::string &name);
177 shared_ptr<QueueReader> GetExternalIQueue(
const std::string &name);
185 void DestroyExternalEndpoint(
const std::string &name);
193 void WaitForNode(
const std::string &nodename);
196 void WaitForAllNodes();
200 void WaitForNodeStart(
const std::string &nodename);
219 const std::string
GetName()
const {
return kernelname; }
232 void NodeTerminated(
Key_t key);
239 void NotifyTerminate();
243 void RemoteCreateNode(
NodeAttr attr);
254 void LoadSharedLib(
const std::string &libname) { nodeloader.LoadSharedLib(libname); }
258 void LoadNodeList(
const std::string &filename) { nodeloader.LoadNodeList(filename); }
262 void SearchDirectory(
const std::string &dirname) { nodeloader.SearchDirectory(dirname); }
300 bool GrowQueueMaxThreshold();
301 bool GrowQueueMaxThreshold(
bool grow);
307 bool SwallowBrokenQueueExceptions();
308 bool SwallowBrokenQueueExceptions(
bool sbqe);
318 return context->CalculateGrowSize(currentsize, request);
326 void CreateExternalEndpoint(
const std::string &name,
bool iswriter);
331 void InternalCreateNode(
NodeAttr &nodeattr);
355 typedef std::map<Key_t, shared_ptr<PseudoNode> >
NodeMap;
356 typedef std::vector< shared_ptr<PseudoNode> >
NodeList;
373 #include <cpn/bits/FunctionNode.h>
Logger object that is used for forwarding log messages.
unsigned CalculateGrowSize(unsigned currentsize, unsigned request)
Calculate the new queue size when a queue needs to grow.
shared_ptr< Context > GetContext() const
shared_ptr< Context > context
std::vector< shared_ptr< PseudoNode > > NodeList
Sync::ReentrantLock garbagelock
The attribute for the Kernel.
void LoadNodeList(const std::string &filename)
const std::string kernelname
void SearchDirectory(const std::string &dirname)
Sync::StatusHandler< KernelStatus_t > status
Definition of the queue attributes.
Definition for node attributes.
The Context abstract data type.
auto_ptr< ConnectionServer > server
Declaration and implementation for the StatusHandler.
void RegisterNodeFactory(shared_ptr< NodeFactory > factory)
A function that lets others register node factories.
Abstract base class for logger outputers. Any object who wishes to be a place for logging messages to...
A very simple logging interface.
Key_t CreateNode(const std::string &name_, const std::string &nodetype_)
Same as CreateNode that takes a NodeAttr except only the required parameters are set.
std::map< Key_t, shared_ptr< PseudoNode > > NodeMap
Definition of the kernel attributes.
auto_ptr< Pthread > thread
Sync::ReentrantCondition nodecond
auto_ptr< RemoteQueueHolder > remotequeueholder
LoggerOutput * GetLogger()
Works just like a pthread condition but works with the ReentrantLock.
void LoadSharedLib(const std::string &libname)
Attempts to load the given dynamic library and make the symbols inside available to be searched for n...
The attributes for a queue.
Sync::ReentrantLock datalock
Sync::ReentrantLock nodelock
The node factory provides a method for the kernel to create arbitrary user defined Nodes...
NodeFactory * GetNodeFactory(const std::string &nodetype)
Return a pointer to the node factory that produces the given node type. May load a shared library to ...
This is a simplified internal representation of the queue attributes needed to create a queue...
const std::string GetName() const
A reentrant lock implementation.