SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | List of all members
smtk::markup::URL Class Reference
Inheritance diagram for smtk::markup::URL:
[legend]
Collaboration diagram for smtk::markup::URL:
[legend]

Public Member Functions

 smtkTypeMacro (smtk::markup::URL)
 
 smtkSuperclassMacro (smtk::markup::Label)
 
template<typename... Args>
 URL (Args &&... args)
 
template<typename... Args>
 URL (const smtk::string::Token &location, Args &&... args)
 
bool setLocation (const smtk::string::Token &location)
 Set/get the actual URL; either a filename or a full resource locator with protocol.
 
smtk::string::Token location () const
 
bool setType (const smtk::string::Token &mimeType)
 Set/get the type of data present at the URL (if known). May be an empty token.
 
smtk::string::Token type () const
 
std::string extensionForType () const
 Return the default file extension to use for the mime type. More...
 
ArcEndpointInterface< arcs::URLsToData, ConstArc, OutgoingArcdata () const
 Return the components instantiated from data in this URL.
 
ArcEndpointInterface< arcs::URLsToData, NonConstArc, OutgoingArcdata ()
 
- Public Member Functions inherited from smtk::markup::Label
 smtkTypeMacro (smtk::markup::Label)
 
 smtkSuperclassMacro (smtk::markup::Component)
 
template<typename... Args>
 Label (Args &&... args)
 
void initialize (const nlohmann::json &data, smtk::resource::json::Helper &helper) override
 Provide an initializer for resources to call after construction.
 
ArcEndpointInterface< arcs::LabelsToSubjects, ConstArc, OutgoingArcsubjects () const
 Return the container of components that this label references.
 
ArcEndpointInterface< arcs::LabelsToSubjects, NonConstArc, OutgoingArcsubjects ()
 
- Public Member Functions inherited from smtk::markup::Component
 smtkTypeMacro (smtk::markup::Component)
 
 smtkSuperclassMacro (smtk::graph::Component)
 
template<typename... Args>
 Component (Args &&... args)
 
Component::Index index () const
 The index is a compile-time intrinsic of the derived resource; as such, it cannot be set.
 
std::string name () const override
 Return the component's name.
 
bool setName (const std::string &name)
 Set the component's name.
 
ArcEndpointInterface< arcs::GroupsToMembers, ConstArc, IncomingArcgroups () const
 Return the container of groups this component belongs to.
 
ArcEndpointInterface< arcs::GroupsToMembers, NonConstArc, IncomingArcgroups ()
 
ArcEndpointInterface< arcs::LabelsToSubjects, ConstArc, IncomingArclabels () const
 Return the container of labels that reference this component.
 
ArcEndpointInterface< arcs::LabelsToSubjects, NonConstArc, IncomingArclabels ()
 
ArcEndpointInterface< arcs::URLsToImportedData, ConstArc, IncomingArcimportedFrom () const
 Return the container of URLs from which this component was imported (if any).
 
ArcEndpointInterface< arcs::URLsToImportedData, NonConstArc, IncomingArcimportedFrom ()
 
ArcEndpointInterface< arcs::OntologyIdentifiersToIndividuals, ConstArc, IncomingArcontologyClasses () const
 Return the container of ontology identifiers this component realizes. More...
 
ArcEndpointInterface< arcs::OntologyIdentifiersToIndividuals, NonConstArc, IncomingArcontologyClasses ()
 
- Public Member Functions inherited from smtk::graph::Component
 smtkTypeMacro (smtk::graph::Component)
 
 smtkSuperclassMacro (smtk::resource::Component)
 
const smtk::resource::ResourcePtr resource () const override
 Access the containing resource.
 
smtk::resource::ResourceparentResource () const override
 Return a raw (not shared) pointer to the resource that owns this component. More...
 
const smtk::common::UUIDid () const override
 Access the component's id.
 
bool setId (const smtk::common::UUID &uid) override
 Set the component's id.
 
template<typename ArcType >
ArcEndpointInterface< ArcType, ConstArc, OutgoingArcoutgoing () const
 Return an endpoint-interface object for arcs of ArcType outgoing from this node. More...
 
template<typename ArcType >
ArcEndpointInterface< ArcType, NonConstArc, OutgoingArcoutgoing ()
 
template<typename ArcType >
ArcEndpointInterface< ArcType, ConstArc, IncomingArcincoming () const
 Return an endpoint-interface object for arcs of ArcType incoming to this node. More...
 
template<typename ArcType >
ArcEndpointInterface< ArcType, NonConstArc, IncomingArcincoming ()
 
bool disconnect (bool onlyExplicit=false)
 Remove all (editable) arcs from this node. More...
 
- Public Member Functions inherited from smtk::resource::Component
 smtkTypeMacro (smtk::resource::Component)
 
 smtkSuperclassMacro (smtk::resource::PersistentObject)
 
 smtkSharedFromThisMacro (smtk::resource::PersistentObject)
 
template<typename ResourceType >
ResourceType * parentResourceAs () const
 This variant of parentResource casts the result to the given ResourceType.
 
Linkslinks () override
 Return the links that connect this component to external resources/components.
 
const Linkslinks () const override
 
Propertiesproperties () override
 Return properties defined on this component.
 
const Propertiesproperties () const override
 
- Public Member Functions inherited from smtk::resource::PersistentObject
 smtkTypeMacroBase (smtk::resource::PersistentObject)
 
template<typename T >
T::Ptr as ()
 Attempt to cast this object to a subclass.
 
template<typename T >
T::ConstPtr as () const
 Attempt to cast this object to a subclass.
 

Additional Inherited Members

- Public Types inherited from smtk::markup::Component
using Serialize = std::true_type
 
using Index = std::size_t
 
- Public Types inherited from smtk::resource::Component
typedef std::function< void(const ComponentPtr &)> Visitor
 
typedef detail::ComponentLinks Links
 
typedef detail::ComponentProperties Properties
 
- Static Public Attributes inherited from smtk::markup::Component
static const Component::Index type_index
 A unique integer corresponding to the component type.
 
- Protected Member Functions inherited from smtk::graph::Component
 Component (const std::shared_ptr< smtk::graph::ResourceBase > &)
 
 Component (const std::shared_ptr< smtk::graph::ResourceBase > &, const smtk::common::UUID &)
 
virtual void createDependentArcs ()
 
- Protected Attributes inherited from smtk::markup::Component
std::string m_name
 
- Protected Attributes inherited from smtk::graph::Component
smtk::WeakReferenceWrapper< smtk::graph::ResourceBasem_resource
 
smtk::common::UUID m_id
 

Member Function Documentation

◆ extensionForType()

std::string smtk::markup::URL::extensionForType ( ) const

Return the default file extension to use for the mime type.

If the location is set, this returns its extension. If not, a file type is generated from the mime type.

The returned value will either be an empty string (if no mime type is set and the location is unset or has no extension) or an extension that begins with a period ('.')


The documentation for this class was generated from the following files: