Ocean
Loading...
Searching...
No Matches
X3DUrlObject.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_SCENEDESCRIPTION_SDX_X3D_X3D_URL_OBJECT_H
9#define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_X3D_URL_OBJECT_H
10
12
15
17
18namespace Ocean
19{
20
21namespace SceneDescription
22{
23
24namespace SDX
25{
26
27namespace X3D
28{
29
30/**
31 * This class implements an abstract x3d url object.
32 * @ingroup scenedescriptionsdxx3d
33 */
34class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT X3DUrlObject : virtual public SDXNode
35{
36 public:
37
38 /**
39 * Resolves the given urls and returns a list of possible filenames.
40 * @param filename Name of a file helping to resolve the urls
41 * @param urls Urls to be resolved
42 * @return Resolved filenames
43 */
44 static IO::Files resolveUrls(const std::string& filename, const MultiString::Values& urls);
45
46 protected:
47
48 /**
49 * Creates a new abstract x3d url object.
50 * @param environment Node environment
51 */
52 explicit X3DUrlObject(const SDXEnvironment* environment);
53
54 protected:
55
56 /**
57 * Registers the fields of this node.
58 * @param specification Node specification receiving the field informations
59 */
60 void registerFields(NodeSpecification& specification);
61
62 /**
63 * Resolves the urls and returns a list of possible filenames.
64 * @return Resolved filenames
65 */
67
68 protected:
69
70 /// Url field.
72};
73
74}
75
76}
77
78}
79
80}
81
82#endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_X3D_URL_OBJECT_H
std::vector< std::string > Values
Definition of a vector holding the single values.
Definition Field1D.h:122
This class implements a node specification object.
Definition scenedescription/Node.h:77
This class implements an abstract x3d url object.
Definition X3DUrlObject.h:35
MultiString url_
Url field.
Definition X3DUrlObject.h:71
X3DUrlObject(const SDXEnvironment *environment)
Creates a new abstract x3d url object.
void registerFields(NodeSpecification &specification)
Registers the fields of this node.
IO::Files resolveUrls() const
Resolves the urls and returns a list of possible filenames.
static IO::Files resolveUrls(const std::string &filename, const MultiString::Values &urls)
Resolves the given urls and returns a list of possible filenames.
This class implements a node environment container.
Definition SDXNode.h:62
This class implements the base class for all SDX scene description nodes.
Definition SDXNode.h:50
std::vector< File > Files
Definition of a vector holding files.
Definition File.h:29
The namespace covering the entire Ocean framework.
Definition Accessor.h:15