<commit_before>/* Copyright 2019 Stanford University, NVIDIA Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "mappers/null_mapper.h"

namespace Legion {
  namespace Mapping {

    Logger log_null("null_mapper");

    //--------------------------------------------------------------------------
    NullMapper::NullMapper(MapperRuntime *rt, Machine m)
      : Mapper(rt), machine(m)
    //--------------------------------------------------------------------------
    {
    }

    //--------------------------------------------------------------------------
    NullMapper::NullMapper(const NullMapper &rhs)
      : Mapper(rhs.runtime), machine(rhs.machine)
    //--------------------------------------------------------------------------
    {
      // should never be called
      assert(false);
    }

    //--------------------------------------------------------------------------
    NullMapper::~NullMapper(void)
    //--------------------------------------------------------------------------
    {
    }

    //--------------------------------------------------------------------------
    NullMapper& NullMapper::operator=(const NullMapper &rhs)
    //--------------------------------------------------------------------------
    {
      // should never be called
      assert(false);
      return *this;
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_unimplemented(const char *func_name,
                                          unsigned line) const
    //--------------------------------------------------------------------------
    {
      log_null.error("Unimplemented mapper method \"%s\" in mapper %s ",
         "on line %s of %s", func_name, get_mapper_name(), line, __FILE__);
      assert(false);
    }

    //--------------------------------------------------------------------------
    const char* NullMapper::get_mapper_name(void) const
    //--------------------------------------------------------------------------
    {
      // Do this one explicitly to avoid infinite recursion
      log_null.error("Unimplemented mapper method \"get_mapper_name\"");
      assert(false);
      return NULL;
    }

    //--------------------------------------------------------------------------
    Mapper::MapperSyncModel NullMapper::get_mapper_sync_model(void) const
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
      return SERIALIZED_REENTRANT_MAPPER_MODEL;
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_task_options(const MapperContext    ctx,
                                         const Task&            task,
                                               TaskOptions&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::premap_task(const MapperContext      ctx,
                                 const Task&              task,
                                 const PremapTaskInput&   input,
                                       PremapTaskOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::slice_task(const MapperContext      ctx,
                                const Task&              task,
                                const SliceTaskInput&    input,
                                      SliceTaskOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_task(const MapperContext      ctx,
                              const Task&              task,
                              const MapTaskInput&      input,
                                    MapTaskOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_task_variant(const MapperContext          ctx,
                                         const Task&                  task,
                                         const SelectVariantInput&    input,
                                               SelectVariantOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::postmap_task(const MapperContext      ctx,
                                  const Task&              task,
                                  const PostMapInput&      input,
                                        PostMapOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_task_sources(const MapperContext        ctx,
                                         const Task&                task,
                                         const SelectTaskSrcInput&  input,
                                               SelectTaskSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_task_temporary_instance(
                                    const MapperContext              ctx,
                                    const Task&                      task,
                                    const CreateTaskTemporaryInput&  input,
                                          CreateTaskTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext      ctx,
                               const Task&              task,
                                     SpeculativeOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext       ctx,
                                      const Task&               task,
                                      const TaskProfilingInfo&  input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_inline(const MapperContext        ctx,
                                const InlineMapping&       inline_op,
                                const MapInlineInput&      input,
                                      MapInlineOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_inline_sources(const MapperContext     ctx,
                                        const InlineMapping&         inline_op,
                                        const SelectInlineSrcInput&  input,
                                              SelectInlineSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_inline_temporary_instance(
                                  const MapperContext                ctx,
                                  const InlineMapping&               inline_op,
                                  const CreateInlineTemporaryInput&  input,
                                        CreateInlineTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext         ctx,
                                      const InlineMapping&        inline_op,
                                      const InlineProfilingInfo&  input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_copy(const MapperContext      ctx,
                              const Copy&              copy,
                              const MapCopyInput&      input,
                                    MapCopyOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_copy_sources(const MapperContext          ctx,
                                         const Copy&                  copy,
                                         const SelectCopySrcInput&    input,
                                               SelectCopySrcOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_copy_temporary_instance(
                                  const MapperContext              ctx,
                                  const Copy&                      copy,
                                  const CreateCopyTemporaryInput&  input,
                                        CreateCopyTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext      ctx,
                               const Copy&              copy,
                                     SpeculativeOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext      ctx,
                                      const Copy&              copy,
                                      const CopyProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_close(const MapperContext       ctx,
                               const Close&              close,
                               const MapCloseInput&      input,
                                     MapCloseOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_close_sources(const MapperContext        ctx,
                                          const Close&               close,
                                          const SelectCloseSrcInput&  input,
                                                SelectCloseSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_close_temporary_instance(
                                  const MapperContext               ctx,
                                  const Close&                      close,
                                  const CreateCloseTemporaryInput&  input,
                                        CreateCloseTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext       ctx,
                                      const Close&              close,
                                      const CloseProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_acquire(const MapperContext         ctx,
                                 const Acquire&              acquire,
                                 const MapAcquireInput&      input,
                                       MapAcquireOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext         ctx,
                               const Acquire&              acquire,
                                     SpeculativeOutput&    output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext         ctx,
                                      const Acquire&              acquire,
                                      const AcquireProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_release(const MapperContext         ctx,
                                 const Release&              release,
                                 const MapReleaseInput&      input,
                                       MapReleaseOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_release_sources(const MapperContext      ctx,
                                        const Release&                 release,
                                        const SelectReleaseSrcInput&   input,
                                              SelectReleaseSrcOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext         ctx,
                               const Release&              release,
                                     SpeculativeOutput&    output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_release_temporary_instance(
                                   const MapperContext                 ctx,
                                   const Release&                      release,
                                   const CreateReleaseTemporaryInput&  input,
                                         CreateReleaseTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext         ctx,
                                      const Release&              release,
                                      const ReleaseProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_partition_projection(const MapperContext  ctx,
                        const Partition&                          partition,
                        const SelectPartitionProjectionInput&     input,
                              SelectPartitionProjectionOutput&    output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_partition(const MapperContext        ctx,
                               const Partition&           partition,
                               const MapPartitionInput&   input,
                                     MapPartitionOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_partition_sources(
                                     const MapperContext             ctx,
                                     const Partition&                partition,
                                     const SelectPartitionSrcInput&  input,
                                           SelectPartitionSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_partition_temporary_instance(
                            const MapperContext                   ctx,
                            const Partition&                      partition,
                            const CreatePartitionTemporaryInput&  input,
                                  CreatePartitionTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext              ctx,
                                    const Partition&                 partition,
                                    const PartitionProfilingInfo&    input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::configure_context(const MapperContext         ctx,
                                       const Task&                 task,
                                             ContextConfigOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_tunable_value(const MapperContext         ctx,
                                          const Task&                 task,
                                          const SelectTunableInput&   input,
                                                SelectTunableOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_must_epoch(const MapperContext           ctx,
                                    const MapMustEpochInput&      input,
                                          MapMustEpochOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_dataflow_graph(const MapperContext           ctx,
                                        const MapDataflowGraphInput&  input,
                                              MapDataflowGraphOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::memoize_operation(const MapperContext  ctx,
                                       const Mappable&      mappable,
                                       const MemoizeInput&  input,
                                             MemoizeOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_tasks_to_map(const MapperContext          ctx,
                                         const SelectMappingInput&    input,
                                               SelectMappingOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_steal_targets(const MapperContext         ctx,
                                          const SelectStealingInput&  input,
                                                SelectStealingOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::permit_steal_request(const MapperContext         ctx,
                                          const StealRequestInput&    input,
                                                StealRequestOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::handle_message(const MapperContext           ctx,
                                    const MapperMessage&          message)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::handle_task_result(const MapperContext           ctx,
                                        const MapperTaskResult&       result)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

  }; // namespace Mapping
}; // namespace Legion

// EOF

<commit_msg>mappers: fix null mapper bug<commit_after>/* Copyright 2019 Stanford University, NVIDIA Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "mappers/null_mapper.h"

namespace Legion {
  namespace Mapping {

    Logger log_null("null_mapper");

    //--------------------------------------------------------------------------
    NullMapper::NullMapper(MapperRuntime *rt, Machine m)
      : Mapper(rt), machine(m)
    //--------------------------------------------------------------------------
    {
    }

    //--------------------------------------------------------------------------
    NullMapper::NullMapper(const NullMapper &rhs)
      : Mapper(rhs.runtime), machine(rhs.machine)
    //--------------------------------------------------------------------------
    {
      // should never be called
      assert(false);
    }

    //--------------------------------------------------------------------------
    NullMapper::~NullMapper(void)
    //--------------------------------------------------------------------------
    {
    }

    //--------------------------------------------------------------------------
    NullMapper& NullMapper::operator=(const NullMapper &rhs)
    //--------------------------------------------------------------------------
    {
      // should never be called
      assert(false);
      return *this;
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_unimplemented(const char *func_name,
                                          unsigned line) const
    //--------------------------------------------------------------------------
    {
      log_null.error("Unimplemented mapper method \"%s\" in mapper %s "
         "on line %d of %s", func_name, get_mapper_name(), line, __FILE__);
      assert(false);
    }

    //--------------------------------------------------------------------------
    const char* NullMapper::get_mapper_name(void) const
    //--------------------------------------------------------------------------
    {
      // Do this one explicitly to avoid infinite recursion
      log_null.error("Unimplemented mapper method \"get_mapper_name\"");
      assert(false);
      return NULL;
    }

    //--------------------------------------------------------------------------
    Mapper::MapperSyncModel NullMapper::get_mapper_sync_model(void) const
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
      return SERIALIZED_REENTRANT_MAPPER_MODEL;
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_task_options(const MapperContext    ctx,
                                         const Task&            task,
                                               TaskOptions&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::premap_task(const MapperContext      ctx,
                                 const Task&              task,
                                 const PremapTaskInput&   input,
                                       PremapTaskOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::slice_task(const MapperContext      ctx,
                                const Task&              task,
                                const SliceTaskInput&    input,
                                      SliceTaskOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_task(const MapperContext      ctx,
                              const Task&              task,
                              const MapTaskInput&      input,
                                    MapTaskOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_task_variant(const MapperContext          ctx,
                                         const Task&                  task,
                                         const SelectVariantInput&    input,
                                               SelectVariantOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::postmap_task(const MapperContext      ctx,
                                  const Task&              task,
                                  const PostMapInput&      input,
                                        PostMapOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_task_sources(const MapperContext        ctx,
                                         const Task&                task,
                                         const SelectTaskSrcInput&  input,
                                               SelectTaskSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_task_temporary_instance(
                                    const MapperContext              ctx,
                                    const Task&                      task,
                                    const CreateTaskTemporaryInput&  input,
                                          CreateTaskTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext      ctx,
                               const Task&              task,
                                     SpeculativeOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext       ctx,
                                      const Task&               task,
                                      const TaskProfilingInfo&  input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_inline(const MapperContext        ctx,
                                const InlineMapping&       inline_op,
                                const MapInlineInput&      input,
                                      MapInlineOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_inline_sources(const MapperContext     ctx,
                                        const InlineMapping&         inline_op,
                                        const SelectInlineSrcInput&  input,
                                              SelectInlineSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_inline_temporary_instance(
                                  const MapperContext                ctx,
                                  const InlineMapping&               inline_op,
                                  const CreateInlineTemporaryInput&  input,
                                        CreateInlineTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext         ctx,
                                      const InlineMapping&        inline_op,
                                      const InlineProfilingInfo&  input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_copy(const MapperContext      ctx,
                              const Copy&              copy,
                              const MapCopyInput&      input,
                                    MapCopyOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_copy_sources(const MapperContext          ctx,
                                         const Copy&                  copy,
                                         const SelectCopySrcInput&    input,
                                               SelectCopySrcOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_copy_temporary_instance(
                                  const MapperContext              ctx,
                                  const Copy&                      copy,
                                  const CreateCopyTemporaryInput&  input,
                                        CreateCopyTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext      ctx,
                               const Copy&              copy,
                                     SpeculativeOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext      ctx,
                                      const Copy&              copy,
                                      const CopyProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_close(const MapperContext       ctx,
                               const Close&              close,
                               const MapCloseInput&      input,
                                     MapCloseOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_close_sources(const MapperContext        ctx,
                                          const Close&               close,
                                          const SelectCloseSrcInput&  input,
                                                SelectCloseSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_close_temporary_instance(
                                  const MapperContext               ctx,
                                  const Close&                      close,
                                  const CreateCloseTemporaryInput&  input,
                                        CreateCloseTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext       ctx,
                                      const Close&              close,
                                      const CloseProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_acquire(const MapperContext         ctx,
                                 const Acquire&              acquire,
                                 const MapAcquireInput&      input,
                                       MapAcquireOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext         ctx,
                               const Acquire&              acquire,
                                     SpeculativeOutput&    output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext         ctx,
                                      const Acquire&              acquire,
                                      const AcquireProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_release(const MapperContext         ctx,
                                 const Release&              release,
                                 const MapReleaseInput&      input,
                                       MapReleaseOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_release_sources(const MapperContext      ctx,
                                        const Release&                 release,
                                        const SelectReleaseSrcInput&   input,
                                              SelectReleaseSrcOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::speculate(const MapperContext         ctx,
                               const Release&              release,
                                     SpeculativeOutput&    output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_release_temporary_instance(
                                   const MapperContext                 ctx,
                                   const Release&                      release,
                                   const CreateReleaseTemporaryInput&  input,
                                         CreateReleaseTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext         ctx,
                                      const Release&              release,
                                      const ReleaseProfilingInfo& input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_partition_projection(const MapperContext  ctx,
                        const Partition&                          partition,
                        const SelectPartitionProjectionInput&     input,
                              SelectPartitionProjectionOutput&    output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_partition(const MapperContext        ctx,
                               const Partition&           partition,
                               const MapPartitionInput&   input,
                                     MapPartitionOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_partition_sources(
                                     const MapperContext             ctx,
                                     const Partition&                partition,
                                     const SelectPartitionSrcInput&  input,
                                           SelectPartitionSrcOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::create_partition_temporary_instance(
                            const MapperContext                   ctx,
                            const Partition&                      partition,
                            const CreatePartitionTemporaryInput&  input,
                                  CreatePartitionTemporaryOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::report_profiling(const MapperContext              ctx,
                                    const Partition&                 partition,
                                    const PartitionProfilingInfo&    input)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::configure_context(const MapperContext         ctx,
                                       const Task&                 task,
                                             ContextConfigOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_tunable_value(const MapperContext         ctx,
                                          const Task&                 task,
                                          const SelectTunableInput&   input,
                                                SelectTunableOutput&  output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_must_epoch(const MapperContext           ctx,
                                    const MapMustEpochInput&      input,
                                          MapMustEpochOutput&     output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::map_dataflow_graph(const MapperContext           ctx,
                                        const MapDataflowGraphInput&  input,
                                              MapDataflowGraphOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::memoize_operation(const MapperContext  ctx,
                                       const Mappable&      mappable,
                                       const MemoizeInput&  input,
                                             MemoizeOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_tasks_to_map(const MapperContext          ctx,
                                         const SelectMappingInput&    input,
                                               SelectMappingOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::select_steal_targets(const MapperContext         ctx,
                                          const SelectStealingInput&  input,
                                                SelectStealingOutput& output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::permit_steal_request(const MapperContext         ctx,
                                          const StealRequestInput&    input,
                                                StealRequestOutput&   output)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::handle_message(const MapperContext           ctx,
                                    const MapperMessage&          message)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

    //--------------------------------------------------------------------------
    void NullMapper::handle_task_result(const MapperContext           ctx,
                                        const MapperTaskResult&       result)
    //--------------------------------------------------------------------------
    {
      report_unimplemented(__func__, __LINE__);
    }

  }; // namespace Mapping
}; // namespace Legion

// EOF

<|endoftext|>


<commit_before>/*************************************************************************
 *
 *  $RCSfile: linguprops.hxx,v $
 *
 *  $Revision: 1.1 $
 *
 *  last change: $Author: tl $ $Date: 2001-02-02 10:54:29 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://www.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/

#ifndef _SVTOOLS_LINGUPROPS_HXX_
#define _SVTOOLS_LINGUPROPS_HXX_

// UNO property names for general options
#define UPN_IS_GERMAN_PRE_REFORM            "IsGermanPreReform"
#define UPN_IS_USE_DICTIONARY_LIST          "IsUseDictionaryList"
#define UPN_IS_IGNORE_CONTROL_CHARACTERS    "IsIgnoreControlCharacters"

// UNO property names for SpellChecker
#define UPN_IS_SPELL_UPPER_CASE             "IsSpellUpperCase"
#define UPN_IS_SPELL_WITH_DIGITS            "IsSpellWithDigits"
#define UPN_IS_SPELL_CAPITALIZATION         "IsSpellCapitalization"

// UNO property names for Hyphenator
#define UPN_HYPH_MIN_LEADING                "HyphMinLeading"
#define UPN_HYPH_MIN_TRAILING               "HyphMinTrailing"
#define UPN_HYPH_MIN_WORD_LENGTH            "HyphMinWordLength"

// UNO property names for OtherLingu (foreign Linguistik)
#define UPN_IS_STANDARD_HYPHENATOR          "IsStandardHyphenator"
#define UPN_IS_STANDARD_SPELL_CHECKER       "IsStandardSpellChecker"
#define UPN_IS_STANDARD_THESAURUS           "IsStandardThesaurus"
#define UPN_OTHER_LINGU_INDEX               "OtherLinguIndex"

// UNO property names for Lingu
// (those not covered by the SpellChecker, Hyphenator and OtherLingu
// properties and more likely to be used in other modules only)
#define UPN_DEFAULT_LANGUAGE                "DefaultLanguage"
#define UPN_DEFAULT_LOCALE                  "DefaultLocale"
#define UPN_DEFAULT_LOCALE_CJK              "DefaultLocale_CJK"
#define UPN_DEFAULT_LOCALE_CTL              "DefaultLocale_CTL"
#define UPN_IS_HYPH_AUTO                    "IsHyphAuto"
#define UPN_IS_HYPH_SPECIAL                 "IsHyphSpecial"
#define UPN_IS_SPELL_AUTO                   "IsSpellAuto"
#define UPN_IS_SPELL_HIDE                   "IsSpellHide"
#define UPN_IS_SPELL_IN_ALL_LANGUAGES       "IsSpellInAllLanguages"
#define UPN_IS_SPELL_SPECIAL                "IsSpellSpecial"
#define UPN_IS_WRAP_REVERSE                 "IsWrapReverse"

// uno property handles
#define UPH_IS_GERMAN_PRE_REFORM             0
#define UPH_IS_USE_DICTIONARY_LIST           1
#define UPH_IS_IGNORE_CONTROL_CHARACTERS     2
#define UPH_IS_SPELL_UPPER_CASE              3
#define UPH_IS_SPELL_WITH_DIGITS             4
#define UPH_IS_SPELL_CAPITALIZATION          5
#define UPH_HYPH_MIN_LEADING                 6
#define UPH_HYPH_MIN_TRAILING                7
#define UPH_HYPH_MIN_WORD_LENGTH             8
#define UPH_DEFAULT_LOCALE                   9
#define UPH_IS_SPELL_AUTO                   10
#define UPH_IS_SPELL_HIDE                   11
#define UPH_IS_SPELL_IN_ALL_LANGUAGES       12
#define UPH_IS_SPELL_SPECIAL                13
#define UPH_IS_HYPH_AUTO                    14
#define UPH_IS_HYPH_SPECIAL                 15
#define UPH_IS_WRAP_REVERSE                 16
#define UPH_IS_STANDARD_HYPHENATOR          17
#define UPH_IS_STANDARD_SPELL_CHECKER       18
#define UPH_IS_STANDARD_THESAURUS           19
#define UPH_OTHER_LINGU_INDEX               20
#define UPH_DEFAULT_LANGUAGE                21
#define UPH_DEFAULT_LOCALE_CJK              22
#define UPH_DEFAULT_LOCALE_CTL              23

#endif

<commit_msg>proerty name and handle for active dictionaries added<commit_after>/*************************************************************************
 *
 *  $RCSfile: linguprops.hxx,v $
 *
 *  $Revision: 1.2 $
 *
 *  last change: $Author: tl $ $Date: 2001-02-02 15:34:06 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://www.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/

#ifndef _SVTOOLS_LINGUPROPS_HXX_
#define _SVTOOLS_LINGUPROPS_HXX_

// UNO property names for general options
#define UPN_IS_GERMAN_PRE_REFORM            "IsGermanPreReform"
#define UPN_IS_USE_DICTIONARY_LIST          "IsUseDictionaryList"
#define UPN_IS_IGNORE_CONTROL_CHARACTERS    "IsIgnoreControlCharacters"
#define UPN_ACTIVE_DICTIONARIES             "ActiveDictionaries"

// UNO property names for SpellChecker
#define UPN_IS_SPELL_UPPER_CASE             "IsSpellUpperCase"
#define UPN_IS_SPELL_WITH_DIGITS            "IsSpellWithDigits"
#define UPN_IS_SPELL_CAPITALIZATION         "IsSpellCapitalization"

// UNO property names for Hyphenator
#define UPN_HYPH_MIN_LEADING                "HyphMinLeading"
#define UPN_HYPH_MIN_TRAILING               "HyphMinTrailing"
#define UPN_HYPH_MIN_WORD_LENGTH            "HyphMinWordLength"

// UNO property names for OtherLingu (foreign Linguistik)
#define UPN_IS_STANDARD_HYPHENATOR          "IsStandardHyphenator"
#define UPN_IS_STANDARD_SPELL_CHECKER       "IsStandardSpellChecker"
#define UPN_IS_STANDARD_THESAURUS           "IsStandardThesaurus"
#define UPN_OTHER_LINGU_INDEX               "OtherLinguIndex"

// UNO property names for Lingu
// (those not covered by the SpellChecker, Hyphenator and OtherLingu
// properties and more likely to be used in other modules only)
#define UPN_DEFAULT_LANGUAGE                "DefaultLanguage"
#define UPN_DEFAULT_LOCALE                  "DefaultLocale"
#define UPN_DEFAULT_LOCALE_CJK              "DefaultLocale_CJK"
#define UPN_DEFAULT_LOCALE_CTL              "DefaultLocale_CTL"
#define UPN_IS_HYPH_AUTO                    "IsHyphAuto"
#define UPN_IS_HYPH_SPECIAL                 "IsHyphSpecial"
#define UPN_IS_SPELL_AUTO                   "IsSpellAuto"
#define UPN_IS_SPELL_HIDE                   "IsSpellHide"
#define UPN_IS_SPELL_IN_ALL_LANGUAGES       "IsSpellInAllLanguages"
#define UPN_IS_SPELL_SPECIAL                "IsSpellSpecial"
#define UPN_IS_WRAP_REVERSE                 "IsWrapReverse"

// uno property handles
#define UPH_IS_GERMAN_PRE_REFORM             0
#define UPH_IS_USE_DICTIONARY_LIST           1
#define UPH_IS_IGNORE_CONTROL_CHARACTERS     2
#define UPH_IS_SPELL_UPPER_CASE              3
#define UPH_IS_SPELL_WITH_DIGITS             4
#define UPH_IS_SPELL_CAPITALIZATION          5
#define UPH_HYPH_MIN_LEADING                 6
#define UPH_HYPH_MIN_TRAILING                7
#define UPH_HYPH_MIN_WORD_LENGTH             8
#define UPH_DEFAULT_LOCALE                   9
#define UPH_IS_SPELL_AUTO                   10
#define UPH_IS_SPELL_HIDE                   11
#define UPH_IS_SPELL_IN_ALL_LANGUAGES       12
#define UPH_IS_SPELL_SPECIAL                13
#define UPH_IS_HYPH_AUTO                    14
#define UPH_IS_HYPH_SPECIAL                 15
#define UPH_IS_WRAP_REVERSE                 16
#define UPH_IS_STANDARD_HYPHENATOR          17
#define UPH_IS_STANDARD_SPELL_CHECKER       18
#define UPH_IS_STANDARD_THESAURUS           19
#define UPH_OTHER_LINGU_INDEX               20
#define UPH_DEFAULT_LANGUAGE                21
#define UPH_DEFAULT_LOCALE_CJK              22
#define UPH_DEFAULT_LOCALE_CTL              23
#define UPH_ACTIVE_DICTIONARIES             24

#endif

<|endoftext|>


<commit_before><commit_msg>gcc-trunk: fix: unable to find string literal operator 'operator FOO'<commit_after><|endoftext|>


<commit_before><commit_msg>Create network_opt_tests.cpp<commit_after><|endoftext|>


<commit_before>/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: dynamicregister.cxx,v $
 *
 *  $Revision: 1.8 $
 *
 *  last change: $Author: obo $ $Date: 2006-09-17 03:41:24 $
 *
 *  The Contents of this file are made available subject to
 *  the terms of GNU Lesser General Public License Version 2.1.
 *
 *
 *    GNU Lesser General Public License Version 2.1
 *    =============================================
 *    Copyright 2005 by Sun Microsystems, Inc.
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License version 2.1, as published by the Free Software Foundation.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public
 *    License along with this library; if not, write to the Free Software
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *    MA  02111-1307  USA
 *
 ************************************************************************/

// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_testshl2.hxx"

#include "dynamicregister.hxx"
#ifndef _OSL_PROCESS_H_
#include <osl/process.h>
#endif
// #include <osl/mutex.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include "filehelper.hxx"

// -----------------------------------------------------------------------------

DynamicLibraryHelper::DynamicLibraryHelper(rtl::OUString const& _sDLLName, GetOpt & _aOptions)
        :m_pModule(new ::osl::Module()),
         m_suDLLName(_sDLLName),
         m_aOptions(_aOptions)
{
    // create and load the module (shared library)
    rtl::OUString suFile = FileHelper::convertPath( _sDLLName );
    rtl::OString sDLLName = rtl::OUStringToOString(suFile, RTL_TEXTENCODING_ASCII_US);
    if (_aOptions.hasOpt("-verbose"))
    {
        fprintf(stderr, "Try to load '%s'.\n", sDLLName.getStr());
    }

    if (! m_pModule->load(suFile, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL))
    {
        sDLLName = rtl::OUStringToOString(_sDLLName, RTL_TEXTENCODING_ASCII_US);
        fprintf(stderr, "warning: Can't load module '%s'.\n", sDLLName.getStr());
    }
}

DynamicLibraryHelper::~DynamicLibraryHelper()
{
    delete m_pModule;
}

