Skip to content

Commit 52d8c29

Browse files
committed
Первая версия
1 parent b701f10 commit 52d8c29

55 files changed

Lines changed: 271032 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 1481 additions & 0 deletions
Large diffs are not rendered by default.

.clang-tidy

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
CheckOptions:
2+
- key: readability-identifier-naming.ClassCase
3+
value: CamelCase
4+
- key: readability-identifier-naming.ParameterCase
5+
value: camelBack
6+
- key: readability-identifier-naming.ClassMethodCase
7+
value: camelBack
8+
- key: readability-identifier-naming.FunctionCase
9+
value: camelBack
10+
- key: readability-identifier-naming.EnumConstantCase
11+
value: CamelCase
12+
- key: readability-identifier-naming.LocalVariableCase
13+
value: camelBack
14+
- key: readability-identifier-naming.PrivateMemberSuffix
15+
value: _
16+
- key: readability-identifier-naming.EnumCase
17+
value: CamelCase
18+
- key: readability-identifier-naming.GlobalVariableCase
19+
value: camelBack
20+
- key: readability-identifier-naming.LocalConstantCase
21+
value: aNy_CasE
22+
- key: readability-identifier-naming.ProtectedMemberSuffix
23+
value: _
24+
- key: readability-identifier-naming.ClassMemberCase
25+
value: camelBack
26+
- key: readability-identifier-naming.MacroDefinitionCase
27+
value: UPPER_CASE
28+
- key: readability-identifier-naming.GlobalVariablePrefix
29+
value: g_
30+
- key: readability-identifier-naming.GlobalConstantCase
31+
value: UPPER_CASE
32+
- key: performance-move-const-arg.CheckTriviallyCopyableMove
33+
value: false
34+
Checks: '-*,
35+
-bugprone-argument-comment,
36+
-bugprone-branch-clone,
37+
-bugprone-exception-escape,
38+
-bugprone-infinite-loop,
39+
-bugprone-lambda-function-name,
40+
-bugprone-macro-parentheses,
41+
-bugprone-narrowing-conversions,
42+
-bugprone-reserved-identifier,
43+
-bugprone-signed-char-misuse,
44+
-bugprone-string-integer-assignment,
45+
-bugprone-suspicious-include,
46+
-bugprone-use-after-move,
47+
-cppcoreguidelines-avoid-c-arrays,
48+
-cppcoreguidelines-avoid-magic-numbers,
49+
-cppcoreguidelines-avoid-non-const-global-variables,
50+
-cppcoreguidelines-explicit-virtual-functions,
51+
-cppcoreguidelines-init-variables,
52+
-cppcoreguidelines-interfaces-global-init,
53+
-cppcoreguidelines-macro-usage,
54+
-cppcoreguidelines-narrowing-conversions,
55+
-cppcoreguidelines-no-malloc,
56+
-cppcoreguidelines-non-private-member-variables-in-classes,
57+
-cppcoreguidelines-owning-memory,
58+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
59+
-cppcoreguidelines-pro-bounds-constant-array-index,
60+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
61+
-cppcoreguidelines-pro-type-const-cast,
62+
-cppcoreguidelines-pro-type-cstyle-cast,
63+
-cppcoreguidelines-pro-type-member-init,
64+
-cppcoreguidelines-pro-type-reinterpret-cast,
65+
-cppcoreguidelines-pro-type-static-cast-downcast,
66+
-cppcoreguidelines-pro-type-union-access,
67+
-cppcoreguidelines-pro-type-vararg,
68+
-cppcoreguidelines-special-member-functions,
69+
-fuchsia-statically-constructed-objects,
70+
-llvm-namespace-comment,
71+
-misc-definitions-in-headers,
72+
-modernize-avoid-bind,
73+
-modernize-concat-nested-namespaces,
74+
-modernize-deprecated-headers,
75+
-modernize-loop-convert,
76+
-modernize-make-shared,
77+
-modernize-make-unique,
78+
-modernize-pass-by-value,
79+
-modernize-raw-string-literal,
80+
-modernize-use-auto,
81+
-modernize-use-default-member-init,
82+
-modernize-use-emplace,
83+
-modernize-use-equals-default,
84+
-modernize-use-equals-delete,
85+
-modernize-use-nodiscard,
86+
-modernize-use-nullptr,
87+
-modernize-use-using,
88+
-performance-faster-string-find,
89+
-performance-for-range-copy,
90+
-performance-implicit-conversion-in-loop,
91+
-performance-inefficient-algorithm,
92+
-performance-inefficient-string-concatenation,
93+
-performance-inefficient-vector-operation,
94+
-performance-move-const-arg,
95+
-performance-move-constructor-init,
96+
-performance-no-automatic-move,
97+
-performance-no-int-to-ptr,
98+
-performance-noexcept-move-constructor,
99+
-performance-trivially-destructible,
100+
-performance-type-promotion-in-math-fn,
101+
-performance-unnecessary-copy-initialization,
102+
-performance-unnecessary-value-param,
103+
-portability-restrict-system-includes,
104+
-portability-simd-intrinsics,
105+
-readability-avoid-const-params-in-decls,
106+
-readability-braces-around-statements,
107+
-readability-const-return-type,
108+
-readability-container-size-empty,
109+
-readability-convert-member-functions-to-static,
110+
-readability-deleted-default,
111+
-readability-else-after-return,
112+
-readability-function-cognitive-complexity,
113+
-readability-function-size,
114+
-readability-identifier-naming,
115+
-readability-implicit-bool-conversion,
116+
-readability-inconsistent-declaration-parameter-name,
117+
-readability-isolate-declaration,
118+
-readability-magic-numbers,
119+
-readability-make-member-function-const,
120+
-readability-named-parameter,
121+
-readability-non-const-parameter,
122+
-readability-qualified-auto,
123+
-readability-redundant-access-specifiers,
124+
-readability-redundant-control-flow,
125+
-readability-redundant-declaration,
126+
-readability-redundant-member-init,
127+
-readability-redundant-smartptr-get,
128+
-readability-redundant-string-cstr,
129+
-readability-redundant-string-init,
130+
-readability-simplify-boolean-expr,
131+
-readability-static-accessed-through-instance,
132+
-readability-static-definition-in-anonymous-namespace,
133+
-readability-uppercase-literal-suffix,
134+
-readability-use-anyofallof,
135+
bugprone-branch-clone,
136+
bugprone-infinite-loop,
137+
bugprone-lambda-function-name,
138+
bugprone-macro-parentheses,
139+
bugprone-reserved-identifier,
140+
bugprone-string-integer-assignment,
141+
cppcoreguidelines-init-variables,
142+
cppcoreguidelines-no-malloc,
143+
cppcoreguidelines-pro-type-member-init,
144+
misc-definitions-in-headers,
145+
modernize-concat-nested-namespaces,
146+
modernize-make-shared,
147+
modernize-make-unique,
148+
modernize-pass-by-value,
149+
modernize-use-default-member-init,
150+
modernize-use-emplace,
151+
modernize-use-equals-default,
152+
modernize-use-equals-delete,
153+
modernize-use-using,
154+
llvm-namespace-comment,
155+
performance-faster-string-find,
156+
performance-for-range-copy,
157+
performance-inefficient-algorithm,
158+
performance-move-const-arg,
159+
performance-move-constructor-init,
160+
performance-no-automatic-move,
161+
performance-noexcept-move-constructor,
162+
performance-unnecessary-copy-initialization,
163+
performance-unnecessary-value-param,
164+
readability-avoid-const-params-in-decls,
165+
readability-convert-member-functions-to-static,
166+
readability-const-return-type,
167+
readability-identifier-naming,
168+
readability-inconsistent-declaration-parameter-name,
169+
readability-make-member-function-const,
170+
readability-redundant-declaration,
171+
readability-static-definition-in-anonymous-namespace,
172+
arcadia-typeid-name-restriction,
173+
bugprone-use-after-move,
174+
performance-implicit-conversion-in-loop,
175+
readability-identifier-naming'

.clangd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CompileFlags:
2+
CompilationDatabase: _build/objs/x64-debug-clang

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*.{as,cpp,h,hpp,inl,txt}]
4+
charset = utf-8-bom
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
* text=auto
2+
*.htm text eol=crlf
3+
*.html text eol=crlf
4+
renames.txt text eol=crlf
5+
6+
*.v text eol=lf
7+
*.as text eol=lf
8+
*.cpp text eol=lf
9+
*.h text eol=lf
10+
*.js text eol=lf
11+
12+
*.feature text
13+
*.md text
14+
*.json text eol=lf
15+
16+
*.bat text eol=crlf
17+
*.cmd text eol=crlf
18+
*.ps1 text eol=crlf
19+
20+
*.sh text eol=lf
21+
*.groovy text eol=lf
22+
23+
# Archives
24+
# 1C
25+
*.xml text eol=crlf
26+
27+
*.bsl text eol=crlf
28+
*.os text eol=crlf

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_build/
2+
1C/
3+
out/
4+
!.gitignore
5+
*.ipch
6+
*.VC.*
7+
.vs/

1C_include/AddInDefBase.h

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
/*
2+
* Warning!!!
3+
* DO NOT ALTER THIS FILE!
4+
*/
5+
6+
#ifndef __ADAPTER_DEF_H__
7+
#define __ADAPTER_DEF_H__
8+
#include "types.h"
9+
10+
struct IInterface
11+
{
12+
};
13+
14+
15+
enum Interfaces
16+
{
17+
eIMsgBox = 0,
18+
eIPlatformInfo,
19+
#if defined(__ANDROID__)
20+
eIAndroidComponentHelper,
21+
#endif
22+
eIAttachedInfo,
23+
};
24+
25+
////////////////////////////////////////////////////////////////////////////////
26+
/**
27+
* This class serves as representation of a platform for external
28+
* components External components use it to communicate with a platform.
29+
*
30+
*/
31+
/// Base interface for object components.
32+
class IAddInDefBase
33+
{
34+
public:
35+
virtual ~IAddInDefBase() {}
36+
/// Adds the error message
37+
/**
38+
* @param wcode - error code
39+
* @param source - source of error
40+
* @param descr - description of error
41+
* @param scode - error code (HRESULT)
42+
* @return the result of
43+
*/
44+
virtual bool ADDIN_API AddError(unsigned short wcode, const WCHAR_T* source,
45+
const WCHAR_T* descr, long scode) = 0;
46+
47+
/// Reads a property value
48+
/**
49+
* @param wszPropName -property name
50+
* @param pVal - value being returned
51+
* @param pErrCode - error code (if any error occured)
52+
* @param errDescriptor - error description (if any error occured)
53+
* @return the result of read.
54+
*/
55+
virtual bool ADDIN_API Read(WCHAR_T* wszPropName,
56+
tVariant* pVal,
57+
long *pErrCode,
58+
WCHAR_T** errDescriptor) = 0;
59+
/// Writes a property value
60+
/**
61+
* @param wszPropName - property name
62+
* @param pVar - new property value
63+
* @return the result of write.
64+
*/
65+
virtual bool ADDIN_API Write(WCHAR_T* wszPropName,
66+
tVariant *pVar) = 0;
67+
68+
///Registers profile components
69+
/**
70+
* @param wszProfileName - profile name
71+
* @return the result of
72+
*/
73+
virtual bool ADDIN_API RegisterProfileAs(WCHAR_T* wszProfileName) = 0;
74+
75+
/// Changes the depth of event buffer
76+
/**
77+
* @param lDepth - new depth of event buffer
78+
* @return the result of
79+
*/
80+
virtual bool ADDIN_API SetEventBufferDepth(long lDepth) = 0;
81+
/// Returns the depth of event buffer
82+
/**
83+
* @return the depth of event buffer
84+
*/
85+
virtual long ADDIN_API GetEventBufferDepth() = 0;
86+
/// Registers external event
87+
/**
88+
* @param wszSource - source of event
89+
* @param wszMessage - event message
90+
* @param wszData - message parameters
91+
* @return the result of
92+
*/
93+
virtual bool ADDIN_API ExternalEvent(WCHAR_T* wszSource,
94+
WCHAR_T* wszMessage,
95+
WCHAR_T* wszData) = 0;
96+
/// Clears event buffer
97+
/**
98+
*/
99+
virtual void ADDIN_API CleanEventBuffer() = 0;
100+
101+
/// Sets status line contents
102+
/**
103+
* @param wszStatusLine - new status line contents
104+
* @return the result of
105+
*/
106+
virtual bool ADDIN_API SetStatusLine(WCHAR_T* wszStatusLine) = 0;
107+
/// Resets the status line contents
108+
/**
109+
* @return the result of
110+
*/
111+
virtual void ADDIN_API ResetStatusLine() = 0;
112+
};
113+
114+
class IAddInDefBaseEx :
115+
public IAddInDefBase
116+
{
117+
public:
118+
virtual ~IAddInDefBaseEx() {}
119+
120+
virtual IInterface* ADDIN_API GetInterface(Interfaces iface) = 0;
121+
};
122+
123+
struct IMsgBox :
124+
public IInterface
125+
{
126+
virtual bool ADDIN_API Confirm(const WCHAR_T* queryText, tVariant* retVal) = 0;
127+
128+
virtual bool ADDIN_API Alert(const WCHAR_T* text) = 0;
129+
};
130+
131+
struct IPlatformInfo :
132+
public IInterface
133+
{
134+
enum AppType
135+
{
136+
eAppUnknown = -1,
137+
eAppThinClient = 0,
138+
eAppThickClient,
139+
eAppWebClient,
140+
eAppServer,
141+
eAppExtConn,
142+
eAppMobileClient,
143+
eAppMobileServer,
144+
};
145+
146+
struct AppInfo
147+
{
148+
const WCHAR_T* AppVersion;
149+
const WCHAR_T* UserAgentInformation;
150+
AppType Application;
151+
};
152+
153+
virtual const AppInfo* ADDIN_API GetPlatformInfo() = 0;
154+
};
155+
struct IAttachedInfo :
156+
public IInterface
157+
{
158+
enum AttachedType
159+
{
160+
eAttachedIsolated = 0,
161+
eAttachedNotIsolated,
162+
};
163+
virtual const AttachedType ADDIN_API GetAttachedInfo() = 0;
164+
};
165+
#endif //__ADAPTER_DEF_H__

0 commit comments

Comments
 (0)