00001 /* Copyright (c) 2007, Gennady Bystritsky <bystr@mac.com> 00002 * 00003 * Distributed under the MIT Licence. 00004 * This is free software. See 'LICENSE' for details. 00005 * You must read and accept the license prior to use. 00006 * 00007 * Author: Gennady Bystritsky 00008 */ 00009 00010 #ifndef _SK_RT_CONFIG_INLINELOCATOR_H_ 00011 #define _SK_RT_CONFIG_INLINELOCATOR_H_ 00012 00013 #include <sk/rt/config/Locator.h> 00014 #include <sk/rt/config/NamedStreamOpener.h> 00015 00016 #include <sk/util/String.h> 00017 #include <sk/util/Holder.hxx> 00018 00019 namespace sk { 00020 namespace rt { 00021 namespace config { 00022 class InlineLocator 00023 : public virtual Locator 00024 { 00025 public: 00026 InlineLocator(const sk::util::String& content); 00027 InlineLocator(const sk::util::String& content, const Locator& other); 00028 // Default copy constructor is OK here. 00029 // InlineLocator(const InlineLocator& other); 00030 virtual ~InlineLocator(); 00031 00032 // sk::rt::config::Locator implementation. 00033 void invoke(const StreamProcessor& processor) const; 00034 00035 // sk::util::Object re-implementation. 00036 const sk::util::Class getClass() const; 00037 00038 private: 00039 InlineLocator(); 00040 InlineLocator& operator = (const InlineLocator& other); 00041 00042 const sk::util::String _content; 00043 sk::util::Holder<const Locator>::Aliasing _locatorHolder; 00044 }; 00045 } 00046 } 00047 } 00048 00049 #endif /* _SK_RT_CONFIG_INLINELOCATOR_H_ */