<commit_msg>INTEGRATION: CWS changefileheader (1.8.52); FILE MERGED 2008/04/01 16:00:19 thb 1.8.52.2: #i85898# Stripping all external header guards 2008/03/31 13:06:07 rt 1.8.52.1: #i87441# Change license header to LPGL v3.<commit_after>/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2008 by Sun Microsystems, Inc.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * $RCSfile: dynamicregister.cxx,v $
 * $Revision: 1.9 $
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/

// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_testshl2.hxx"

#include "dynamicregister.hxx"
#include <osl/process.h>
// #include <osl/mutex.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include "filehelper.hxx"

// -----------------------------------------------------------------------------

DynamicLibraryHelper::DynamicLibraryHelper(rtl::OUString const& _sDLLName, GetOpt & _aOptions)
        :m_pModule(new ::osl::Module()),
         m_suDLLName(_sDLLName),
         m_aOptions(_aOptions)
{
    // create and load the module (shared library)
    rtl::OUString suFile = FileHelper::convertPath( _sDLLName );
    rtl::OString sDLLName = rtl::OUStringToOString(suFile, RTL_TEXTENCODING_ASCII_US);
    if (_aOptions.hasOpt("-verbose"))
    {
        fprintf(stderr, "Try to load '%s'.\n", sDLLName.getStr());
    }

    if (! m_pModule->load(suFile, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL))
    {
        sDLLName = rtl::OUStringToOString(_sDLLName, RTL_TEXTENCODING_ASCII_US);
        fprintf(stderr, "warning: Can't load module '%s'.\n", sDLLName.getStr());
    }
}

