Skip to content

Commit

Permalink
Первая версия
Browse files Browse the repository at this point in the history
  • Loading branch information
orefkov committed Oct 5, 2022
1 parent b701f10 commit 52d8c29
Show file tree
Hide file tree
Showing 55 changed files with 271,032 additions and 0 deletions.
1,481 changes: 1,481 additions & 0 deletions .clang-format

Large diffs are not rendered by default.

175 changes: 175 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ParameterCase
value: camelBack
- key: readability-identifier-naming.ClassMethodCase
value: camelBack
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.LocalVariableCase
value: camelBack
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.GlobalVariableCase
value: camelBack
- key: readability-identifier-naming.LocalConstantCase
value: aNy_CasE
- key: readability-identifier-naming.ProtectedMemberSuffix
value: _
- key: readability-identifier-naming.ClassMemberCase
value: camelBack
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalVariablePrefix
value: g_
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: false
Checks: '-*,
-bugprone-argument-comment,
-bugprone-branch-clone,
-bugprone-exception-escape,
-bugprone-infinite-loop,
-bugprone-lambda-function-name,
-bugprone-macro-parentheses,
-bugprone-narrowing-conversions,
-bugprone-reserved-identifier,
-bugprone-signed-char-misuse,
-bugprone-string-integer-assignment,
-bugprone-suspicious-include,
-bugprone-use-after-move,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-explicit-virtual-functions,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-interfaces-global-init,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-fuchsia-statically-constructed-objects,
-llvm-namespace-comment,
-misc-definitions-in-headers,
-modernize-avoid-bind,
-modernize-concat-nested-namespaces,
-modernize-deprecated-headers,
-modernize-loop-convert,
-modernize-make-shared,
-modernize-make-unique,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-emplace,
-modernize-use-equals-default,
-modernize-use-equals-delete,
-modernize-use-nodiscard,
-modernize-use-nullptr,
-modernize-use-using,
-performance-faster-string-find,
-performance-for-range-copy,
-performance-implicit-conversion-in-loop,
-performance-inefficient-algorithm,
-performance-inefficient-string-concatenation,
-performance-inefficient-vector-operation,
-performance-move-const-arg,
-performance-move-constructor-init,
-performance-no-automatic-move,
-performance-no-int-to-ptr,
-performance-noexcept-move-constructor,
-performance-trivially-destructible,
-performance-type-promotion-in-math-fn,
-performance-unnecessary-copy-initialization,
-performance-unnecessary-value-param,
-portability-restrict-system-includes,
-portability-simd-intrinsics,
-readability-avoid-const-params-in-decls,
-readability-braces-around-statements,
-readability-const-return-type,
-readability-container-size-empty,
-readability-convert-member-functions-to-static,
-readability-deleted-default,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-naming,
-readability-implicit-bool-conversion,
-readability-inconsistent-declaration-parameter-name,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-make-member-function-const,
-readability-named-parameter,
-readability-non-const-parameter,
-readability-qualified-auto,
-readability-redundant-access-specifiers,
-readability-redundant-control-flow,
-readability-redundant-declaration,
-readability-redundant-member-init,
-readability-redundant-smartptr-get,
-readability-redundant-string-cstr,
-readability-redundant-string-init,
-readability-simplify-boolean-expr,
-readability-static-accessed-through-instance,
-readability-static-definition-in-anonymous-namespace,
-readability-uppercase-literal-suffix,
-readability-use-anyofallof,
bugprone-branch-clone,
bugprone-infinite-loop,
bugprone-lambda-function-name,
bugprone-macro-parentheses,
bugprone-reserved-identifier,
bugprone-string-integer-assignment,
cppcoreguidelines-init-variables,
cppcoreguidelines-no-malloc,
cppcoreguidelines-pro-type-member-init,
misc-definitions-in-headers,
modernize-concat-nested-namespaces,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-use-default-member-init,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-using,
llvm-namespace-comment,
performance-faster-string-find,
performance-for-range-copy,
performance-inefficient-algorithm,
performance-move-const-arg,
performance-move-constructor-init,
performance-no-automatic-move,
performance-noexcept-move-constructor,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
readability-avoid-const-params-in-decls,
readability-convert-member-functions-to-static,
readability-const-return-type,
readability-identifier-naming,
readability-inconsistent-declaration-parameter-name,
readability-make-member-function-const,
readability-redundant-declaration,
readability-static-definition-in-anonymous-namespace,
arcadia-typeid-name-restriction,
bugprone-use-after-move,
performance-implicit-conversion-in-loop,
readability-identifier-naming'
2 changes: 2 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CompileFlags:
CompilationDatabase: _build/objs/x64-debug-clang
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*.{as,cpp,h,hpp,inl,txt}]
charset = utf-8-bom
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
28 changes: 28 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
* text=auto
*.htm text eol=crlf
*.html text eol=crlf
renames.txt text eol=crlf

