You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
2.9 KiB
101 lines
2.9 KiB
/*=============================================================================
|
|
Copyright (c) 1992 Electronic Data Systems Corporation
|
|
|
|
Unpublished - All rights reserved
|
|
THIS PROGRAM IS AN UNPUBLISHED WORK FULLY PROTECTED BY THE UNITED STATES
|
|
COPYRIGHT LAWS AND IS CONSIDERED A TRADE SECRET BELONGING TO THE COPYRIGHT
|
|
HOLDER.
|
|
===============================================================================
|
|
File description:
|
|
|
|
|
|
FILE : FeatureKeyCheck.hxx
|
|
MODULE: TCCORE
|
|
|
|
These classes provide simple logical support for UGS common licensing check.
|
|
License checks can, for example, take the following format.
|
|
|
|
CHANGE_USER OR (CHANGE_AUTHOR AND CHANGE_ACCESS)
|
|
|
|
====================================================================================================
|
|
Date Name Description of Change
|
|
|
|
$HISTORY$
|
|
===================================================================================================*/
|
|
|
|
#ifndef TEAMCENTER__FEATUREKEYCHECK_HXX
|
|
#define TEAMCENTER__FEATUREKEYCHECK_HXX
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <tccore/libtccore_exports.h>
|
|
|
|
namespace Teamcenter
|
|
{
|
|
class FeatureKeyCheck;
|
|
class FeatureKeyCheckAND;
|
|
class FeatureKeyCheckOR;
|
|
}
|
|
|
|
class TCCORE_API Teamcenter::FeatureKeyCheck
|
|
{
|
|
public:
|
|
FeatureKeyCheck();
|
|
explicit FeatureKeyCheck(std::string featureKeyStr);
|
|
virtual ~FeatureKeyCheck();
|
|
|
|
int getFeatureKey(std::string &featureKeyStr);
|
|
|
|
virtual int toString(std::string &str);
|
|
|
|
virtual int evaluate(const std::string &BOName, int &result, bool &fullCheck);
|
|
virtual int evaluateFirst(const std::string &BOName, int &result);
|
|
|
|
protected:
|
|
std::string featureKey;
|
|
};
|
|
|
|
class TCCORE_API Teamcenter::FeatureKeyCheckAND : public Teamcenter::FeatureKeyCheck
|
|
{
|
|
public:
|
|
FeatureKeyCheckAND();
|
|
FeatureKeyCheckAND(FeatureKeyCheck *keyChecks[], int numChecks);
|
|
FeatureKeyCheckAND(std::string keyChecks[], int numChecks);
|
|
~FeatureKeyCheckAND();
|
|
|
|
int getNumKeys(int *num);
|
|
|
|
int toString(std::string &str);
|
|
|
|
int evaluate(const std::string &BOName, int &result, bool &fullCheck);
|
|
int evaluateFirst(const std::string &BOName, int &result);
|
|
|
|
private:
|
|
std::vector<FeatureKeyCheck *> featureKeyChecks;
|
|
int count;
|
|
};
|
|
|
|
class TCCORE_API Teamcenter::FeatureKeyCheckOR : public Teamcenter::FeatureKeyCheck
|
|
{
|
|
public:
|
|
FeatureKeyCheckOR();
|
|
FeatureKeyCheckOR(FeatureKeyCheck *keyChecks[], int numChecks);
|
|
FeatureKeyCheckOR(std::string keyChecks[], int numChecks);
|
|
~FeatureKeyCheckOR();
|
|
|
|
int getNumKeys(int *num);
|
|
|
|
int toString(std::string &str);
|
|
int toMsgString(std::string &str);
|
|
|
|
int evaluate(const std::string &BOName, int &result, bool &fullCheck);
|
|
int evaluateFirst(const std::string &BOName, int &result);
|
|
|
|
private:
|
|
std::vector<FeatureKeyCheck *> featureKeyChecks;
|
|
int count;
|
|
};
|
|
|
|
#include <tccore/libtccore_undef.h>
|
|
#endif
|