DynamicLibraryHelper::~DynamicLibraryHelper()
{
    delete m_pModule;
}

<|endoftext|>


<commit_before>// Copyright 2010-2013 RethinkDB, all rights reserved.
#include <string>

#include "errors.hpp"
#include <boost/algorithm/string/predicate.hpp>

#include "http/http.hpp"
#include "clustering/administration/http/json_adapters.hpp"
#include "clustering/administration/http/semilattice_app.hpp"
#include "clustering/administration/suggester.hpp"
#include "stl_utils.hpp"

template <class metadata_t>
semilattice_http_app_t<metadata_t>::semilattice_http_app_t(
        metadata_change_handler_t<metadata_t> *_metadata_change_handler,
        const clone_ptr_t<watchable_t<change_tracking_map_t<peer_id_t, cluster_directory_metadata_t> > > &_directory_metadata,
        uuid_u _us) :
    directory_metadata(_directory_metadata),
    us(_us),
    metadata_change_handler(_metadata_change_handler) {
    // Do nothing
}

template <class metadata_t>
semilattice_http_app_t<metadata_t>::~semilattice_http_app_t() {
    // Do nothing
}

template <class metadata_t>
void semilattice_http_app_t<metadata_t>::get_root(scoped_cJSON_t *json_out) {
    // keep this in sync with handle's behavior for getting the root
    metadata_t metadata = metadata_change_handler->get();
    vclock_ctx_t json_ctx(us);
    json_ctx_adapter_t<metadata_t, vclock_ctx_t> json_adapter(&metadata, json_ctx);
    json_out->reset(json_adapter.render());
}

