コード例 #1
0
        public static FPInt GetNumClasses(FPRetentionClassContextRef inContextRef)
        {
            FPInt retval = SDK.FPRetentionClassContext_GetNumClasses(inContextRef);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #2
0
ファイル: Pool.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPInt GetLastError()
        {
            FPInt retval = SDK.FPPool_GetLastError();

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #3
0
ファイル: Pool.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPInt GetGlobalOption(string inOptionName)
        {
            FPInt retval = SDK.FPPool_GetGlobalOption8(inOptionName);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #4
0
ファイル: Pool.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPInt GetIntOption(FPPoolRef inPool, string inOptionName)
        {
            FPInt retval = SDK.FPPool_GetIntOption8(inPool, inOptionName);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #5
0
 public Frog(FPInt x, FPInt y)
     : base()
 {
     _position.X = x;
     _position.Y = y;
     //AddBehavior(new CircleMovement(this, new Vector2(x, y), 50, MathHelper.Pi));
 }
コード例 #6
0
        public static FPQueryResultRef FetchResult(FPPoolQueryRef inPoolQueryRef, FPInt inTimeout)
        {
            FPQueryResultRef retval = SDK.FPPoolQuery_FetchResult(inPoolQueryRef, inTimeout);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="inCapabilityName"></param>
        /// <param name="inCapabilityAttributeName"></param>
        /// <returns></returns>
        internal string GetCapability(string inCapabilityName, string inCapabilityAttributeName)
        {
            StringBuilder outString = new StringBuilder();
            FPInt         bufSize   = 0;
            FPInt         len       = 0;

            do
            {
                bufSize += FPMisc.STRING_BUFFER_SIZE;
                len     += FPMisc.STRING_BUFFER_SIZE;
                outString.EnsureCapacity((int)bufSize);
                try
                {
                    Native.Pool.GetCapability(this, inCapabilityName, inCapabilityAttributeName, outString, ref len);
                }
                catch (FPLibraryException e)
                {
                    ErrorInfo err = e.ErrorInfo;

                    if (e.ErrorInfo.Error == FPMisc.ATTR_NOT_FOUND_ERR)
                    {
                        return("");
                    }
                    else
                    {
                        throw e;
                    }
                }
            } while (len > bufSize);

            return(outString.ToString());
        }
コード例 #8
0
        public static FPInt GetNumAttributes(FPTagRef inTag)
        {
            FPInt retval = SDK.FPTag_GetNumAttributes(inTag);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #9
0
        public static FPInt FetchResult(FPQueryRef inQuery, StringBuilder outResultClip, ref FPLong outTimestamp, FPInt inTimeout)
        {
            FPInt retval = SDK.FPQuery_FetchResult(inQuery, outResultClip, ref outTimestamp, inTimeout);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #10
0
ファイル: Clip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPInt GetNumDescriptionAttributes(FPClipRef inClip)
        {
            FPInt retval = SDK.FPClip_GetNumDescriptionAttributes(inClip);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #11
0
        public static FPInt GetType(FPQueryResultRef inQueryResultRef)
        {
            FPInt retval = SDK.FPQueryResult_GetType(inQueryResultRef);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #12
0
ファイル: Clip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPClipRef Open(FPPoolRef inPool, string inClipID, FPInt inOpenMode)
        {
            FPClipRef retval = SDK.FPClip_Open(inPool, inClipID, inOpenMode);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #13
0
ファイル: Logging.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPInt GetMaxOverflows(FPLogStateRef inRef)
        {
            FPInt retval = SDK.FPLogState_GetMaxOverflows(inRef);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #14
0
ファイル: Logging.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPInt GetLogFilter(FPLogStateRef inRef)
        {
            FPInt retval = SDK.FPLogState_GetLogFilter(inRef);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #15
0
        public static FPInt GetType(FPQueryExpressionRef inRef)
        {
            FPInt retval = SDK.FPQueryExpression_GetType(inRef);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #16
0
        public static FPInt BlobExists(FPTagRef inTag)
        {
            FPInt retval = SDK.FPTag_BlobExists(inTag);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #17
0
ファイル: Clip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        public static FPInt GetNumTags(FPClipRef inClip)
        {
            FPInt retval = SDK.FPClip_GetNumTags(inClip);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #18
0
ファイル: Tag.cs プロジェクト: eddiepaz/EMC.Centera.SDK
        public static FPTagRef Copy(FPTagRef inTag, FPTagRef inNewParent, FPInt inOptions)
        {
            var retval = SDK.FPTag_Copy(inTag, inNewParent, inOptions);

            SDK.CheckAndThrowError();
            return(retval);
        }
コード例 #19
0
        /// <summary>
        ///Converts a Time (represented by a long valueof the number of seconds since the UNIX Epoch) to a string representation.
        ///
        ///@param inTime	The long representing the Time.
        ///@param inOptions	Allows for inclusion or exclusion of the millisecond element in the returned string.
        ///@return A string representing the Time value.
        /// </summary>
        public static string FPTime_SecondsToString(long inTime, FPInt inOptions)
        {
            var   outClusterTime = new StringBuilder();
            FPInt bufSize        = 0;
            FPInt clusterTimeLen = 0;

            do
            {
                bufSize        += FPMisc.STRING_BUFFER_SIZE;
                clusterTimeLen += FPMisc.STRING_BUFFER_SIZE;
                outClusterTime.EnsureCapacity((int)bufSize);
                Native.FP.FPTime_SecondsToString((FPLong)inTime, outClusterTime, ref clusterTimeLen, inOptions);
            } while(clusterTimeLen > bufSize);

            return(outClusterTime.ToString());
        }
コード例 #20
0
ファイル: FPClip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        /// <summary>
        ///Get a description attribute from the Clip level metadata. See API Guide: FPClip_GetDescriptionAttribute
        ///
        ///@param inAttrName	The name of the description attribute.
        ///@return The string value of the Description attribute.
        /// </summary>
        public string GetAttribute(string inAttrName)
        {
            byte[] outString;
            FPInt  bufSize = 0;
            FPInt  len;

            do
            {
                bufSize  += FPMisc.STRING_BUFFER_SIZE;
                len       = bufSize;
                outString = new byte[(int)bufSize];
                Native.Clip.GetDescriptionAttribute(this, inAttrName, ref outString, ref len);
            } while (len > bufSize);

            return(Encoding.UTF8.GetString(outString, 0, (int)len - 1));
        }
コード例 #21
0
ファイル: FPMisc.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        /// <summary>
        ///Converts a Time (represented by a long value) to a string representation.
        ///
        ///@param inTime	The long representing the Time (number of seconds since the UNIX Epoch).
        ///@return An string representing the Time value.
        /// </summary>
        public static string FPTime_LongToString(long inTime)
        {
            StringBuilder outClusterTime = new StringBuilder();
            FPInt         bufSize        = 0;
            FPInt         clusterTimeLen = 0;

            do
            {
                bufSize        += STRING_BUFFER_SIZE;
                clusterTimeLen += STRING_BUFFER_SIZE;
                outClusterTime.EnsureCapacity((int)bufSize);
                Native.FP.FPTime_LongToString((FPLong)inTime, outClusterTime, ref clusterTimeLen);
            } while (clusterTimeLen > bufSize);

            return(outClusterTime.ToString());
        }
コード例 #22
0
        /// <summary>
        ///Retrieve the value of an Attribute of the Clip associated with this result.
        ///See API Guide: FPQueryResult_GetField
        ///
        ///@param	inAttrName	The name of the attribute to retieve from the current member of the result set.
        ///@return	The value of the Attribute  of the Clip associated with the current member of the result set.
        /// </summary>
        public string GetField(string inAttrName)
        {
            byte[] outString;
            FPInt  bufSize = 0;
            FPInt  len     = 0;

            do
            {
                bufSize  += FPMisc.STRING_BUFFER_SIZE;
                len       = bufSize;
                outString = new byte[(int)bufSize];

                Native.QueryResult.GetField(theResult, inAttrName, ref outString, ref len);
            } while (len > bufSize);

            return(Encoding.UTF8.GetString(outString, 0, (int)len - 1));
        }
コード例 #23
0
ファイル: FPTag.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        /// <summary>
        ///Returns an attribute name and value from this Tag using the given index number.
        ///See API Guide: FPTag_GetIndexAttribute
        ///
        ///@param	inIndex		The index of the attribute to retrieve.
        ///@return	An FPAttribute contining the name-value string pair.
        /// </summary>
        public FPAttribute GetAttributeByIndex(int inIndex)
        {
            byte[] nameString;
            byte[] valString;
            FPInt  nameSize = 0, nameLen = 0, valSize = 0, valLen = 0;

            do
            {
                nameSize  += FPMisc.STRING_BUFFER_SIZE;
                nameLen    = nameSize;
                nameString = new byte[(int)nameSize];

                valSize  += FPMisc.STRING_BUFFER_SIZE;
                valLen    = valSize;
                valString = new byte[(int)valSize];

                Native.Tag.GetIndexAttribute(this, (FPInt)inIndex, ref nameString, ref nameLen, ref valString, ref valLen);
            } while (nameLen > nameSize || valLen > valSize);

            return(new FPAttribute(Encoding.UTF8.GetString(nameString, 0, (int)nameLen - 1), Encoding.UTF8.GetString(valString, 0, (int)valLen - 1)));
        }
コード例 #24
0
ファイル: SDK.cs プロジェクト: Quadrotech/EMC.Centera.SDK
        /// <summary>
        /// Generic error checking routine for transforming SDK errors into .NET exceptions
        /// </summary>
        public static void CheckAndThrowError()
        {
            /* Get the error code of the last SDK API function call */
            FPInt errorCode = FPPool_GetLastError();

            if (0 != errorCode)
            {
                FPErrorInfo errInfo = new FPErrorInfo();

                unsafe
                {
                    IntPtr ptr = (IntPtr)Marshal.AllocHGlobal((int)1024).ToPointer();

                    /* Get the error message of the last SDK API function call */
                    FPPool_GetLastErrorInfo(ptr);
                    errInfo = (FPErrorInfo)Marshal.PtrToStructure(ptr, typeof(FPErrorInfo));
                    Marshal.FreeHGlobal(ptr);
                }

                throw new FPLibraryException(errInfo);
            }
        }
コード例 #25
0
 public static void GetField(FPQueryResultRef inQueryResultRef, string inAttrName, ref byte[] outAttrValue, ref FPInt ioAttrValueLen)
 {
     SDK.FPQueryResult_GetField8(inQueryResultRef, inAttrName, outAttrValue, ref ioAttrValueLen);
     SDK.CheckAndThrowError();
 }
コード例 #26
0
 public static void GetName(FPRetentionClassRef inClassRef, ref byte[] outName, ref FPInt ioNameLen)
 {
     SDK.FPRetentionClass_GetName8(inClassRef, outName, ref ioNameLen);
     SDK.CheckAndThrowError();
 }
コード例 #27
0
ファイル: Clip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
 public static void GetEBREventTime(FPClipRef inClip, StringBuilder outEBREventTime, ref FPInt ioEBREventTimeLen)
 {
     SDK.FPClip_GetEBREventTime8(inClip, outEBREventTime, ref ioEBREventTimeLen);
     SDK.CheckAndThrowError();
 }
コード例 #28
0
ファイル: Clip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
 public static void GetDescriptionAttributeIndex(FPClipRef inClip, FPInt inIndex, ref byte[] outAttrName, ref FPInt ioAttrNameLen, ref byte[] outAttrValue, ref FPInt ioAttrValueLen)
 {
     SDK.FPClip_GetDescriptionAttributeIndex8(inClip, inIndex, outAttrName, ref ioAttrNameLen, outAttrValue, ref ioAttrValueLen);
     SDK.CheckAndThrowError();
 }
コード例 #29
0
ファイル: Clip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
 public static void GetDescriptionAttribute(FPClipRef inClip, string inAttrName, ref byte[] outAttrValue, ref FPInt ioAttrValueLen)
 {
     SDK.FPClip_GetDescriptionAttribute8(inClip, inAttrName, outAttrValue, ref ioAttrValueLen);
     SDK.CheckAndThrowError();
 }
コード例 #30
0
ファイル: Clip.cs プロジェクト: Quadrotech/EMC.Centera.SDK
 public static void GetCreationDate(FPClipRef inClip, StringBuilder outDate, ref FPInt ioDateLen)
 {
     SDK.FPClip_GetCreationDate8(inClip, outDate, ref ioDateLen);
     SDK.CheckAndThrowError();
 }