SDKBrowserURL Class Reference Library » Browser

#include <lib_browser.h>

详细描述

Represents a browser URL for locations in the file system (and virtual places somewhere in the browser).
For URL strings the following applies:

另请参阅
SDKBrowserBase for base paths constants.

Private

void *  GetPrivate (void) const

Constructor/Destructor

  SDKBrowserURL ()
  SDKBrowserURL (const SDKBrowserURL &src)
  SDKBrowserURL (const Filename &src)
  SDKBrowserURL (const maxon::String &src)
  ~SDKBrowserURL (void)

Operator

const SDKBrowserURL operator= (const SDKBrowserURL &cs)
const SDKBrowserURL   operator+ (const String &str2) const
const SDKBrowserURL operator+= (const String &str)
Bool   operator== (const SDKBrowserURL &url) const
Bool   operator!= (const SDKBrowserURL &url) const

Information

Bool   IsPopulated () const
SDKBrowserURL   GetDirectory (void) const
String   GetFileString (void) const
Bool   IsFilename (void) const
Bool   CheckSuffix (const String &s) const
String   GetSuffix (void) const

Set/Get Filename/String

void  SetFilename (const Filename &f)
void  SetString (const String &s)
Bool   GetFilename ( Filename &f) const
Filename   GetFilename (void) const
void  GetString ( String &s) const
String   GetString (void) const

构造函数 & 析构函数文档编制

◆  SDKBrowserURL() [1/4]

SDKBrowserURL ( )

Default constructor. Constructs a SDKBrowserURL .

◆  SDKBrowserURL() [2/4]

SDKBrowserURL ( const SDKBrowserURL src )

Copy constructor. Constructs a SDKBrowserURL with the content of the source URL in src .

参数
[in] src A source URL.

◆  SDKBrowserURL() [3/4]

SDKBrowserURL ( const Filename src )

Constructs a SDKBrowserURL with a file name.

参数
[in] src A file name.

◆  SDKBrowserURL() [4/4]

SDKBrowserURL ( const maxon::String src )

Constructs a SDKBrowserURL with a string.

参数
[in] src A URL string, e.g. "file://localhost/image.jpg" .

◆  ~SDKBrowserURL()

~ SDKBrowserURL ( void  )

Destructor.

成员函数文档编制

◆  GetPrivate()

void* GetPrivate ( void  ) const

Private .

◆  operator=()

const SDKBrowserURL & operator= ( const SDKBrowserURL cs )

Assignment operator.

参数
[in] cs The right-hand URL to assign.
返回
The assigned left-hand URL.

◆  operator+()

const SDKBrowserURL operator+ ( const String str2 ) const

Concatenates a string to the path of the URL and return the result.

参数
[in] str2 The string to add.
返回
The result of the addition.

◆  operator+=()

const SDKBrowserURL & operator+= ( const String str )

Concatenates a string to the path of the URL and keep the result in the URL.

参数
[in] str The string to add.
返回
The result of the addition.

◆  operator==()

Bool operator== ( const SDKBrowserURL url ) const

Equality operator. Compares the URL with another URL.

参数
[in] url The right-hand URL to compare with.
返回
true if the URLs are equal, otherwise false .

◆  operator!=()

Bool operator!= ( const SDKBrowserURL url ) const

Inequality operator. Compares the URL with another URL.

参数
[in] url The right-hand URL to compare with.
返回
true if the URLs are not equal, otherwise false .

◆  IsPopulated()

Bool IsPopulated ( ) const

Checks if the URL is empty.

返回
true if the URL has been set, otherwise false .

◆  GetDirectory()

SDKBrowserURL GetDirectory ( void  ) const

Retrieves the URL of the parent directory.

返回
The directory for the URL.

◆  GetFileString()

String GetFileString ( void  ) const

Retrieves the local file name only (without the path).

返回
The file name string.

◆  IsFilename()

Bool IsFilename ( void  ) const

Checks if the URL can be represented as a Filename .

返回
true if the URL can be represented as a Filename , otherwise false .

◆  CheckSuffix()

Bool CheckSuffix ( const String s ) const

Checks if the suffix of the URL is the same as the string s .

参数
[in] s A suffix string without the dot, e.g. "c4d" .
返回
true if the suffix matches, otherwise false .

◆  GetSuffix()

String GetSuffix ( void  ) const

Retrieves the suffix of the URL (always in lower case).

返回
The suffix string without the dot, e.g. "c4d" .

◆  SetFilename()

void SetFilename ( const Filename f )

Assigns a file name to the URL.

参数
[in] f The file name to assign.

◆  SetString()

void SetString ( const String s )

Assigns a string to the URL.

◆  GetFilename() [1/2]

Bool GetFilename ( Filename f ) const

Retrieves a Filename from the URL.

参数
[out] f Assigned the file name if method is successful.
返回
true if the URL contains a filename (or a "file://" string) and assign that name to f .
false if the URL string is a catalog location or something else in the browser tree.

◆  GetFilename() [2/2]

Filename GetFilename ( void  ) const

Retrieves a Filename from the URL.

返回
The URL as a file name if the URL contains a filename (or a "file://" string).
An empty Filename if the URL does not contain a file name.

◆  GetString() [1/2]

void GetString ( String s ) const

Retrieves the URL string content.

参数
[out] s Assigned the URL string.

◆  GetString() [2/2]

String GetString ( void  ) const

Retrieves the URL string content.

返回
The URL string.