*.v text eol=lf
*.as text eol=lf
*.cpp text eol=lf
*.h text eol=lf
*.js text eol=lf

*.feature text
*.md text
*.json text eol=lf

*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

*.sh text eol=lf
*.groovy text eol=lf

# Archives
# 1C
*.xml text eol=crlf

*.bsl text eol=crlf
*.os text eol=crlf
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_build/
1C/
out/
!.gitignore
*.ipch
*.VC.*
.vs/
165 changes: 165 additions & 0 deletions 1C_include/AddInDefBase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/*
* Warning!!!
* DO NOT ALTER THIS FILE!
*/

#ifndef __ADAPTER_DEF_H__
#define __ADAPTER_DEF_H__
#include "types.h"

struct IInterface
{
};


enum Interfaces
{
eIMsgBox = 0,
eIPlatformInfo,
#if defined(__ANDROID__)
eIAndroidComponentHelper,
#endif
eIAttachedInfo,
};

////////////////////////////////////////////////////////////////////////////////
/**
* This class serves as representation of a platform for external
* components External components use it to communicate with a platform.
*
*/
/// Base interface for object components.
class IAddInDefBase
{
public:
virtual ~IAddInDefBase() {}
/// Adds the error message
/**
* @param wcode - error code
* @param source - source of error
* @param descr - description of error
* @param scode - error code (HRESULT)
* @return the result of
*/
virtual bool ADDIN_API AddError(unsigned short wcode, const WCHAR_T* source,
const WCHAR_T* descr, long scode) = 0;

/// Reads a property value
/**
* @param wszPropName -property name
* @param pVal - value being returned
* @param pErrCode - error code (if any error occured)
* @param errDescriptor - error description (if any error occured)
* @return the result of read.
*/
virtual bool ADDIN_API Read(WCHAR_T* wszPropName,
tVariant* pVal,
long *pErrCode,
WCHAR_T** errDescriptor) = 0;
/// Writes a property value
/**
* @param wszPropName - property name
* @param pVar - new property value
* @return the result of write.
*/
virtual bool ADDIN_API Write(WCHAR_T* wszPropName,
tVariant *pVar) = 0;

///Registers profile components
/**
* @param wszProfileName - profile name
* @return the result of
*/
virtual bool ADDIN_API RegisterProfileAs(WCHAR_T* wszProfileName) = 0;

/// Changes the depth of event buffer
/**
* @param lDepth - new depth of event buffer
* @return the result of
*/
virtual bool ADDIN_API SetEventBufferDepth(long lDepth) = 0;
/// Returns the depth of event buffer
/**
* @return the depth of event buffer
*/
virtual long ADDIN_API GetEventBufferDepth() = 0;
/// Registers external event
/**
* @param wszSource - source of event
* @param wszMessage - event message
* @param wszData - message parameters
* @return the result of
*/
virtual bool ADDIN_API ExternalEvent(WCHAR_T* wszSource,
WCHAR_T* wszMessage,
WCHAR_T* wszData) = 0;
/// Clears event buffer
/**
*/
virtual void ADDIN_API CleanEventBuffer() = 0;

/// Sets status line contents
/**
* @param wszStatusLine - new status line contents
* @return the result of
*/
virtual bool ADDIN_API SetStatusLine(WCHAR_T* wszStatusLine) = 0;
/// Resets the status line contents
/**
* @return the result of
*/
virtual void ADDIN_API ResetStatusLine() = 0;
};

class IAddInDefBaseEx :
public IAddInDefBase
{
public:
virtual ~IAddInDefBaseEx() {}

virtual IInterface* ADDIN_API GetInterface(Interfaces iface) = 0;
};

struct IMsgBox :
public IInterface
{
virtual bool ADDIN_API Confirm(const WCHAR_T* queryText, tVariant* retVal) = 0;

virtual bool ADDIN_API Alert(const WCHAR_T* text) = 0;
};

struct IPlatformInfo :
public IInterface
{
enum AppType
{
eAppUnknown = -1,
eAppThinClient = 0,
eAppThickClient,
eAppWebClient,
eAppServer,
eAppExtConn,
eAppMobileClient,
eAppMobileServer,
};

struct AppInfo
{
const WCHAR_T* AppVersion;
const WCHAR_T* UserAgentInformation;
AppType Application;
};

virtual const AppInfo* ADDIN_API GetPlatformInfo() = 0;
};
struct IAttachedInfo :
public IInterface
{
enum AttachedType
{
eAttachedIsolated = 0,
eAttachedNotIsolated,
};
virtual const AttachedType ADDIN_API GetAttachedInfo() = 0;
};
#endif //__ADAPTER_DEF_H__
Loading

0 comments on commit 52d8c29

Please sign in to comment.