CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
security_element.h
1
2#ifndef _aspose_system_security_securityelement_h_
3#define _aspose_system_security_securityelement_h_
4
5#include "defines.h"
6#include "system/string.h"
7#include "system/collections/dictionary.h"
8#include "system/collections/list.h"
9
10namespace System {
11namespace Security {
12
18class ASPOSECPP_SHARED_CLASS SecurityElement final : public Object
19{
20public:
23 ASPOSECPP_SHARED_API SecurityElement(const String& tag);
27 ASPOSECPP_SHARED_API SecurityElement(const String& tag, const String& text);
28
43 ASPOSECPP_SHARED_API String get_Tag();
46 ASPOSECPP_SHARED_API void set_Tag(const String& value);
49 ASPOSECPP_SHARED_API String get_Text();
52 ASPOSECPP_SHARED_API void set_Text(const String& value);
53
57 ASPOSECPP_SHARED_API void AddAttribute(const String& name, const String& value);
60 ASPOSECPP_SHARED_API void AddChild(SecurityElement child);
63 ASPOSECPP_SHARED_API String Attribute(const String& name);
64
67 ASPOSECPP_SHARED_API SecurityElement Copy();
71 ASPOSECPP_SHARED_API bool Equal(SecurityElement other);
72
76 static String Escape(const String& str){ return str.Replace(u"&", u"&amp;").Replace(u"<", u"&lt;").Replace(u">", u"&gt;").Replace(u"\"", u"&quot;").Replace(u"\'", u"&apos;"); }
80 static ASPOSECPP_SHARED_API SecurityElement FromString(const String& xml);
84 static ASPOSECPP_SHARED_API bool IsValidAttributeName(const String& name);
88 static ASPOSECPP_SHARED_API bool IsValidAttributeValue(const String& value);
92 static ASPOSECPP_SHARED_API bool IsValidTag(const String& tag);
96 static ASPOSECPP_SHARED_API bool IsValidText(const String& text);
97
101 ASPOSECPP_SHARED_API SecurityElement SearchForChildByTag(const String& tag);
105 ASPOSECPP_SHARED_API String SearchForTextOfTag(const String& tag);
108 ASPOSECPP_SHARED_API String ToString() const override;
109};
110
111}
112}
113
114#endif
List forward declaration.
Definition: list.h:127
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
XML object model for encoding security object. Not implemented. Objects of this class should only be ...
Definition: security_element.h:19
static bool IsValidText(const String &text)
Checks if text is valid.
void AddChild(SecurityElement child)
Adds child tag.
String get_Text()
Gets tag inner text.
SecurityElement(const String &tag)
Constructor.
SecurityElement Copy()
Clones tag.
void AddAttribute(const String &name, const String &value)
Adds attribute to tag.
String Attribute(const String &name)
Gets attribute value.
static String Escape(const String &str)
Escapes characters in XML string.
Definition: security_element.h:76
static bool IsValidAttributeName(const String &name)
Checks if attribute name is valid.
System::Collections::Generic::List< SecurityElement > get_Children()
Gets tag child objects.
void set_Tag(const String &value)
Sets tag name.
void set_Children(System::Collections::Generic::List< SecurityElement > value)
Sets tag child objects.
bool Equal(SecurityElement other)
Checks for parameters equality.
static bool IsValidTag(const String &tag)
Checks if tag is valid.
void set_Attributes(System::Collections::Generic::Dictionary< String, String > value)
Sets tag attributes.
String ToString() const override
Converts tag to string.
String SearchForTextOfTag(const String &tag)
Gets child tag inner text by tag name.
SecurityElement SearchForChildByTag(const String &tag)
Gets child tag by name.
String get_Tag()
Gets tag name.
SecurityElement(const String &tag, const String &text)
Constructor.
void set_Text(const String &value)
Sets tag inner text.
static bool IsValidAttributeValue(const String &value)
Checks if attribute value is valid.
static SecurityElement FromString(const String &xml)
Creates element from XML code.
System::Collections::Generic::Dictionary< String, String > get_Attributes()
Gets tag attributes.
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
String Replace(char_t oldValue, char_t newValue) const
Replaces all occurrences of character in the string.
Definition: db_command.h:9