template <class metadata_t>
http_res_t semilattice_http_app_t<metadata_t>::handle(const http_req_t &req) {
    try {
        metadata_t metadata = metadata_change_handler->get();

        //as we traverse the json sub directories this will keep track of where we are
        vclock_ctx_t json_ctx(us);
        boost::shared_ptr<json_adapter_if_t> json_adapter_head(new json_ctx_adapter_t<metadata_t, vclock_ctx_t>(&metadata, json_ctx));

        http_req_t::resource_t::iterator it = req.resource.begin();

        //Traverse through the subfields until we're done with the url
        while (it != req.resource.end()) {
            json_adapter_if_t::json_adapter_map_t subfields = json_adapter_head->get_subfields();
            if (subfields.find(*it) == subfields.end()) {
                return http_res_t(HTTP_NOT_FOUND); //someone tried to walk off the edge of the world
            }
            json_adapter_head = subfields[*it];
            it++;
        }

        //json_adapter_head now points to the correct part of the metadata time to build a response and be on our way
        switch (req.method) {
            case GET:
            {
                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case POST:
            {
                // TODO: Get rid of this release mode wrapper, make Michael unhappy.
#ifdef NDEBUG
                if (!verify_content_type(req, "application/json")) {
                    return http_res_t(HTTP_UNSUPPORTED_MEDIA_TYPE);
                }
#endif
                scoped_cJSON_t change(cJSON_Parse(req.body.c_str()));
                if (!change.get()) { //A null value indicates that parsing failed
                    logINF("Json body failed to parse. Here's the data that failed: %s",
                           req.get_sanitized_body().c_str());
                    return http_res_t(HTTP_BAD_REQUEST);
                }

                json_adapter_head->apply(change.get());

                {
                    scoped_cJSON_t absolute_change(change.release());
                    std::vector<std::string> parts(req.resource.begin(), req.resource.end());
                    for (std::vector<std::string>::reverse_iterator jt = parts.rbegin(); jt != parts.rend(); ++jt) {
                        scoped_cJSON_t inner(absolute_change.release());
                        absolute_change.reset(cJSON_CreateObject());
                        absolute_change.AddItemToObject(jt->c_str(), inner.release());
                    }
                    logINF("Applying data %s", absolute_change.PrintUnformatted().c_str());
                }

                // Determine for which namespaces we should prioritize distribution
                // Default: none
                defaulting_map_t<namespace_id_t, bool> prioritize_distr_for_ns(false);
                const boost::optional<std::string> prefer_distribution_param =
                    req.find_query_param("prefer_distribution");
                if (prefer_distribution_param) {
                    if (prefer_distribution_param.get() == "none") {
                    } else if (prefer_distribution_param.get() == "all") {
                        prioritize_distr_for_ns =
                            defaulting_map_t<namespace_id_t, bool>(true);
                    } else if (prefer_distribution_param.get() == "changed_only") {
                        // TODO!
                        prioritize_distr_for_ns =
                            defaulting_map_t<namespace_id_t, bool>(true);
                    }
                }

                metadata_change_callback(&metadata, prioritize_distr_for_ns);
                metadata_change_handler->update(metadata);

                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case DELETE:
            {
                json_adapter_head->erase();

                logINF("Deleting %s", req.resource.as_string().c_str());

                metadata_change_callback(&metadata,
                                         defaulting_map_t<namespace_id_t, bool>(false));
                metadata_change_handler->update(metadata);

                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case PUT:
            {
                // TODO: Get rid of this release mode wrapper, make Michael unhappy.
#ifdef NDEBUG
                if (!verify_content_type(req, "application/json")) {
                    return http_res_t(HTTP_UNSUPPORTED_MEDIA_TYPE);
                }
#endif
                scoped_cJSON_t change(cJSON_Parse(req.body.c_str()));
                if (!change.get()) { //A null value indicates that parsing failed
                    logINF("Json body failed to parse. Here's the data that failed: %s",
                           req.get_sanitized_body().c_str());
                    return http_res_t(HTTP_BAD_REQUEST);
                }

                {
                    scoped_cJSON_t absolute_change(change.release());
                    std::vector<std::string> parts(req.resource.begin(), req.resource.end());
                    for (std::vector<std::string>::reverse_iterator jt = parts.rbegin(); jt != parts.rend(); ++jt) {
                        scoped_cJSON_t inner(absolute_change.release());
                        absolute_change.reset(cJSON_CreateObject());
                        absolute_change.AddItemToObject(jt->c_str(), inner.release());
                    }
                    logINF("Applying data %s", absolute_change.PrintUnformatted().c_str());
                }

                json_adapter_head->reset();
                json_adapter_head->apply(change.get());

                metadata_change_callback(&metadata,
                                         defaulting_map_t<namespace_id_t, bool>(false));
                metadata_change_handler->update(metadata);

                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case HEAD:
            case TRACE:
            case OPTIONS:
            case CONNECT:
            case PATCH:
            default:
                return http_res_t(HTTP_METHOD_NOT_ALLOWED);
                break;
        }
    } catch (const schema_mismatch_exc_t &e) {
        logINF("HTTP request throw a schema_mismatch_exc_t with what = %s", e.what());
        return http_error_res(e.what());
    } catch (const permission_denied_exc_t &e) {
        logINF("HTTP request throw a permission_denied_exc_t with what = %s", e.what());
        return http_error_res(e.what());
    } catch (const cannot_satisfy_goals_exc_t &e) {
        logINF("The server was given a set of goals for which it couldn't find a valid blueprint. %s", e.what());
        return http_error_res(e.what(), HTTP_INTERNAL_SERVER_ERROR);
    } catch (const gone_exc_t & e) {
        logINF("HTTP request throw a gone_exc_t with what = %s", e.what());
        return http_error_res(e.what(), HTTP_GONE);
    }
    unreachable();
}

template <class metadata_t>
bool semilattice_http_app_t<metadata_t>::verify_content_type(const http_req_t &req,
                                                             const std::string &expected_content_type) const {
    boost::optional<std::string> content_type = req.find_header_line("Content-Type");
    // Only compare the beginning of the content-type. Some browsers may add additional
    // information, and e.g. send "application/json; charset=UTF-8" instead of "application/json"
    if (!content_type || !boost::istarts_with(content_type.get(), expected_content_type)) {
        std::string actual_content_type = (content_type ? content_type.get() : "<NONE>");
        logINF("Bad request, Content-Type should be %s, but is %s.", expected_content_type.c_str(), actual_content_type.c_str());
        return false;
    }

    return true;
}

cluster_semilattice_http_app_t::cluster_semilattice_http_app_t(
        metadata_change_handler_t<cluster_semilattice_metadata_t> *_metadata_change_handler,
        const clone_ptr_t<watchable_t<change_tracking_map_t<peer_id_t, cluster_directory_metadata_t> > > &_directory_metadata,
        uuid_u _us) :
    semilattice_http_app_t<cluster_semilattice_metadata_t>(_metadata_change_handler, _directory_metadata, _us) {
    // Do nothing
}

cluster_semilattice_http_app_t::~cluster_semilattice_http_app_t() {
    // Do nothing
}

void cluster_semilattice_http_app_t::metadata_change_callback(cluster_semilattice_metadata_t *new_metadata,
        const defaulting_map_t<namespace_id_t, bool> &prioritize_distr_for_ns) {

    try {
        fill_in_blueprints(new_metadata,
                           directory_metadata->get().get_inner(),
                           us,
                           prioritize_distr_for_ns);
    } catch (const missing_machine_exc_t &e) { }
}

auth_semilattice_http_app_t::auth_semilattice_http_app_t(
        metadata_change_handler_t<auth_semilattice_metadata_t> *_metadata_change_handler,
        const clone_ptr_t<watchable_t<change_tracking_map_t<peer_id_t, cluster_directory_metadata_t> > > &_directory_metadata,
        uuid_u _us) :
    semilattice_http_app_t<auth_semilattice_metadata_t>(_metadata_change_handler, _directory_metadata, _us) {
    // Do nothing
}

auth_semilattice_http_app_t::~auth_semilattice_http_app_t() {
    // Do nothing
}

void auth_semilattice_http_app_t::metadata_change_callback(auth_semilattice_metadata_t *,
        const defaulting_map_t<namespace_id_t, bool> &) {

    // Do nothing
}

template class semilattice_http_app_t<cluster_semilattice_metadata_t>;
template class semilattice_http_app_t<auth_semilattice_metadata_t>;
<commit_msg>Extract the affected name spaces in the semilattice app.<commit_after>// Copyright 2010-2013 RethinkDB, all rights reserved.
#include <string>
#include <vector>

#include "errors.hpp"
#include <boost/algorithm/string/predicate.hpp>

#include "http/http.hpp"
#include "clustering/administration/http/json_adapters.hpp"
#include "clustering/administration/http/semilattice_app.hpp"
#include "clustering/administration/suggester.hpp"
#include "stl_utils.hpp"

template <class metadata_t>
semilattice_http_app_t<metadata_t>::semilattice_http_app_t(
        metadata_change_handler_t<metadata_t> *_metadata_change_handler,
        const clone_ptr_t<watchable_t<change_tracking_map_t<peer_id_t, cluster_directory_metadata_t> > > &_directory_metadata,
        uuid_u _us) :
    directory_metadata(_directory_metadata),
    us(_us),
    metadata_change_handler(_metadata_change_handler) {
    // Do nothing
}

template <class metadata_t>
semilattice_http_app_t<metadata_t>::~semilattice_http_app_t() {
    // Do nothing
}

template <class metadata_t>
void semilattice_http_app_t<metadata_t>::get_root(scoped_cJSON_t *json_out) {
    // keep this in sync with handle's behavior for getting the root
    metadata_t metadata = metadata_change_handler->get();
    vclock_ctx_t json_ctx(us);
    json_ctx_adapter_t<metadata_t, vclock_ctx_t> json_adapter(&metadata, json_ctx);
    json_out->reset(json_adapter.render());
}

// Small helper to extract the changed namespace ids from a JSON change request
class collect_namespaces_exc_t {
public:
    collect_namespaces_exc_t(const std::string &_msg) : msg(_msg) { }
    std::string get_msg() const { return msg; }
private:
    std::string msg;
};
std::vector<namespace_id_t> collect_affected_namespaces(const cJSON *change_request)
    THROWS_ONLY(collect_namespaces_exc_t) {

    if (change_request == NULL) {
        throw collect_namespaces_exc_t("Missing change request");
    }
    if (change_request->type != cJSON_Object ) {
        throw collect_namespaces_exc_t("Unhandled change_request type");
    }
    std::vector<namespace_id_t> result;
    const cJSON *entry = change_request->next;
    while (entry) {
        if (entry->string == NULL) throw collect_namespaces_exc_t("Missing field name");
        try {
            const namespace_id_t ns_id = str_to_uuid(std::string(entry->string));
            result.push_back(ns_id);
        } catch (...) {
            throw collect_namespaces_exc_t("Unable to decode UUID: "
                                           + std::string(entry->string));
        }
        entry = entry->next;
    }
    return result;
}

template <class metadata_t>
http_res_t semilattice_http_app_t<metadata_t>::handle(const http_req_t &req) {
    try {
        metadata_t metadata = metadata_change_handler->get();

        //as we traverse the json sub directories this will keep track of where we are
        vclock_ctx_t json_ctx(us);
        boost::shared_ptr<json_adapter_if_t> json_adapter_head(new json_ctx_adapter_t<metadata_t, vclock_ctx_t>(&metadata, json_ctx));

        http_req_t::resource_t::iterator it = req.resource.begin();

        //Traverse through the subfields until we're done with the url
        while (it != req.resource.end()) {
            json_adapter_if_t::json_adapter_map_t subfields = json_adapter_head->get_subfields();
            if (subfields.find(*it) == subfields.end()) {
                return http_res_t(HTTP_NOT_FOUND); //someone tried to walk off the edge of the world
            }
            json_adapter_head = subfields[*it];
            it++;
        }

        //json_adapter_head now points to the correct part of the metadata time to build a response and be on our way
        switch (req.method) {
            case GET:
            {
                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case POST:
            {
                // TODO: Get rid of this release mode wrapper, make Michael unhappy.
#ifdef NDEBUG
                if (!verify_content_type(req, "application/json")) {
                    return http_res_t(HTTP_UNSUPPORTED_MEDIA_TYPE);
                }
#endif
                scoped_cJSON_t change(cJSON_Parse(req.body.c_str()));
                if (!change.get()) { //A null value indicates that parsing failed
                    logINF("Json body failed to parse. Here's the data that failed: %s",
                           req.get_sanitized_body().c_str());
                    return http_res_t(HTTP_BAD_REQUEST);
                }

                // Determine for which namespaces we should prioritize distribution
                // Default: none
                defaulting_map_t<namespace_id_t, bool> prioritize_distr_for_ns(false);
                const boost::optional<std::string> prefer_distribution_param =
                    req.find_query_param("prefer_distribution");
                if (prefer_distribution_param) {
                    if (prefer_distribution_param.get() == "none") {
                    } else if (prefer_distribution_param.get() == "all") {
                        prioritize_distr_for_ns =
                            defaulting_map_t<namespace_id_t, bool>(true);
                    } else if (prefer_distribution_param.get() == "changed_only") {
                        try {
                            const std::vector<namespace_id_t> changed_ns =
                                collect_affected_namespaces(change.get());
                            for (auto jt = changed_ns.begin();
                                 jt != changed_ns.end();
                                 ++jt) {
                                prioritize_distr_for_ns.set(*jt, true);
                            }
                        } catch (const collect_namespaces_exc_t &e) {
                            logINF("Unable to extract affected namespaces from request: %s",
                                e.get_msg().c_str());
                            return http_res_t(HTTP_BAD_REQUEST);
                        }
                    } else {
                        logINF("Invalid value for prefer_distribution argument: %s",
                           prefer_distribution_param.get().c_str());
                        return http_res_t(HTTP_BAD_REQUEST);
                    }
                }

                json_adapter_head->apply(change.get());

                {
                    scoped_cJSON_t absolute_change(change.release());
                    std::vector<std::string> parts(req.resource.begin(), req.resource.end());
                    for (std::vector<std::string>::reverse_iterator jt = parts.rbegin(); jt != parts.rend(); ++jt) {
                        scoped_cJSON_t inner(absolute_change.release());
                        absolute_change.reset(cJSON_CreateObject());
                        absolute_change.AddItemToObject(jt->c_str(), inner.release());
                    }
                    logINF("Applying data %s", absolute_change.PrintUnformatted().c_str());
                }

                metadata_change_callback(&metadata, prioritize_distr_for_ns);
                metadata_change_handler->update(metadata);

                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case DELETE:
            {
                json_adapter_head->erase();

                logINF("Deleting %s", req.resource.as_string().c_str());

                metadata_change_callback(&metadata,
                                         defaulting_map_t<namespace_id_t, bool>(false));
                metadata_change_handler->update(metadata);

                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case PUT:
            {
                // TODO: Get rid of this release mode wrapper, make Michael unhappy.
#ifdef NDEBUG
                if (!verify_content_type(req, "application/json")) {
                    return http_res_t(HTTP_UNSUPPORTED_MEDIA_TYPE);
                }
#endif
                scoped_cJSON_t change(cJSON_Parse(req.body.c_str()));
                if (!change.get()) { //A null value indicates that parsing failed
                    logINF("Json body failed to parse. Here's the data that failed: %s",
                           req.get_sanitized_body().c_str());
                    return http_res_t(HTTP_BAD_REQUEST);
                }

                {
                    scoped_cJSON_t absolute_change(change.release());
                    std::vector<std::string> parts(req.resource.begin(), req.resource.end());
                    for (std::vector<std::string>::reverse_iterator jt = parts.rbegin(); jt != parts.rend(); ++jt) {
                        scoped_cJSON_t inner(absolute_change.release());
                        absolute_change.reset(cJSON_CreateObject());
                        absolute_change.AddItemToObject(jt->c_str(), inner.release());
                    }
                    logINF("Applying data %s", absolute_change.PrintUnformatted().c_str());
                }

                json_adapter_head->reset();
                json_adapter_head->apply(change.get());

                metadata_change_callback(&metadata,
                                         defaulting_map_t<namespace_id_t, bool>(false));
                metadata_change_handler->update(metadata);

                scoped_cJSON_t json_repr(json_adapter_head->render());
                return http_json_res(json_repr.get());
            }
            break;
            case HEAD:
            case TRACE:
            case OPTIONS:
            case CONNECT:
            case PATCH:
            default:
                return http_res_t(HTTP_METHOD_NOT_ALLOWED);
                break;
        }
    } catch (const schema_mismatch_exc_t &e) {
        logINF("HTTP request throw a schema_mismatch_exc_t with what = %s", e.what());
        return http_error_res(e.what());
    } catch (const permission_denied_exc_t &e) {
        logINF("HTTP request throw a permission_denied_exc_t with what = %s", e.what());
        return http_error_res(e.what());
    } catch (const cannot_satisfy_goals_exc_t &e) {
        logINF("The server was given a set of goals for which it couldn't find a valid blueprint. %s", e.what());
        return http_error_res(e.what(), HTTP_INTERNAL_SERVER_ERROR);
    } catch (const gone_exc_t & e) {
        logINF("HTTP request throw a gone_exc_t with what = %s", e.what());
        return http_error_res(e.what(), HTTP_GONE);
    }
    unreachable();
}

template <class metadata_t>
bool semilattice_http_app_t<metadata_t>::verify_content_type(const http_req_t &req,
                                                             const std::string &expected_content_type) const {
    boost::optional<std::string> content_type = req.find_header_line("Content-Type");
    // Only compare the beginning of the content-type. Some browsers may add additional
    // information, and e.g. send "application/json; charset=UTF-8" instead of "application/json"
    if (!content_type || !boost::istarts_with(content_type.get(), expected_content_type)) {
        std::string actual_content_type = (content_type ? content_type.get() : "<NONE>");
        logINF("Bad request, Content-Type should be %s, but is %s.", expected_content_type.c_str(), actual_content_type.c_str());
        return false;
    }

    return true;
}

cluster_semilattice_http_app_t::cluster_semilattice_http_app_t(
        metadata_change_handler_t<cluster_semilattice_metadata_t> *_metadata_change_handler,
        const clone_ptr_t<watchable_t<change_tracking_map_t<peer_id_t, cluster_directory_metadata_t> > > &_directory_metadata,
        uuid_u _us) :
    semilattice_http_app_t<cluster_semilattice_metadata_t>(_metadata_change_handler, _directory_metadata, _us) {
    // Do nothing
}

cluster_semilattice_http_app_t::~cluster_semilattice_http_app_t() {
    // Do nothing
}

void cluster_semilattice_http_app_t::metadata_change_callback(cluster_semilattice_metadata_t *new_metadata,
        const defaulting_map_t<namespace_id_t, bool> &prioritize_distr_for_ns) {

    try {
        fill_in_blueprints(new_metadata,
                           directory_metadata->get().get_inner(),
                           us,
                           prioritize_distr_for_ns);
    } catch (const missing_machine_exc_t &e) { }
}

auth_semilattice_http_app_t::auth_semilattice_http_app_t(
        metadata_change_handler_t<auth_semilattice_metadata_t> *_metadata_change_handler,
        const clone_ptr_t<watchable_t<change_tracking_map_t<peer_id_t, cluster_directory_metadata_t> > > &_directory_metadata,
        uuid_u _us) :
    semilattice_http_app_t<auth_semilattice_metadata_t>(_metadata_change_handler, _directory_metadata, _us) {
    // Do nothing
}

auth_semilattice_http_app_t::~auth_semilattice_http_app_t() {
    // Do nothing
}

void auth_semilattice_http_app_t::metadata_change_callback(auth_semilattice_metadata_t *,
        const defaulting_map_t<namespace_id_t, bool> &) {

    // Do nothing
}

template class semilattice_http_app_t<cluster_semilattice_metadata_t>;
template class semilattice_http_app_t<auth_semilattice_metadata_t>;
<|endoftext|>