- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Models/Base/Io/SaveLoad/DomainArraySerializer.cpp

    00001
    00002 //
    00003 // Copyright (c) 2005           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00010
    00012 // This file implements the BaseModelDomainArray portion of the
    00013 // Serializer class.
    00015
    00016
    00017 #include "Serializer.h"
    00018 #include <Mers/Utils/Io/SaveLoad/ISaveLoad.h>
    00019 #include <Mers/Utils/Io/SaveLoad/Serializer.h>
    00020 #include <Mers/Utils/Io/SaveLoad/ArraySerializerHelper.h>
    00021 #include <Mers/Models/Base/BaseModel.h>
    00022 #include <Mers/Models/Base/BaseModelDomainArray.h>
    00023 #include <Mers/Utils/Lang/String.h>
    00024 #include <cassert>
    00025
    00027
    00028 using namespace Mers::Models::Base::Io::SaveLoad;
    00029 using Mers::Utils::Io::SaveLoad::ISaveLoad;
    00030 using Mers::Utils::Io::SaveLoad::HelperSerializer;
    00031 using Mers::Utils::Io::SaveLoad::ArraySerializerHelper;
    00032 using Mers::Models::Base::BaseModel;
    00033 using Mers::Models::Base::BaseModelDomain;
    00034 using Mers::Models::Base::BaseModelDomainArray;
    00035 using Mers::Utils::Lang::String;
    00036
    00038
    00039 void Serializer::saveLoad( ISaveLoad * sl, const char * name,
    00040         BaseModelDomainArray * &domains )
    00041 {
    00042         HelperSerializer< BaseModelDomain *, Serializer > serializer( this );
    00043
    00044         // Note that we're not the owner, because the model owns all
    00045         // domains loaded.
    00046         ArraySerializerHelper::saveLoad< BaseModelDomainArray, BaseModelDomain * >
    00047                 ( sl, name, domains, serializer, false );
    00048 }
    00049