Detailed Description

Provides methods to license the component.

Examples

Aspose.Words will attempt to find the license file in the embedded resources or in the assembly folders.

auto license = MakeObject<License>();
license->SetLicense(u"Aspose.Words.Cpp.lic");

#include <Aspose.Words.Cpp/Licensing/License.h>

+ Inheritance diagram for Aspose::Words::License:

Public Member Functions

 License ()
 Initializes a new instance of this class. More...
 
virtual const TypeInfoGetType () const override
 
virtual bool Is (const TypeInfo &target) const override
 
void SetLicense (SharedPtr< Stream > stream)
 Licenses the component. More...
 
void SetLicense (String licenseName)
 Licenses the component. More...
 
- Public Member Functions inherited from Object
ASPOSECPP_SHARED_API Object ()
 
ASPOSECPP_SHARED_API Object (Object const &x)
 
virtual ASPOSECPP_SHARED_API ~Object ()
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 
Detail::SmartPtrCounter * GetCounter ()
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 
ASPOSECPP_SHARED_API void Lock ()
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 
Objectoperator= (Object const &x)
 
bool ReferenceEquals (String const &str, std::nullptr_t)
 
bool ReferenceEquals (String const &str1, String const &str2)
 
int RemovedSharedRefs (int count)
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 
int SharedCount () const
 
ObjectSharedRefAdded ()
 
int SharedRefRemovedSafe ()
 
virtual ASPOSECPP_SHARED_API String ToString () const
 
ASPOSECPP_SHARED_API void Unlock ()
 
Detail::SmartPtrCounter * WeakRefAdded ()
 
void WeakRefRemoved ()
 

Static Public Member Functions

static const TypeInfoType ()
 
- Static Public Member Functions inherited from Object
bool Equals (double const &objA, double const &objB)
 
bool Equals (float const &objA, float const &objB)
 
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 
static const TypeInfoType ()
 

Additional Inherited Members

- Public Types inherited from Object
typedef SmartPtr< Objectptr
 
typedef System::Details::SharedMembersType shared_members_type
 

Constructor & Destructor Documentation

◆ License()

Aspose::Words::License::License ( )

Initializes a new instance of this class.

Examples

Aspose.Words will attempt to find the license file in the embedded resources or in the assembly folders.

auto license = MakeObject<License>();
license->SetLicense(u"Aspose.Words.Cpp.lic");

Member Function Documentation

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::License::GetType ( ) const
overridevirtual

Reimplemented from System::Object.

◆ Is()

virtual bool Aspose::Words::License::Is ( const System::TypeInfo target) const
overridevirtual

Reimplemented from System::Object.

◆ SetLicense() [1/2]

void Aspose::Words::License::SetLicense ( System::SharedPtr< System::IO::Stream stream)

Licenses the component.

Use this method to load a license from a stream.

Parameters
streamA stream that contains the license.
Examples

Shows how to initialize a license from a stream.

auto license = MakeObject<License>();
license->SetLicense(myStream);

◆ SetLicense() [2/2]

void Aspose::Words::License::SetLicense ( System::String  licenseName)

Licenses the component.

Tries to find the license in the following locations:

  1. Explicit path.
  2. The folder that contains the Aspose component assembly.
  3. The folder that contains the client's calling assembly.
  4. The folder that contains the entry (startup) assembly.
  5. An embedded resource in the client's calling assembly.

Note:On the .NET Compact Framework, tries to find the license only in these locations:

  1. Explicit path.
  2. An embedded resource in the client's calling assembly.
Parameters
licenseNameCan be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode.
Examples

Aspose.Words will attempt to find the license file in the embedded resources or in the assembly folders.

auto license = MakeObject<License>();
license->SetLicense(u"Aspose.Words.Cpp.lic");

◆ Type()

static const System::TypeInfo& Aspose::Words::License::Type ( )
static