Exemplo n.º 1
0
   State &operator= (const State &Value) {

      cache = 0;

      if (Value.context && (Value.context != context)) {

         if (context) { context->unref (); context = 0; }

         context = Value.context;

         if (context) { context->ref (); }
      }

      dataTable.empty ();
      dataTable.copy (Value.dataTable);

      if (Value.stringTable) {

         if (!stringTable) { stringTable = new stringStruct; }
         if (stringTable) { *stringTable = *(Value.stringTable); }
      }
      else if (stringTable) { delete stringTable; stringTable = 0; }

      return *this;
   };
Exemplo n.º 2
0
   State (RuntimeContext *theContext, Log *theLog) :
         context (theContext),
         defs (0),
         log (theLog) {

      if (context) {

         context->ref ();
         defs = context->get_definitions_context ();
         if (defs) { defs->ref (); }
      }
   }
Exemplo n.º 3
0
   State (
         const String &TheName,
         const String &TheClassName,
         const String &TheFactoryName,
         const String &TheScopeName,
         const PluginDeleteModeEnum TheDeleteMode,
         RuntimeContext *theContext,
         DynamicLibrary *theLib) :
         _handlePtr (TheName ? 0 : new RuntimeHandle ("Plugin", theContext)),
         Name (TheName ? TheName : "Unnamed Component"),
         ClassName (TheClassName),
         FactoryName (TheFactoryName),
         ScopeName (TheScopeName),
         PluginHandle (_handlePtr ?
            _handlePtr->get_runtime_handle () :
            Definitions (theContext).create_named_handle (TheName)),
         deleteMode (TheDeleteMode),
         context (theContext),
         lib (theLib) {

      if (context) { context->ref (); }
   }
Exemplo n.º 4
0
 State (RuntimeContext *theContext) :
       context (theContext),
       cache (0),
       stringTable (0) { if (context) { context->ref (); } }